Cost model.
More...
#include <cost_model.h>
|
| virtual | ~CostModelObj ()=default |
| | Virtual destructor.
|
| |
| virtual void | Load (const ffi::String &path)=0 |
| | Load the cost model from given file location.
|
| |
| virtual void | Save (const ffi::String &path)=0 |
| | Save the cost model to given file location.
|
| |
| virtual void | Update (const TuneContext &context, const ffi::Array< MeasureCandidate > &candidates, const ffi::Array< RunnerResult > &results)=0 |
| | Update the cost model given running results.
|
| |
| virtual std::vector< double > | Predict (const TuneContext &context, const ffi::Array< MeasureCandidate > &candidates)=0 |
| | Predict the normalized score (the larger the better) of given measure candidates.
|
| |
| | TVM_FFI_DECLARE_OBJECT_INFO ("s_tir.meta_schedule.CostModel", CostModelObj, ffi::Object) |
| |
◆ ~CostModelObj()
| virtual tvm::s_tir::meta_schedule::CostModelObj::~CostModelObj |
( |
| ) |
|
|
virtualdefault |
◆ Load()
| virtual void tvm::s_tir::meta_schedule::CostModelObj::Load |
( |
const ffi::String & |
path | ) |
|
|
pure virtual |
◆ Predict()
| virtual std::vector< double > tvm::s_tir::meta_schedule::CostModelObj::Predict |
( |
const TuneContext & |
context, |
|
|
const ffi::Array< MeasureCandidate > & |
candidates |
|
) |
| |
|
pure virtual |
Predict the normalized score (the larger the better) of given measure candidates.
- Parameters
-
| context | The tuning context. |
| candidates | The measure candidates. |
- Returns
- The predicted normalized score.
Implemented in tvm::s_tir::meta_schedule::PyCostModelObj.
◆ Save()
| virtual void tvm::s_tir::meta_schedule::CostModelObj::Save |
( |
const ffi::String & |
path | ) |
|
|
pure virtual |
◆ TVM_FFI_DECLARE_OBJECT_INFO()
| tvm::s_tir::meta_schedule::CostModelObj::TVM_FFI_DECLARE_OBJECT_INFO |
( |
"s_tir.meta_schedule.CostModel" |
, |
|
|
CostModelObj |
, |
|
|
ffi::Object |
|
|
) |
| |
◆ Update()
Update the cost model given running results.
- Parameters
-
| context | The tuning context. |
| candidates | The measure candidates. |
| results | The running results of the measure candidates. |
Implemented in tvm::s_tir::meta_schedule::PyCostModelObj.
◆ _type_mutable
| constexpr const bool tvm::s_tir::meta_schedule::CostModelObj::_type_mutable = true |
|
staticconstexpr |
The documentation for this class was generated from the following file: