tvm
|
Classes | |
class | RelaxFrameNode |
The base ir_builder frame for the relax dialect. More... | |
class | RelaxFrame |
class | SeqExprFrameNode |
The base ir_builder frame for frames with SeqExpr i.e. Functions, If branches. More... | |
class | SeqExprFrame |
class | FunctionFrameNode |
The ir_builder frame for the relax function. More... | |
class | FunctionFrame |
class | BlockFrameNode |
The ir_builder frame for relax binding blocks. More... | |
class | BlockFrame |
class | IfFrameNode |
A frame that represents if statement. More... | |
class | IfFrame |
Managed reference to IfFrameNode. More... | |
class | ThenFrameNode |
A frame that represents then. More... | |
class | ThenFrame |
Managed reference to ThenFrameNode. More... | |
class | ElseFrameNode |
A frame that represents else. More... | |
class | ElseFrame |
Managed reference to ElseFrameNode. More... | |
Functions | |
FunctionFrame | Function (const Bool &is_pure, const Bool &is_private) |
Start a function frame. More... | |
tvm::relax::Var | Arg (const String &name, const tvm::relax::StructInfo &struct_info) |
Add a parameter to the last function frame. More... | |
void | FuncName (const String &name) |
Specify the name of the last function frame. More... | |
void | FuncAttrs (Map< String, ObjectRef > attrs) |
Specify the attrs of the last function frame. More... | |
void | FuncRetStructInfo (const tvm::relax::StructInfo &ret_sinfo) |
Specify the return struct info of the last function frame. More... | |
void | FuncRetValue (const tvm::relax::Expr &value) |
Specify the return value of the last function frame. More... | |
BlockFrame | BindingBlock () |
Start a binding block frame. More... | |
BlockFrame | Dataflow () |
Start a dataflow binding block frame. More... | |
void | DataflowBlockOutput (const Array< tvm::relax::Var > &vars) |
Expose the dataflow block output variables as global ones. More... | |
tvm::relax::Var | Emit (const tvm::relax::Expr &value, const Optional< tvm::relax::StructInfo > &annotate_struct_info=NullOpt) |
Emit a binding to the last binding block frame. More... | |
tvm::relax::Var | EmitMatchCast (const tvm::relax::Expr &value, const tvm::relax::StructInfo &struct_info) |
Emit a match_cast binding to the last binding block frame. More... | |
tvm::relax::Var | EmitVarBinding (const tvm::relax::VarBinding &binding) |
Emit a binding to the last binding block frame. More... | |
IfFrame | If (tvm::relax::Expr condition) |
Create an if statement. More... | |
ThenFrame | Then () |
Create a then. More... | |
ElseFrame | Else () |
Create an else. More... | |
tvm::relax::Var tvm::script::ir_builder::relax::Arg | ( | const String & | name, |
const tvm::relax::StructInfo & | struct_info | ||
) |
Add a parameter to the last function frame.
name | The name of the parameter. |
struct_info | The struct_info of the parameter. |
BlockFrame tvm::script::ir_builder::relax::BindingBlock | ( | ) |
Start a binding block frame.
BlockFrame tvm::script::ir_builder::relax::Dataflow | ( | ) |
Start a dataflow binding block frame.
void tvm::script::ir_builder::relax::DataflowBlockOutput | ( | const Array< tvm::relax::Var > & | vars | ) |
Expose the dataflow block output variables as global ones.
vars | The output variables of a dataflow block |
tvm::relax::Var tvm::script::ir_builder::relax::Emit | ( | const tvm::relax::Expr & | value, |
const Optional< tvm::relax::StructInfo > & | annotate_struct_info = NullOpt |
||
) |
Emit a binding to the last binding block frame.
value | The right side value of the bindings to be emitted. |
annotate_struct_info | The optional struct info annotation for the emitted value. |
tvm::relax::Var tvm::script::ir_builder::relax::EmitMatchCast | ( | const tvm::relax::Expr & | value, |
const tvm::relax::StructInfo & | struct_info | ||
) |
Emit a match_cast binding to the last binding block frame.
value | The value of the MatchCast to be emitted. |
struct_info | The struct info of the MatchCast to be emitted. |
tvm::relax::Var tvm::script::ir_builder::relax::EmitVarBinding | ( | const tvm::relax::VarBinding & | binding | ) |
Emit a binding to the last binding block frame.
binding | The binding to be emitted. |
Specify the attrs of the last function frame.
attrs | The function attrs. |
void tvm::script::ir_builder::relax::FuncName | ( | const String & | name | ) |
Specify the name of the last function frame.
name | The function name. |
void tvm::script::ir_builder::relax::FuncRetStructInfo | ( | const tvm::relax::StructInfo & | ret_sinfo | ) |
Specify the return struct info of the last function frame.
ret_sinfo | The return struct info. |
void tvm::script::ir_builder::relax::FuncRetValue | ( | const tvm::relax::Expr & | value | ) |
Specify the return value of the last function frame.
value | The return value. |
FunctionFrame tvm::script::ir_builder::relax::Function | ( | const Bool & | is_pure, |
const Bool & | is_private | ||
) |
Start a function frame.
is_pure | Whether the function is annotated as pure. |
is_private | Whether the function is annotated as private. |
IfFrame tvm::script::ir_builder::relax::If | ( | tvm::relax::Expr | condition | ) |
Create an if statement.
condition | The condition of if statement. |