From: 박종현/On-Device Lab(SR)/Staff Engineer/삼성전자 Date: Mon, 5 Aug 2019 06:05:35 +0000 (+0900) Subject: [locomotiv] Use link helper (#6197) X-Git-Tag: submit/tizen/20190809.050447~183 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=79111d3a90e4817936e8628aaafd9a36f5d1e2e5;p=platform%2Fcore%2Fml%2Fnnfw.git [locomotiv] Use link helper (#6197) Let's use link helper instead of deprecated "node" method in GraphInput/Output. Signed-off-by: Jonghyun Park --- diff --git a/compiler/locomotiv/src/Session.test.cpp b/compiler/locomotiv/src/Session.test.cpp index 27fe074..07d55d2 100644 --- a/compiler/locomotiv/src/Session.test.cpp +++ b/compiler/locomotiv/src/Session.test.cpp @@ -41,7 +41,7 @@ TEST(Session, graph_IO_size) for (uint32_t i = 0; i < inputs; ++i) { auto pull = g->nodes()->create(); - g->inputs()->create()->node(pull); + loco::link(g->inputs()->create(), pull); } // outputs @@ -49,7 +49,7 @@ TEST(Session, graph_IO_size) for (uint32_t o = 0; o < outputs; ++o) { auto push = g->nodes()->create(); - g->outputs()->create()->node(push); + loco::link(g->outputs()->create(), push); } // Make session @@ -67,7 +67,7 @@ TEST(Session, set_input) pull->dtype(loco::DataType::FLOAT32); pull->rank(1); pull->dim(0) = 1; - g->inputs()->create()->node(pull); + loco::link(g->inputs()->create(), pull); // Make good data auto buf = make_buffer(Shape{1}); @@ -115,11 +115,11 @@ TEST(Session, inference_identity) // Input auto graph_input = g->inputs()->create(); - graph_input->node(pull_node); + loco::link(graph_input, pull_node); // Output auto graph_output = g->outputs()->create(); - graph_output->node(push_node); + loco::link(graph_output, push_node); graphs.push_back(std::move(g)); } @@ -140,11 +140,11 @@ TEST(Session, inference_identity) // Input auto graph_input = g->inputs()->create(); - graph_input->node(pull_node); + loco::link(graph_input, pull_node); // Output auto graph_output = g->outputs()->create(); - graph_output->node(push_node); + loco::link(graph_output, push_node); graphs.push_back(std::move(g)); } @@ -350,7 +350,7 @@ TEST(Session, dtor) // Input auto input = g->inputs()->create(); - input->node(pull); + loco::link(input, pull); { locomotiv::Session s(g.get());