|
tvm
|
Classes | |
| class | AssertFrame |
| Managed reference to AssertFrameObj. More... | |
| class | AssertFrameObj |
| A frame that represents the assert statement. Proceeds if the condition is true, otherwise aborts with the message. More... | |
| class | ElseFrame |
| Managed reference to ElseFrameObj. More... | |
| class | ElseFrameObj |
| A frame that represents else. More... | |
| class | ForFrame |
| Managed reference to ForFrameObj. More... | |
| class | ForFrameObj |
| A frame that represents the for loop. More... | |
| class | IfFrame |
| Managed reference to IfFrameObj. More... | |
| class | IfFrameObj |
| A frame that represents if statement. More... | |
| class | IRModuleFrame |
| Managed reference to IRModuleFrameObj. More... | |
| class | IRModuleFrameObj |
| A frame that represents the IRModule frame with functions and global variables. More... | |
| class | RegionFrame |
| Managed reference to RegionFrameObj. More... | |
| class | RegionFrameObj |
| A result-free region with lexical body parameters. More... | |
| class | StmtFrame |
| Managed reference to StmtFrameObj. More... | |
| class | StmtFrameObj |
| A shared frame containing a sequence of core IR statements. More... | |
| class | ThenFrame |
| Managed reference to ThenFrameObj. More... | |
| class | ThenFrameObj |
| A frame that represents then. More... | |
| class | WhileFrame |
| Managed reference to WhileFrameObj. More... | |
| class | WhileFrameObj |
| A frame that represents while loop. More... | |
Functions | |
| TVM_TIRX_DLL IRModuleFrame | IRModule () |
| The IRModule declaration statement. | |
| TVM_TIRX_DLL GlobalVar | DeclFunction (const ffi::String &func_name, const BaseFunc &func_signature) |
| Declare a Function without given the specific function implementation. | |
| TVM_TIRX_DLL void | DefFunction (const ffi::String &func_name, const BaseFunc &func) |
| Define the function which is declared before. | |
| ForFrame | For (ForKind kind, PrimExpr start, PrimExpr stop, ffi::Optional< PrimExpr > step=std::nullopt, ffi::Optional< PrimType > dtype=std::nullopt, ffi::Optional< ffi::Map< ffi::String, Any > > annotations=std::nullopt) |
| Construct a For statement of the given kind. | |
| ForFrame | Grid (ffi::Array< ffi::Variant< PrimExpr, ffi::Tuple< PrimExpr, PrimExpr > > > extents, ffi::Optional< PrimType > dtype=std::nullopt) |
| The grid For statement. | |
| AssertFrame | Assert (PrimExpr condition, ffi::String error_kind, ffi::Array< ffi::String > message_parts) |
| The assertion statement. | |
| Var | Bind (Expr value, ffi::Optional< Type > type_annotation=std::nullopt, ffi::Optional< Var > var=std::nullopt) |
| Create a Bind (variable binding). | |
| WhileFrame | While (PrimExpr condition) |
| Create a while loop. | |
| tvm::Stmt | Return (Expr value) |
| Create a return statement. | |
| tvm::Stmt | Break () |
| Create a break statement. | |
| tvm::Stmt | Continue () |
| Create a continue statement. | |
| IfFrame | If (PrimExpr condition) |
| Create an if statement. | |
| ThenFrame | Then () |
| Create a then. | |
| ElseFrame | Else () |
| Create an else. | |
| RegionFrame | Region (Op op, ffi::Array< Expr > args, ffi::Optional< ffi::Array< Var > > body_params=std::nullopt, DictAttrs attrs=DictAttrs()) |
| Construct a result-free region with lexical body parameters. | |
| tvm::Stmt | Evaluate (Expr value) |
| Evaluate the input expression. | |
| AssertFrame tvm::script::ir_builder::ir::Assert | ( | PrimExpr | condition, |
| ffi::String | error_kind, | ||
| ffi::Array< ffi::String > | message_parts | ||
| ) |
The assertion statement.
| condition | The assertion condition. |
| error_kind | The error kind (e.g. "RuntimeError", "TypeError", "ValueError"). |
| message_parts | The error message parts (stored as separate fragments in the IR). |
| Var tvm::script::ir_builder::ir::Bind | ( | Expr | value, |
| ffi::Optional< Type > | type_annotation = std::nullopt, |
||
| ffi::Optional< Var > | var = std::nullopt |
||
| ) |
Create a Bind (variable binding).
Emits a flat Bind statement to the current frame and returns the bound variable.
| value | The value to be bound. |
| type_annotation | The type annotation of the binding. Usually it is used for fine-grained var typing, particularly, PtrType. |
| var | The variable to be bound. If not specified, a new variable will be created. |
| tvm::Stmt tvm::script::ir_builder::ir::Break | ( | ) |
Create a break statement.
| tvm::Stmt tvm::script::ir_builder::ir::Continue | ( | ) |
Create a continue statement.
| TVM_TIRX_DLL GlobalVar tvm::script::ir_builder::ir::DeclFunction | ( | const ffi::String & | func_name, |
| const BaseFunc & | func_signature | ||
| ) |
Declare a Function without given the specific function implementation.
DefFunction | func_name | The function unique name. |
| func_signature | A Function w/o body, which used to specify the function signature (i.e. func params and func return type/shape). |
| TVM_TIRX_DLL void tvm::script::ir_builder::ir::DefFunction | ( | const ffi::String & | func_name, |
| const BaseFunc & | func | ||
| ) |
Define the function which is declared before.
| func_name | The function unique name. |
| func | The given function implementation |
Evaluate the input expression.
| value | The input expression to evaluate. |
| ForFrame tvm::script::ir_builder::ir::For | ( | ForKind | kind, |
| PrimExpr | start, | ||
| PrimExpr | stop, | ||
| ffi::Optional< PrimExpr > | step = std::nullopt, |
||
| ffi::Optional< PrimType > | dtype = std::nullopt, |
||
| ffi::Optional< ffi::Map< ffi::String, Any > > | annotations = std::nullopt |
||
| ) |
Construct a For statement of the given kind.
| kind | The kind of iteration. |
| start | The minimum value of iteration. |
| stop | The maximum value of iteration. |
| step | The optional step value of iteration. |
| dtype | The optional dtype of the loop var ("int32" or "uint32"). When omitted it is inferred from the bounds. |
| annotations | The optional annotations of the For statement. |
Create an if statement.
| condition | The condition of if statement. |
| TVM_TIRX_DLL IRModuleFrame tvm::script::ir_builder::ir::IRModule | ( | ) |
The IRModule declaration statement.
| RegionFrame tvm::script::ir_builder::ir::Region | ( | Op | op, |
| ffi::Array< Expr > | args, | ||
| ffi::Optional< ffi::Array< Var > > | body_params = std::nullopt, |
||
| DictAttrs | attrs = DictAttrs() |
||
| ) |
Construct a result-free region with lexical body parameters.
| op | The region operation. |
| args | Operands evaluated outside the region body. |
| body_params | Existing body parameters, or omitted to generate them from the operation. |
| attrs | Additional operation attributes. |
Create a return statement.
| value | The value to return. |
| WhileFrame tvm::script::ir_builder::ir::While | ( | PrimExpr | condition | ) |
Create a while loop.
| condition | The termination condition of the loop. |