A block is a basic schedule unit in TIR.
More...
#include <stmt.h>
|
| ffi::Array< s_tir::IterVar > | iter_vars |
| | The variables of the block.
|
| |
| ffi::Array< TensorRegion > | reads |
| | The read tensor regions of the block.
|
| |
| ffi::Array< TensorRegion > | writes |
| | The write tensor regions of the block.
|
| |
| ffi::String | name_hint |
| | The name_hint of the block.
|
| |
| ffi::Array< tirx::TensorVar > | alloc_tensors |
| | The tensor allocated in the block.
|
| |
| ffi::Array< MatchTensorRegion > | match_tensors |
| | The match tensor regions.
|
| |
| ffi::Map< ffi::String, ffi::Any > | annotations |
| | The annotation of the block.
|
| |
| ffi::Optional< SeqStmt > | init |
| | The init statement is executed during the first iteration of reduction loops in a reduction block. The optional init field allows us to represent initialization and reduction update in a single block and transform them collectively. We also provide primitives to decompose the init into a separate block during scheduling. Init field is std::nullopt if there is no reduction iter_vars.
|
| |
| SeqStmt | body |
| | The body of the block.
|
| |
| Location | loc = UnknownLoc() |
| | Location that points to the original source code. Reserved debug information.
|
| |
A block is a basic schedule unit in TIR.
- Note
- SBlock's body is parameterized by iter vars.
with T.sblock(name):
v0 = T.axis.S(domain, value0)
v1 = T.axis.R(domain, value1)
...
T.reads([tensor0[start:end, ...], ...])
T.
writes([tensor1[start:end, ...], ...])
T.where(predicate)
tensor2 = T.alloc_tensor(ty_args=[T.Tensor(shape, dtype)])
tensor3 = Ts.match_tensor(source_tensor[start:end, ...])
Ts.sblock_attr({attr_key: attr_value, ...})
with T.init():
ffi::Array< TensorRegion > writes
The write tensor regions of the block.
Definition stmt.h:123
◆ SBlockNode() [1/2]
| tvm::s_tir::SBlockNode::SBlockNode |
( |
ffi::UnsafeInit |
tag | ) |
|
|
inlineexplicit |
◆ SBlockNode() [2/2]
| tvm::s_tir::SBlockNode::SBlockNode |
( |
SeqStmt |
body | ) |
|
|
inlineexplicit |
◆ RegisterReflection()
| static void tvm::s_tir::SBlockNode::RegisterReflection |
( |
| ) |
|
|
inlinestatic |
◆ TVM_FFI_DECLARE_OBJECT_INFO_FINAL()
| tvm::s_tir::SBlockNode::TVM_FFI_DECLARE_OBJECT_INFO_FINAL |
( |
"s_tir.SBlock" |
, |
|
|
SBlockNode |
, |
|
|
StmtNode |
|
|
) |
| |
◆ alloc_tensors
The tensor allocated in the block.
◆ annotations
| ffi::Map<ffi::String, ffi::Any> tvm::s_tir::SBlockNode::annotations |
The annotation of the block.
◆ body
| SeqStmt tvm::s_tir::SBlockNode::body |
◆ init
| ffi::Optional<SeqStmt> tvm::s_tir::SBlockNode::init |
The init statement is executed during the first iteration of reduction loops in a reduction block. The optional init field allows us to represent initialization and reduction update in a single block and transform them collectively. We also provide primitives to decompose the init into a separate block during scheduling. Init field is std::nullopt if there is no reduction iter_vars.
◆ iter_vars
The variables of the block.
◆ match_tensors
The match tensor regions.
◆ name_hint
| ffi::String tvm::s_tir::SBlockNode::name_hint |
The name_hint of the block.
◆ reads
The read tensor regions of the block.
◆ writes
The write tensor regions of the block.
The documentation for this class was generated from the following file: