tvm
Public Member Functions | List of all members
tvm::auto_scheduler::AttachMap Class Reference

Managed reference to AttachMapNode. More...

#include <loop_state.h>

Inheritance diagram for tvm::auto_scheduler::AttachMap:
Collaboration diagram for tvm::auto_scheduler::AttachMap:

Public Member Functions

void SetComputeAtIter (int stage_id, int target_stage_id, int target_iter_id)
 Process the stage/iterator mapping after compute at. More...
 
void DeleteStage (int stage_id)
 Delete the entry of a specific stage. This is a public wrapper of DeleteStageEntry. More...
 
void UpdateIters (const std::vector< IterKey > &original_iters, const std::vector< IterKey > &new_iters)
 Find the relations of original iterators in AttachMap, and update them with the new iterators. Both stage_to_attach_iter and iter_to_attached_stages will be updated. More...
 
AttachMap ApplyStageIdOffset (int start_id, int offset=1) const
 Traverse through stage_to_attach_iter and iter_to_attached_stages map, add offset to stage indexes that are larger than the start_id. Used for steps that insert new stages to ComputeDAG (e.g., CacheRead/CacheWrite step). More...
 
 TVM_DEFINE_OBJECT_REF_METHODS (AttachMap, ObjectRef, AttachMapNode)
 
 TVM_DEFINE_OBJECT_REF_COW_METHOD (AttachMapNode)
 
- Public Member Functions inherited from tvm::runtime::ObjectRef
 ObjectRef ()=default
 default constructor More...
 
 ObjectRef (ObjectPtr< Object > data)
 Constructor from existing object ptr. More...
 
bool same_as (const ObjectRef &other) const
 Comparator. More...
 
bool operator== (const ObjectRef &other) const
 Comparator. More...
 
bool operator!= (const ObjectRef &other) const
 Comparator. More...
 
bool operator< (const ObjectRef &other) const
 Comparator. More...
 
bool defined () const
 
const Objectget () const
 
const Objectoperator-> () const
 
bool unique () const
 
int use_count () const
 
template<typename ObjectType , typename = std::enable_if_t<std::is_base_of_v<Object, ObjectType>>>
const ObjectType * as () const
 Try to downcast the internal Object to a raw pointer of a corresponding type. More...
 
template<typename ObjectRefType , typename = std::enable_if_t<std::is_base_of_v<ObjectRef, ObjectRefType>>>
Optional< ObjectRefType > as () const
 Try to downcast the ObjectRef to a Optional<T> of the requested type. More...
 

Additional Inherited Members

- Public Types inherited from tvm::runtime::ObjectRef
using ContainerType = Object
 type indicate the container type. More...
 
- Static Public Attributes inherited from tvm::runtime::ObjectRef
static constexpr bool _type_is_nullable = true
 
- Protected Member Functions inherited from tvm::runtime::ObjectRef
Objectget_mutable () const
 
- Static Protected Member Functions inherited from tvm::runtime::ObjectRef
template<typename T >
static T DowncastNoCheck (ObjectRef ref)
 Internal helper function downcast a ref without check. More...
 
static void FFIClearAfterMove (ObjectRef *ref)
 Clear the object ref data field without DecRef after we successfully moved the field. More...
 
template<typename ObjectType >
static ObjectPtr< ObjectType > GetDataPtr (const ObjectRef &ref)
 Internal helper function get data_ as ObjectPtr of ObjectType. More...
 
- Protected Attributes inherited from tvm::runtime::ObjectRef
ObjectPtr< Objectdata_
 Internal pointer that backs the reference. More...
 

Detailed Description

Managed reference to AttachMapNode.

See also
AttachMapNode

Member Function Documentation

◆ ApplyStageIdOffset()

AttachMap tvm::auto_scheduler::AttachMap::ApplyStageIdOffset ( int  start_id,
int  offset = 1 
) const

Traverse through stage_to_attach_iter and iter_to_attached_stages map, add offset to stage indexes that are larger than the start_id. Used for steps that insert new stages to ComputeDAG (e.g., CacheRead/CacheWrite step).

Parameters
start_idThe index threshold. This function only adds offset for stages with indices larger then this threshold.
offsetThe index offset to be added to the stage index.
Returns
The updated AttachMap after applying stage index offset.

◆ DeleteStage()

void tvm::auto_scheduler::AttachMap::DeleteStage ( int  stage_id)

Delete the entry of a specific stage. This is a public wrapper of DeleteStageEntry.

Parameters
stage_idThe index of the stage to be deleted.

◆ SetComputeAtIter()

void tvm::auto_scheduler::AttachMap::SetComputeAtIter ( int  stage_id,
int  target_stage_id,
int  target_iter_id 
)

Process the stage/iterator mapping after compute at.

Parameters
stage_idThe index of the source stage of computed at.
target_stage_idThe index of stage that this step will compute at to.
target_iter_idThe index of target iterator in the target stage.

◆ TVM_DEFINE_OBJECT_REF_COW_METHOD()

tvm::auto_scheduler::AttachMap::TVM_DEFINE_OBJECT_REF_COW_METHOD ( AttachMapNode  )

◆ TVM_DEFINE_OBJECT_REF_METHODS()

tvm::auto_scheduler::AttachMap::TVM_DEFINE_OBJECT_REF_METHODS ( AttachMap  ,
ObjectRef  ,
AttachMapNode   
)

◆ UpdateIters()

void tvm::auto_scheduler::AttachMap::UpdateIters ( const std::vector< IterKey > &  original_iters,
const std::vector< IterKey > &  new_iters 
)

Find the relations of original iterators in AttachMap, and update them with the new iterators. Both stage_to_attach_iter and iter_to_attached_stages will be updated.

Parameters
original_itersThe original IterKey.
new_itersThe new IterKey for replacing the old ones.

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