ONE - On-device Neural Engine
|
An optimization pass that removes Permute operations if possible. More...
#include <PermutationEliminationPass.h>
Public Member Functions | |
std::string | id () final |
Returns string id for this pass. Same with class name. | |
void | callback (const ir::OperationIndex &i, ir::IOperation &n) final |
Be called for all nodes of graph. | |
LoweredOperationPass (ILoweredGraph &lowered_graph) | |
Public Member Functions inherited from onert::compiler::pass::LoweredOperationPass | |
LoweredOperationPass (ILoweredGraph &lowered_graph) | |
virtual | ~LoweredOperationPass ()=default |
Public Member Functions inherited from onert::compiler::pass::OperationPass | |
virtual | ~OperationPass ()=default |
void | run () final |
Run the pass. | |
Pass (ir::Graph &graph) | |
Public Member Functions inherited from onert::compiler::pass::Pass | |
Pass (ir::Graph &graph) | |
virtual | ~Pass ()=default |
Public Member Functions inherited from onert::compiler::pass::IPass | |
virtual | ~IPass ()=default |
Public Member Functions inherited from onert::ir::OperationVisitor | |
virtual | ~OperationVisitor ()=default |
Additional Inherited Members | |
Protected Attributes inherited from onert::compiler::pass::LoweredOperationPass | |
ILoweredGraph & | _lowered_graph |
Protected Attributes inherited from onert::compiler::pass::Pass | |
ir::Graph & | _graph |
An optimization pass that removes Permute operations if possible.
There may be some Permute operations that are inserted by PermutationInsertionPass or other passes. This pass checks all Permute operations and eliminates them if Permute in/out tensors are compatible and layouts match.
Permute input tensor is kept and the output is removed for all the cases, except model outputs. As all output tensors have to be builtin backend, so the output is kept.
Definition at line 43 of file PermutationEliminationPass.h.
|
finalvirtual |
Be called for all nodes of graph.
index | is the index of a node in graph |
node | is the node in graph |
Implements onert::compiler::pass::LoweredOperationPass.
Definition at line 29 of file PermutationEliminationPass.cc.
References onert::ir::IOperation::accept().
|
inlinefinalvirtual |
Returns string id for this pass. Same with class name.
Implements onert::compiler::pass::LoweredOperationPass.
Definition at line 49 of file PermutationEliminationPass.h.
|
inline |
Definition at line 33 of file LoweredOperationPass.h.