tvm
|
Namespaces | |
axis | |
Classes | |
class | TIRFrameNode |
A base frame that represents the TIR fame with body of statements. More... | |
class | TIRFrame |
Managed reference to TIRFrameNode. More... | |
class | PrimFuncFrameNode |
A frame that represents the PrimFunc containing TIR statements. More... | |
class | PrimFuncFrame |
Managed reference to PrimFuncFrameNode. More... | |
class | BlockFrameNode |
A frame that represents the block. More... | |
class | BlockFrame |
Managed reference to BlockFrameNode. More... | |
class | BlockInitFrameNode |
A frame that represents the block initialization statment. More... | |
class | BlockInitFrame |
Managed reference to BlockInitFrameNode. More... | |
class | ForFrameNode |
A frame that represents the for loop. More... | |
class | ForFrame |
Managed reference to ForFrameNode. More... | |
class | AssertFrameNode |
A frame that represents the assert statement. Proceeds if the condition is true, otherwise aborts with the message. More... | |
class | AssertFrame |
Managed reference to AssertFrameNode. More... | |
class | LetFrameNode |
A frame represents the let binding expression, which binds a var. More... | |
class | LetFrame |
Managed reference to LetFrameNode. More... | |
class | LaunchThreadFrameNode |
The LaunchThreadFrameNode. More... | |
class | LaunchThreadFrame |
Managed reference to LaunchThreadFrameNode. More... | |
class | RealizeFrameNode |
A frame that represents realization. More... | |
class | RealizeFrame |
Managed reference to RealizeFrameNode. More... | |
class | AllocateFrameNode |
A frame represents the allocate. More... | |
class | AllocateFrame |
Managed reference to AllocateFrameNode. More... | |
class | AllocateConstFrameNode |
A frame represents the allocate constant. More... | |
class | AllocateConstFrame |
Managed reference to AllocateConstFrameNode. More... | |
class | AttrFrameNode |
A frame that represents attribute node. More... | |
class | AttrFrame |
Managed reference to AttrFrameNode. More... | |
class | WhileFrameNode |
A frame that represents while loop. More... | |
class | WhileFrame |
Managed reference to WhileFrameNode. More... | |
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... | |
class | DeclBufferFrameNode |
class | DeclBufferFrame |
Functions | |
Buffer | BufferDecl (Array< PrimExpr > shape, DataType dtype, String buffer_name, Optional< Var > data, Optional< Array< PrimExpr >> strides, Optional< PrimExpr > elem_offset, String storage_scope, int align, int offset_factor, String buffer_type, Optional< Array< IntImm >> axis_separators) |
The buffer declaration function. More... | |
PrimFuncFrame | PrimFunc (bool is_private) |
The primitive function statement. More... | |
Var | Arg (String name, Var var) |
The PrimFunc variable arguments adding function. More... | |
Buffer | Arg (String name, Buffer buffer) |
The PrimFunc buffer arguments adding function. More... | |
void | FuncName (String name) |
The PrimFunc naming statement. More... | |
void | FuncAttrs (Map< String, ObjectRef > attrs) |
The PrimFunc annotation statement. More... | |
Type | FuncRet (Type ret_type) |
The PrimFunc return type statement. More... | |
Buffer | MatchBuffer (ObjectRef param, Array< PrimExpr > shape, DataType dtype=DataType::Float(32), Optional< Var > data=NullOpt, Array< PrimExpr > strides={}, PrimExpr elem_offset=PrimExpr(), String storage_scope="global", int align=-1, int offset_factor=0, String buffer_type="default", Array< IntImm > axis_separators={}) |
The buffer match statement. More... | |
BlockFrame | Block (String name, bool no_realize=false) |
The block declaration statement. More... | |
BlockInitFrame | Init () |
The block initialization statement. More... | |
void | Where (PrimExpr predicate) |
The block predicate statement. More... | |
void | Reads (Array< ObjectRef > buffer_slices) |
The block buffer region reading statement. More... | |
void | Writes (Array< ObjectRef > buffer_slices) |
The block buffer region writing statement. More... | |
void | BlockAttrs (Map< String, ObjectRef > attrs) |
The block annotation statement. More... | |
Buffer | AllocBuffer (Array< PrimExpr > shape, DataType dtype=DataType::Float(32), Optional< Var > data=NullOpt, Array< PrimExpr > strides={}, PrimExpr elem_offset=PrimExpr(), String storage_scope="", int align=-1, int offset_factor=0, String buffer_type="default", Array< IntImm > axis_separators={}) |
The buffer allocation function. More... | |
ForFrame | Serial (PrimExpr start, PrimExpr stop, Optional< Map< String, ObjectRef >> annotations=NullOpt) |
The serial For statement. More... | |
ForFrame | Parallel (PrimExpr start, PrimExpr stop, Optional< Map< String, ObjectRef >> annotations=NullOpt) |
The parallel For statement. More... | |
ForFrame | Vectorized (PrimExpr start, PrimExpr stop, Optional< Map< String, ObjectRef >> annotations=NullOpt) |
The vectorized For statement. More... | |
ForFrame | Unroll (PrimExpr start, PrimExpr stop, Optional< Map< String, ObjectRef >> annotations=NullOpt) |
The unrolled For statement. More... | |
ForFrame | ThreadBinding (PrimExpr start, PrimExpr stop, String thread, Optional< Map< String, ObjectRef >> annotations=NullOpt) |
The thread-binding For statement. More... | |
ForFrame | Grid (Array< PrimExpr > extents) |
The grid For statement. More... | |
AssertFrame | Assert (PrimExpr condition, String message) |
The assertion statement. More... | |
LetFrame | LetStmt (PrimExpr value, Optional< Type > type_annotation=NullOpt, Optional< Var > var=NullOpt) |
The let binding. More... | |
RealizeFrame | Realize (tvm::tir::BufferRegion buffer_slice, String storage_scope, PrimExpr condition) |
The realization. More... | |
AllocateFrame | Allocate (Array< PrimExpr > extents, DataType dtype, String storage_scope="", Optional< PrimExpr > condition=NullOpt, Optional< Map< String, ObjectRef >> annotations=NullOpt) |
The allocate node. More... | |
AllocateConstFrame | AllocateConst (NDArray data, DataType dtype, Array< PrimExpr > extents, Optional< Map< String, ObjectRef >> annotations=NullOpt) |
The allocate constant node. More... | |
AttrFrame | Attr (ObjectRef node, String attr_key, PrimExpr value) |
Create an attribute. More... | |
WhileFrame | While (PrimExpr condition) |
Create a while loop. More... | |
IfFrame | If (PrimExpr condition) |
Create an if statement. More... | |
ThenFrame | Then () |
Create a then. More... | |
ElseFrame | Else () |
Create an else. More... | |
DeclBufferFrame | DeclBuffer (Array< PrimExpr > shape, DataType dtype, String buffer_name, Optional< Var > data, Optional< Array< PrimExpr >> strides, Optional< PrimExpr > elem_offset, String storage_scope, int align, int offset_factor, String buffer_type, Optional< Array< IntImm >> axis_separators) |
The buffer declaration frame. More... | |
LaunchThreadFrame | LaunchThread (Var var, PrimExpr extent) |
Launch a thread. More... | |
LaunchThreadFrame | LaunchThread (String thread_tag, PrimExpr extent) |
Launch a new thread. More... | |
Var | EnvThread (String thread_tag, DataType dtype=DataType::Int(32)) |
Bind a var to thread env. More... | |
void | BufferStore (Buffer buffer, PrimExpr value, Array< PrimExpr > indices, Optional< PrimExpr > predicate) |
Store data in a buffer. More... | |
void | Prefetch (Buffer buffer, Array< Range > bounds) |
The prefetch hint for a buffer. More... | |
void | Evaluate (PrimExpr value) |
Evaluate the input expression. More... | |
Var | Handle (runtime::DataType dtype=runtime::DataType::Void(), String storage_scope="global", bool is_size_var=false, bool is_unknown_type=false) |
Create a TIR var that represents a pointer. More... | |
PrimExpr | Float8 (Optional< PrimExpr > expr=NullOpt, bool is_size_var=false) |
PrimExpr | Float16 (Optional< PrimExpr > expr=NullOpt, bool is_size_var=false) |
PrimExpr | Float32 (Optional< PrimExpr > expr=NullOpt, bool is_size_var=false) |
PrimExpr | Float64 (Optional< PrimExpr > expr=NullOpt, bool is_size_var=false) |
PrimExpr | UInt8 (Optional< PrimExpr > expr=NullOpt, bool is_size_var=false) |
PrimExpr | UInt16 (Optional< PrimExpr > expr=NullOpt, bool is_size_var=false) |
PrimExpr | UInt32 (Optional< PrimExpr > expr=NullOpt, bool is_size_var=false) |
PrimExpr | UInt64 (Optional< PrimExpr > expr=NullOpt, bool is_size_var=false) |
PrimExpr | Int8 (Optional< PrimExpr > expr=NullOpt, bool is_size_var=false) |
PrimExpr | Int16 (Optional< PrimExpr > expr=NullOpt, bool is_size_var=false) |
PrimExpr | Int32 (Optional< PrimExpr > expr=NullOpt, bool is_size_var=false) |
PrimExpr | Int64 (Optional< PrimExpr > expr=NullOpt, bool is_size_var=false) |
PrimExpr | Float8x4 (Optional< PrimExpr > expr=NullOpt, bool is_size_var=false) |
PrimExpr | Float8x8 (Optional< PrimExpr > expr=NullOpt, bool is_size_var=false) |
PrimExpr | Float8x16 (Optional< PrimExpr > expr=NullOpt, bool is_size_var=false) |
PrimExpr | Float8x32 (Optional< PrimExpr > expr=NullOpt, bool is_size_var=false) |
PrimExpr | Float8x64 (Optional< PrimExpr > expr=NullOpt, bool is_size_var=false) |
PrimExpr | Float16x4 (Optional< PrimExpr > expr=NullOpt, bool is_size_var=false) |
PrimExpr | Float16x8 (Optional< PrimExpr > expr=NullOpt, bool is_size_var=false) |
PrimExpr | Float16x16 (Optional< PrimExpr > expr=NullOpt, bool is_size_var=false) |
PrimExpr | Float16x32 (Optional< PrimExpr > expr=NullOpt, bool is_size_var=false) |
PrimExpr | Float16x64 (Optional< PrimExpr > expr=NullOpt, bool is_size_var=false) |
PrimExpr | Float32x4 (Optional< PrimExpr > expr=NullOpt, bool is_size_var=false) |
PrimExpr | Float32x8 (Optional< PrimExpr > expr=NullOpt, bool is_size_var=false) |
PrimExpr | Float32x16 (Optional< PrimExpr > expr=NullOpt, bool is_size_var=false) |
PrimExpr | Float32x32 (Optional< PrimExpr > expr=NullOpt, bool is_size_var=false) |
PrimExpr | Float32x64 (Optional< PrimExpr > expr=NullOpt, bool is_size_var=false) |
PrimExpr | Float64x4 (Optional< PrimExpr > expr=NullOpt, bool is_size_var=false) |
PrimExpr | Float64x8 (Optional< PrimExpr > expr=NullOpt, bool is_size_var=false) |
PrimExpr | Float64x16 (Optional< PrimExpr > expr=NullOpt, bool is_size_var=false) |
PrimExpr | Float64x32 (Optional< PrimExpr > expr=NullOpt, bool is_size_var=false) |
PrimExpr | Float64x64 (Optional< PrimExpr > expr=NullOpt, bool is_size_var=false) |
PrimExpr | UInt8x4 (Optional< PrimExpr > expr=NullOpt, bool is_size_var=false) |
PrimExpr | UInt8x8 (Optional< PrimExpr > expr=NullOpt, bool is_size_var=false) |
PrimExpr | UInt8x16 (Optional< PrimExpr > expr=NullOpt, bool is_size_var=false) |
PrimExpr | UInt8x32 (Optional< PrimExpr > expr=NullOpt, bool is_size_var=false) |
PrimExpr | UInt8x64 (Optional< PrimExpr > expr=NullOpt, bool is_size_var=false) |
PrimExpr | UInt16x4 (Optional< PrimExpr > expr=NullOpt, bool is_size_var=false) |
PrimExpr | UInt16x8 (Optional< PrimExpr > expr=NullOpt, bool is_size_var=false) |
PrimExpr | UInt16x16 (Optional< PrimExpr > expr=NullOpt, bool is_size_var=false) |
PrimExpr | UInt16x32 (Optional< PrimExpr > expr=NullOpt, bool is_size_var=false) |
PrimExpr | UInt16x64 (Optional< PrimExpr > expr=NullOpt, bool is_size_var=false) |
PrimExpr | UInt32x4 (Optional< PrimExpr > expr=NullOpt, bool is_size_var=false) |
PrimExpr | UInt32x8 (Optional< PrimExpr > expr=NullOpt, bool is_size_var=false) |
PrimExpr | UInt32x16 (Optional< PrimExpr > expr=NullOpt, bool is_size_var=false) |
PrimExpr | UInt32x32 (Optional< PrimExpr > expr=NullOpt, bool is_size_var=false) |
PrimExpr | UInt32x64 (Optional< PrimExpr > expr=NullOpt, bool is_size_var=false) |
PrimExpr | UInt64x4 (Optional< PrimExpr > expr=NullOpt, bool is_size_var=false) |
PrimExpr | UInt64x8 (Optional< PrimExpr > expr=NullOpt, bool is_size_var=false) |
PrimExpr | UInt64x16 (Optional< PrimExpr > expr=NullOpt, bool is_size_var=false) |
PrimExpr | UInt64x32 (Optional< PrimExpr > expr=NullOpt, bool is_size_var=false) |
PrimExpr | UInt64x64 (Optional< PrimExpr > expr=NullOpt, bool is_size_var=false) |
PrimExpr | Int8x4 (Optional< PrimExpr > expr=NullOpt, bool is_size_var=false) |
PrimExpr | Int8x8 (Optional< PrimExpr > expr=NullOpt, bool is_size_var=false) |
PrimExpr | Int8x16 (Optional< PrimExpr > expr=NullOpt, bool is_size_var=false) |
PrimExpr | Int8x32 (Optional< PrimExpr > expr=NullOpt, bool is_size_var=false) |
PrimExpr | Int8x64 (Optional< PrimExpr > expr=NullOpt, bool is_size_var=false) |
PrimExpr | Int16x4 (Optional< PrimExpr > expr=NullOpt, bool is_size_var=false) |
PrimExpr | Int16x8 (Optional< PrimExpr > expr=NullOpt, bool is_size_var=false) |
PrimExpr | Int16x16 (Optional< PrimExpr > expr=NullOpt, bool is_size_var=false) |
PrimExpr | Int16x32 (Optional< PrimExpr > expr=NullOpt, bool is_size_var=false) |
PrimExpr | Int16x64 (Optional< PrimExpr > expr=NullOpt, bool is_size_var=false) |
PrimExpr | Int32x4 (Optional< PrimExpr > expr=NullOpt, bool is_size_var=false) |
PrimExpr | Int32x8 (Optional< PrimExpr > expr=NullOpt, bool is_size_var=false) |
PrimExpr | Int32x16 (Optional< PrimExpr > expr=NullOpt, bool is_size_var=false) |
PrimExpr | Int32x32 (Optional< PrimExpr > expr=NullOpt, bool is_size_var=false) |
PrimExpr | Int32x64 (Optional< PrimExpr > expr=NullOpt, bool is_size_var=false) |
PrimExpr | Int64x4 (Optional< PrimExpr > expr=NullOpt, bool is_size_var=false) |
PrimExpr | Int64x8 (Optional< PrimExpr > expr=NullOpt, bool is_size_var=false) |
PrimExpr | Int64x16 (Optional< PrimExpr > expr=NullOpt, bool is_size_var=false) |
PrimExpr | Int64x32 (Optional< PrimExpr > expr=NullOpt, bool is_size_var=false) |
PrimExpr | Int64x64 (Optional< PrimExpr > expr=NullOpt, bool is_size_var=false) |
PrimExpr | E4M3Float8 (Optional< PrimExpr > expr=NullOpt, bool is_size_var=false) |
PrimExpr | E4M3Float8x4 (Optional< PrimExpr > expr=NullOpt, bool is_size_var=false) |
PrimExpr | E4M3Float8x8 (Optional< PrimExpr > expr=NullOpt, bool is_size_var=false) |
PrimExpr | E4M3Float8x16 (Optional< PrimExpr > expr=NullOpt, bool is_size_var=false) |
PrimExpr | E4M3Float8x32 (Optional< PrimExpr > expr=NullOpt, bool is_size_var=false) |
PrimExpr | E4M3Float8x64 (Optional< PrimExpr > expr=NullOpt, bool is_size_var=false) |
PrimExpr | E5M2Float8 (Optional< PrimExpr > expr=NullOpt, bool is_size_var=false) |
PrimExpr | E5M2Float8x4 (Optional< PrimExpr > expr=NullOpt, bool is_size_var=false) |
PrimExpr | E5M2Float8x8 (Optional< PrimExpr > expr=NullOpt, bool is_size_var=false) |
PrimExpr | E5M2Float8x16 (Optional< PrimExpr > expr=NullOpt, bool is_size_var=false) |
PrimExpr | E5M2Float8x32 (Optional< PrimExpr > expr=NullOpt, bool is_size_var=false) |
PrimExpr | E5M2Float8x64 (Optional< PrimExpr > expr=NullOpt, bool is_size_var=false) |
PrimExpr | Boolean (Optional< PrimExpr > expr=NullOpt, bool is_size_var=false) |
PrimExpr | Void (Optional< PrimExpr > expr=NullOpt, bool is_size_var=false) |
AllocateFrame tvm::script::ir_builder::tir::Allocate | ( | Array< PrimExpr > | extents, |
DataType | dtype, | ||
String | storage_scope = "" , |
||
Optional< PrimExpr > | condition = NullOpt , |
||
Optional< Map< String, ObjectRef >> | annotations = NullOpt |
||
) |
The allocate node.
extents | The extents of the allocate. |
dtype | The data type of the buffer. |
storage_scope | The storage scope. |
condition | The condition. |
annotations | Additional annotation hints. |
AllocateConstFrame tvm::script::ir_builder::tir::AllocateConst | ( | NDArray | data, |
DataType | dtype, | ||
Array< PrimExpr > | extents, | ||
Optional< Map< String, ObjectRef >> | annotations = NullOpt |
||
) |
The allocate constant node.
data | The data associated with the constant. |
dtype | The data type of the buffer. |
extents | The extents of the allocate. |
annotations | Additional annotation hints. |
Buffer tvm::script::ir_builder::tir::AllocBuffer | ( | Array< PrimExpr > | shape, |
DataType | dtype = DataType::Float(32) , |
||
Optional< Var > | data = NullOpt , |
||
Array< PrimExpr > | strides = {} , |
||
PrimExpr | elem_offset = PrimExpr() , |
||
String | storage_scope = "" , |
||
int | align = -1 , |
||
int | offset_factor = 0 , |
||
String | buffer_type = "default" , |
||
Array< IntImm > | axis_separators = {} |
||
) |
The buffer allocation function.
shape | The type of the buffer prior to flattening. |
dtype | The data type in the content of the buffer. |
data | The pointer to the head of the data. |
strides | The strides of each dimension. |
elem_offset | The offset in terms of number of dtype elements (including lanes). |
storage_scope | The optional storage scope of buffer data pointer. |
align | The alignment requirement of data pointer in bytes. |
offset_factor | The factor of elem_offset field. |
buffer_type | The buffer type. |
axis_separators | The separators between input axes when generating flattened output axes. |
The PrimFunc buffer arguments adding function.
name | The name of the buffer. |
buffer | The buffer argument. |
The PrimFunc variable arguments adding function.
name | The name of the variable. |
var | The variable argument. |
AssertFrame tvm::script::ir_builder::tir::Assert | ( | PrimExpr | condition, |
String | message | ||
) |
The assertion statement.
condition | The assertion condition. |
message | The error message when the assertion fails. |
Create an attribute.
node | The node to annotate the attribute. |
attr_key | Attribute type key. |
value | The value of the attribute. |
BlockFrame tvm::script::ir_builder::tir::Block | ( | String | name, |
bool | no_realize = false |
||
) |
The block declaration statement.
name | The name of the block. |
no_realize | The flag whether to construct BlockRealize or Block. |
The block annotation statement.
attrs | The annotation of the block. |
|
inline |
Buffer tvm::script::ir_builder::tir::BufferDecl | ( | Array< PrimExpr > | shape, |
DataType | dtype, | ||
String | buffer_name, | ||
Optional< Var > | data, | ||
Optional< Array< PrimExpr >> | strides, | ||
Optional< PrimExpr > | elem_offset, | ||
String | storage_scope, | ||
int | align, | ||
int | offset_factor, | ||
String | buffer_type, | ||
Optional< Array< IntImm >> | axis_separators | ||
) |
The buffer declaration function.
shape | The type of the buffer prior to flattening. |
dtype | The data type in the content of the buffer. |
buffer_name | The name of the buffer. |
data | The pointer to the head of the data. |
strides | The strides of each dimension. |
elem_offset | The offset in terms of number of dtype elements (including lanes). |
storage_scope | The optional storage scope of buffer data pointer. |
align | The alignment requirement of data pointer in bytes. |
offset_factor | The factor of elem_offset field. |
buffer_type | The buffer type. |
axis_separators | The separators between input axes when generating flattened output axes. |
void tvm::script::ir_builder::tir::BufferStore | ( | Buffer | buffer, |
PrimExpr | value, | ||
Array< PrimExpr > | indices, | ||
Optional< PrimExpr > | predicate | ||
) |
Store data in a buffer.
buffer | The buffer. |
value | The value to be stored. |
indices | The indices location to be stored. |
predicate | A vector mask of boolean values indicating which lanes of a vector are to be stored. The number lanes of the mask must be equal to the number of lanes in value. |
DeclBufferFrame tvm::script::ir_builder::tir::DeclBuffer | ( | Array< PrimExpr > | shape, |
DataType | dtype, | ||
String | buffer_name, | ||
Optional< Var > | data, | ||
Optional< Array< PrimExpr >> | strides, | ||
Optional< PrimExpr > | elem_offset, | ||
String | storage_scope, | ||
int | align, | ||
int | offset_factor, | ||
String | buffer_type, | ||
Optional< Array< IntImm >> | axis_separators | ||
) |
The buffer declaration frame.
shape | The type of the buffer prior to flattening. |
dtype | The data type in the content of the buffer. |
buffer_name | The name of the buffer. |
data | The pointer to the head of the data. |
strides | The strides of each dimension. |
elem_offset | The offset in terms of number of dtype elements (including lanes). |
storage_scope | The optional storage scope of buffer data pointer. |
align | The alignment requirement of data pointer in bytes. |
offset_factor | The factor of elem_offset field. |
buffer_type | The buffer type. |
axis_separators | The separators between input axes when generating flattened output axes. |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Var tvm::script::ir_builder::tir::EnvThread | ( | String | thread_tag, |
DataType | dtype = DataType::Int(32) |
||
) |
Bind a var to thread env.
thread_tag | The thread type tag. |
dtype | The data type of the variable. |
void tvm::script::ir_builder::tir::Evaluate | ( | PrimExpr | value | ) |
Evaluate the input expression.
value | The input expression to evaluate. |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
The PrimFunc annotation statement.
attrs | The annotations of the PrimFunc. |
void tvm::script::ir_builder::tir::FuncName | ( | String | name | ) |
The PrimFunc naming statement.
name | The name of the PrimFunc. |
The PrimFunc return type statement.
ret_type | The return type of the PrimFunc. |
|
inline |
Create a TIR var that represents a pointer.
dtype | The data type of the pointer. |
storage_scope | The storage scope of the pointer. |
is_size_var | Whether the pointer is a size var. |
is_unknown_type | Used to distinguish between PrimType(DataType::Handle()) and PointerType(PrimType(DataType::Void())) . If true, resolve dtype of Void() as PrimType , and if false resolve dtype of Void() as a PointerType . |
Create an if statement.
condition | The condition of if statement. |
BlockInitFrame tvm::script::ir_builder::tir::Init | ( | ) |
The block initialization statement.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
LaunchThreadFrame tvm::script::ir_builder::tir::LaunchThread | ( | String | thread_tag, |
PrimExpr | extent | ||
) |
Launch a new thread.
thread_tag | The thread type tag. |
extent | The extent of environment thread. |
LaunchThreadFrame tvm::script::ir_builder::tir::LaunchThread | ( | Var | var, |
PrimExpr | extent | ||
) |
Launch a thread.
var | The iteration variable. |
extent | The extent of environment thread. |
LetFrame tvm::script::ir_builder::tir::LetStmt | ( | PrimExpr | value, |
Optional< Type > | type_annotation = NullOpt , |
||
Optional< Var > | var = NullOpt |
||
) |
The let binding.
value | The value to be bound. |
type_annotation | The type annotation of the let binding. Usually it is used for fine-grained var typing, particularly, PointerType. |
var | The variable to be bound. If not specified, a new variable will be created. |
Buffer tvm::script::ir_builder::tir::MatchBuffer | ( | ObjectRef | param, |
Array< PrimExpr > | shape, | ||
DataType | dtype = DataType::Float(32) , |
||
Optional< Var > | data = NullOpt , |
||
Array< PrimExpr > | strides = {} , |
||
PrimExpr | elem_offset = PrimExpr() , |
||
String | storage_scope = "global" , |
||
int | align = -1 , |
||
int | offset_factor = 0 , |
||
String | buffer_type = "default" , |
||
Array< IntImm > | axis_separators = {} |
||
) |
The buffer match statement.
param | The parameter of the PrimFunc to match. |
shape | The type of the buffer prior to flattening. |
dtype | The data type in the content of the buffer. |
data | The pointer to the head of the data. |
strides | The strides of each dimension. |
elem_offset | The offset in terms of number of dtype elements (including lanes). |
storage_scope | The optional storage scope of buffer data pointer. |
align | The alignment requirement of data pointer in bytes. |
offset_factor | The factor of elem_offset field. |
buffer_type | The buffer type. |
axis_separators | The separators between input axes when generating flattened output axes. |
ForFrame tvm::script::ir_builder::tir::Parallel | ( | PrimExpr | start, |
PrimExpr | stop, | ||
Optional< Map< String, ObjectRef >> | annotations = NullOpt |
||
) |
The parallel For statement.
start | The minimum value of iteration. |
stop | The maximum value of iteration. |
annotations | The optional annotations of the For statement. |
The prefetch hint for a buffer.
buffer | The buffer to be prefetched. |
bounds | The bounds to be prefetched. |
PrimFuncFrame tvm::script::ir_builder::tir::PrimFunc | ( | bool | is_private | ) |
The primitive function statement.
The block buffer region reading statement.
buffer_slices | The array of buffer regions to read. |
RealizeFrame tvm::script::ir_builder::tir::Realize | ( | tvm::tir::BufferRegion | buffer_slice, |
String | storage_scope, | ||
PrimExpr | condition | ||
) |
The realization.
buffer_slice | The region of buffer access. |
storage_scope | The storage scope associated with this realization. |
condition | The condition expression. |
ForFrame tvm::script::ir_builder::tir::Serial | ( | PrimExpr | start, |
PrimExpr | stop, | ||
Optional< Map< String, ObjectRef >> | annotations = NullOpt |
||
) |
The serial For statement.
start | The minimum value of iteration. |
stop | The maximum value of iteration. |
annotations | The optional annotations of the For statement. |
ForFrame tvm::script::ir_builder::tir::ThreadBinding | ( | PrimExpr | start, |
PrimExpr | stop, | ||
String | thread, | ||
Optional< Map< String, ObjectRef >> | annotations = NullOpt |
||
) |
The thread-binding For statement.
start | The minimum value of iteration. |
stop | The maximum value of iteration. |
thread | The thread for loop variable to bind. |
annotations | The optional annotations of the For statement. |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
ForFrame tvm::script::ir_builder::tir::Unroll | ( | PrimExpr | start, |
PrimExpr | stop, | ||
Optional< Map< String, ObjectRef >> | annotations = NullOpt |
||
) |
The unrolled For statement.
start | The minimum value of iteration. |
stop | The maximum value of iteration. |
annotations | The optional annotations of the For statement. |
ForFrame tvm::script::ir_builder::tir::Vectorized | ( | PrimExpr | start, |
PrimExpr | stop, | ||
Optional< Map< String, ObjectRef >> | annotations = NullOpt |
||
) |
The vectorized For statement.
start | The minimum value of iteration. |
stop | The maximum value of iteration. |
annotations | The optional annotations of the For statement. |
|
inline |
void tvm::script::ir_builder::tir::Where | ( | PrimExpr | predicate | ) |
The block predicate statement.
predicate | The predicate condition. |
WhileFrame tvm::script::ir_builder::tir::While | ( | PrimExpr | condition | ) |
Create a while loop.
condition | The termination condition of the loop. |