ONE - On-device Neural Engine
Loading...
Searching...
No Matches
luci::tinf::Rule Struct Reference

#include <CircleTypeInference.h>

Public Member Functions

bool infer (const luci::CircleNode *, loco::DataType &) const
 

Detailed Description

Definition at line 32 of file CircleTypeInference.h.

Member Function Documentation

◆ infer()

bool luci::tinf::Rule::infer ( const luci::CircleNode circle_node,
loco::DataType dtype 
) const

Definition at line 48 of file CircleTypeInference.cpp.

49{
50 LOGGER(l);
51 VERBOSE(l, 1) << "[CircleTypeInference] " << circle_node->name();
52 VERBOSE(l, 1) << " before: " << static_cast<int>(circle_node->dtype());
53
54 if (!inputs_dtype_ready(circle_node))
55 {
56 VERBOSE(l, 1) << " after: Some inputs are not ready for inference";
57 return false;
58 }
59
60 Algorithm alg;
61 dtype = circle_node->accept(&alg);
62
63 VERBOSE(l, 1) << " after: " << static_cast<int>(dtype);
64
65 return true;
66}
#define LOGGER(name)
Definition Log.h:65
#define VERBOSE(name, lv)
Definition Log.h:71
Algorithm
Definition kuma.h:28
NodeName name(void) const
T accept(CircleNodeVisitorBase< T > *) const

References luci::CircleNode::accept(), LOGGER, luci::CircleNode::name(), and VERBOSE.

Referenced by luci::CircleTypeInferencePass::run().


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