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

Managed reference to AccessAnalyzerNode. More...

#include <compute_dag.h>

Inheritance diagram for tvm::auto_scheduler::AccessAnalyzer:
Collaboration diagram for tvm::auto_scheduler::AccessAnalyzer:

Public Member Functions

 AccessAnalyzer (const Array< te::Tensor > &tensors)
 
bool IsSimpleAccess (const te::Operation &op) const
 Return whether this operation is an op with simple access (e.g., injective, broadcast and elementwise ops without reduction) More...
 
bool IsStrictlyInlineable (const te::Operation &op) const
 Return whether this operation is strictly inlineable (e.g., injective, broadcast and elementwise without reduction, branch or expensive operations) More...
 
bool NeedsMultiLevelTiling (const te::Operation &op) const
 Return whether this operation needs multi-level tiling (e.g., computation-intensive ops with data reuse opportunity like matmul, conv2d) More...
 
bool IsOutput (const te::Operation &op) const
 Return whether this operation is an output operation. More...
 
std::unordered_set< te::Operation, ObjectHash, ObjectEqualGetConsumers (const State &state, const te::Operation &op) const
 Get all consumers of an operation. More...
 
std::unordered_set< te::Operation, ObjectHash, ObjectEqualGetProducers (const State &state, const te::Operation &op) const
 Get all producers of an operation. More...
 
std::unordered_set< te::Operation, ObjectHash, ObjectEqualGetDirectProducers (const te::Operation &op) const
 Get all direct producers of an operation. More...
 
int GetNumCommonOuterIterator (const te::Operation &op, const te::Operation &target_op) const
 Get the number of common outer iterators. More...
 
bool ElementWiseMatch (const te::Operation &op, const te::Operation &target_op) const
 Return whether two operations are elementwise-matched (e.g. conv2d and relu are elementwise-matched) More...
 
 TVM_DEFINE_OBJECT_REF_METHODS (AccessAnalyzer, ObjectRef, AccessAnalyzerNode)
 
- 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 AccessAnalyzerNode.

See also
AccessAnalyzerNode

Constructor & Destructor Documentation

◆ AccessAnalyzer()

tvm::auto_scheduler::AccessAnalyzer::AccessAnalyzer ( const Array< te::Tensor > &  tensors)
explicit

Member Function Documentation

◆ ElementWiseMatch()

bool tvm::auto_scheduler::AccessAnalyzer::ElementWiseMatch ( const te::Operation op,
const te::Operation target_op 
) const

Return whether two operations are elementwise-matched (e.g. conv2d and relu are elementwise-matched)

Note
This function propagates the relation for chains with multiple ops.

◆ GetConsumers()

std::unordered_set<te::Operation, ObjectHash, ObjectEqual> tvm::auto_scheduler::AccessAnalyzer::GetConsumers ( const State state,
const te::Operation op 
) const

Get all consumers of an operation.

Parameters
stateThe current loop state
opThe operation
Returns
The set of consumers
Note
This function propagates the relation for inlined ops

◆ GetDirectProducers()

std::unordered_set<te::Operation, ObjectHash, ObjectEqual> tvm::auto_scheduler::AccessAnalyzer::GetDirectProducers ( const te::Operation op) const

Get all direct producers of an operation.

Parameters
opThe operation
Returns
The set of direct producers
Note
This function DOES NOT propagate the relation for inlined ops

◆ GetNumCommonOuterIterator()

int tvm::auto_scheduler::AccessAnalyzer::GetNumCommonOuterIterator ( const te::Operation op,
const te::Operation target_op 
) const

Get the number of common outer iterators.

Parameters
opThe operation
target_opThe target operation
Note
This function propagates the relation for chains with multiple ops.

◆ GetProducers()

std::unordered_set<te::Operation, ObjectHash, ObjectEqual> tvm::auto_scheduler::AccessAnalyzer::GetProducers ( const State state,
const te::Operation op 
) const

Get all producers of an operation.

Parameters
stateThe current loop state
opThe operation
Returns
The set of producers
Note
This function propagates the relation for inlined ops

◆ IsOutput()

bool tvm::auto_scheduler::AccessAnalyzer::IsOutput ( const te::Operation op) const

Return whether this operation is an output operation.

Parameters
opThe operation

◆ IsSimpleAccess()

bool tvm::auto_scheduler::AccessAnalyzer::IsSimpleAccess ( const te::Operation op) const

Return whether this operation is an op with simple access (e.g., injective, broadcast and elementwise ops without reduction)

Parameters
opThe operation

◆ IsStrictlyInlineable()

bool tvm::auto_scheduler::AccessAnalyzer::IsStrictlyInlineable ( const te::Operation op) const

Return whether this operation is strictly inlineable (e.g., injective, broadcast and elementwise without reduction, branch or expensive operations)

Parameters
opThe operation

◆ NeedsMultiLevelTiling()

bool tvm::auto_scheduler::AccessAnalyzer::NeedsMultiLevelTiling ( const te::Operation op) const

Return whether this operation needs multi-level tiling (e.g., computation-intensive ops with data reuse opportunity like matmul, conv2d)

Parameters
opThe operation

◆ TVM_DEFINE_OBJECT_REF_METHODS()

tvm::auto_scheduler::AccessAnalyzer::TVM_DEFINE_OBJECT_REF_METHODS ( AccessAnalyzer  ,
ObjectRef  ,
AccessAnalyzerNode   
)

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