|
void | tvm::auto_scheduler::UpdateStageToAxesMap (const te::Stage &stage, StageToAxesMap *stage_to_axes) |
| Update the current stage IterVar information to StageToAxesMap. More...
|
|
Step | tvm::auto_scheduler::StepReadFromRecord (dmlc::JSONReader *reader) |
| Read a step record from JSONReader and create the corresponding step. More...
|
|
void | tvm::auto_scheduler::StepApplyToState (const Step &step, State *state, const ComputeDAG &dag) |
| Apply a general step to a State with runtime dynamic dispatching. More...
|
|
void | tvm::auto_scheduler::StepApplyToSchedule (const Step &step, Array< te::Stage > *stages, StageToAxesMap *stage_to_axes, te::Schedule *schedule, const Array< Step > &transform_steps) |
| Apply a general step to tvm.schedule with runtime dynamic dispatching. More...
|
|
String | tvm::auto_scheduler::StepPrintAsPythonAPI (const Step &step, Array< te::Stage > *stages, StageToAxesMap *stage_to_axes, te::Schedule *schedule, const Array< Step > &transform_steps) |
| Print a general step as equivalent python schedule API with runtime dynamic dispatching. More...
|
|
Transformation steps. These steps are used to manipulate LoopState
. They are similar to the schedule primitives in te::Stage.
- Note
- How to add a new transform step: Take fuse step for example:
- Define class
FuseStepNode
, FuseStep
in transform_steps.h
, and implement its first construction function FuseStep::FuseStep()
in transform_steps.cc
.
- Implement
FuseStepNode::ApplyToSchedule()
and FuseStepNode::PrintAsPythonAPI()
.
- In these two functions you need to lower this step with tvm's te schedule API
- Implement
FuseStepNode::ApplyToState
and the state API State::fuse
.
- In these two functions you need to incrementally update all data structures in State with CopyOnWrite style.
- Add your step to
StepApplyToState
, StepApplyToSchedule
, and StepPrintAsPythonAPI
.
- Log record serialization support:
- Add
FuseStepNode::WriteToRecord
which takes a mutable JSONWriter pointer as input and output the record to it.
- Add another construction function that takes a mutable JSONReader as input, this will get a step record from the reader and create the step.
- Add the step implementation to
StepReadFromRecord
.
- Add its corresponding Python API to
loop_state.py
with necessary unit tests. The test should at lease cover two parts: the functional test and the record serialization test.