tvm
Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | List of all members
tvm::transform::SequentialNode Class Reference

The SequentialNode contains a set of passes that transform Relax programs from one AST to another semantically equivalent one. More...

#include <transform.h>

Inheritance diagram for tvm::transform::SequentialNode:
Collaboration diagram for tvm::transform::SequentialNode:

Public Member Functions

PassInfo Info () const override
 Get the pass information/meta data. More...
 
void ResolveDependency (const IRModule &mod)
 Resolve the pass dependency. It globs all required passes by a given pass and executes them. More...
 
IRModule operator() (IRModule mod, const PassContext &pass_ctx) const final
 Perform optimizations on a series of passes. The aforementioned typical pass manager jobs could be done by it. This function could be overloaded to focus on different metrics, i.e. performance, memory footprint, etc. More...
 
 TVM_DECLARE_FINAL_OBJECT_INFO (SequentialNode, PassNode)
 
- Public Member Functions inherited from tvm::transform::PassNode
virtual ~PassNode ()
 
IRModule operator() (IRModule mod) const
 Transform mod using the default PassContext in the current scope. More...
 
 TVM_DECLARE_BASE_OBJECT_INFO (PassNode, Object)
 

Static Public Member Functions

static void RegisterReflection ()
 

Public Attributes

PassInfo pass_info
 
tvm::Array< Passpasses
 A list of passes that used to compose a sequential pass. More...
 

Static Public Attributes

static constexpr const char * _type_key = "transform.Sequential"
 
- Static Public Attributes inherited from tvm::transform::PassNode
static constexpr const char * _type_key = "transform.Pass"
 

Detailed Description

The SequentialNode contains a set of passes that transform Relax programs from one AST to another semantically equivalent one.

One example of this level of pass is that the pass manager needs to correctly perform a host of optimizations with a given optimization level and disabled passes.

Member Function Documentation

◆ Info()

PassInfo tvm::transform::SequentialNode::Info ( ) const
inlineoverridevirtual

Get the pass information/meta data.

Implements tvm::transform::PassNode.

◆ operator()()

IRModule tvm::transform::SequentialNode::operator() ( IRModule  mod,
const PassContext pass_ctx 
) const
finalvirtual

Perform optimizations on a series of passes. The aforementioned typical pass manager jobs could be done by it. This function could be overloaded to focus on different metrics, i.e. performance, memory footprint, etc.

Parameters
modThe module that these passes are applied on.
pass_ctxThe context that these passes execute on.
Returns
Return the updated module.

Implements tvm::transform::PassNode.

◆ RegisterReflection()

static void tvm::transform::SequentialNode::RegisterReflection ( )
inlinestatic

◆ ResolveDependency()

void tvm::transform::SequentialNode::ResolveDependency ( const IRModule mod)

Resolve the pass dependency. It globs all required passes by a given pass and executes them.

Parameters
modThe module that an optimization pass runs on.

TODO(zhiics) Build a dependency graph among the passes using provided metadata, i.e. required_passes. Likely, we can have a data structure, i.e. PassInfo, to store the relevant information including the parent passes.

◆ TVM_DECLARE_FINAL_OBJECT_INFO()

tvm::transform::SequentialNode::TVM_DECLARE_FINAL_OBJECT_INFO ( SequentialNode  ,
PassNode   
)

Member Data Documentation

◆ _type_key

constexpr const char* tvm::transform::SequentialNode::_type_key = "transform.Sequential"
staticconstexpr

◆ pass_info

PassInfo tvm::transform::SequentialNode::pass_info

◆ passes

tvm::Array<Pass> tvm::transform::SequentialNode::passes

A list of passes that used to compose a sequential pass.


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