ONE - On-device Neural Engine
Loading...
Searching...
No Matches
luci::SubstituteSqueezeToReshapePass Struct Referencefinal

Class to Substitute Squeeze to Reshape node for certain conditions. More...

#include <SubstituteSqueezeToReshapePass.h>

Collaboration diagram for luci::SubstituteSqueezeToReshapePass:

Public Member Functions

const char * name (void) const final
 
bool run (loco::Graph *g) final
 
- Public Member Functions inherited from logo::Pass
virtual ~Pass ()=default
 

Detailed Description

Class to Substitute Squeeze to Reshape node for certain conditions.

Definition at line 28 of file SubstituteSqueezeToReshapePass.h.

Member Function Documentation

◆ name()

const char * luci::SubstituteSqueezeToReshapePass::name ( void  ) const
inlinefinalvirtual

Reimplemented from logo::Pass.

Definition at line 30 of file SubstituteSqueezeToReshapePass.h.

30{ return "luci::SubstituteSqueezeToReshapePass"; }

◆ run()

bool luci::SubstituteSqueezeToReshapePass::run ( loco::Graph g)
finalvirtual

BEFORE | [CircleNode] | [CircleSqueeze] | [CircleNode] |

AFTER | [CircleNode] [CircleConst] | \ / [CircleSqueeze] [CircleReshape] | [CircleNode] |

Implements logo::Pass.

Definition at line 171 of file SubstituteSqueezeToReshapePass.cpp.

172{
173 bool changed = false;
174 for (auto node : loco::active_nodes(loco::output_nodes(g)))
175 {
176 if (auto squeeze = dynamic_cast<luci::CircleSqueeze *>(node))
177 {
178 if (substitute_squeeze_to_reshape(squeeze))
179 changed = true;
180 }
181 }
182 return changed;
183}
SQUEEZE in Circle.
std::set< loco::Node * > active_nodes(const std::vector< loco::Node * > &roots)
Enumerate all the nodes required to compute "roots".
std::vector< Node * > output_nodes(Graph *)
Definition Graph.cpp:101

References loco::active_nodes(), and loco::output_nodes().

Referenced by package.infer.session::inference().


The documentation for this struct was generated from the following files: