ONE - On-device Neural Engine
Loading...
Searching...
No Matches
luci::QuantizePreCheckerPass Class Reference

Pass to verify the input model has the form acceptable by quantizer. More...

#include <QuantizePreCheckerPass.h>

Collaboration diagram for luci::QuantizePreCheckerPass:

Public Member Functions

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

Detailed Description

Pass to verify the input model has the form acceptable by quantizer.

Definition at line 28 of file QuantizePreCheckerPass.h.

Member Function Documentation

◆ name()

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

Reimplemented from logo::Pass.

Definition at line 31 of file QuantizePreCheckerPass.h.

31{ return "luci::QuantizePreCheckerPass"; }

◆ run()

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

Verify the input model has the form acceptable by quantizer

Implements logo::Pass.

Definition at line 102 of file QuantizePreCheckerPass.cpp.

103{
104 LOGGER(l);
105 INFO(l) << "QuantizePreCheckerPass Start" << std::endl;
106
107 for (auto node : loco::active_nodes(loco::output_nodes(g)))
108 {
109 // Check const inputs
110 auto circle_node = loco::must_cast<luci::CircleNode *>(node);
111 ConstInputChecker checker{};
112 circle_node->accept(&checker);
113 }
114
115 INFO(l) << "QuantizePreCheckerPass End" << std::endl;
116
117 return false; // one time run
118}
#define LOGGER(name)
Definition Log.h:65
#define INFO(name)
Definition Log.h:68
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(), INFO, LOGGER, and loco::output_nodes().

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


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