23#ifndef TVM_S_TIR_ITER_VAR_H_
24#define TVM_S_TIR_ITER_VAR_H_
27#include <tvm/ffi/optional.h>
130 namespace refl = tvm::ffi::reflection;
131 refl::ObjectDef<IterVarObj>()
133 .def_ro(
"var", &
IterVarObj::var, refl::AttachFieldFlag::SEqHashDefSimple())
165 return "ThreadIndex";
177 return "Parallelized";
Type ty
The deduced or annotated type of the expression.
Definition expr.h:80
Non-nullable source-location metadata.
Definition location.h:91
Base node for opaque construction-time expressions.
Definition expr.h:136
Typed reference/view over any Expr whose ExprObj::ty is PrimType.
Definition expr.h:187
Checked scalar view over a VarObj.
Definition expr.h:598
ExpectedType ty() const
Definition expr.h:164
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:109
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:128
static void RegisterReflection()
Definition iter_var.h:129
IterVarObj(PrimVar var)
Definition iter_var.h:113
IterVarType iter_type
The type of the IterVar.
Definition iter_var.h:123
static constexpr TVMFFISEqHashKind _type_s_eq_hash_kind
Definition iter_var.h:138
TVM_FFI_DECLARE_OBJECT_INFO_FINAL("s_tir.IterVar", IterVarObj, OpaqueExprObj)
ffi::Optional< Range > dom
the domain of iteration, if known, can be None For the intermediate schedule node,...
Definition iter_var.h:119
IterVarObj(ffi::UnsafeInit tag)
Definition iter_var.h:111
PrimVar var
The looping variable.
Definition iter_var.h:121
Iteration Variable, represents an iteration over an integer interval.
Definition iter_var.h:148
IterVar(ffi::ObjectPtr< IterVarObj > node)
Definition iter_var.h:153
TVM_DEFINE_OBJECT_REF_COW_METHOD(IterVarObj)
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:156
TVM_FFI_DEFINE_OBJECT_REF_METHODS_NOTNULLABLE(IterVar, PrimExpr, IterVarObj)
Copy-on-write helper macro for IR ffi::ObjectRef types.
Parent compiler symbol visibility.
const char * IterVarType2String(IterVarType t)
Definition iter_var.h:160
IterVarType
Type of iteration variable. Each IterVar have a specific type.
Definition iter_var.h:40
@ kOrdered
Serial loops with loop carry dependency, the iteration must execute in order. Cannot be re-ordered.
Definition iter_var.h:72
@ kTensorized
Marks boundary of tensorization intrinsic.
Definition iter_var.h:100
@ kThreadIndex
The IterVar itself is a thread-index of a fixed thread launching group. Note that this is already ass...
Definition iter_var.h:57
@ kParallelized
The loop is parallelized.
Definition iter_var.h:96
@ kCommReduce
Communicative reduction. Cannot be directly parallelized.
Definition iter_var.h:64
@ kOpaque
IterVar is opaque,.
Definition iter_var.h:82
@ kDataPar
Data parallel iteration. This normally corresponds to axis of Tensor. Allow all IterVar manipulations...
Definition iter_var.h:49
@ kUnrolled
The execution is unrolled.
Definition iter_var.h:88
@ kVectorized
The loop is vectorized.
Definition iter_var.h:92
An object that builds and maintains block scope and StmtSref mapping for Dependence analysis.
Definition analysis.h:41