From: 윤현식/On-Device Lab(SR)/Principal Engineer/삼성전자 Date: Mon, 9 Sep 2019 23:39:18 +0000 (+0900) Subject: [exo-tflite] Moving Knob check of each converter into convert.cpp (#7303) X-Git-Tag: accepted/tizen/unified/20190911.111615~20 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=8cd0cff7847d1f693d146bdaa67a9ebdd05739f9;p=platform%2Fcore%2Fml%2Fnnfw.git [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 --- 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