The search strategy for measure candidates generation.
More...
#include <search_strategy.h>
The search strategy for measure candidates generation.
- Note
- The relationship between SearchStrategy and other classes are as follows: ┌──────────────────────────────────────────────────────────────┐ ┌──┴───────────────────────────────────────────────────────────┐ │ ┌──┴────────────────── Tune Context ───────────────────────────┐ │ │ │ ┌─────────────────────┐ │ │ │ │ │ │ Generate │ │ │ │ │ Space Generator ├──────────────┐ │ │ │ │ │ │ │ │ │ │ │ └─────────────────────┘ ▼ │ │ │ │ Design Space │ │ │ │ ┌─────────────────────┐ │ │ │ │ │ Generate │ │ Pretuning │ │ │ │ │ ┌───────────┤ Search Strategy │◄─────────────┘ │ │ │ │ │ │ │ │ ├──┘ │ │ └─────────────────────┘ ├──┘ └────┼─────────────────────────────────────────────────────────┘ │ │ ┌────┼──────────────── Managed By Task Scheduler ─────────────────────┐ │ │ ┌───────────┐ │ │ │ Send to │ │ Send to │ │ ▼ ┌─────────────►│ Builder ├──────────┐ │ │ Measure Candidate │ Builder │ │ Runner │ │ │ │ │ └───────────┘ │ │ │ │ ┌────────────┴────────┐ │ │ │ │ │ │ ┌───────────┐ │ │ │ └────►│ Task Scheduler │ │ │ │ │ │ │ │ │ Runner │◄─────────┘ │ │ └─────────────────────┘ │ │ │ │ ▲ └─────┬─────┘ │ │ │ │ │ │ └─── Runner Future ◄────┘ │ └─────────────────────────────────────────────────────────────────────┘
◆ ~SearchStrategyNode()
virtual tvm::meta_schedule::SearchStrategyNode::~SearchStrategyNode |
( |
| ) |
|
|
virtualdefault |
◆ Clone()
virtual SearchStrategy tvm::meta_schedule::SearchStrategyNode::Clone |
( |
| ) |
const |
|
pure virtual |
◆ GenerateMeasureCandidates()
◆ InitializeWithTuneContext()
virtual void tvm::meta_schedule::SearchStrategyNode::InitializeWithTuneContext |
( |
const TuneContext & |
context | ) |
|
|
pure virtual |
Initialize the search strategy with tuning context.
- Parameters
-
context | The tuning context for initialization. |
- Note
- This method is supposed to be called only once before every other method.
Implemented in tvm::meta_schedule::PySearchStrategyNode.
◆ NotifyRunnerResults()
Update the search strategy with measurement results.
- Parameters
-
measure_candidates | The candidates to be measured. |
results | The measurement results from the runner. |
Implemented in tvm::meta_schedule::PySearchStrategyNode.
◆ PostTuning()
virtual void tvm::meta_schedule::SearchStrategyNode::PostTuning |
( |
| ) |
|
|
pure virtual |
Post-tuning for the search strategy.
- Note
- Post-tuning is supposed to be called after the tuning process and before we reset the search strategy with another pre-tuning. Post-tuning can be empty.
Implemented in tvm::meta_schedule::PySearchStrategyNode.
◆ PreTuning()
Pre-tuning for the search strategy.
- Parameters
-
max_trials | The maximum number of trials. |
num_trials_per_iter | The number of trials per iteration. |
design_spaces | The design spaces used during tuning process. |
database | The database used during tuning process. |
cost_model | The cost model used during tuning process. |
- Note
- Pre-tuning is supposed to be called before the tuning process and after the initialization. Because the search strategy is stateful, we can always call pretuning and reset the search strategy.
Implemented in tvm::meta_schedule::PySearchStrategyNode.
◆ TVM_DECLARE_BASE_OBJECT_INFO()
◆ _type_key
constexpr const char* tvm::meta_schedule::SearchStrategyNode::_type_key = "meta_schedule.SearchStrategy" |
|
staticconstexpr |
The documentation for this class was generated from the following file: