tvm
Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | List of all members
tvm::tir::BlockDependenceInfoNode Class Reference

An object that helps build and query block level dependences using the 2 core objects BlockScope and StmtSRef. More...

#include <block_dependence_info.h>

Inheritance diagram for tvm::tir::BlockDependenceInfoNode:
Collaboration diagram for tvm::tir::BlockDependenceInfoNode:

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 *, StmtSRefstmt2ref
 The reverse mapping from block/for-loop to their corresponding srefs. More...
 

Static Public Attributes

static constexpr const char * _type_key = "tir.BlockDependenceInfo"
 

Detailed Description

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

Member Function Documentation

◆ GetBlockScope()

BlockScope tvm::tir::BlockDependenceInfoNode::GetBlockScope ( const StmtSRef scope_root) const
inline

Get the BlockScope corresponding to the sref of scope root block.

Parameters
scope_rootThe block sref to be retrieved
Returns
The corresponding BlockScope

◆ RegisterReflection()

static void tvm::tir::BlockDependenceInfoNode::RegisterReflection ( )
inlinestatic

◆ TVM_DECLARE_FINAL_OBJECT_INFO()

tvm::tir::BlockDependenceInfoNode::TVM_DECLARE_FINAL_OBJECT_INFO ( BlockDependenceInfoNode  ,
Object   
)

Member Data Documentation

◆ _type_key

constexpr const char* tvm::tir::BlockDependenceInfoNode::_type_key = "tir.BlockDependenceInfo"
staticconstexpr

◆ sref2scope

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,.

◆ stmt2ref

std::unordered_map<const StmtNode*, StmtSRef> tvm::tir::BlockDependenceInfoNode::stmt2ref

The reverse mapping from block/for-loop to their corresponding srefs.


The documentation for this class was generated from the following file: