24#ifndef TVM_TIRX_STMT_H_
25#define TVM_TIRX_STMT_H_
27#include <tvm/ffi/reflection/registry.h>
55 namespace refl = tvm::ffi::reflection;
57 refl::AttachFieldFlag::SEqHashIgnore());
67class Stmt :
public ffi::ObjectRef {
87 namespace refl = tvm::ffi::reflection;
88 refl::ObjectDef<BindNode>()
90 .def_ro(
"var", &
BindNode::var, refl::AttachFieldFlag::SEqHashDefRecursive())
130 namespace refl = tvm::ffi::reflection;
131 refl::ObjectDef<AttrStmtNode>()
172 namespace refl = tvm::ffi::reflection;
173 refl::ObjectDef<AssertStmtNode>()
188 ffi::Array<prim::StringImm> message_parts,
Span span =
Span());
214 namespace refl = tvm::ffi::reflection;
215 refl::ObjectDef<BufferStoreNode>()
245 namespace refl = tvm::ffi::reflection;
246 refl::ObjectDef<DeclBufferNode>()
275 namespace refl = tvm::ffi::reflection;
276 refl::ObjectDef<AllocBufferNode>()
289 ffi::Map<ffi::String, ffi::Any> annotations = ffi::Map<ffi::String, ffi::Any>(),
297 for (
const PrimExpr& extent : (*this)->buffer->shape) {
328 namespace refl = tvm::ffi::reflection;
346 namespace refl = tvm::ffi::reflection;
377 size_t size()
const {
return operator->()->size(); }
402 template <
typename...
Args>
404 ffi::Array<Stmt> seq;
410 }
else if (seq.size() == 1) {
417 if constexpr (
sizeof...(seq_args) == 1) {
421 if (
original->seq.size() != seq.size()) {
424 for (
size_t i = 0;
i < seq.size();
i++) {
442 explicit Flattener(ffi::Array<Stmt>* seq) : seq_(seq) {}
444 template <
typename T>
446 if constexpr (std::is_same_v<T, SeqStmt>) {
449 if constexpr (!std::is_base_of_v<T, SeqStmt>) {
452 if constexpr (std::is_base_of_v<Stmt, T>) {
454 return ffi::GetRef<SeqStmt>(
ptr);
462 template <
typename T>
464 if constexpr (std::is_base_of_v<ObjectRef, T>) {
471 if constexpr (std::is_same_v<T, SeqStmt>) {
477 if constexpr (std::is_base_of_v<T, SeqStmt>) {
486 if constexpr (std::is_base_of_v<T, Evaluate>) {
498 if constexpr (std::is_base_of_v<Stmt, T>) {
510 ffi::Array<Stmt>* seq_;
530 namespace refl = tvm::ffi::reflection;
531 refl::ObjectDef<IfThenElseNode>()
546 ffi::Optional<Stmt> else_case = std::nullopt,
Span span =
Span());
622 namespace refl = tvm::ffi::reflection;
623 refl::ObjectDef<ForNode>()
624 .def_ro(
"loop_var", &
ForNode::loop_var, refl::AttachFieldFlag::SEqHashDefRecursive())
647 ffi::Optional<IterVar> thread_binding = std::nullopt,
648 ffi::Map<ffi::String, ffi::Any> annotations = {},
649 ffi::Optional<PrimExpr> step = std::nullopt,
Span span =
Span());
673 namespace refl = tvm::ffi::reflection;
674 refl::ObjectDef<WhileNode>()
702 namespace refl = tvm::ffi::reflection;
727 namespace refl = tvm::ffi::reflection;
728 refl::ObjectDef<BreakNode>();
752 namespace refl = tvm::ffi::reflection;
753 refl::ObjectDef<ContinueNode>();
788 namespace refl = tvm::ffi::reflection;
789 refl::ObjectDef<MatchBufferRegionNode>()
791 refl::AttachFieldFlag::SEqHashDefRecursive())
861 namespace refl = tvm::ffi::reflection;
862 refl::ObjectDef<SBlockNode>()
868 refl::AttachFieldFlag::SEqHashDefRecursive())
884 ffi::Array<IterVar> iter_vars, ffi::Array<BufferRegion> reads,
885 ffi::Array<BufferRegion> writes, ffi::String name_hint,
Stmt body,
886 ffi::Optional<Stmt> init = std::nullopt,
887 ffi::Array<BufferVar> alloc_buffers = ffi::Array<BufferVar>(),
888 ffi::Array<MatchBufferRegion> match_buffers = ffi::Array<MatchBufferRegion>(),
889 ffi::Map<ffi::String, ffi::Any> annotations = ffi::Map<ffi::String, ffi::Any>(),
893 ffi::Array<BufferVar> alloc_buffers = ffi::Array<BufferVar>(),
916 namespace refl = tvm::ffi::reflection;
917 refl::ObjectDef<SBlockRealizeNode>()
952 namespace refl = tvm::ffi::reflection;
1025 return attr_key.compare(0, 7,
"pragma_") == 0;
1048 return "vectorized";
1052 return "thread_binding";
Symbolic n-dimensional array, to represent a memory buffer.
Managed reference to ExprNode.
Definition base_expr.h:335
Constant integer literals in the program.
Definition expr.h:487
Typed reference/view over any Expr whose ExprNode::ty is PrimType.
Definition base_expr.h:401
Definition base_expr.h:137
Definition source_map.h:111
Managed reference to VarNode.
Definition expr.h:372
RAII wrapper function to enter and exit a context object similar to python's with syntax.
Definition with_context.h:59
Managed reference to StringImmNode.
Definition expr.h:68
Allocate a buffer and declare it in scope.
Definition stmt.h:262
BufferVar buffer
The buffer being allocated and declared.
Definition stmt.h:265
ffi::Map< ffi::String, ffi::Any > annotations
Additional annotations about the allocation.
Definition stmt.h:272
TVM_FFI_DECLARE_OBJECT_INFO_FINAL("tirx.AllocBuffer", AllocBufferNode, StmtNode)
static void RegisterReflection()
Definition stmt.h:274
Managed reference to AllocBufferNode.
Definition stmt.h:285
AllocBuffer(BufferVar buffer, ffi::Map< ffi::String, ffi::Any > annotations=ffi::Map< ffi::String, ffi::Any >(), Span span=Span())
std::optional< int64_t > ConstantAllocationSize() const
If the buffer's shape is constant, return the total number of elements.
Definition stmt.h:295
TVM_DEFINE_OBJECT_REF_COW_METHOD(AllocBufferNode)
TVM_FFI_DEFINE_OBJECT_REF_METHODS_NULLABLE(AllocBuffer, Stmt, AllocBufferNode)
Assert condition, if an error occurs, return the error message.
Definition stmt.h:162
ffi::Array< prim::StringImm > message_parts
Error message fragments, concatenated at runtime when assertion fails.
Definition stmt.h:169
PrimExpr condition
Condition to be checked.
Definition stmt.h:165
prim::StringImm error_kind
The error kind, e.g. "RuntimeError", "TypeError", "ValueError".
Definition stmt.h:167
static void RegisterReflection()
Definition stmt.h:171
TVM_FFI_DECLARE_OBJECT_INFO_FINAL("tirx.AssertStmt", AssertStmtNode, StmtNode)
Managed reference to AssertStmtNode.
Definition stmt.h:185
TVM_FFI_DEFINE_OBJECT_REF_METHODS_NULLABLE(AssertStmt, Stmt, AssertStmtNode)
AssertStmt(PrimExpr condition, prim::StringImm error_kind, ffi::Array< prim::StringImm > message_parts, Span span=Span())
TVM_DEFINE_OBJECT_REF_COW_METHOD(AssertStmtNode)
Define certain auxiliary attribute for the body to be a symbolic value. This provide auxiliary inform...
Definition stmt.h:118
static void RegisterReflection()
Definition stmt.h:129
PrimExpr value
The attribute value, value is well defined at current scope.
Definition stmt.h:125
ffi::Any node
this is attribute about certain node
Definition stmt.h:121
TVM_FFI_DECLARE_OBJECT_INFO_FINAL("tirx.AttrStmt", AttrStmtNode, StmtNode)
ffi::String attr_key
the type key of the attribute
Definition stmt.h:123
Stmt body
The body statement to be executed.
Definition stmt.h:127
Managed reference to AttrStmtNode.
Definition stmt.h:144
TVM_FFI_DEFINE_OBJECT_REF_METHODS_NULLABLE(AttrStmt, Stmt, AttrStmtNode)
AttrStmt(ffi::Any node, ffi::String attr_key, PrimExpr value, Stmt body, Span span=Span())
TVM_DEFINE_OBJECT_REF_COW_METHOD(AttrStmtNode)
Bind a variable to a value in the enclosing scope.
Definition stmt.h:79
Expr value
The value to bind to the variable.
Definition stmt.h:84
TVM_FFI_DECLARE_OBJECT_INFO_FINAL("tirx.Bind", BindNode, StmtNode)
static void RegisterReflection()
Definition stmt.h:86
Var var
The variable being bound.
Definition stmt.h:82
Managed reference to BindNode.
Definition stmt.h:100
Bind(Var var, Expr value, Span span=Span())
TVM_DEFINE_OBJECT_REF_COW_METHOD(BindNode)
TVM_FFI_DEFINE_OBJECT_REF_METHODS_NULLABLE(Bind, Stmt, BindNode)
A Break in control flow.
Definition stmt.h:724
static void RegisterReflection()
Definition stmt.h:726
TVM_FFI_DECLARE_OBJECT_INFO_FINAL("tirx.Break", BreakNode, StmtNode)
Managed reference to BreakNode.
Definition stmt.h:738
TVM_FFI_DEFINE_OBJECT_REF_METHODS_NULLABLE(Break, Stmt, BreakNode)
TVM_DEFINE_OBJECT_REF_COW_METHOD(BreakNode)
Managed reference to BufferRegionNode.
Definition buffer_region.h:66
Store value to the high dimension buffer.
Definition stmt.h:204
ffi::Array< PrimExpr > indices
The indices location to be stored.
Definition stmt.h:211
static void RegisterReflection()
Definition stmt.h:213
PrimExpr value
The value to be stored.
Definition stmt.h:209
BufferVar buffer
The buffer variable.
Definition stmt.h:207
TVM_FFI_DECLARE_OBJECT_INFO_FINAL("tirx.BufferStore", BufferStoreNode, StmtNode)
Managed reference to BufferStoreNode.
Definition stmt.h:227
TVM_DEFINE_OBJECT_REF_COW_METHOD(BufferStoreNode)
BufferStore(BufferVar buffer, PrimExpr value, ffi::Array< PrimExpr > indices, Span span=Span())
TVM_FFI_DEFINE_OBJECT_REF_METHODS_NULLABLE(BufferStore, Stmt, BufferStoreNode)
Checked zero-state view over an ordinary VarNode with BufferType.
Definition buffer.h:179
A Continue in control flow.
Definition stmt.h:749
static void RegisterReflection()
Definition stmt.h:751
TVM_FFI_DECLARE_OBJECT_INFO_FINAL("tirx.Continue", ContinueNode, StmtNode)
Managed reference to ContinueNode.
Definition stmt.h:763
TVM_DEFINE_OBJECT_REF_COW_METHOD(ContinueNode)
TVM_FFI_DEFINE_OBJECT_REF_METHODS_NULLABLE(Continue, Stmt, ContinueNode)
Declare a buffer that can be used in the body.
Definition stmt.h:237
BufferVar buffer
The buffer being declared.
Definition stmt.h:240
TVM_FFI_DECLARE_OBJECT_INFO_FINAL("tirx.DeclBuffer", DeclBufferNode, StmtNode)
Expr data
Physical pointer expression backing the declaration.
Definition stmt.h:242
static void RegisterReflection()
Definition stmt.h:244
Managed reference to DeclBufferNode.
Definition stmt.h:254
TVM_FFI_DEFINE_OBJECT_REF_METHODS_NULLABLE(DeclBuffer, Stmt, DeclBufferNode)
DeclBuffer(BufferVar buffer, Expr data, Span span=Span())
TVM_DEFINE_OBJECT_REF_COW_METHOD(DeclBufferNode)
Evaluates an expression. This is mostly used for putting a Call node into Stmt.
Definition stmt.h:340
TVM_FFI_DECLARE_OBJECT_INFO_FINAL("tirx.Evaluate", EvaluateNode, StmtNode)
Expr value
The expression to be evaluated.
Definition stmt.h:343
static void RegisterReflection()
Definition stmt.h:345
Managed reference to EvaluateNode.
Definition stmt.h:356
Evaluate(Expr value, Span span=Span())
Evaluate(int value, Span span=Span())
Definition stmt.h:360
TVM_DEFINE_OBJECT_REF_COW_METHOD(EvaluateNode)
TVM_FFI_DEFINE_OBJECT_REF_METHODS_NULLABLE(Evaluate, Stmt, EvaluateNode)
A for loop, with possible type annotations.
Definition stmt.h:590
PrimExpr min
The minimum value of iteration.
Definition stmt.h:595
ffi::Optional< IterVar > thread_binding
Only valid when kind == ForKind::kThreadBinding The context thread that this loop variable bounds to.
Definition stmt.h:606
ffi::Optional< PrimExpr > step
The loop step. It is one if not specified.
Definition stmt.h:619
bool HasTrivialStep() const
Check it is a loop without nontrivial loop step.
Stmt body
The body of the for loop.
Definition stmt.h:601
PrimExpr extent
The extent of the iteration.
Definition stmt.h:597
ForKind kind
The kind of the for loop.
Definition stmt.h:599
ffi::Map< ffi::String, ffi::Any > annotations
Additional annotations about the loop.
Definition stmt.h:615
TVM_FFI_DECLARE_OBJECT_INFO_FINAL("tirx.For", ForNode, StmtNode)
PrimVar loop_var
The loop variable.
Definition stmt.h:593
static void RegisterReflection()
Definition stmt.h:621
Managed reference to ForNode.
Definition stmt.h:644
For(PrimVar loop_var, PrimExpr min, PrimExpr extent, ForKind kind, Stmt body, ffi::Optional< IterVar > thread_binding=std::nullopt, ffi::Map< ffi::String, ffi::Any > annotations={}, ffi::Optional< PrimExpr > step=std::nullopt, Span span=Span())
TVM_FFI_DEFINE_OBJECT_REF_METHODS_NULLABLE(For, Stmt, ForNode)
TVM_DEFINE_OBJECT_REF_COW_METHOD(ForNode)
IfThenElse statement.
Definition stmt.h:520
static void RegisterReflection()
Definition stmt.h:529
ffi::Optional< Stmt > else_case
The branch to be executed when condition is false, can be null.
Definition stmt.h:527
PrimExpr condition
The condition.
Definition stmt.h:523
Stmt then_case
The branch to be executed when condition is true.
Definition stmt.h:525
TVM_FFI_DECLARE_OBJECT_INFO_FINAL("tirx.IfThenElse", IfThenElseNode, StmtNode)
Managed reference to IfThenElseNode.
Definition stmt.h:543
TVM_DEFINE_OBJECT_REF_COW_METHOD(IfThenElseNode)
TVM_FFI_DEFINE_OBJECT_REF_METHODS_NULLABLE(IfThenElse, Stmt, IfThenElseNode)
IfThenElse(PrimExpr condition, Stmt then_case, ffi::Optional< Stmt > else_case=std::nullopt, Span span=Span())
Match introduces a constraint that the source buffer region can be remapped to the data layout specif...
Definition stmt.h:780
BufferRegion source
The source buffer region.
Definition stmt.h:785
static void RegisterReflection()
Definition stmt.h:787
static constexpr TVMFFISEqHashKind _type_s_eq_hash_kind
Definition stmt.h:795
BufferVar buffer
The target buffer.
Definition stmt.h:783
TVM_FFI_DECLARE_OBJECT_INFO_FINAL("tirx.MatchBufferRegion", MatchBufferRegionNode, ffi::Object)
Managed reference to MatchBufferRegionNode.
Definition stmt.h:803
TVM_DEFINE_OBJECT_REF_COW_METHOD(MatchBufferRegionNode)
MatchBufferRegion(BufferVar buffer, BufferRegion source)
TVM_FFI_DEFINE_OBJECT_REF_METHODS_NULLABLE(MatchBufferRegion, ffi::ObjectRef, MatchBufferRegionNode)
Checked scalar view over a VarNode.
Definition var.h:46
A return from the current function.
Definition stmt.h:696
static void RegisterReflection()
Definition stmt.h:701
TVM_FFI_DECLARE_OBJECT_INFO_FINAL("tirx.Return", ReturnNode, StmtNode)
Expr value
The value to return.
Definition stmt.h:699
Managed reference to ReturnNode.
Definition stmt.h:713
TVM_DEFINE_OBJECT_REF_COW_METHOD(ReturnNode)
TVM_FFI_DEFINE_OBJECT_REF_METHODS_NULLABLE(Return, Stmt, ReturnNode)
Return(Expr value, Span span=Span())
A block is a basic schedule unit in TIR.
Definition stmt.h:833
Stmt body
The body of the block.
Definition stmt.h:858
ffi::Array< BufferRegion > reads
The read buffer regions of the block.
Definition stmt.h:838
static void RegisterReflection()
Definition stmt.h:860
TVM_FFI_DECLARE_OBJECT_INFO_FINAL("tirx.SBlock", SBlockNode, StmtNode)
ffi::Array< MatchBufferRegion > match_buffers
The match buffer regions.
Definition stmt.h:846
ffi::String name_hint
The name_hint of the block.
Definition stmt.h:842
ffi::Optional< Stmt > init
The init statement is executed during the first iteration of reduction loops in a reduction block....
Definition stmt.h:856
ffi::Array< BufferVar > alloc_buffers
The buffer allocated in the block.
Definition stmt.h:844
ffi::Array< IterVar > iter_vars
The variables of the block.
Definition stmt.h:836
ffi::Array< BufferRegion > writes
The write buffer regions of the block.
Definition stmt.h:840
ffi::Map< ffi::String, ffi::Any > annotations
The annotation of the block.
Definition stmt.h:848
A block realization node represents execution of the block at the binding values.
Definition stmt.h:903
static void RegisterReflection()
Definition stmt.h:915
PrimExpr predicate
The predicate of the block realization, the block will only be executed when the predicate is true.
Definition stmt.h:911
ffi::Array< PrimExpr > iter_values
The corresponding values of the iter vars.
Definition stmt.h:906
TVM_FFI_DECLARE_OBJECT_INFO_FINAL("tirx.SBlockRealize", SBlockRealizeNode, StmtNode)
SBlock block
The block to be realized.
Definition stmt.h:913
Managed reference to BlockRealizeNode.
Definition stmt.h:929
TVM_DEFINE_OBJECT_REF_COW_METHOD(SBlockRealizeNode)
SBlockRealize(ffi::Array< PrimExpr > iter_values, PrimExpr predicate, SBlock block, Span span=Span())
TVM_FFI_DEFINE_OBJECT_REF_METHODS_NULLABLE(SBlockRealize, Stmt, SBlockRealizeNode)
Managed reference to SBlockNode.
Definition stmt.h:881
TVM_FFI_DEFINE_OBJECT_REF_METHODS_NULLABLE(SBlock, Stmt, SBlockNode)
SBlock(ffi::String name_hint, Stmt body, ffi::Array< BufferVar > alloc_buffers=ffi::Array< BufferVar >(), Span span=Span())
TVM_DEFINE_OBJECT_REF_COW_METHOD(SBlockNode)
SBlock(ffi::Array< IterVar > iter_vars, ffi::Array< BufferRegion > reads, ffi::Array< BufferRegion > writes, ffi::String name_hint, Stmt body, ffi::Optional< Stmt > init=std::nullopt, ffi::Array< BufferVar > alloc_buffers=ffi::Array< BufferVar >(), ffi::Array< MatchBufferRegion > match_buffers=ffi::Array< MatchBufferRegion >(), ffi::Map< ffi::String, ffi::Any > annotations=ffi::Map< ffi::String, ffi::Any >(), Span span=Span())
Standalone statement that declares a scope-id binding (e.g. cta_id, warp_id, lane_id)....
Definition stmt.h:946
ScopeIdDef def
The scope-id definition (Vars + extents + binding).
Definition stmt.h:949
TVM_FFI_DECLARE_OBJECT_INFO_FINAL("tirx.ScopeIdDefStmt", ScopeIdDefStmtNode, StmtNode)
static void RegisterReflection()
Definition stmt.h:951
Managed reference to ScopeIdDefStmtNode.
Definition stmt.h:959
ScopeIdDefStmt(ScopeIdDef def, Span span=Span())
TVM_FFI_DEFINE_OBJECT_REF_METHODS_NULLABLE(ScopeIdDefStmt, Stmt, ScopeIdDefStmtNode)
TVM_DEFINE_OBJECT_REF_COW_METHOD(ScopeIdDefStmtNode)
Definition exec_scope.h:137
The container of seq statement. Represent a sequence of statements.
Definition stmt.h:315
size_t size() const
Definition stmt.h:321
Stmt operator[](size_t index) const
Get the index-th element in the sequence.
Definition stmt.h:325
ffi::Array< Stmt > seq
internal sequence content.
Definition stmt.h:318
static void RegisterReflection()
Definition stmt.h:327
TVM_FFI_DECLARE_OBJECT_INFO_FINAL("tirx.SeqStmt", SeqStmtNode, StmtNode)
Helper class to flatten sequence of arguments into Array.
Definition stmt.h:440
static ffi::Optional< SeqStmt > AsSeqStmt(const T &t)
Definition stmt.h:445
void operator()(size_t i, const T &stmt_or_seq) const
Definition stmt.h:463
Flattener(ffi::Array< Stmt > *seq)
Definition stmt.h:442
Sequence statement.
Definition stmt.h:367
TVM_DEFINE_OBJECT_REF_COW_METHOD(SeqStmtNode)
Stmt operator[](size_t index) const
Get the index-th element in the sequence.
Definition stmt.h:381
static Stmt Flatten(Args &&... seq_args)
Construct a sequence statement by flattening all the arrays and sequences in the arguments recursivel...
Definition stmt.h:403
size_t size() const
Definition stmt.h:377
SeqStmt(ffi::Array< Stmt > seq, Span span=Span())
Construct SeqStmt.
TVM_FFI_DEFINE_OBJECT_REF_METHODS_NULLABLE(SeqStmt, Stmt, SeqStmtNode)
Base node of all statements.
Definition stmt.h:43
static constexpr const uint32_t _type_child_slots
Definition stmt.h:62
static constexpr TVMFFISEqHashKind _type_s_eq_hash_kind
Definition stmt.h:60
Span span
Span that points to the original source code. Reserved debug information.
Definition stmt.h:49
StmtNode(Span span)
Definition stmt.h:52
TVM_FFI_DECLARE_OBJECT_INFO("tirx.Stmt", StmtNode, ffi::Object)
static void RegisterReflection()
Definition stmt.h:54
Container of all statements.
Definition stmt.h:67
TVM_FFI_DEFINE_OBJECT_REF_METHODS_NULLABLE(Stmt, ffi::ObjectRef, StmtNode)
A While loop.
Definition stmt.h:665
static void RegisterReflection()
Definition stmt.h:672
PrimExpr condition
The termination condition.
Definition stmt.h:668
TVM_FFI_DECLARE_OBJECT_INFO_FINAL("tirx.While", WhileNode, StmtNode)
Stmt body
The body of the while loop.
Definition stmt.h:670
Managed reference to WhileNode.
Definition stmt.h:685
TVM_DEFINE_OBJECT_REF_COW_METHOD(WhileNode)
While(PrimExpr condition, Stmt body, Span span=Span())
TVM_FFI_DEFINE_OBJECT_REF_METHODS_NULLABLE(While, Stmt, WhileNode)
constexpr const char * thread_extent
Mark launching extent of thread, used by device API.
Definition stmt.h:997
bool IsPragmaKey(const std::string &attr_key)
Check if attr_key is a pragma key extension.
Definition stmt.h:1024
constexpr const char * pragma_unroll_explicit
Pragma: unroll explicit.
Definition stmt.h:993
constexpr const char * storage_alignment
Mark storage alignment requirement of buffers.
Definition stmt.h:995
constexpr const char * buffer_data_alignment
Mark buffer initial addr alignment in bytes.
Definition stmt.h:1001
constexpr const char * kPersistentKernel
Mark the kernel as persistent.
Definition stmt.h:1009
constexpr const char * device_id
The allocation device for global malloc in host.
Definition stmt.h:975
constexpr const char * pragma_auto_unroll_max_step
Pragma: auto-unroll, max_step.
Definition stmt.h:987
constexpr const char * tensorized_nki_instruction
Definition stmt.h:1004
constexpr const char * pragma_import_llvm
Import llvm source or file into the final code gen module.
Definition stmt.h:991
constexpr const char * pragma_import_c
Import C source or file into the final code gen module.
Definition stmt.h:989
constexpr const char * compute_scope
Mark the scope as when computation start to happen. This can hint some code generator to create a new...
Definition stmt.h:973
constexpr const char * buffer_allocated_addr
Mark buffer allocated addr in bytes.
Definition stmt.h:1003
constexpr const char * device_type
The device type.
Definition stmt.h:979
constexpr const char * kVolatile
Annotation key on AllocBuffer marking the allocation as volatile.
Definition stmt.h:999
constexpr const char * device_scope
Mark that it is in the device scope.
Definition stmt.h:977
constexpr const char * extern_scope
Mark the scope as generated by extern primitive. Such scope can contain arbitrary ir program and we n...
Definition stmt.h:985
constexpr const char * kDeviceEntry
Mark the device-region entry within a PrimFunc body. The AttrStmt so-keyed has a body that is the dev...
Definition stmt.h:1017
@ kUnrolled
The execution is unrolled.
Definition var.h:128
@ kVectorized
The loop is vectorized.
Definition var.h:132
const char * ForKind2String(ForKind t)
Definition stmt.h:1041
std::ostream & operator<<(std::ostream &os, CallEffectKind side_effect)
Definition op_attr_types.h:140
PrimExpr TypeAnnotation(PrimType dtype, Span span=Span())
Create a type annotation expression.
ForKind
The kind of the loop.
Definition stmt.h:559
@ kThreadBinding
The loop variable is bound to a thread in an environment. In the final stage of lowering,...
@ kUnrolled
The loop body must be unrolled.
@ kParallel
Parallel execution on CPU.
@ kVectorized
Vector SIMD loop. The loop body will be vectorized.
@ kSerial
default semantics – serial execution.
An object that builds and maintains block scope and StmtSref mapping for Dependence analysis.
Definition analyzer.h:40