tvm
|
The task scheduler with customized methods on the python-side. More...
#include <task_scheduler.h>
Public Types | |
using | FNextTaskId = ffi::TypedFunction< int()> |
The function type of NextTaskId method. More... | |
using | FJoinRunningTask = ffi::TypedFunction< Array< RunnerResult >(int)> |
The function type of JoinRunningTask method. More... | |
using | FTune = ffi::TypedFunction< void(Array< TuneContext > tasks, Array< FloatImm > task_weights, int max_trials_global, int max_trials_per_task, int num_trials_per_iter, Builder builder, Runner runner, Array< MeasureCallback > measure_callbacks, Optional< Database > database, Optional< CostModel > cost_model)> |
The function type of Tune method. More... | |
Public Member Functions | |
int | NextTaskId () final |
Fetch the next task id. More... | |
Array< RunnerResult > | JoinRunningTask (int task_id) final |
Wait until the task is finished. More... | |
void | Tune (Array< TuneContext > tasks, Array< FloatImm > task_weights, int max_trials_global, int max_trials_per_task, int num_trials_per_iter, Builder builder, Runner runner, Array< MeasureCallback > measure_callbacks, Optional< Database > database, Optional< CostModel > cost_model) final |
Jointly tune a given list of tasks. More... | |
TVM_DECLARE_FINAL_OBJECT_INFO (PyTaskSchedulerNode, TaskSchedulerNode) | |
![]() | |
virtual | ~TaskSchedulerNode ()=default |
The default destructor. More... | |
void | TerminateTask (int task_id) |
Terminate a task. More... | |
void | TouchTask (int task_id) |
Touch the task and update its status. More... | |
void | PrintTuningStatistics () |
Print out a human-readable format of the tuning statistics. More... | |
TVM_DECLARE_BASE_OBJECT_INFO (TaskSchedulerNode, Object) | |
Static Public Member Functions | |
static void | RegisterReflection () |
![]() | |
static void | RegisterReflection () |
Public Attributes | |
FNextTaskId | f_next_task_id |
The packed function to the NextTaskId function. More... | |
FJoinRunningTask | f_join_running_task |
The packed function to the JoinRunningTask function. More... | |
FTune | f_tune |
The packed function to the Tune function. More... | |
![]() | |
ffi::Function | logger |
The tuning task's logging function. More... | |
Array< TaskRecord > | tasks_ |
Records for each task. More... | |
Array< MeasureCallback > | measure_callbacks_ |
The list of measure callbacks of the scheduler. More... | |
Optional< Database > | database_ |
The database used in tuning. More... | |
Optional< CostModel > | cost_model_ |
The cost model used in tuning. More... | |
int | remaining_tasks_ |
The number of remaining tasks to be tuned. More... | |
Static Public Attributes | |
static constexpr const char * | _type_key = "meta_schedule.PyTaskScheduler" |
![]() | |
static constexpr const char * | _type_key = "meta_schedule.TaskScheduler" |
The task scheduler with customized methods on the python-side.
using tvm::meta_schedule::PyTaskSchedulerNode::FJoinRunningTask = ffi::TypedFunction<Array<RunnerResult>(int)> |
The function type of JoinRunningTask
method.
task_id | The task id to be joined. |
using tvm::meta_schedule::PyTaskSchedulerNode::FNextTaskId = ffi::TypedFunction<int()> |
The function type of NextTaskId
method.
using tvm::meta_schedule::PyTaskSchedulerNode::FTune = ffi::TypedFunction<void(Array<TuneContext> tasks, Array<FloatImm> task_weights, int max_trials_global, int max_trials_per_task, int num_trials_per_iter, Builder builder, Runner runner, Array<MeasureCallback> measure_callbacks, Optional<Database> database, Optional<CostModel> cost_model)> |
The function type of Tune
method.
|
finalvirtual |
Wait until the task is finished.
task_id | The task id to be joined. |
Reimplemented from tvm::meta_schedule::TaskSchedulerNode.
|
finalvirtual |
|
inlinestatic |
|
finalvirtual |
Jointly tune a given list of tasks.
tasks | The tasks to be tuned |
task_weights | The weight of each task |
max_trials_global | The maximum number of trials to be performed globally |
max_trials_per_task | The maximum number of trials to be performed for each task |
num_trials_per_iter | The number of trials to be performed in each iteration |
builder | The MetaSchedule builder |
runner | The MetaSchedule runner |
measure_callbacks | The callbacks to be called after each measurement |
database | The database used in tuning |
cost_model | The cost model used in tuning |
Reimplemented from tvm::meta_schedule::TaskSchedulerNode.
tvm::meta_schedule::PyTaskSchedulerNode::TVM_DECLARE_FINAL_OBJECT_INFO | ( | PyTaskSchedulerNode | , |
TaskSchedulerNode | |||
) |
|
staticconstexpr |
FJoinRunningTask tvm::meta_schedule::PyTaskSchedulerNode::f_join_running_task |
The packed function to the JoinRunningTask
function.
FNextTaskId tvm::meta_schedule::PyTaskSchedulerNode::f_next_task_id |
The packed function to the NextTaskId
function.
FTune tvm::meta_schedule::PyTaskSchedulerNode::f_tune |
The packed function to the Tune
function.