17#ifndef __TEST_GRAPH_H__
18#define __TEST_GRAPH_H__
37 std::unique_ptr<loco::Graph>
g;
49 auto input =
g->inputs()->create();
54 auto output =
g->outputs()->create();
56 output->name(
"output");
68 auto node =
g->nodes()->create<T>();
77 auto node =
g->nodes()->create<T>();
87 auto node =
g->nodes()->create<T>();
88 setInput(node, arg1, arg2);
98 auto node =
g->nodes()->create<T>();
99 setInput(node, arg1, arg2, arg3);
127 assert(
false &&
"NYI");
158 assert(
false &&
"NYI");
186 const_perm = append<luci::CircleConst>();
187 transpose_node = append<luci::CircleTranspose>(
input_node, const_perm);
188 complete(transpose_node);
Logical unit of computation.
AVERAGE_POOL_2D in Circle.
loco::Node * value(void) const
Class to build tensor data.
loco::Node * axis(void) const
loco::Node * input(void) const
loco::Node * params(void) const
loco::Node * indices(void) const
CircleNode for Output of the Graph.
loco::Node * from(void) const
loco::Node * features(void) const
RESIZE_BILINEAR in Circle.
loco::Node * size(void) const
loco::Node * input(void) const
RESIZE_NEAREST_NEIGHBOR in Circle.
loco::Node * input(void) const
loco::Node * size(void) const
loco::Node * input(void) const
loco::Node * a(void) const
loco::Node * perm(void) const
T * append(luci::CircleNode *arg1)
Creates op T (arity=1) with arg1 as an input and appends it to graph.
T * append(luci::CircleNode *arg1, luci::CircleNode *arg2, luci::CircleNode *arg3)
Creates op T (arity=3) with arg1, arg2, arg3 as inputs and appends it to graph.
luci::CircleOutput * output_node
luci::CircleInput * input_node
T * append()
Creates node with NO arg and appends it to graph.
T * append(luci::CircleNode *arg1, luci::CircleNode *arg2)
Creates op T (arity=2) with arg1, arg2 as inputs and appends it to graph.
std::unique_ptr< loco::Graph > g
void complete(luci::CircleNode *last_node)
std::unique_ptr< Graph > make_graph(void)
void graph_output_shape(luci::CircleOutput *output)
This will set GraphOutput shape from CircleOutput shape.
void graph_input_shape(luci::CircleInput *input)
This will set GraphInput shape from CircleInput shape.
void graph_input_dtype(luci::CircleInput *input)
This will set GraphInput dtype from CircleInput dtype.
void graph_output_dtype(luci::CircleOutput *output)
This will set GraphOutput dtype from CircleOutput dtype.
CircleInput * input_node(loco::Graph *g, const loco::GraphInputIndex &index)
Find a Pull node with a given input index.
void link(loco::GraphOutput *, CircleOutput *)
Link GraphOutput with CircleOutput node.