TEST(ConstantFolding, const_relu_to_const)
{
- loco::Graph graph;
- create_net_const_relu(&graph);
+ auto graph = loco::make_graph();
+ create_net_const_relu(graph.get());
logo::ConstantFoldingPass pass;
- while (pass.run(&graph) == true)
+ while (pass.run(graph.get()) == true)
{
;
}
- auto push = logo::test::find_first_node_by_type<loco::Push>(&graph);
+ auto push = logo::test::find_first_node_by_type<loco::Push>(graph.get());
auto const_gen = dynamic_cast<loco::ConstGen *>(push->from());
ASSERT_NE(const_gen, nullptr);
TEST(ConstantFolding, const_relu_to_concat)
{
- loco::Graph graph;
- create_net_const_relu_concat(&graph);
+ auto graph = loco::make_graph();
+ create_net_const_relu_concat(graph.get());
logo::ConstantFoldingPass pass;
- while (pass.run(&graph) == true)
+ while (pass.run(graph.get()) == true)
{
;
}
- auto push = logo::test::find_first_node_by_type<loco::Push>(&graph);
+ auto push = logo::test::find_first_node_by_type<loco::Push>(graph.get());
auto const_gen = dynamic_cast<loco::ConstGen *>(push->from());
ASSERT_NE(const_gen, nullptr);