From 8cd0cff7847d1f693d146bdaa67a9ebdd05739f9 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: Tue, 10 Sep 2019 08:39:18 +0900 Subject: [PATCH] [exo-tflite] Moving Knob check of each converter into convert.cpp (#7303) * [exo-tflite] Moving Knob check of each converter into convert.cpp Knob check of each converter was moved into `convert.cpp`. Signed-off-by: Hyun Sik Yoon * remove unused header --- compiler/exo-tflite/src/Conversion/ReluConverter.cpp | 12 ------------ compiler/exo-tflite/src/Convert.cpp | 6 +++++- 2 files changed, 5 insertions(+), 13 deletions(-) diff --git a/compiler/exo-tflite/src/Conversion/ReluConverter.cpp b/compiler/exo-tflite/src/Conversion/ReluConverter.cpp index 6eb344f..a0ac1f7 100644 --- a/compiler/exo-tflite/src/Conversion/ReluConverter.cpp +++ b/compiler/exo-tflite/src/Conversion/ReluConverter.cpp @@ -17,9 +17,7 @@ #include "ReluConverter.h" #include "GraphBlock.h" -#include "Knob.h" #include "Check.h" -#include "Log.h" #include "Dialect/IR/TFLNodes.h" @@ -30,16 +28,6 @@ namespace exo bool ReluConverter::convert(loco::ReLU *origin) { - LOGGER(l); - - if (!get_knob()) // for backward compatibility - { - INFO(l) << "Knob::ConvertRelu is NOT set."; - return false; - } - - INFO(l) << "Knob::ConvertRelu is set."; - if (!loco::shape_known(origin)) { return false; diff --git a/compiler/exo-tflite/src/Convert.cpp b/compiler/exo-tflite/src/Convert.cpp index e4b9eca..c97a64c 100644 --- a/compiler/exo-tflite/src/Convert.cpp +++ b/compiler/exo-tflite/src/Convert.cpp @@ -21,6 +21,7 @@ #include "Conversion/TypeInferencePass.h" #include "Conversion/ShapeInferencePass.h" #include "ProgressReporter.h" +#include "Knob.h" #include #include @@ -62,7 +63,10 @@ void convert_to_TFLNodes(loco::Graph *graph) // TODO loco::FeatureBiasAdd // TODO loco::FixedReshape // TODO loco::MaxPool2D - phase.emplace_back(stdex::make_unique()); + + if (get_knob()) + phase.emplace_back(stdex::make_unique()); + // TODO loco::ReLU6 // TODO loco::Tanh // TODO loco::TensorConcat -- 2.7.4