summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author오형석/On-Device Lab(SR)/Staff Engineer/삼성전자 <hseok82.oh@samsung.com>2019-04-10 07:21:19 (GMT)
committer이춘석/On-Device Lab(SR)/Staff Engineer/삼성전자 <chunseok.lee@samsung.com>2019-04-10 07:21:19 (GMT)
commit9f6b712b39856c2cf8bf27c5426ad98635976900 (patch)
tree356e62e0b147e2bc2a6aa760ad0b4bd048297c7b
parent9190311d3a1fe6bb323ed104b6701714ba11670a (diff)
downloadnnfw-9f6b712b39856c2cf8bf27c5426ad98635976900.zip
nnfw-9f6b712b39856c2cf8bf27c5426ad98635976900.tar.gz
nnfw-9f6b712b39856c2cf8bf27c5426ad98635976900.tar.bz2
Remove unused util function in cpu backend (#4971)
Remove unused util function in cpu backend: type conversion to tflite internal type Signed-off-by: Hyeongseok Oh <hseok82.oh@samsung.com>
-rw-r--r--runtimes/neurun/backend/cpu/kernel/OperationUtils.h73
1 files changed, 0 insertions, 73 deletions
diff --git a/runtimes/neurun/backend/cpu/kernel/OperationUtils.h b/runtimes/neurun/backend/cpu/kernel/OperationUtils.h
index 95bc16d..1527242 100644
--- a/runtimes/neurun/backend/cpu/kernel/OperationUtils.h
+++ b/runtimes/neurun/backend/cpu/kernel/OperationUtils.h
@@ -25,9 +25,6 @@
#include <cker/Shape.h>
-#include "tensorflow/contrib/lite/c/builtin_op_data.h"
-#include "tensorflow/contrib/lite/kernels/internal/types.h"
-#include "tensorflow/contrib/lite/kernels/internal/tensor.h"
#include "model/operand/Object.h"
#include "model/operand/DataType.h"
@@ -64,51 +61,6 @@ uint32_t getNumberOfElements(const Shape &shape);
uint32_t getSizeOfDimension(const Shape &shape, uint32_t dimensionIdx);
-inline ::tflite::Dims<4> convertShapeToDims(const Shape &shape)
-{
- // nnAssert(shape.dimensions.size() <= 4);
- ::tflite::Dims<4> dims;
- // The dimensions are reversed in Dims<4>.
- for (int i = 0; i < 4; ++i)
- {
- int src = static_cast<int>(shape.dimensions.size()) - i - 1;
- if (src >= 0)
- {
- dims.sizes[i] = static_cast<int>(getSizeOfDimension(shape, src));
- }
- else
- {
- dims.sizes[i] = 1;
- }
- }
- dims.strides[0] = 1;
- for (int i = 1; i < 4; i++)
- {
- dims.strides[i] = dims.strides[i - 1] * dims.sizes[i - 1];
- }
- return dims;
-}
-
-inline ::tflite::RuntimeShape convertShapeToTFLiteShape(const Shape &shape)
-{
- std::vector<int32_t> raw_shape;
- raw_shape.resize(4);
-
- for (uint32_t i = 0; i < 4; ++i)
- {
- if (i >= shape.dimensions.size())
- {
- raw_shape[i] = 1;
- }
- else
- {
- raw_shape[i] = shape.dimensions[i];
- }
- }
-
- return ::tflite::GetTensorShape(raw_shape);
-}
-
inline nnfw::cker::Shape convertToExtendedCkerShape(const Shape &shape)
{
std::vector<int32_t> raw_shape;
@@ -150,31 +102,6 @@ inline nnfw::cker::Shape convertShapeToCkerShape(const Shape &shape)
return nnfw::cker::GetShape(raw_shape);
}
-inline TfLiteFusedActivation convertFusedActivation(FuseCode act)
-{
- if (act == ANEURALNETWORKS_FUSED_NONE)
- {
- return kTfLiteActNone;
- }
-
- if (act == ANEURALNETWORKS_FUSED_RELU)
- {
- return kTfLiteActRelu;
- }
-
- if (act == ANEURALNETWORKS_FUSED_RELU1)
- {
- return kTfLiteActRelu1;
- }
-
- if (act == ANEURALNETWORKS_FUSED_RELU6)
- {
- return kTfLiteActRelu6;
- }
-
- return kTfLiteActNone;
-}
-
bool QuantizeMultiplier(double double_multiplier, int32_t *quantized_multiplier, int *shift);
__wur bool QuantizeMultiplierSmallerThanOne(double double_multiplier, int32_t *quantized_multiplier,