|
ONE - On-device Neural Engine
|
#include <PassTestGraphs.h>

Public Member Functions | |
| ConstantFoldingTestGraph (std::vector< uint32_t > input_shape, loco::DataType input_dtype) | |
| virtual void | init ()=0 |
| virtual | ~ConstantFoldingTestGraph ()=default |
| virtual loco::Node * | createFoldedPattern ()=0 |
| virtual luci::CircleConst * | getFoldedPattern ()=0 |
| loco::Graph * | graph () |
Protected Attributes | |
| loco::Graph | _g |
| luci::CircleInput * | _input = nullptr |
| luci::CircleOutput * | _output = nullptr |
ConstantFoldingTestGraph is a base class for testing constant folding passes. It creates Input and Output in the below graph. Child classes must implement Connector and Folded pattern.
[Input] [Folded pattern] (Implemented by child class)
\ /
[Connector] (Implemented by child class)
|
[Output]
Connector should satisfy the below conditions
For example, Add, Mul, Sub, .. can be a Connector
Definition at line 47 of file PassTestGraphs.h.
|
inline |
Definition at line 50 of file PassTestGraphs.h.
References _g, _input, _output, loco::NodePool::create(), loco::Graph::InputContext::create(), loco::Graph::OutputContext::create(), luci::CircleInput::index(), luci::CircleOutput::index(), loco::Graph::inputs(), luci::must_cast(), luci::CircleNode::name(), loco::Graph::nodes(), and loco::Graph::outputs().
|
virtualdefault |
|
pure virtual |
Referenced by luci::ConstantFoldingAddTestGraph::init().
|
pure virtual |
Implemented in luci::ConstantFoldingAddTestGraph.
|
inline |
Definition at line 97 of file PassTestGraphs.h.
References _g.
Referenced by TopologicalSortHelper.TopologicalSortHelper::add_edge(), and TopologicalSortHelper.TopologicalSortHelper::sort_util().
Implemented in luci::ConstantFoldingAddTestGraph.
|
protected |
Definition at line 101 of file PassTestGraphs.h.
Referenced by luci::ConstantFoldingAddTestGraph::ConstantFoldingAddTestGraph(), ConstantFoldingTestGraph(), and graph().
|
protected |
Definition at line 102 of file PassTestGraphs.h.
Referenced by luci::ConstantFoldingAddTestGraph::ConstantFoldingAddTestGraph(), and ConstantFoldingTestGraph().
|
protected |
Definition at line 103 of file PassTestGraphs.h.
Referenced by luci::ConstantFoldingAddTestGraph::ConstantFoldingAddTestGraph(), and ConstantFoldingTestGraph().