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

Class to remove QDQ pattern for mixed-precision Ops. More...

#include <RemoveQDQForMixedPrecisionOpPass.h>

Collaboration diagram for luci::RemoveQDQForMixedPrecisionOpPass:

Public Member Functions

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

Detailed Description

Class to remove QDQ pattern for mixed-precision Ops.

Definition at line 28 of file RemoveQDQForMixedPrecisionOpPass.h.

Member Function Documentation

◆ name()

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

Reimplemented from logo::Pass.

Definition at line 30 of file RemoveQDQForMixedPrecisionOpPass.h.

30{ return "luci::RemoveQDQForMixedPrecisionOpPass"; }

◆ run()

bool luci::RemoveQDQForMixedPrecisionOpPass::run ( loco::Graph graph)
finalvirtual

Run the pass.

Returns
false if there was nothing changed

Implements logo::Pass.

Definition at line 84 of file RemoveQDQForMixedPrecisionOpPass.cpp.

85{
86 bool changed = false;
87 for (auto node : loco::postorder_traversal(loco::output_nodes(g)))
88 {
89 if (auto dq = dynamic_cast<luci::CircleDequantize *>(node))
90 {
91 if (remove_qdq_for_mpo(dq))
92 changed = true;
93 }
94 }
95 return changed;
96}
DEQUANTIZE in Circle.
std::vector< loco::Node * > postorder_traversal(const std::vector< loco::Node * > &roots)
Generate postorder traversal sequence starting from "roots".
Definition Algorithm.cpp:53
std::vector< Node * > output_nodes(Graph *)
Definition Graph.cpp:101

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

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


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