tvm
Loading...
Searching...
No Matches
stmt.h
Go to the documentation of this file.
1/*
2 * Licensed to the Apache Software Foundation (ASF) under one
3 * or more contributor license agreements. See the NOTICE file
4 * distributed with this work for additional information
5 * regarding copyright ownership. The ASF licenses this file
6 * to you under the Apache License, Version 2.0 (the
7 * "License"); you may not use this file except in compliance
8 * with the License. You may obtain a copy of the License at
9 *
10 * http://www.apache.org/licenses/LICENSE-2.0
11 *
12 * Unless required by applicable law or agreed to in writing,
13 * software distributed under the License is distributed on an
14 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 * KIND, either express or implied. See the License for the
16 * specific language governing permissions and limitations
17 * under the License.
18 */
27#ifndef TVM_S_TIR_STMT_H_
28#define TVM_S_TIR_STMT_H_
29
30#include <tvm/base.h>
31#include <tvm/ffi/container/tuple.h>
32#include <tvm/s_tir/iter_var.h>
33#include <tvm/tirx/stmt.h>
34
35namespace tvm {
36namespace s_tir {
37
39using TensorAllocatedAddresses = ffi::Array<ffi::Tuple<Var, ffi::Array<PrimExpr>>>;
40
50class MatchTensorRegionObj : public ffi::Object {
51 public:
52 explicit MatchTensorRegionObj(ffi::UnsafeInit tag) : tensor(tag), source(tag) {}
53
56
61
62 static void RegisterReflection() {
63 namespace refl = tvm::ffi::reflection;
64 refl::ObjectDef<MatchTensorRegionObj>()
65 .def_ro("tensor", &MatchTensorRegionObj::tensor, refl::AttachFieldFlag::SEqHashDefPattern())
66 .def_ro("source", &MatchTensorRegionObj::source);
67 }
68
69 static constexpr TVMFFISEqHashKind _type_s_eq_hash_kind = kTVMFFISEqHashKindTreeNode;
70 TVM_FFI_DECLARE_OBJECT_INFO_FINAL("s_tir.MatchTensorRegion", MatchTensorRegionObj, ffi::Object);
71};
72
77class MatchTensorRegion : public ffi::ObjectRef {
78 public:
79 explicit MatchTensorRegion(ffi::UnsafeInit tag, ffi::ObjectPtr<MatchTensorRegionObj> data)
80 : ffi::ObjectRef(tag) {
81 data_ = std::move(data);
82 }
83
84 TVM_DLL explicit MatchTensorRegion(tirx::TensorVar tensor, TensorRegion source);
85
89};
90
112class SBlockObj : public StmtObj {
113 public:
114 explicit SBlockObj(ffi::UnsafeInit tag) : body(tag) {}
115
116 explicit SBlockObj(SeqStmt body) : body(std::move(body)) {}
117
119 ffi::Array<s_tir::IterVar> iter_vars;
121 ffi::Array<TensorRegion> reads;
123 ffi::Array<TensorRegion> writes;
125 ffi::String name_hint;
127 ffi::Array<tirx::TensorVar> alloc_tensors;
129 ffi::Array<MatchTensorRegion> match_tensors;
131 ffi::Map<ffi::String, ffi::Any> annotations;
139 ffi::Optional<SeqStmt> init;
142
143 static void RegisterReflection() {
144 namespace refl = tvm::ffi::reflection;
145 refl::ObjectDef<SBlockObj>()
146 .def_ro("iter_vars", &SBlockObj::iter_vars)
147 .def_ro("reads", &SBlockObj::reads)
148 .def_ro("writes", &SBlockObj::writes)
149 .def_ro("name_hint", &SBlockObj::name_hint, refl::AttachFieldFlag::SEqHashIgnore())
150 .def_ro("alloc_tensors", &SBlockObj::alloc_tensors,
151 refl::AttachFieldFlag::SEqHashDefSimple())
152 .def_ro("match_tensors", &SBlockObj::match_tensors)
153 .def_ro("annotations", &SBlockObj::annotations)
154 .def_ro("init", &SBlockObj::init)
155 .def_ro("body", &SBlockObj::body);
156 }
158};
159
164class SBlock : public Stmt {
165 public:
166 TVM_DLL explicit SBlock(
167 ffi::Array<s_tir::IterVar> iter_vars, ffi::Array<TensorRegion> reads,
168 ffi::Array<TensorRegion> writes, ffi::String name_hint, SeqStmt body,
169 ffi::Optional<SeqStmt> init = std::nullopt,
170 ffi::Array<tirx::TensorVar> alloc_tensors = ffi::Array<tirx::TensorVar>(),
171 ffi::Array<MatchTensorRegion> match_tensors = ffi::Array<MatchTensorRegion>(),
172 ffi::Map<ffi::String, ffi::Any> annotations = ffi::Map<ffi::String, ffi::Any>(),
173 Location loc = UnknownLoc());
174
175 TVM_DLL explicit SBlock(ffi::String name_hint, SeqStmt body,
176 ffi::Array<tirx::TensorVar> alloc_tensors = ffi::Array<tirx::TensorVar>(),
177 Location loc = UnknownLoc());
178
179 explicit SBlock(ffi::ObjectPtr<SBlockObj> node) : Stmt(std::move(node)) {}
180
183};
184
188class SBlockRealizeObj : public StmtObj {
189 public:
190 explicit SBlockRealizeObj(ffi::UnsafeInit tag) : predicate(tag), block(tag) {}
191
194
196 ffi::Array<PrimExpr> iter_values;
204
205 static void RegisterReflection() {
206 namespace refl = tvm::ffi::reflection;
207 refl::ObjectDef<SBlockRealizeObj>()
208 .def_ro("iter_values", &SBlockRealizeObj::iter_values)
209 .def_ro("predicate", &SBlockRealizeObj::predicate)
210 .def_ro("block", &SBlockRealizeObj::block);
211 }
213};
214
219class SBlockRealize : public Stmt {
220 public:
221 TVM_DLL explicit SBlockRealize(ffi::Array<PrimExpr> iter_values, PrimExpr predicate, SBlock block,
222 Location loc = UnknownLoc());
223
224 explicit SBlockRealize(ffi::ObjectPtr<SBlockRealizeObj> node) : Stmt(std::move(node)) {}
225
228};
229
231TVM_DLL const Op& async_copy_scope();
233TVM_DLL const Op& async_commit();
235TVM_DLL const Op& async_wait();
237TVM_DLL const Op& manual_sync();
238
239namespace attr {
241inline constexpr ffi::reflection::AttrKey<ffi::String> kThreadBinding{"thread_binding"};
242
247inline constexpr ffi::reflection::AttrKey<int64_t> kDoubleBufferScope{"double_buffer_scope"};
248
252inline constexpr ffi::reflection::AttrKey<ffi::String> kFragmentShape{"fragment_shape"};
253
257inline constexpr ffi::reflection::AttrKey<ffi::String> kFragmentLayout{"fragment_layout"};
258
262inline constexpr ffi::reflection::AttrKey<PrimExpr> kLoopPartitionHint{"loop_partition_hint"};
263
264// -----------------------------------------------------------------------
265// meta_schedule annotations
266// -----------------------------------------------------------------------
267
269inline constexpr ffi::reflection::AttrKey<ffi::String> kMetaScheduleTilingStructure{
270 "meta_schedule.tiling_structure"};
271
276inline constexpr ffi::reflection::AttrKey<int64_t> kMetaScheduleCooperativeFetch{
277 "meta_schedule.cooperative_fetch"};
278
280inline constexpr ffi::reflection::AttrKey<int64_t> kMetaScheduleThreadExtentLowInclusive{
281 "meta_schedule.thread_extent_low_inclusive"};
282
284inline constexpr ffi::reflection::AttrKey<int64_t> kMetaScheduleThreadExtentHighInclusive{
285 "meta_schedule.thread_extent_high_inclusive"};
286
288inline constexpr ffi::reflection::AttrKey<int64_t> kMetaScheduleRandomComputeProducer{
289 "meta_schedule.random_compute_producer"};
290
292inline constexpr ffi::reflection::AttrKey<int64_t> kMetaScheduleParallel{"meta_schedule.parallel"};
293
295inline constexpr ffi::reflection::AttrKey<int64_t> kMetaScheduleVectorize{
296 "meta_schedule.vectorize"};
297
299inline constexpr ffi::reflection::AttrKey<int64_t> kMetaScheduleUnrollExplicit{
300 "meta_schedule.unroll_explicit"};
301
303inline constexpr ffi::reflection::AttrKey<int64_t> kMetaScheduleUnrollImplicit{
304 "meta_schedule.unroll_implicit"};
305
307inline constexpr ffi::reflection::AttrKey<ffi::String> kMetaScheduleAutoTensorize{
308 "meta_schedule.auto_tensorize"};
309
311inline constexpr ffi::reflection::AttrKey<bool> kMetaScheduleLayoutRewritePreproc{
312 "meta_schedule.layout_rewrite_preproc"};
313
317inline constexpr ffi::reflection::AttrKey<ffi::String> kMetaScheduleAutoTensorizeInit{
318 "meta_schedule.auto_tensorize_init"};
319
321inline constexpr ffi::reflection::AttrKey<ffi::String> kMetaScheduleInlineRule{
322 "meta_schedule.inline_rule"};
323
324// -----------------------------------------------------------------------
325// Schedule primitive / SBlock annotations
326// -----------------------------------------------------------------------
327
329inline constexpr ffi::reflection::AttrKey<TensorAllocatedAddresses> kTensorAllocatedAddr{
330 "s_tir.tensor_allocated_addr"};
331
339inline constexpr ffi::reflection::AttrKey<int64_t> kScriptParsingDetectAccess{
340 "tirx.script_parsing_detect_access"};
341
345constexpr const char* kRequireBlockVarBoundPredicate = "require_bound_predicate";
346
348inline constexpr ffi::reflection::AttrKey<ffi::Array<int64_t>> kSoftwarePipelineStage{
349 "software_pipeline_stage"};
350
352inline constexpr ffi::reflection::AttrKey<ffi::Array<int64_t>> kSoftwarePipelineOrder{
353 "software_pipeline_order"};
354
359inline constexpr ffi::reflection::AttrKey<ffi::Array<int64_t>> kSoftwarePipelineAsyncStages{
360 "software_pipeline_async_stages"};
361
363inline constexpr ffi::reflection::AttrKey<int64_t> kManifestSharedMemoryLocalStage{
364 "tirx.manifest_shared_memory_local_stage"};
365
372inline constexpr ffi::reflection::AttrKey<
373 ffi::Array<ffi::Tuple<int32_t, int32_t, int32_t, int32_t>>>
374 kTensorDimAlign{"tensor_dim_align"};
375
379inline constexpr ffi::reflection::AttrKey<ffi::Array<int64_t>> kExplicitReadRegion{
380 "explicit_read_region"};
381
385inline constexpr ffi::reflection::AttrKey<ffi::Array<int64_t>> kExplicitWriteRegion{
386 "explicit_write_region"};
387
389inline constexpr ffi::reflection::AttrKey<int64_t> kIrregularLoopMark{"irregular_loop_mark"};
390
392inline constexpr ffi::reflection::AttrKey<int64_t> kAutoCopy{"auto_copy"};
393
395inline constexpr ffi::reflection::AttrKey<int64_t> kLocalStage{"local_stage"};
396
398inline constexpr ffi::reflection::AttrKey<int64_t> kVectorBytes{"vector_bytes"};
399
404inline constexpr ffi::reflection::AttrKey<int64_t> kWarpExecution{"warp_execution"};
405
406constexpr const char* kPermutedLayout = "permuted_layout";
407
408inline constexpr ffi::reflection::AttrKey<ffi::String> kScheduleRule{"schedule_rule"};
409
410inline constexpr ffi::reflection::AttrKey<ffi::Array<int64_t>> kMetaScheduleWriteCacheLevel{
411 "s_tir.meta_schedule.write_cache_level"};
412
413} // namespace attr
414
416inline ffi::Optional<ffi::String> GetThreadBinding(const ForObj* loop) {
417 if (auto tag = loop->annotations.Get(tvm::s_tir::attr::kThreadBinding.name)) {
418 TVM_FFI_CHECK(loop->kind == ForKind::kParallel, ValueError)
419 << "thread_binding requires a parallel loop";
420 TVM_FFI_CHECK(tag->as<ffi::String>().has_value(), TypeError)
421 << "thread_binding annotation must be a string";
422 TVM_FFI_CHECK(loop->HasTrivialStep(), ValueError) << "Thread binding loops require a unit step";
423 return tag->cast<ffi::String>();
424 }
425 return std::nullopt;
426}
427inline ffi::Optional<ffi::String> GetThreadBinding(const For& loop) {
428 return GetThreadBinding(loop.get());
429}
430
431} // namespace s_tir
432} // namespace tvm
433#endif // TVM_S_TIR_STMT_H_
TIRx statements and shared statement entry header.
A for loop, with possible type annotations.
Definition stmt.h:471
ffi::Map< ffi::String, ffi::Any > annotations
Additional annotations about the loop.
Definition stmt.h:501
ForKind kind
The kind of the for loop.
Definition stmt.h:492
TVM_TIRX_DLL bool HasTrivialStep() const
Check it is a loop without nontrivial loop step.
Managed reference to ForObj.
Definition stmt.h:527
Non-nullable source-location metadata.
Definition location.h:91
Reference-counted handle to a canonical named operator.
Definition op.h:140
Typed reference/view over any Expr whose ExprObj::ty is PrimType.
Definition expr.h:187
Sequence statement.
Definition stmt.h:91
Base node of all statements.
Definition stmt.h:37
Container of all statements.
Definition stmt.h:61
Managed reference to TensorRegionObj.
Definition expr.h:944
Reference to the shared immutable unknown location.
Definition location.h:105
Match introduces a constraint that the source tensor region can be remapped to the data layout specif...
Definition stmt.h:50
static constexpr TVMFFISEqHashKind _type_s_eq_hash_kind
Definition stmt.h:69
TVM_FFI_DECLARE_OBJECT_INFO_FINAL("s_tir.MatchTensorRegion", MatchTensorRegionObj, ffi::Object)
static void RegisterReflection()
Definition stmt.h:62
tirx::TensorVar tensor
The target tensor.
Definition stmt.h:58
MatchTensorRegionObj(tirx::TensorVar tensor, TensorRegion source)
Definition stmt.h:54
TensorRegion source
The source tensor region.
Definition stmt.h:60
MatchTensorRegionObj(ffi::UnsafeInit tag)
Definition stmt.h:52
Managed reference to MatchTensorRegionObj.
Definition stmt.h:77
MatchTensorRegion(tirx::TensorVar tensor, TensorRegion source)
TVM_DEFINE_OBJECT_REF_COW_METHOD(MatchTensorRegionObj)
MatchTensorRegion(ffi::UnsafeInit tag, ffi::ObjectPtr< MatchTensorRegionObj > data)
Definition stmt.h:79
TVM_FFI_DEFINE_OBJECT_REF_METHODS_NOTNULLABLE(MatchTensorRegion, ffi::ObjectRef, MatchTensorRegionObj)
A block is a basic schedule unit in TIR.
Definition stmt.h:112
SBlockObj(SeqStmt body)
Definition stmt.h:116
static void RegisterReflection()
Definition stmt.h:143
ffi::Array< MatchTensorRegion > match_tensors
The match tensor regions.
Definition stmt.h:129
ffi::Array< tirx::TensorVar > alloc_tensors
The tensor allocated in the block.
Definition stmt.h:127
TVM_FFI_DECLARE_OBJECT_INFO_FINAL("s_tir.SBlock", SBlockObj, StmtObj)
SBlockObj(ffi::UnsafeInit tag)
Definition stmt.h:114
SeqStmt body
The body of the block.
Definition stmt.h:141
ffi::Array< TensorRegion > writes
The write tensor regions of the block.
Definition stmt.h:123
ffi::Array< s_tir::IterVar > iter_vars
The variables of the block.
Definition stmt.h:119
ffi::String name_hint
The name_hint of the block.
Definition stmt.h:125
ffi::Map< ffi::String, ffi::Any > annotations
The annotation of the block.
Definition stmt.h:131
ffi::Optional< SeqStmt > init
The init statement is executed during the first iteration of reduction loops in a reduction block....
Definition stmt.h:139
ffi::Array< TensorRegion > reads
The read tensor regions of the block.
Definition stmt.h:121
A block realization node represents execution of the block at the binding values.
Definition stmt.h:188
TVM_FFI_DECLARE_OBJECT_INFO_FINAL("s_tir.SBlockRealize", SBlockRealizeObj, StmtObj)
PrimExpr predicate
The predicate of the block realization, the block will only be executed when the predicate is true.
Definition stmt.h:201
ffi::Array< PrimExpr > iter_values
The corresponding values of the iter vars.
Definition stmt.h:196
SBlockRealizeObj(ffi::UnsafeInit tag)
Definition stmt.h:190
SBlockRealizeObj(PrimExpr predicate, SBlock block)
Definition stmt.h:192
static void RegisterReflection()
Definition stmt.h:205
SBlock block
The block to be realized.
Definition stmt.h:203
Managed reference to BlockRealizeNode.
Definition stmt.h:219
SBlockRealize(ffi::ObjectPtr< SBlockRealizeObj > node)
Definition stmt.h:224
TVM_FFI_DEFINE_OBJECT_REF_METHODS_NOTNULLABLE(SBlockRealize, Stmt, SBlockRealizeObj)
TVM_DEFINE_OBJECT_REF_COW_METHOD(SBlockRealizeObj)
SBlockRealize(ffi::Array< PrimExpr > iter_values, PrimExpr predicate, SBlock block, Location loc=UnknownLoc())
Managed reference to SBlockObj.
Definition stmt.h:164
SBlock(ffi::Array< s_tir::IterVar > iter_vars, ffi::Array< TensorRegion > reads, ffi::Array< TensorRegion > writes, ffi::String name_hint, SeqStmt body, ffi::Optional< SeqStmt > init=std::nullopt, ffi::Array< tirx::TensorVar > alloc_tensors=ffi::Array< tirx::TensorVar >(), ffi::Array< MatchTensorRegion > match_tensors=ffi::Array< MatchTensorRegion >(), ffi::Map< ffi::String, ffi::Any > annotations=ffi::Map< ffi::String, ffi::Any >(), Location loc=UnknownLoc())
SBlock(ffi::ObjectPtr< SBlockObj > node)
Definition stmt.h:179
TVM_FFI_DEFINE_OBJECT_REF_METHODS_NOTNULLABLE(SBlock, Stmt, SBlockObj)
SBlock(ffi::String name_hint, SeqStmt body, ffi::Array< tirx::TensorVar > alloc_tensors=ffi::Array< tirx::TensorVar >(), Location loc=UnknownLoc())
TVM_DEFINE_OBJECT_REF_COW_METHOD(SBlockObj)
Checked zero-state view over an ordinary VarObj with TensorType.
Definition expr.h:48
Parent compiler symbol visibility.
Axis metadata for schedulable tensor computations.
constexpr ffi::reflection::AttrKey< int64_t > kMetaScheduleThreadExtentLowInclusive
The allowed range of thread extent in thread bindings.
Definition stmt.h:280
constexpr ffi::reflection::AttrKey< ffi::Array< int64_t > > kExplicitWriteRegion
Mark that a block has an explicitly specified write region. This is used to override the default writ...
Definition stmt.h:385
constexpr ffi::reflection::AttrKey< ffi::Array< int64_t > > kMetaScheduleWriteCacheLevel
Definition stmt.h:410
constexpr ffi::reflection::AttrKey< PrimExpr > kLoopPartitionHint
For annotation requesting partitioning when its PrimExpr value is provably true.
Definition stmt.h:262
constexpr ffi::reflection::AttrKey< int64_t > kManifestSharedMemoryLocalStage
Mark the local stage for the shared memory access should be added.
Definition stmt.h:363
constexpr ffi::reflection::AttrKey< int64_t > kMetaScheduleUnrollExplicit
Mark auto-unroll setting on the block.
Definition stmt.h:299
constexpr ffi::reflection::AttrKey< ffi::String > kMetaScheduleAutoTensorize
Mark that a block should be further rewritten using tensorization.
Definition stmt.h:307
constexpr ffi::reflection::AttrKey< int64_t > kLocalStage
Mark local stage constraint on data copy.
Definition stmt.h:395
constexpr ffi::reflection::AttrKey< ffi::String > kThreadBinding
Hardware thread axis bound to a parallel loop during S-TIR scheduling.
Definition stmt.h:241
constexpr ffi::reflection::AttrKey< ffi::Array< int64_t > > kExplicitReadRegion
Mark that a block has an explicitly specified read region. This is used to override the default read ...
Definition stmt.h:379
constexpr ffi::reflection::AttrKey< ffi::Array< int64_t > > kSoftwarePipelineAsyncStages
List stages in the software pipeline that should run asynchronously.
Definition stmt.h:359
constexpr ffi::reflection::AttrKey< int64_t > kIrregularLoopMark
,ark a ForObj represent an irregular loop of non-structural control flow edges.
Definition stmt.h:389
constexpr ffi::reflection::AttrKey< int64_t > kAutoCopy
Mark auto copy for memhammer.
Definition stmt.h:392
constexpr ffi::reflection::AttrKey< ffi::String > kMetaScheduleTilingStructure
Mark the tiling structure of blocks that are applied by rule Multi-Level-Tiling.
Definition stmt.h:269
constexpr ffi::reflection::AttrKey< ffi::Array< int64_t > > kSoftwarePipelineOrder
Mark the order of a statement in the software pipeline.
Definition stmt.h:352
constexpr ffi::reflection::AttrKey< int64_t > kDoubleBufferScope
SBlock annotation selecting a write-tensor index for double buffering in InjectSoftwarePipeline.
Definition stmt.h:247
constexpr ffi::reflection::AttrKey< int64_t > kScriptParsingDetectAccess
Mark whether the script-completer need to fill in missing access region during script parsing.
Definition stmt.h:339
constexpr ffi::reflection::AttrKey< ffi::String > kScheduleRule
Definition stmt.h:408
constexpr ffi::reflection::AttrKey< int64_t > kVectorBytes
Mark vectorization length constraint on block.
Definition stmt.h:398
constexpr ffi::reflection::AttrKey< ffi::String > kMetaScheduleInlineRule
Mark that a block is disallowed in auto inline.
Definition stmt.h:321
constexpr ffi::reflection::AttrKey< TensorAllocatedAddresses > kTensorAllocatedAddr
TensorAllocatedAddresses for block-owned allocations and match tensors.
Definition stmt.h:329
constexpr ffi::reflection::AttrKey< int64_t > kMetaScheduleVectorize
Mark auto-vectorize setting on the block.
Definition stmt.h:295
constexpr ffi::reflection::AttrKey< ffi::String > kMetaScheduleAutoTensorizeInit
Mark that the init statement of a block should be further rewritten using tensorization.
Definition stmt.h:317
constexpr ffi::reflection::AttrKey< ffi::Array< ffi::Tuple< int32_t, int32_t, int32_t, int32_t > > > kTensorDimAlign
Mark alignment of tensor dimension The annotation value is an array of explicit tuples (tensor_index,...
Definition stmt.h:374
constexpr ffi::reflection::AttrKey< int64_t > kMetaScheduleParallel
Mark auto-parallel setting on the block.
Definition stmt.h:292
constexpr ffi::reflection::AttrKey< int64_t > kMetaScheduleUnrollImplicit
Mark auto-unroll setting on the block.
Definition stmt.h:303
constexpr ffi::reflection::AttrKey< int64_t > kWarpExecution
Mark that a block is executed by a warp. This implies the extend of threadIdx.x is warp size.
Definition stmt.h:404
constexpr ffi::reflection::AttrKey< int64_t > kMetaScheduleRandomComputeProducer
Mark the block whose producer needs to be applied by rule Random-Compute-Location.
Definition stmt.h:288
constexpr ffi::reflection::AttrKey< bool > kMetaScheduleLayoutRewritePreproc
Mark that a block is a preprocessor block for layout rewrite.
Definition stmt.h:311
constexpr ffi::reflection::AttrKey< ffi::String > kFragmentShape
String-valued allocation Call attribute containing the TensorCore fragment shape.
Definition stmt.h:252
constexpr ffi::reflection::AttrKey< int64_t > kMetaScheduleThreadExtentHighInclusive
The allowed range of thread extent in thread bindings.
Definition stmt.h:284
constexpr const char * kRequireBlockVarBoundPredicate
Mark that the block need to add predicate for block var bounds during lowering.
Definition stmt.h:345
constexpr ffi::reflection::AttrKey< ffi::String > kFragmentLayout
String-valued allocation Call attribute containing the TensorCore fragment layout.
Definition stmt.h:257
constexpr const char * kPermutedLayout
Definition stmt.h:406
constexpr ffi::reflection::AttrKey< int64_t > kMetaScheduleCooperativeFetch
Mark that the loop should be further skip and bound to environment threads to enable cooperative fetc...
Definition stmt.h:276
constexpr ffi::reflection::AttrKey< ffi::Array< int64_t > > kSoftwarePipelineStage
Mark the stage of a statement in the software pipeline.
Definition stmt.h:348
const Op & async_commit()
Commit the preceding asynchronous copies to a queue.
const Op & async_copy_scope()
Region marking copies eligible for asynchronous lowering.
const Op & manual_sync()
Region whose author manages cross-thread synchronization explicitly.
const Op & async_wait()
Wait until at most the given number of committed groups remain in flight.
ffi::Array< ffi::Tuple< Var, ffi::Array< PrimExpr > > > TensorAllocatedAddresses
Placement entries owned by a block, traversable with their tensor references.
Definition stmt.h:39
ffi::Optional< ffi::String > GetThreadBinding(const ForObj *loop)
Interpret and validate S-TIR thread placement on a shared loop.
Definition stmt.h:416
An object that builds and maintains block scope and StmtSref mapping for Dependence analysis.
Definition analysis.h:41
@ kParallel
Parallel execution.