summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author윤현식/On-Device Lab(SR)/Principal Engineer/삼성전자 <hyunsik.yoon@samsung.com>2019-09-17 15:09:08 +0900
committer박종현/On-Device Lab(SR)/Staff Engineer/삼성전자 <jh1302.park@samsung.com>2019-09-17 15:09:08 +0900
commite6a6480a966f038f5d52f7839ffab6219352a738 (patch)
treecf23e653871b11f57e05b384a3273d52cfb408e3
parentfc2452a94d1d160507cf0c2f27bed3ece43352a6 (diff)
downloadnnfw-e6a6480a966f038f5d52f7839ffab6219352a738.tar.gz
nnfw-e6a6480a966f038f5d52f7839ffab6219352a738.tar.bz2
nnfw-e6a6480a966f038f5d52f7839ffab6219352a738.zip
[exo-tflite] Renaming get_knob -> get (#7510)
`get_knob` was renamed to `get` since it always use with knob name and `knob` is duplicate. (e.g., `get<Knob::EnableTFLDialect>`) Signed-off-by: Hyun Sik Yoon <hyunsik.yoon@samsung.com>
-rw-r--r--compiler/exo-tflite/src/Convert.cpp12
-rw-r--r--compiler/exo-tflite/src/Knob.cpp2
-rw-r--r--compiler/exo-tflite/src/Knob.h2
-rw-r--r--compiler/exo-tflite/src/TFLExporterImpl.cpp4
4 files changed, 10 insertions, 10 deletions
diff --git a/compiler/exo-tflite/src/Convert.cpp b/compiler/exo-tflite/src/Convert.cpp
index 20035ffe9..56f3c63bb 100644
--- a/compiler/exo-tflite/src/Convert.cpp
+++ b/compiler/exo-tflite/src/Convert.cpp
@@ -55,18 +55,18 @@ void convert_to_TFLNodes(loco::Graph *graph)
// Add converters for canonical nodes. Note: Not all loco canonical nodes are listed.
- if (get_knob<Knob::ConvertAvgPool2D>())
+ if (get<Knob::ConvertAvgPool2D>())
phase.emplace_back(stdex::make_unique<AvgPool2DConverter>());
// TODO loco::ConstGen
// TODO loco::Conv2D
// TODO loco::DepthwiseConv2D
// TODO loco::DepthwiseFilterEncode
- if (get_knob<Knob::ConvertEltwiseAdd>())
+ if (get<Knob::ConvertEltwiseAdd>())
phase.emplace_back(stdex::make_unique<EltwiseAddConverter>());
// TODO loco::EltwiseDiv
- if (get_knob<Knob::ConvertEltwiseMul>())
+ if (get<Knob::ConvertEltwiseMul>())
phase.emplace_back(stdex::make_unique<EltwiseMulConverter>());
// TODO loco::EltwiseSqrt
@@ -74,17 +74,17 @@ void convert_to_TFLNodes(loco::Graph *graph)
// TODO loco::FeatureBiasAdd
// TODO loco::FixedReshape
- if (get_knob<Knob::ConvertMaxPool2D>())
+ if (get<Knob::ConvertMaxPool2D>())
phase.emplace_back(stdex::make_unique<MaxPool2DConverter>());
- if (get_knob<Knob::ConvertRelu>())
+ if (get<Knob::ConvertRelu>())
phase.emplace_back(stdex::make_unique<ReluConverter>());
// TODO loco::ReLU6
// TODO loco::Tanh
// TODO loco::TensorConcat
// TODO loco::TensorBiasAdd
- if (get_knob<Knob::ConvertTensorBroadcast>())
+ if (get<Knob::ConvertTensorBroadcast>())
phase.emplace_back(stdex::make_unique<TensorBroadcastConverter>());
// TODO loco::TensorSoftmax
diff --git a/compiler/exo-tflite/src/Knob.cpp b/compiler/exo-tflite/src/Knob.cpp
index 3b218ce21..66c184031 100644
--- a/compiler/exo-tflite/src/Knob.cpp
+++ b/compiler/exo-tflite/src/Knob.cpp
@@ -94,7 +94,7 @@ namespace exo
{
#define KNOB_BOOL(NAME, DEFAULT, DESC) \
- template <> typename KnobTrait<Knob::NAME>::ValueType get_knob<Knob::NAME>(void) \
+ template <> typename KnobTrait<Knob::NAME>::ValueType get<Knob::NAME>(void) \
{ \
static typename KnobTrait<Knob::NAME>::ValueType value = \
::knob_load<typename KnobTrait<Knob::NAME>::ValueType>(::knob_loader(), #NAME, DEFAULT); \
diff --git a/compiler/exo-tflite/src/Knob.h b/compiler/exo-tflite/src/Knob.h
index c330f8a24..6483c141d 100644
--- a/compiler/exo-tflite/src/Knob.h
+++ b/compiler/exo-tflite/src/Knob.h
@@ -37,7 +37,7 @@ template <Knob K> struct KnobTrait;
#include "Knob.lst"
#undef KNOB_BOOL
-template <Knob K> typename KnobTrait<K>::ValueType get_knob(void);
+template <Knob K> typename KnobTrait<K>::ValueType get(void);
} // namespace exo
diff --git a/compiler/exo-tflite/src/TFLExporterImpl.cpp b/compiler/exo-tflite/src/TFLExporterImpl.cpp
index f37b9f70e..ebe98cae5 100644
--- a/compiler/exo-tflite/src/TFLExporterImpl.cpp
+++ b/compiler/exo-tflite/src/TFLExporterImpl.cpp
@@ -106,9 +106,9 @@ void TFLExporter::Impl::exportGraph(loco::Graph *graph)
{
LOGGER(l);
- INFO(l) << "Knob::EnableTFLDialect is " << (get_knob<Knob::EnableTFLDialect>() ? "set" : "unset");
+ INFO(l) << "Knob::EnableTFLDialect is " << (get<Knob::EnableTFLDialect>() ? "set" : "unset");
- if (get_knob<Knob::EnableTFLDialect>()) // guard for backward compatibility
+ if (get<Knob::EnableTFLDialect>()) // guard for backward compatibility
{
convert_to_TFLNodes(graph);
}