tvm
|
An object that helps build and query block level dependences using the 2 core objects BlockScope and StmtSRef. More...
#include <block_dependence_info.h>
Public Member Functions | |
TVM_DECLARE_FINAL_OBJECT_INFO (BlockDependenceInfoNode, Object) | |
BlockScope | GetBlockScope (const StmtSRef &scope_root) const |
Get the BlockScope corresponding to the sref of scope root block. More... | |
Static Public Member Functions | |
static void | RegisterReflection () |
Public Attributes | |
std::unordered_map< StmtSRef, BlockScope, ObjectPtrHash, ObjectPtrEqual > | sref2scope |
Mapping from a block sref to its corresponding BlockScope, tracking the dependency inside the block scope,. More... | |
std::unordered_map< const StmtNode *, StmtSRef > | stmt2ref |
The reverse mapping from block/for-loop to their corresponding srefs. More... | |
Static Public Attributes | |
static constexpr const char * | _type_key = "tir.BlockDependenceInfo" |
An object that helps build and query block level dependences using the 2 core objects BlockScope and StmtSRef.
The data structures exposed are: 1) sref2scope: Mapping from the srefs to its corresponding BlockScope 2) stmt2ref: Mapping from blocks to corresponding StmtSRefs
Note that this object does not store SRefs to loops as the purpose is only to expose block level dependences. This provides the advantage that the scope block (parent block) for a given block sref can be directly accessed using the sref->parent member
|
inline |
Get the BlockScope corresponding to the sref of scope root block.
scope_root | The block sref to be retrieved |
|
inlinestatic |
tvm::tir::BlockDependenceInfoNode::TVM_DECLARE_FINAL_OBJECT_INFO | ( | BlockDependenceInfoNode | , |
Object | |||
) |
|
staticconstexpr |
std::unordered_map<StmtSRef, BlockScope, ObjectPtrHash, ObjectPtrEqual> tvm::tir::BlockDependenceInfoNode::sref2scope |
Mapping from a block sref to its corresponding BlockScope, tracking the dependency inside the block scope,.
The reverse mapping from block/for-loop to their corresponding srefs.