tvm
Public Member Functions | Static Public Attributes | List of all members
tvm::transform::PassNode Class Referenceabstract

PassNode is the base type of differnt types of optimization passes. It is designed as a pure class and implemented by different pass subclasses at different granularity of Relax nodes. More...

#include <transform.h>

Inheritance diagram for tvm::transform::PassNode:
Collaboration diagram for tvm::transform::PassNode:

Public Member Functions

virtual ~PassNode ()
 
virtual PassInfo Info () const =0
 Get the pass information/meta data. More...
 
IRModule operator() (IRModule mod) const
 Transform mod using the default PassContext in the current scope. More...
 
virtual IRModule operator() (IRModule mod, const PassContext &pass_ctx) const =0
 Transform mod using a functor under a given pass context. More...
 
 TVM_DECLARE_BASE_OBJECT_INFO (PassNode, Object)
 

Static Public Attributes

static constexpr const char * _type_key = "transform.Pass"
 

Detailed Description

PassNode is the base type of differnt types of optimization passes. It is designed as a pure class and implemented by different pass subclasses at different granularity of Relax nodes.

Constructor & Destructor Documentation

◆ ~PassNode()

virtual tvm::transform::PassNode::~PassNode ( )
inlinevirtual

Member Function Documentation

◆ Info()

virtual PassInfo tvm::transform::PassNode::Info ( ) const
pure virtual

Get the pass information/meta data.

Implemented in tvm::transform::SequentialNode.

◆ operator()() [1/2]

IRModule tvm::transform::PassNode::operator() ( IRModule  mod) const
inline

Transform mod using the default PassContext in the current scope.

Parameters
modThe module that an optimization pass runs on.
Returns
The transformed module.

◆ operator()() [2/2]

virtual IRModule tvm::transform::PassNode::operator() ( IRModule  mod,
const PassContext pass_ctx 
) const
pure virtual

Transform mod using a functor under a given pass context.

Parameters
modThe module that an optimization pass runs on.
pass_ctxThe pass context that can provide information for the optimization.
Returns
The transformed module.

Implemented in tvm::transform::SequentialNode.

◆ TVM_DECLARE_BASE_OBJECT_INFO()

tvm::transform::PassNode::TVM_DECLARE_BASE_OBJECT_INFO ( PassNode  ,
Object   
)

Member Data Documentation

◆ _type_key

constexpr const char* tvm::transform::PassNode::_type_key = "transform.Pass"
staticconstexpr

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