tvm
Namespaces | Classes | Functions
tvm::script::ir_builder::tir Namespace Reference

Namespaces

 axis
 

Classes

class  AllocateConstFrame
 Managed reference to AllocateConstFrameNode. More...
 
class  AllocateConstFrameNode
 A frame represents the allocate constant. More...
 
class  AllocateFrame
 Managed reference to AllocateFrameNode. More...
 
class  AllocateFrameNode
 A frame represents the allocate. More...
 
class  AssertFrame
 Managed reference to AssertFrameNode. More...
 
class  AssertFrameNode
 A frame that represents the assert statement. Proceeds if the condition is true, otherwise aborts with the message. More...
 
class  AttrFrame
 Managed reference to AttrFrameNode. More...
 
class  AttrFrameNode
 A frame that represents attribute node. More...
 
class  BlockFrame
 Managed reference to BlockFrameNode. More...
 
class  BlockFrameNode
 A frame that represents the block. More...
 
class  BlockInitFrame
 Managed reference to BlockInitFrameNode. More...
 
class  BlockInitFrameNode
 A frame that represents the block initialization statment. More...
 
class  DeclBufferFrame
 
class  DeclBufferFrameNode
 
class  ElseFrame
 Managed reference to ElseFrameNode. More...
 
class  ElseFrameNode
 A frame that represents else. More...
 
class  ForFrame
 Managed reference to ForFrameNode. More...
 
class  ForFrameNode
 A frame that represents the for loop. More...
 
class  IfFrame
 Managed reference to IfFrameNode. More...
 
class  IfFrameNode
 A frame that represents if statement. More...
 
class  LaunchThreadFrame
 Managed reference to LaunchThreadFrameNode. More...
 
class  LaunchThreadFrameNode
 The LaunchThreadFrameNode. More...
 
class  LetFrame
 Managed reference to LetFrameNode. More...
 
class  LetFrameNode
 A frame represents the let binding expression, which binds a var. More...
 
class  PrimFuncFrame
 Managed reference to PrimFuncFrameNode. More...
 
class  PrimFuncFrameNode
 A frame that represents the PrimFunc containing TIR statements. More...
 
class  RealizeFrame
 Managed reference to RealizeFrameNode. More...
 
class  RealizeFrameNode
 A frame that represents realization. More...
 
class  ThenFrame
 Managed reference to ThenFrameNode. More...
 
class  ThenFrameNode
 A frame that represents then. More...
 
class  TIRFrame
 Managed reference to TIRFrameNode. More...
 
class  TIRFrameNode
 A base frame that represents the TIR fame with body of statements. More...
 
class  WhileFrame
 Managed reference to WhileFrameNode. More...
 
class  WhileFrameNode
 A frame that represents while loop. More...
 

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 ()
 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...
 
void PreflattenedBuffer (Buffer postflattened_buffer, 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 pre-flattened buffer 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 Let (Var var, PrimExpr value)
 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, Map< String, ObjectRef > annotations=NullValue< Map< String, ObjectRef >>())
 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...
 
Var EnvThread (String thread_tag)
 Bind a var to thread env. More...
 
void BufferStore (Buffer buffer, PrimExpr value, Array< PrimExpr > indices)
 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...
 
PrimExpr Int8 (Optional< PrimExpr > expr=NullOpt)
 
PrimExpr Int16 (Optional< PrimExpr > expr=NullOpt)
 
PrimExpr Int32 (Optional< PrimExpr > expr=NullOpt)
 
PrimExpr Int64 (Optional< PrimExpr > expr=NullOpt)
 
PrimExpr UInt8 (Optional< PrimExpr > expr=NullOpt)
 
PrimExpr UInt16 (Optional< PrimExpr > expr=NullOpt)
 
PrimExpr UInt32 (Optional< PrimExpr > expr=NullOpt)
 
PrimExpr UInt64 (Optional< PrimExpr > expr=NullOpt)
 
