tvm
Loading...
Searching...
No Matches
Public Member Functions | List of all members
tvm::s_tir::InstructionKindDef Class Reference

Temporary builder for a canonical named instruction kind. More...

#include <instruction.h>

Collaboration diagram for tvm::s_tir::InstructionKindDef:

Public Member Functions

 InstructionKindDef (const ffi::String &name)
 Find or create the canonical kind and assign its name.
 
InstructionKindDef & set_is_pure (bool is_pure)
 Set whether removing this instruction leaves schedule state unchanged.
 
InstructionKindDef & set_apply_to_schedule (FInstructionApply f_apply_to_schedule)
 Set the schedule application callback.
 
InstructionKindDef & set_as_python (FInstructionAsPython f_as_python)
 Set the Python trace formatting callback.
 
InstructionKindDef & set_attrs_as_json (FInstructionAttrsAsJSON f_attrs_as_json)
 Set the optional JSON serialization callback.
 
InstructionKindDef & set_attrs_from_json (FInstructionAttrsFromJSON f_attrs_from_json)
 Set the optional JSON deserialization callback.
 

Detailed Description

Temporary builder for a canonical named instruction kind.

Constructor & Destructor Documentation

◆ InstructionKindDef()

tvm::s_tir::InstructionKindDef::InstructionKindDef ( const ffi::String &  name)
explicit

Find or create the canonical kind and assign its name.

Parameters
nameThe instruction kind name.

Member Function Documentation

◆ set_apply_to_schedule()

InstructionKindDef & tvm::s_tir::InstructionKindDef::set_apply_to_schedule ( FInstructionApply  f_apply_to_schedule)
inline

Set the schedule application callback.

Parameters
f_apply_to_scheduleCallback that applies the instruction.
Returns
This builder for chaining.

◆ set_as_python()

InstructionKindDef & tvm::s_tir::InstructionKindDef::set_as_python ( FInstructionAsPython  f_as_python)
inline

Set the Python trace formatting callback.

Parameters
f_as_pythonCallback that formats an instruction.
Returns
This builder for chaining.

◆ set_attrs_as_json()

InstructionKindDef & tvm::s_tir::InstructionKindDef::set_attrs_as_json ( FInstructionAttrsAsJSON  f_attrs_as_json)
inline

Set the optional JSON serialization callback.

Parameters
f_attrs_as_jsonCallback, or null when conversion is unnecessary.
Returns
This builder for chaining.

◆ set_attrs_from_json()

InstructionKindDef & tvm::s_tir::InstructionKindDef::set_attrs_from_json ( FInstructionAttrsFromJSON  f_attrs_from_json)
inline

Set the optional JSON deserialization callback.

Parameters
f_attrs_from_jsonCallback, or null when conversion is unnecessary.
Returns
This builder for chaining.

◆ set_is_pure()

InstructionKindDef & tvm::s_tir::InstructionKindDef::set_is_pure ( bool  is_pure)
inline

Set whether removing this instruction leaves schedule state unchanged.

Parameters
is_pureWhether the instruction is pure.
Returns
This builder for chaining.

The documentation for this class was generated from the following file: