|
tvm
|
Kind of an instruction, e.g. Split, Reorder, etc. Besides the name, every kind of instruction has its own properties, including: 1) A boolean indicating if the instruction is pure, i.e. change nothing in the schedule state 2) A functor that applies the instruction to a TensorIR schedule 3) A functor that converts the instruction to a statement in python syntax 4) A functor that serialize its attributes to JSON 5) A functor that deserialize its attributes from JSON. More...
#include <instruction.h>
Public Member Functions | |
| bool | IsPostproc () const |
| Checks if the instruction kind is EnterPostproc. | |
| TVM_FFI_DECLARE_OBJECT_INFO_FINAL ("s_tir.InstructionKind", InstructionKindNode, ffi::Object) | |
Static Public Member Functions | |
| static void | RegisterReflection () |
Public Attributes | |
| ffi::String | name |
| The name of a kind of instructions. | |
| bool | is_pure {false} |
Indicates if the instruction is pure, i.e. removing it alone doesn't mutate the schedule state. For example, the instruction GetSBlock is pure because it changes nothing, while ComputeInline is not because removing it leads to a different resulting schedule. | |
| FInstructionApply | f_apply_to_schedule {nullptr} |
| A functor that applies the instruction to a TensorIR schedule. | |
| FInstructionAsPython | f_as_python {nullptr} |
| A functor that converts the instruction to a statement in python syntax. | |
| FInstructionAttrsAsJSON | f_attrs_as_json {nullptr} |
| A functor that serialize its attributes to JSON. | |
| FInstructionAttrsFromJSON | f_attrs_from_json {nullptr} |
| A functor that deserialize its attributes from JSON. | |
Kind of an instruction, e.g. Split, Reorder, etc. Besides the name, every kind of instruction has its own properties, including: 1) A boolean indicating if the instruction is pure, i.e. change nothing in the schedule state 2) A functor that applies the instruction to a TensorIR schedule 3) A functor that converts the instruction to a statement in python syntax 4) A functor that serialize its attributes to JSON 5) A functor that deserialize its attributes from JSON.
Unlike tvm::OpNode, InstructionKindNode doesn't support unstructured properties, mainly because there is no such usecase yet to add any other property.
| bool tvm::s_tir::InstructionKindNode::IsPostproc | ( | ) | const |
Checks if the instruction kind is EnterPostproc.
| tvm::s_tir::InstructionKindNode::TVM_FFI_DECLARE_OBJECT_INFO_FINAL | ( | "s_tir.InstructionKind" | , |
| InstructionKindNode | , | ||
| ffi::Object | |||
| ) |
| FInstructionApply tvm::s_tir::InstructionKindNode::f_apply_to_schedule {nullptr} |
A functor that applies the instruction to a TensorIR schedule.
| FInstructionAsPython tvm::s_tir::InstructionKindNode::f_as_python {nullptr} |
A functor that converts the instruction to a statement in python syntax.
| FInstructionAttrsAsJSON tvm::s_tir::InstructionKindNode::f_attrs_as_json {nullptr} |
A functor that serialize its attributes to JSON.
| FInstructionAttrsFromJSON tvm::s_tir::InstructionKindNode::f_attrs_from_json {nullptr} |
A functor that deserialize its attributes from JSON.
Indicates if the instruction is pure, i.e. removing it alone doesn't mutate the schedule state. For example, the instruction GetSBlock is pure because it changes nothing, while ComputeInline is not because removing it leads to a different resulting schedule.
| ffi::String tvm::s_tir::InstructionKindNode::name |
The name of a kind of instructions.