PrimExpr Float8 (Optional< PrimExpr > expr=NullOpt)
 
PrimExpr Float16 (Optional< PrimExpr > expr=NullOpt)
 
PrimExpr Float32 (Optional< PrimExpr > expr=NullOpt)
 
PrimExpr Float64 (Optional< PrimExpr > expr=NullOpt)
 
PrimExpr Int32x4 (Optional< PrimExpr > expr=NullOpt)
 
PrimExpr Int32x8 (Optional< PrimExpr > expr=NullOpt)
 
PrimExpr Int32x16 (Optional< PrimExpr > expr=NullOpt)
 
PrimExpr Boolean (Optional< PrimExpr > expr=NullOpt)
 
PrimExpr Handle (Optional< PrimExpr > expr=NullOpt)
 
PrimExpr Void (Optional< PrimExpr > expr=NullOpt)
 

Function Documentation

◆ Allocate()

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.

Parameters
extentsThe extents of the allocate.
dtypeThe data type of the buffer.
storage_scopeThe storage scope.
conditionThe condition.
annotationsAdditional annotation hints.
Returns
The created AllocateFrame.

◆ AllocateConst()

AllocateConstFrame tvm::script::ir_builder::tir::AllocateConst ( NDArray  data,
DataType  dtype,
Array< PrimExpr extents,
Map< String, ObjectRef annotations = NullValueMapStringObjectRef >>() 
)

The allocate constant node.

Parameters
dataThe data associated with the constant.
dtypeThe data type of the buffer.
extentsThe extents of the allocate.
annotationsAdditional annotation hints.
Returns
The created AllocateConstFrame.

◆ AllocBuffer()

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.

Parameters
shapeThe type of the buffer prior to flattening.
dtypeThe data type in the content of the buffer.
dataThe pointer to the head of the data.
stridesThe strides of each dimension.
elem_offsetThe offset in terms of number of dtype elements (including lanes).
storage_scopeThe optional storage scope of buffer data pointer.
alignThe alignment requirement of data pointer in bytes.
offset_factorThe factor of elem_offset field.
buffer_typeThe buffer type.
axis_separatorsThe separators between input axes when generating flattened output axes.
Returns
The allocated buffer.

◆ Arg() [1/2]

Var tvm::script::ir_builder::tir::Arg ( String  name,
Var  var 
)

The PrimFunc variable arguments adding function.

Parameters
nameThe name of the variable.
varThe variable argument.
Returns
The variable.

◆ Arg() [2/2]

Buffer tvm::script::ir_builder::tir::Arg ( String  name,
Buffer  buffer 
)

The PrimFunc buffer arguments adding function.

Parameters
nameThe name of the buffer.
bufferThe buffer argument.
Returns
The buffer.

◆ Assert()

AssertFrame tvm::script::ir_builder::tir::Assert ( PrimExpr  condition,
String  message 
)

The assertion statement.

Parameters
conditionThe assertion condition.
messageThe error message when the assertion fails.
Returns
The AssertFrame.

◆ Attr()

AttrFrame tvm::script::ir_builder::tir::Attr ( ObjectRef  node,
String  attr_key,
PrimExpr  value 
)

Create an attribute.

Parameters
nodeThe node to annotate the attribute.
attr_keyAttribute type key.
valueThe value of the attribute.
Returns
The result AttrFrame.

◆ Block()

BlockFrame tvm::script::ir_builder::tir::Block ( String  name,
bool  no_realize = false 
)

The block declaration statement.

Parameters
nameThe name of the block.
no_realizeThe flag whether to construct BlockRealize or Block.
Returns
The BlockFrame.

◆ BlockAttrs()

void tvm::script::ir_builder::tir::BlockAttrs ( Map< String, ObjectRef attrs)

The block annotation statement.

Parameters
attrsThe annotation of the block.

◆ Boolean()

PrimExpr tvm::script::ir_builder::tir::Boolean ( Optional< PrimExpr expr = NullOpt)
inline

◆ BufferDecl()

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.

Parameters
shapeThe type of the buffer prior to flattening.
dtypeThe data type in the content of the buffer.
buffer_nameThe name of the buffer.
dataThe pointer to the head of the data.
stridesThe strides of each dimension.
elem_offsetThe offset in terms of number of dtype elements (including lanes).
storage_scopeThe optional storage scope of buffer data pointer.
alignThe alignment requirement of data pointer in bytes.
offset_factorThe factor of elem_offset field.
buffer_typeThe buffer type.
axis_separatorsThe separators between input axes when generating flattened output axes.
Returns
The declared buffer.

◆ BufferStore()

void tvm::script::ir_builder::tir::BufferStore ( Buffer  buffer,
PrimExpr  value,
Array< PrimExpr indices 
)

Store data in a buffer.

Parameters
bufferThe buffer.
valueThe value to be stored.
indicesThe indices location to be stored.

◆ DeclBuffer()

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.

Parameters
shapeThe type of the buffer prior to flattening.
dtypeThe data type in the content of the buffer.
buffer_nameThe name of the buffer.
dataThe pointer to the head of the data.
stridesThe strides of each dimension.
elem_offsetThe offset in terms of number of dtype elements (including lanes).
storage_scopeThe optional storage scope of buffer data pointer.
alignThe alignment requirement of data pointer in bytes.
offset_factorThe factor of elem_offset field.
buffer_typeThe buffer type.
axis_separatorsThe separators between input axes when generating flattened output axes.
Returns
The declared buffer.

◆ Else()

ElseFrame tvm::script::ir_builder::tir::Else ( )

Create an else.

Returns
The result ElseFrame.

◆ EnvThread()

Var tvm::script::ir_builder::tir::EnvThread ( String  thread_tag)

Bind a var to thread env.

Parameters
thread_tagThe thread type tag.
Returns
The result variable which gets bound to the thread env.

◆ Evaluate()

void tvm::script::ir_builder::tir::Evaluate ( PrimExpr  value)

Evaluate the input expression.

Parameters
valueThe input expression to evaluate.

◆ Float16()

PrimExpr tvm::script::ir_builder::tir::Float16 ( Optional< PrimExpr expr = NullOpt)
inline

◆ Float32()

PrimExpr tvm::script::ir_builder::tir::Float32 ( Optional< PrimExpr expr = NullOpt)
inline

◆ Float64()

PrimExpr tvm::script::ir_builder::tir::Float64 ( Optional< PrimExpr expr = NullOpt)
inline

◆ Float8()

PrimExpr tvm::script::ir_builder::tir::Float8 ( Optional< PrimExpr expr = NullOpt)
inline

◆ FuncAttrs()

void tvm::script::ir_builder::tir::FuncAttrs ( Map< String, ObjectRef attrs)

The PrimFunc annotation statement.

Parameters
attrsThe annotations of the PrimFunc.

◆ FuncName()

void tvm::script::ir_builder::tir::FuncName ( String  name)

The PrimFunc naming statement.

Parameters
nameThe name of the PrimFunc.

◆ FuncRet()

Type tvm::script::ir_builder::tir::FuncRet ( Type  ret_type)

The PrimFunc return type statement.

Parameters
ret_typeThe return type of the PrimFunc.
Returns
The return type.

◆ Grid()

ForFrame tvm::script::ir_builder::tir::Grid ( Array< PrimExpr extents)

The grid For statement.

Parameters
extentsThe extents of the iteration.
Returns
The ForFrame.

◆ Handle()

PrimExpr tvm::script::ir_builder::tir::Handle ( Optional< PrimExpr expr = NullOpt)
inline

◆ If()

IfFrame tvm::script::ir_builder::tir::If ( PrimExpr  condition)

Create an if statement.

Parameters
conditionThe condition of if statement.
Returns
The result IfFrame.

◆ Init()

BlockInitFrame tvm::script::ir_builder::tir::Init ( )

The block initialization statement.

Returns
The BlockInitFrame.

◆ Int16()

PrimExpr tvm::script::ir_builder::tir::Int16 ( Optional< PrimExpr expr = NullOpt)
inline

◆ Int32()

PrimExpr tvm::script::ir_builder::tir::Int32 ( Optional< PrimExpr expr = NullOpt)
inline

◆ Int32x16()

PrimExpr tvm::script::ir_builder::tir::Int32x16 ( Optional< PrimExpr expr = NullOpt)
inline

◆ Int32x4()

PrimExpr tvm::script::ir_builder::tir::Int32x4 ( Optional< PrimExpr expr = NullOpt)
inline

◆ Int32x8()

PrimExpr tvm::script::ir_builder::tir::Int32x8 ( Optional< PrimExpr expr = NullOpt)
inline

◆ Int64()

PrimExpr tvm::script::ir_builder::tir::Int64 ( Optional< PrimExpr expr = NullOpt)
inline

◆ Int8()

PrimExpr tvm::script::ir_builder::tir::Int8 ( Optional< PrimExpr expr = NullOpt)
inline

◆ LaunchThread()

LaunchThreadFrame tvm::script::ir_builder::tir::LaunchThread ( Var  var,
PrimExpr  extent 
)

Launch a thread.

Parameters
varThe iteration variable.
extentThe extent of environment thread.
Returns
The result LaunchThreadFrame.

◆ Let()

LetFrame tvm::script::ir_builder::tir::Let ( Var  var,
PrimExpr  value 
)

The let binding.

Parameters
varThe variable to bind.
valueThe value to be bound.
Returns
The created LetFrame.

◆ MatchBuffer()

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.

Parameters
paramThe parameter of the PrimFunc to match.
shapeThe type of the buffer prior to flattening.
dtypeThe data type in the content of the buffer.
dataThe pointer to the head of the data.
stridesThe strides of each dimension.
elem_offsetThe offset in terms of number of dtype elements (including lanes).
storage_scopeThe optional storage scope of buffer data pointer.
alignThe alignment requirement of data pointer in bytes.
offset_factorThe factor of elem_offset field.
buffer_typeThe buffer type.
axis_separatorsThe separators between input axes when generating flattened output axes.
Returns
The matched buffer.
Examples:
/workspace/include/tvm/script/ir_builder/base.h.

◆ Parallel()

ForFrame tvm::script::ir_builder::tir::Parallel ( PrimExpr  start,
PrimExpr  stop,
Optional< Map< String, ObjectRef >>  annotations = NullOpt 
)

The parallel For statement.

Parameters
startThe minimum value of iteration.
stopThe maximum value of iteration.
annotationsThe optional annotations of the For statement.
Returns
The ForFrame.

◆ Prefetch()

void tvm::script::ir_builder::tir::Prefetch ( Buffer  buffer,
Array< Range bounds 
)

The prefetch hint for a buffer.

Parameters
bufferThe buffer to be prefetched.
boundsThe bounds to be prefetched.

◆ PreflattenedBuffer()

