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) | |
![]() | |
LoweredOperationPass (ILoweredGraph &lowered_graph) | |
virtual | ~LoweredOperationPass ()=default |
![]() | |
virtual | ~OperationPass ()=default |
void | run () final |
Run the pass. | |
Pass (ir::Graph &graph) | |
![]() | |
Pass (ir::Graph &graph) | |
virtual | ~Pass ()=default |
![]() | |
virtual | ~IPass ()=default |
![]() | |
virtual | ~OperationVisitor ()=default |
Additional Inherited Members | |
![]() | |
ILoweredGraph & | _lowered_graph |
![]() | |
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 39 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 25 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 45 of file PermutationEliminationPass.h.
|
inline |
Definition at line 29 of file LoweredOperationPass.h.