An object with 1-to-1 correspondence with each block reference in the sref tree. This data structure is used to track the producer-consumer dependencies between blocks. For example even leaf nodes have a scope node, even though they have no dependencies.
More...
#include <sblock_scope.h>
|
| std::unordered_map< StmtSRef, ffi::Array< Dependency >, ffi::ObjectPtrHash, ffi::ObjectPtrEqual > | src2deps |
| | Lookup table for the src of dependencies.
|
| |
| std::unordered_map< StmtSRef, ffi::Array< Dependency >, ffi::ObjectPtrHash, ffi::ObjectPtrEqual > | dst2deps |
| | Lookup table for the dst of dependencies.
|
| |
| std::unordered_map< TensorVar, ffi::Array< StmtSRef >, ffi::ObjectPtrHash, ffi::ObjectPtrEqual > | tensor_writers |
| | The mapping from the tensor to the blocks who write it.
|
| |
An object with 1-to-1 correspondence with each block reference in the sref tree. This data structure is used to track the producer-consumer dependencies between blocks. For example even leaf nodes have a scope node, even though they have no dependencies.
Glossary:
- s_tir::SBlock scope: A contiguous subtree of the sref tree, rooted at each s_tir::SBlock sref, whose components are:
- scope root: a block sref
- internal srefs: loop srefs
- scope leaves: block srefs
- Child block: The scope leaf blocks under the scope root or a specific internal sref
◆ GetDepsByDst()
| ffi::Array< Dependency > tvm::tirx::SBlockScopeObj::GetDepsByDst |
( |
const StmtSRef & |
dst | ) |
const |
Get all dependencies whose dst equals dst
- Parameters
-
- Returns
- The dependencies
◆ GetDepsBySrc()
| ffi::Array< Dependency > tvm::tirx::SBlockScopeObj::GetDepsBySrc |
( |
const StmtSRef & |
src | ) |
const |
Get all dependencies whose src equals src
- Parameters
-
- Returns
- The dependencies
◆ RegisterReflection()
| static void tvm::tirx::SBlockScopeObj::RegisterReflection |
( |
| ) |
|
|
inlinestatic |
◆ TVM_FFI_DECLARE_OBJECT_INFO_FINAL()
| tvm::tirx::SBlockScopeObj::TVM_FFI_DECLARE_OBJECT_INFO_FINAL |
( |
"s_tir.SBlockScope" |
, |
|
|
SBlockScopeObj |
, |
|
|
ffi::Object |
|
|
) |
| |
◆ dst2deps
| std::unordered_map<StmtSRef, ffi::Array<Dependency>, ffi::ObjectPtrHash, ffi::ObjectPtrEqual> tvm::tirx::SBlockScopeObj::dst2deps |
Lookup table for the dst of dependencies.
◆ src2deps
| std::unordered_map<StmtSRef, ffi::Array<Dependency>, ffi::ObjectPtrHash, ffi::ObjectPtrEqual> tvm::tirx::SBlockScopeObj::src2deps |
Lookup table for the src of dependencies.
- Note
- We intentionally didn't use tvm::Map as the data structure, because we need the values inside to be mutable so that they could be further maintained properly during transformations.
◆ tensor_writers
| std::unordered_map<TensorVar, ffi::Array<StmtSRef>, ffi::ObjectPtrHash, ffi::ObjectPtrEqual> tvm::tirx::SBlockScopeObj::tensor_writers |
The mapping from the tensor to the blocks who write it.
The documentation for this class was generated from the following file: