23#ifndef TVM_S_TIR_ITER_VAR_H_
24#define TVM_S_TIR_ITER_VAR_H_
26#include <tvm/ffi/optional.h>
129 namespace refl = tvm::ffi::reflection;
130 refl::ObjectDef<IterVarNode>()
132 .def_ro(
"var", &
IterVarNode::var, refl::AttachFieldFlag::SEqHashDefSimple())
164 return "ThreadIndex";
176 return "Parallelized";
Type ty
The deduced or annotated type of the expression.
Definition base_expr.h:338
Non-nullable source-location metadata.
Definition location.h:91
Base node for opaque construction-time expressions.
Definition base_expr.h:394
Typed reference/view over any Expr whose ExprNode::ty is PrimType.
Definition base_expr.h:447
Checked scalar view over a VarNode.
Definition expr.h:742
ExpectedType ty() const
Definition base_expr.h:424
Reference to the shared immutable unknown location.
Definition location.h:105
An iteration variable representing an iteration over a one dimensional interval.
Definition iter_var.h:108
PrimVar var
The looping variable.
Definition iter_var.h:120
static void RegisterReflection()
Definition iter_var.h:128
IterVarType iter_type
The type of the IterVar.
Definition iter_var.h:122
IterVarNode(ffi::UnsafeInit tag)
Definition iter_var.h:110
IterVarNode(PrimVar var)
Definition iter_var.h:112
ffi::String thread_tag
additional tag on the iteration variable, set this if this is bound already to a known thread tag.
Definition iter_var.h:127
static constexpr TVMFFISEqHashKind _type_s_eq_hash_kind
Definition iter_var.h:137
ffi::Optional< Range > dom
the domain of iteration, if known, can be None For the intermediate schedule node,...
Definition iter_var.h:118
TVM_FFI_DECLARE_OBJECT_INFO_FINAL("s_tir.IterVar", IterVarNode, OpaqueExprNode)
Iteration Variable, represents an iteration over an integer interval.
Definition iter_var.h:147
IterVar(ffi::ObjectPtr< IterVarNode > node)
Definition iter_var.h:152
TVM_DEFINE_OBJECT_REF_COW_METHOD(IterVarNode)
IterVar(ffi::Optional< Range > dom, PrimVar var, IterVarType iter_type, ffi::String thread_tag="", Location loc=UnknownLoc())
static constexpr bool _type_container_is_exact
Definition iter_var.h:155
TVM_FFI_DEFINE_OBJECT_REF_METHODS_NOTNULLABLE(IterVar, PrimExpr, IterVarNode)
Copy-on-write helper macro for IR ffi::ObjectRef types.
const char * IterVarType2String(IterVarType t)
Definition iter_var.h:159
IterVarType
Type of iteration variable. Each IterVar have a specific type.
Definition iter_var.h:39
@ kOrdered
Serial loops with loop carry dependency, the iteration must execute in order. Cannot be re-ordered.
Definition iter_var.h:71
@ kTensorized
Marks boundary of tensorization intrinsic.
Definition iter_var.h:99
@ kThreadIndex
The IterVar itself is a thread-index of a fixed thread launching group. Note that this is already ass...
Definition iter_var.h:56
@ kParallelized
The loop is parallelized.
Definition iter_var.h:95
@ kCommReduce
Communicative reduction. Cannot be directly parallelized.
Definition iter_var.h:63
@ kOpaque
IterVar is opaque,.
Definition iter_var.h:81
@ kDataPar
Data parallel iteration. This normally corresponds to axis of Tensor. Allow all IterVar manipulations...
Definition iter_var.h:48
@ kUnrolled
The execution is unrolled.
Definition iter_var.h:87
@ kVectorized
The loop is vectorized.
Definition iter_var.h:91
An object that builds and maintains block scope and StmtSref mapping for Dependence analysis.
Definition attr.h:23