31 #ifndef TVM_TIR_BLOCK_DEPENDENCE_INFO_H_
32 #define TVM_TIR_BLOCK_DEPENDENCE_INFO_H_
34 #include <tvm/ffi/reflection/registry.h>
37 #include <unordered_map>
60 std::unordered_map<StmtSRef, BlockScope, ObjectPtrHash, ObjectPtrEqual>
sref2scope;
62 std::unordered_map<const StmtNode*, StmtSRef>
stmt2ref;
66 refl::ObjectDef<BlockDependenceInfoNode>();
69 static constexpr
const char*
_type_key =
"tir.BlockDependenceInfo";
80 <<
"IndexError: Cannot find the corresponding BlockScope to the block sref:\n"
81 << GetRef<Stmt>(scope_root->stmt);
Definition of two pillar data structure for TensorIR scheduling: StmtSRef, BlockScope.
Managed reference class to IRModuleNode.
Definition: module.h:257
An object that helps build and query block level dependences using the 2 core objects BlockScope and ...
Definition: block_dependence_info.h:54
static void RegisterReflection()
Definition: block_dependence_info.h:64
static constexpr const char * _type_key
Definition: block_dependence_info.h:69
TVM_DECLARE_FINAL_OBJECT_INFO(BlockDependenceInfoNode, Object)
std::unordered_map< const StmtNode *, StmtSRef > stmt2ref
The reverse mapping from block/for-loop to their corresponding srefs.
Definition: block_dependence_info.h:62
std::unordered_map< StmtSRef, BlockScope, ObjectPtrHash, ObjectPtrEqual > sref2scope
Mapping from a block sref to its corresponding BlockScope, tracking the dependency inside the block s...
Definition: block_dependence_info.h:60
BlockScope GetBlockScope(const StmtSRef &scope_root) const
Get the BlockScope corresponding to the sref of scope root block.
Definition: block_dependence_info.h:77
Managed reference to BlockDependenceInfoNode.
Definition: block_dependence_info.h:90
BlockDependenceInfo(IRModule mod)
Construct a BlockDependenceInfo from IRModule.
TVM_DEFINE_MUTABLE_NOTNULLABLE_OBJECT_REF_METHODS(BlockDependenceInfo, ObjectRef, BlockDependenceInfoNode)
Managed reference to BlockScopeNode.
Definition: block_scope.h:298
Managed reference to StmtSRefNode.
Definition: block_scope.h:106
Definition: repr_printer.h:91
tvm::PrimExpr mod(const tvm::PrimExpr &a, const tvm::PrimExpr &b)
Definition: broadcast.h:306
Performance counters for profiling via the PAPI library.
Definition: analyzer.h:37