tvm
|
#include <database.h>
Public Member Functions | |
DatabaseNode (String mod_eq_name="structural") | |
Constructor. More... | |
virtual | ~DatabaseNode () |
Default destructor. More... | |
virtual bool | HasWorkload (const IRModule &mod)=0 |
Check if the database has the given workload. More... | |
virtual Workload | CommitWorkload (const IRModule &mod)=0 |
Look up or add workload to the database if missing. More... | |
virtual void | CommitTuningRecord (const TuningRecord &record)=0 |
Add a tuning record to the database. More... | |
virtual Array< TuningRecord > | GetTopK (const Workload &workload, int top_k)=0 |
Get the top K valid tuning records of given workload from the database. More... | |
virtual Array< TuningRecord > | GetAllTuningRecords ()=0 |
Get all tuning records from the database. More... | |
virtual int64_t | Size ()=0 |
Get the size of the database. More... | |
virtual Optional< TuningRecord > | QueryTuningRecord (const IRModule &mod, const Target &target, const String &workload_name) |
Query the best record of the given workload from the database. More... | |
virtual Optional< tir::Schedule > | QuerySchedule (const IRModule &mod, const Target &target, const String &workload_name) |
Query the best schedule of the given workload from the database. More... | |
virtual Optional< IRModule > | QueryIRModule (const IRModule &mod, const Target &target, const String &workload_name) |
Query the best IRModule of the given workload from the database. More... | |
void | DumpPruned (Database destination) |
Prune the database and dump it a given database. More... | |
const ModuleEquality & | GetModuleEquality () const |
Return a reference to the owned module equality method instance. More... | |
TVM_DECLARE_BASE_OBJECT_INFO (DatabaseNode, runtime::Object) | |
Static Public Attributes | |
static constexpr const char * | _type_key = "meta_schedule.Database" |
|
explicit |
Constructor.
mod_eq_name | A string to specify the module equality testing and hashing method. It must be one of the followings:
|
|
virtual |
Default destructor.
|
pure virtual |
Add a tuning record to the database.
record | The tuning record to be added. |
Implemented in tvm::meta_schedule::PyDatabaseNode.
|
pure virtual |
Look up or add workload to the database if missing.
mod | The IRModule to be searched for or added. |
Implemented in tvm::meta_schedule::PyDatabaseNode.
void tvm::meta_schedule::DatabaseNode::DumpPruned | ( | Database | destination | ) |
Prune the database and dump it a given database.
destination | The destination database to be dumped to. |
|
pure virtual |
Get all tuning records from the database.
Implemented in tvm::meta_schedule::PyDatabaseNode.
|
inline |
Return a reference to the owned module equality method instance.
|
pure virtual |
Get the top K valid tuning records of given workload from the database.
workload | The workload to be searched for. |
top_k | The number of top records to be returned. |
Implemented in tvm::meta_schedule::PyDatabaseNode.
|
pure virtual |
Check if the database has the given workload.
mod | The IRModule to be searched for. |
Implemented in tvm::meta_schedule::PyDatabaseNode.
|
virtual |
Query the best IRModule of the given workload from the database.
mod | The IRModule to be searched for. |
target | The target to be searched for. |
workload_name | The name of the workload to be searched for. |
Reimplemented in tvm::meta_schedule::PyDatabaseNode.
|
virtual |
Query the best schedule of the given workload from the database.
mod | The IRModule to be searched for. |
target | The target to be searched for. |
workload_name | The name of the workload to be searched for. |
Reimplemented in tvm::meta_schedule::PyDatabaseNode.
|
virtual |
Query the best record of the given workload from the database.
mod | The IRModule to be searched for. |
target | The target to be searched for. |
workload_name | The name of the workload to be searched for. |
Reimplemented in tvm::meta_schedule::PyDatabaseNode.
|
pure virtual |
Get the size of the database.
Implemented in tvm::meta_schedule::PyDatabaseNode.
tvm::meta_schedule::DatabaseNode::TVM_DECLARE_BASE_OBJECT_INFO | ( | DatabaseNode | , |
runtime::Object | |||
) |
|
staticconstexpr |