From d346b8af26970903d547193dc33bbab982eaf641 Mon Sep 17 00:00:00 2001 From: =?utf8?q?=EC=9C=A4=ED=98=84=EC=8B=9D/On-Device=20Lab=28SR=29/Princip?= =?utf8?q?al=20Engineer/=EC=82=BC=EC=84=B1=EC=A0=84=EC=9E=90?= Date: Thu, 31 Oct 2019 07:00:39 +0900 Subject: [PATCH] [exo] revising TestGraph.h (#8618) This revises TestGraph.h to 1) remove build() and 2) remove graph(). 1) build() is moved into constructor 2) graph() is already defined in parent Signed-off-by: Hyun Sik Yoon --- .../exo/src/Conversion/ConstGenConverter.test.cpp | 1 - .../src/Conversion/FeatureBiasAddConverter.test.cpp | 1 - compiler/exo/src/TestGraph.h | 20 ++------------------ 3 files changed, 2 insertions(+), 20 deletions(-) diff --git a/compiler/exo/src/Conversion/ConstGenConverter.test.cpp b/compiler/exo/src/Conversion/ConstGenConverter.test.cpp index 9d46545..f7a5772 100644 --- a/compiler/exo/src/Conversion/ConstGenConverter.test.cpp +++ b/compiler/exo/src/Conversion/ConstGenConverter.test.cpp @@ -28,7 +28,6 @@ TEST(TFLConstGenConverterTest, ConstGen_Relu) { exo::test::ExampleGraph g; - g.build(); // set constgen { diff --git a/compiler/exo/src/Conversion/FeatureBiasAddConverter.test.cpp b/compiler/exo/src/Conversion/FeatureBiasAddConverter.test.cpp index b00d0be..f3c4a5f 100644 --- a/compiler/exo/src/Conversion/FeatureBiasAddConverter.test.cpp +++ b/compiler/exo/src/Conversion/FeatureBiasAddConverter.test.cpp @@ -29,7 +29,6 @@ TEST(FeatureBiasAddConverterTest, basic_test) { exo::test::ExampleGraph g; - g.build(); { // attrib setting // pull diff --git a/compiler/exo/src/TestGraph.h b/compiler/exo/src/TestGraph.h index 3942055..f919cc9 100644 --- a/compiler/exo/src/TestGraph.h +++ b/compiler/exo/src/TestGraph.h @@ -219,11 +219,7 @@ public: loco::FeatureDecode *fea_dec = nullptr; public: - ExampleGraph() = default; - - loco::Graph *graph() { return g.get(); } - - void build() + ExampleGraph() { fea_enc = exo::make_feature_encode(pull); constgen = append(); @@ -246,17 +242,11 @@ public: loco::ReLU *relu = nullptr; public: - ExampleGraph() = default; - - loco::Graph *graph() { return g.get(); } - - void build() + ExampleGraph() { constgen = append(); relu = append(constgen); complete(relu); - - EXO_TEST_ASSERT_NODE_COUNT({push}, 3); // sanity check } }; @@ -276,8 +266,6 @@ public: transpose = append(pull); complete(transpose); } - - loco::Graph *graph() { return g.get(); } }; /** @@ -299,8 +287,6 @@ public: exo::make_filter_decode(filterEncode); // to Tensorflow Lite complete(filterDecode); } - - loco::Graph *graph() { return g.get(); } }; /** @@ -321,8 +307,6 @@ public: tfl_transpose = append(pull, const_perm); complete(tfl_transpose); } - - loco::Graph *graph() { return g.get(); } }; } // namespace test -- 2.7.4