19 #ifndef TVM_META_SCHEDULE_DATABASE_H_ 20 #define TVM_META_SCHEDULE_DATABASE_H_ 34 namespace meta_schedule {
47 v->Visit(
"mod", &mod);
51 static constexpr
const char*
_type_key =
"meta_schedule.Workload";
119 v->Visit(
"trace", &trace);
120 v->Visit(
"workload", &workload);
121 v->Visit(
"run_secs", &run_secs);
122 v->Visit(
"target", &target);
123 v->Visit(
"args_info", &args_info);
126 static constexpr
const char*
_type_key =
"meta_schedule.TuningRecord";
163 TVM_DLL
static TuningRecord FromJSON(
const ObjectRef& json_obj,
const Workload& workload);
188 virtual void CommitTuningRecord(
const TuningRecord& record) = 0;
205 virtual int64_t Size() = 0;
207 static constexpr
const char*
_type_key =
"meta_schedule.Database";
275 ICHECK(f_has_workload !=
nullptr) <<
"PyDatabase's HasWorkload method not implemented!";
276 return f_has_workload(
mod);
280 ICHECK(f_commit_workload !=
nullptr) <<
"PyDatabase's CommitWorkload method not implemented!";
281 return f_commit_workload(
mod);
285 ICHECK(f_commit_tuning_record !=
nullptr)
286 <<
"PyDatabase's CommitTuningRecord method not implemented!";
287 f_commit_tuning_record(record);
291 ICHECK(f_get_top_k !=
nullptr) <<
"PyDatabase's GetTopK method not implemented!";
292 return f_get_top_k(workload, top_k);
296 ICHECK(f_get_all_tuning_records !=
nullptr)
297 <<
"PyDatabase's GetAllTuningRecords method not implemented!";
298 return f_get_all_tuning_records();
302 ICHECK(f_size !=
nullptr) <<
"PyDatabase's Size method not implemented!";
306 static constexpr
const char*
_type_key =
"meta_schedule.PyDatabase";
346 #endif // TVM_META_SCHEDULE_DATABASE_H_
#define TVM_DEFINE_MUTABLE_NOTNULLABLE_OBJECT_REF_METHODS(TypeName, ParentType, ObjectName)
Definition: object.h:758
Runtime String container types.
IRModule that holds the functions and type definitions.
runtime implementation for LibTorch/TorchScript.
Definition: analyzer.h:36
base class of all object containers.
Definition: object.h:167
Content-aware structural equality comparator for objects.
Definition: structural_equal.h:81
Runtime Array container types.
Visitor class to get the attributes of an AST/IR node. The content is going to be called for each fie...
Definition: reflection.h:52
Array, container representing a contiguous sequence of ObjectRefs.
Definition: array.h:270
Reference to string objects.
Definition: string.h:124
Base class of all object reference.
Definition: object.h:511
A managed object in the TVM runtime.
Managed reference class to IRModuleNode.
Definition: module.h:360
Compilation target object.
Managed reference to TraceNode.
Definition: trace.h:141
Optional container that to represent to a Nullable variant of T.
Definition: optional.h:51
Reflection and serialization of compiler IR/AST nodes.
#define TVM_DECLARE_BASE_OBJECT_INFO(TypeName, ParentType)
helper macro to declare a base object type that can be inherited.
Definition: object.h:648
#define TVM_DEFINE_NOTNULLABLE_OBJECT_REF_METHODS(TypeName, ParentType, ObjectName)
Definition: object.h:728
Type-erased function used across TVM API.