|
tvm
|
The cost model with customized methods on the python-side. More...
#include <cost_model.h>
Public Types | |
| using | FLoad = ffi::TypedFunction< void(ffi::String)> |
| Load the cost model from given file location. More... | |
| using | FSave = ffi::TypedFunction< void(ffi::String)> |
| Save the cost model to given file location. More... | |
| using | FUpdate = ffi::TypedFunction< void(const TuneContext &, const ffi::Array< MeasureCandidate > &, const ffi::Array< RunnerResult > &)> |
| Update the cost model given running results. More... | |
| using | FPredict = ffi::TypedFunction< void(const TuneContext &, const ffi::Array< MeasureCandidate > &, void *p_addr)> |
| Predict the running results of given measure candidates. More... | |
| using | FAsString = ffi::TypedFunction< ffi::String()> |
| Get the cost model as string with name. More... | |
Public Member Functions | |
| void | Load (const ffi::String &path) |
| Load the cost model from given file location. More... | |
| void | Save (const ffi::String &path) |
| Save the cost model to given file location. More... | |
| void | Update (const TuneContext &context, const ffi::Array< MeasureCandidate > &candidates, const ffi::Array< RunnerResult > &results) |
| Update the cost model given running results. More... | |
| std::vector< double > | Predict (const TuneContext &context, const ffi::Array< MeasureCandidate > &candidates) |
| Predict the normalized score (the larger the better) of given measure candidates. More... | |
| TVM_FFI_DECLARE_OBJECT_INFO_FINAL ("meta_schedule.PyCostModel", PyCostModelNode, CostModelNode) | |
Public Member Functions inherited from tvm::meta_schedule::CostModelNode | |
| virtual | ~CostModelNode ()=default |
| Virtual destructor. More... | |
| TVM_FFI_DECLARE_OBJECT_INFO ("meta_schedule.CostModel", CostModelNode, Object) | |
Public Attributes | |
| FLoad | f_load |
The packed function to the Load function. More... | |
| FSave | f_save |
The packed function to the Save function. More... | |
| FUpdate | f_update |
The packed function to the Update function. More... | |
| FPredict | f_predict |
The packed function to the Predict function. More... | |
| FAsString | f_as_string |
The packed function to the AsString function. More... | |
Additional Inherited Members | |
Static Public Attributes inherited from tvm::meta_schedule::CostModelNode | |
| static constexpr const bool | _type_mutable = true |
The cost model with customized methods on the python-side.
| using tvm::meta_schedule::PyCostModelNode::FAsString = ffi::TypedFunction<ffi::String()> |
Get the cost model as string with name.
| using tvm::meta_schedule::PyCostModelNode::FLoad = ffi::TypedFunction<void(ffi::String)> |
Load the cost model from given file location.
| path | The file path. |
| using tvm::meta_schedule::PyCostModelNode::FPredict = ffi::TypedFunction<void(const TuneContext&, const ffi::Array<MeasureCandidate>&, void* p_addr)> |
Predict the running results of given measure candidates.
| context | The tuning context. |
| candidates | The measure candidates. |
| p_addr | The address to save the estimated running results. |
| using tvm::meta_schedule::PyCostModelNode::FSave = ffi::TypedFunction<void(ffi::String)> |
Save the cost model to given file location.
| path | The file path. |
| using tvm::meta_schedule::PyCostModelNode::FUpdate = ffi::TypedFunction<void(const TuneContext&, const ffi::Array<MeasureCandidate>&, const ffi::Array<RunnerResult>&)> |
Update the cost model given running results.
| context | The tuning context. |
| candidates | The measure candidates. |
| results | The running results of the measure candidates. |
|
virtual |
Load the cost model from given file location.
| path | The file path. |
Implements tvm::meta_schedule::CostModelNode.
|
virtual |
Predict the normalized score (the larger the better) of given measure candidates.
| context | The tuning context. |
| candidates | The measure candidates. |
Implements tvm::meta_schedule::CostModelNode.
|
virtual |
Save the cost model to given file location.
| path | The file path. |
Implements tvm::meta_schedule::CostModelNode.
| tvm::meta_schedule::PyCostModelNode::TVM_FFI_DECLARE_OBJECT_INFO_FINAL | ( | "meta_schedule.PyCostModel" | , |
| PyCostModelNode | , | ||
| CostModelNode | |||
| ) |
|
virtual |
Update the cost model given running results.
| context | The tuning context. |
| candidates | The measure candidates. |
| results | The running results of the measure candidates. |
Implements tvm::meta_schedule::CostModelNode.
| FAsString tvm::meta_schedule::PyCostModelNode::f_as_string |
The packed function to the AsString function.
| FLoad tvm::meta_schedule::PyCostModelNode::f_load |
The packed function to the Load function.
| FPredict tvm::meta_schedule::PyCostModelNode::f_predict |
The packed function to the Predict function.
| FSave tvm::meta_schedule::PyCostModelNode::f_save |
The packed function to the Save function.
| FUpdate tvm::meta_schedule::PyCostModelNode::f_update |
The packed function to the Update function.