|
tvm
|
Classes | |
| class | BindingBlockFrame |
| class | BindingBlockFrameObj |
| The ir_builder frame for relax binding blocks. More... | |
| class | ElseFrame |
| Managed reference to ElseFrameObj. More... | |
| class | ElseFrameObj |
| A frame that represents else. More... | |
| class | FunctionFrame |
| class | FunctionFrameObj |
| The ir_builder frame for the relax function. More... | |
| class | IfFrame |
| Managed reference to IfFrameObj. More... | |
| class | IfFrameObj |
| A frame that represents if statement. More... | |
| class | RelaxFrame |
| class | RelaxFrameObj |
| The base ir_builder frame for the relax dialect. More... | |
| class | SeqExprFrame |
| class | SeqExprFrameObj |
| The base ir_builder frame for frames with SeqExpr i.e. Functions, IfExpr branches. More... | |
| class | ThenFrame |
| Managed reference to ThenFrameObj. More... | |
| class | ThenFrameObj |
| A frame that represents then. More... | |
Functions | |
| ffi::Optional< tvm::relax::VDevice > | LookupVDevice (ffi::String target_kind, int device_index) |
| Find a module virtual device by target kind and index. | |
| FunctionFrame | Function (bool is_pure, bool is_private) |
| Start a function frame. | |
| FunctionFrame | DeclFunction (bool is_pure, bool is_private, bool local) |
| Start a bodyless declaration using the normal signature operations. | |
| FunctionFrame | LocalFunction (bool is_pure, const tvm::Var &reference) |
| Define a local function under its cached declaration identity. | |
| tvm::Var | ArgVar (const ffi::String &name, const tvm::Var &var) |
| Add a cached parameter without changing its identity. | |
| tvm::Var | Arg (const ffi::String &name, const tvm::Type &ty) |
| Add a parameter to the last function frame. | |
| void | FuncName (const ffi::String &name) |
| Specify the name of the last function frame. | |
| void | FuncAttrs (ffi::Map< ffi::String, Any > attrs) |
| Specify the attrs of the last function frame. | |
| void | FuncRetType (const tvm::Type &ret_ty) |
| Specify the return type of the last function frame. | |
| void | FuncRetValue (const tvm::relax::Expr &value) |
| Specify the return value of the last function frame. | |
| BindingBlockFrame | BindingBlock () |
| Start a binding block frame. | |
| BindingBlockFrame | Dataflow () |
| Start a dataflow binding block frame. | |
| void | DataflowBlockOutput (const ffi::Array< tvm::Var > &vars) |
| Expose the dataflow block output variables as global ones. | |
| tvm::Var | Emit (const tvm::relax::Expr &value, const ffi::Optional< tvm::Type > &annotate_ty=std::nullopt) |
| Emit a binding to the last binding block frame. | |
| tvm::Var | EmitMatchCast (const tvm::relax::Expr &value, const tvm::Type &ty) |
| Emit a match_cast binding to the last binding block frame. | |
| tvm::Var | EmitVarBinding (const tvm::relax::VarBinding &binding) |
| Emit a binding to the last binding block frame. | |
| tvm::Var | EmitWithLoc (const tvm::relax::Expr &value, const ffi::Optional< tvm::Type > &annotate_ty, const Location &name_loc, const Location &loc=UnknownLoc()) |
| Emit a binding with separate statement and variable-name ranges. | |
| tvm::Var | EmitMatchCastWithLoc (const tvm::relax::Expr &value, const tvm::Type &ty, const Location &name_loc, const Location &loc=UnknownLoc()) |
| Emit a match cast with separate statement and variable-name ranges. | |
| IfFrame | If (tvm::relax::Expr condition) |
| Create an if statement. | |
| ThenFrame | Then () |
| Create a then. | |
| ElseFrame | Else () |
| Create an else. | |
Add a parameter to the last function frame.
| name | The name of the parameter. |
| ty | The ty of the parameter. |
Add a cached parameter without changing its identity.
| BindingBlockFrame tvm::script::ir_builder::relax::BindingBlock | ( | ) |
Start a binding block frame.
| BindingBlockFrame tvm::script::ir_builder::relax::Dataflow | ( | ) |
Start a dataflow binding block frame.
| void tvm::script::ir_builder::relax::DataflowBlockOutput | ( | const ffi::Array< tvm::Var > & | vars | ) |
Expose the dataflow block output variables as global ones.
| vars | The output variables of a dataflow block |
| FunctionFrame tvm::script::ir_builder::relax::DeclFunction | ( | bool | is_pure, |
| bool | is_private, | ||
| bool | local | ||
| ) |
Start a bodyless declaration using the normal signature operations.
| tvm::Var tvm::script::ir_builder::relax::Emit | ( | const tvm::relax::Expr & | value, |
| const ffi::Optional< tvm::Type > & | annotate_ty = std::nullopt |
||
| ) |
Emit a binding to the last binding block frame.
| value | The right side value of the bindings to be emitted. |
| annotate_ty | The optional type annotation for the emitted value. |
| tvm::Var tvm::script::ir_builder::relax::EmitMatchCast | ( | const tvm::relax::Expr & | value, |
| const tvm::Type & | ty | ||
| ) |
Emit a match_cast binding to the last binding block frame.
| value | The value of the MatchCast to be emitted. |
| ty | The type of the MatchCast to be emitted. |
| tvm::Var tvm::script::ir_builder::relax::EmitMatchCastWithLoc | ( | const tvm::relax::Expr & | value, |
| const tvm::Type & | ty, | ||
| const Location & | name_loc, | ||
| const Location & | loc = UnknownLoc() |
||
| ) |
Emit a match cast with separate statement and variable-name ranges.
| tvm::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. |
| tvm::Var tvm::script::ir_builder::relax::EmitWithLoc | ( | const tvm::relax::Expr & | value, |
| const ffi::Optional< tvm::Type > & | annotate_ty, | ||
| const Location & | name_loc, | ||
| const Location & | loc = UnknownLoc() |
||
| ) |
Emit a binding with separate statement and variable-name ranges.
| void tvm::script::ir_builder::relax::FuncAttrs | ( | ffi::Map< ffi::String, Any > | attrs | ) |
Specify the attrs of the last function frame.
| attrs | The function attrs. |
| void tvm::script::ir_builder::relax::FuncName | ( | const ffi::String & | name | ) |
Specify the name of the last function frame.
| name | The function name. |
| void tvm::script::ir_builder::relax::FuncRetType | ( | const tvm::Type & | ret_ty | ) |
Specify the return type of the last function frame.
| ret_ty | The return type. |
| 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 | ( | bool | is_pure, |
| 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. |
| FunctionFrame tvm::script::ir_builder::relax::LocalFunction | ( | bool | is_pure, |
| const tvm::Var & | reference | ||
| ) |
Define a local function under its cached declaration identity.
| ffi::Optional< tvm::relax::VDevice > tvm::script::ir_builder::relax::LookupVDevice | ( | ffi::String | target_kind, |
| int | device_index | ||
| ) |
Find a module virtual device by target kind and index.