This is an automated email from the ASF dual-hosted git repository.
tlopex pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tvm.git
The following commit(s) were added to refs/heads/main by this push:
new bda2ec7095 Fixing database bug (#18409)
bda2ec7095 is described below
commit bda2ec7095a174993a710e1035c3f94a89cd6f40
Author: Thais Camacho <[email protected]>
AuthorDate: Thu Oct 30 19:46:31 2025 -0300
Fixing database bug (#18409)
* Fixing database bug
* Fix lit gemini error
---
include/tvm/meta_schedule/database.h | 1 +
src/relax/transform/meta_schedule.cc | 1 +
2 files changed, 2 insertions(+)
diff --git a/include/tvm/meta_schedule/database.h
b/include/tvm/meta_schedule/database.h
index ebd945482f..6f6b8bfca8 100644
--- a/include/tvm/meta_schedule/database.h
+++ b/include/tvm/meta_schedule/database.h
@@ -31,6 +31,7 @@
#include <tvm/tir/schedule/schedule.h>
#include <tvm/tir/schedule/trace.h>
+#include <filesystem>
#include <memory>
namespace tvm {
diff --git a/src/relax/transform/meta_schedule.cc
b/src/relax/transform/meta_schedule.cc
index 023e8cdab3..dd5b932674 100644
--- a/src/relax/transform/meta_schedule.cc
+++ b/src/relax/transform/meta_schedule.cc
@@ -86,6 +86,7 @@ Pass MetaScheduleApplyDatabase(ffi::Optional<ffi::String>
work_dir, bool enable_
database = Database::Current().value();
} else {
ICHECK(work_dir.has_value());
+ std::filesystem::create_directories(work_dir.value().c_str());
ffi::String path_workload = work_dir.value() + "/database_workload.json";
ffi::String path_tuning_record = work_dir.value() +
"/database_tuning_record.json";
LOG(WARNING) << "Creating JSONDatabase. Workload at: " << path_workload