void tvm::script::ir_builder::tir::PreflattenedBuffer ( Buffer  postflattened_buffer,
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 pre-flattened buffer statement.

Parameters
postflattened_bufferThe original buffer to be flattened.
shapeThe type of the buffer prior to flattening.
dtypeThe data type in the content of the buffer.
dataThe pointer to the head of the data.
stridesThe strides of each dimension.
elem_offsetThe offset in terms of number of dtype elements (including lanes).
storage_scopeThe optional storage scope of buffer data pointer.
alignThe alignment requirement of data pointer in bytes.
offset_factorThe factor of elem_offset field.
buffer_typeThe buffer type.
axis_separatorsThe separators between input axes when generating flattened output axes.

◆ PrimFunc()

PrimFuncFrame tvm::script::ir_builder::tir::PrimFunc ( )

The primitive function statement.

Returns
The PrimFuncFrame.

◆ Reads()

void tvm::script::ir_builder::tir::Reads ( Array< ObjectRef buffer_slices)

The block buffer region reading statement.

Parameters
buffer_slicesThe array of buffer regions to read.

◆ Realize()

RealizeFrame tvm::script::ir_builder::tir::Realize ( tvm::tir::BufferRegion  buffer_slice,
String  storage_scope,
PrimExpr  condition 
)

The realization.

Parameters
buffer_sliceThe region of buffer access.
storage_scopeThe storage scope associated with this realization.
conditionThe condition expression.
Returns
The result RealizeFrame.

◆ Serial()

ForFrame tvm::script::ir_builder::tir::Serial ( PrimExpr  start,
PrimExpr  stop,
Optional< Map< String, ObjectRef >>  annotations = NullOpt 
)

The serial For statement.

Parameters
startThe minimum value of iteration.
stopThe maximum value of iteration.
annotationsThe optional annotations of the For statement.
Returns
The ForFrame.

◆ Then()

ThenFrame tvm::script::ir_builder::tir::Then ( )

Create a then.

Returns
The result ThenFrame.

◆ ThreadBinding()

ForFrame tvm::script::ir_builder::tir::ThreadBinding ( PrimExpr  start,
PrimExpr  stop,
String  thread,
Optional< Map< String, ObjectRef >>  annotations = NullOpt 
)

The thread-binding For statement.

Parameters
startThe minimum value of iteration.
stopThe maximum value of iteration.
threadThe thread for loop variable to bind.
annotationsThe optional annotations of the For statement.
Returns
The ForFrame.

◆ UInt16()

PrimExpr tvm::script::ir_builder::tir::UInt16 ( Optional< PrimExpr expr = NullOpt)
inline

◆ UInt32()

PrimExpr tvm::script::ir_builder::tir::UInt32 ( Optional< PrimExpr expr = NullOpt)
inline

◆ UInt64()

PrimExpr tvm::script::ir_builder::tir::UInt64 ( Optional< PrimExpr expr = NullOpt)
inline

◆ UInt8()

PrimExpr tvm::script::ir_builder::tir::UInt8 ( Optional< PrimExpr expr = NullOpt)
inline

◆ Unroll()

ForFrame tvm::script::ir_builder::tir::Unroll ( PrimExpr  start,
PrimExpr  stop,
Optional< Map< String, ObjectRef >>  annotations = NullOpt 
)

The unrolled For statement.

Parameters
startThe minimum value of iteration.
stopThe maximum value of iteration.
annotationsThe optional annotations of the For statement.
Returns
The ForFrame.

◆ Vectorized()

ForFrame tvm::script::ir_builder::tir::Vectorized ( PrimExpr  start,
PrimExpr  stop,
Optional< Map< String, ObjectRef >>  annotations = NullOpt 
)

The vectorized For statement.

Parameters
startThe minimum value of iteration.
stopThe maximum value of iteration.
annotationsThe optional annotations of the For statement.
Returns
The ForFrame.

◆ Void()

PrimExpr tvm::script::ir_builder::tir::Void ( Optional< PrimExpr expr = NullOpt)
inline

◆ Where()

void tvm::script::ir_builder::tir::Where ( PrimExpr  predicate)

The block predicate statement.

Parameters
predicateThe predicate condition.

◆ While()

WhileFrame tvm::script::ir_builder::tir::While ( PrimExpr  condition)

Create a while loop.

Parameters
conditionThe termination condition of the loop.
Returns
The result WhileFrame.

◆ Writes()

void tvm::script::ir_builder::tir::Writes ( Array< ObjectRef buffer_slices)

The block buffer region writing statement.

Parameters
buffer_slicesThe array of buffer regions to write.