thaisacs opened a new pull request, #18409:
URL: https://github.com/apache/tvm/pull/18409

   Before this PR, when I tried to tune a model whose pipeline had 0 trials and 
the database directory didn't exist yet, I would get the following error:
   
   [14:04:12] /home/thais/Dev/tvm/src/relax/transform/meta_schedule.cc:91: 
Warning: Creating JSONDatabase. Workload at: 
./tuning_logs_alexnet/database_workload.json, Tuning records at: 
./tuning_logs_alexnet/database_tuning_record.json
   Traceback (most recent call last):
     File "/home/thais/Dev/TVM-MetaSchedule-Bench/model-tune.py", line 108, in 
<module>
       tune_model(network_arg, args.dtype, TOTAL_TRIALS, target, work_dir)
     File "/home/thais/Dev/TVM-MetaSchedule-Bench/model-tune.py", line 31, in 
tune_model
       mod = relax.get_pipeline(
     File "/home/thais/Dev/tvm/python/tvm/ir/transform.py", line 167, in 
__call__
       return _ffi_transform_api.RunPass(self, mod)
     File "python/tvm_ffi/cython/function.pxi", line 758, in 
core.Function.__call__
     File "<unknown>", line 0, in 
tvm::transform::Pass::operator()(tvm::IRModule) const
     File "<unknown>", line 0, in 
tvm::transform::Pass::operator()(tvm::IRModule, tvm::transform::PassContext 
const&) const
     File "<unknown>", line 0, in 
tvm::transform::ModulePassNode::operator()(tvm::IRModule, 
tvm::transform::PassContext const&) const
     File "<unknown>", line 0, in std::_Function_handler<tvm::IRModule 
(tvm::IRModule, tvm::transform::PassContext), 
tvm::transform::__TVMFFIStaticInitFunc4()::{lambda(tvm::ffi::TypedFunction<tvm::IRModule
 (tvm::ffi::RValueRef<tvm::IRModule, void>, tvm::transform::PassContext)>, 
tvm::transform::PassInfo)#1}::operator()(tvm::ffi::TypedFunction<tvm::IRModule 
(tvm::ffi::RValueRef<tvm::IRModule, void>, tvm::transform::PassContext)>, 
tvm::transform::PassInfo) const::{lambda(tvm::IRModule, 
tvm::transform::PassContext)#1}>::_M_invoke(std::_Any_data const&, 
tvm::IRModule&&, tvm::transform::PassContext&&)
     File "<unknown>", line 0, in 
tvm::transform::__TVMFFIStaticInitFunc4()::{lambda(tvm::ffi::TypedFunction<tvm::IRModule
 (tvm::ffi::RValueRef<tvm::IRModule, void>, tvm::transform::PassContext)>, 
tvm::transform::PassInfo)#1}::operator()(tvm::ffi::TypedFunction<tvm::IRModule 
(tvm::ffi::RValueRef<tvm::IRModule, void>, tvm::transform::PassContext)>, 
tvm::transform::PassInfo) const::{lambda(tvm::IRModule, 
tvm::transform::PassContext)#1}::operator()(tvm::IRModule, 
tvm::transform::PassContext) const
     File "python/tvm_ffi/cython/function.pxi", line 914, in 
core.tvm_ffi_callback
     File "/home/thais/Dev/tvm/python/tvm/relax/pipeline.py", line 172, in 
_pipeline
       mod = tvm.transform.Sequential(
     File "/home/thais/Dev/tvm/python/tvm/ir/transform.py", line 167, in 
__call__
       return _ffi_transform_api.RunPass(self, mod)
     File "python/tvm_ffi/cython/function.pxi", line 758, in 
core.Function.__call__
     File "<unknown>", line 0, in 
tvm::transform::Pass::operator()(tvm::IRModule) const
     File "<unknown>", line 0, in 
tvm::transform::Pass::operator()(tvm::IRModule, tvm::transform::PassContext 
const&) const
     File "<unknown>", line 0, in 
tvm::transform::SequentialNode::operator()(tvm::IRModule, 
tvm::transform::PassContext const&) const
     File "<unknown>", line 0, in 
tvm::transform::Pass::operator()(tvm::IRModule, tvm::transform::PassContext 
const&) const
     File "<unknown>", line 0, in 
tvm::transform::ModulePassNode::operator()(tvm::IRModule, 
tvm::transform::PassContext const&) const
     File "<unknown>", line 0, in std::_Function_handler<tvm::IRModule 
(tvm::IRModule, tvm::transform::PassContext), 
tvm::relax::transform::MetaScheduleApplyDatabase(tvm::ffi::Optional<tvm::ffi::String,
 void>, bool)::{lambda(tvm::IRModule, 
tvm::transform::PassContext)#1}>::_M_invoke(std::_Any_data const&, 
tvm::IRModule&&, tvm::transform::PassContext&&)
     File "<unknown>", line 0, in 
tvm::relax::transform::MetaScheduleApplyDatabase(tvm::ffi::Optional<tvm::ffi::String,
 void>, bool)::{lambda(tvm::IRModule, 
tvm::transform::PassContext)#1}::operator()(tvm::IRModule, 
tvm::transform::PassContext) const [clone .constprop.0]
     File "<unknown>", line 0, in 
tvm::meta_schedule::Database::JSONDatabase(tvm::ffi::String, tvm::ffi::String, 
bool, tvm::ffi::String)
     File "<unknown>", line 0, in 
tvm::meta_schedule::JSONFileReadLines(tvm::ffi::String const&, int, bool)
     File "<unknown>", line 0, in tvm::runtime::detail::LogFatal::~LogFatal() 
[clone .constprop.0]
     File "<unknown>", line 0, in 
tvm::runtime::detail::LogFatal::Entry::Finalize()
   ValueError: Check failed: (os.good()) is false: Cannot create new file: 
./tuning_logs_alexnet/database_workload.json


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to