From 79111d3a90e4817936e8628aaafd9a36f5d1e2e5 Mon Sep 17 00:00:00 2001 From: =?utf8?q?=EB=B0=95=EC=A2=85=ED=98=84/On-Device=20Lab=28SR=29/Staff?= =?utf8?q?=20Engineer/=EC=82=BC=EC=84=B1=EC=A0=84=EC=9E=90?= Date: Mon, 5 Aug 2019 15:05:35 +0900 Subject: [PATCH] [locomotiv] Use link helper (#6197) Let's use link helper instead of deprecated "node" method in GraphInput/Output. Signed-off-by: Jonghyun Park --- compiler/locomotiv/src/Session.test.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) 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()); -- 2.7.4