tvm
|
The SequentialNode contains a set of passes that transform Relax programs from one AST to another semantically equivalent one. More...
#include <transform.h>
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) | |
![]() | |
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< Pass > | passes |
A list of passes that used to compose a sequential pass. More... | |
Static Public Attributes | |
static constexpr const char * | _type_key = "transform.Sequential" |
![]() | |
static constexpr const char * | _type_key = "transform.Pass" |
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.
|
inlineoverridevirtual |
Get the pass information/meta data.
Implements tvm::transform::PassNode.
|
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.
mod | The module that these passes are applied on. |
pass_ctx | The context that these passes execute on. |
Implements tvm::transform::PassNode.
|
inlinestatic |
void tvm::transform::SequentialNode::ResolveDependency | ( | const IRModule & | mod | ) |
Resolve the pass dependency. It globs all required passes by a given pass and executes them.
mod | The 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::transform::SequentialNode::TVM_DECLARE_FINAL_OBJECT_INFO | ( | SequentialNode | , |
PassNode | |||
) |
|
staticconstexpr |
PassInfo tvm::transform::SequentialNode::pass_info |
tvm::Array<Pass> tvm::transform::SequentialNode::passes |
A list of passes that used to compose a sequential pass.