From: 이춘석/동작제어Lab(SR)/Staff Engineer/삼성전자 Date: Mon, 10 Sep 2018 02:16:49 +0000 (+0900) Subject: Remove tensor.h deps of RSQRT, SQDiff (#2638) X-Git-Tag: 0.2~56 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=67f5ab7efa09783f0e9e6b2d323d04b6beb8805d;p=platform%2Fcore%2Fml%2Fnnfw.git Remove tensor.h deps of RSQRT, SQDiff (#2638) To fix gbs build, remove tensor.h deps of RSQRT and SQDiff Signed-off-by: Chunseok Lee --- diff --git a/libs/support/tflite/src/kernels/RSQRT.cpp b/libs/support/tflite/src/kernels/RSQRT.cpp index dfb5b0c..13efe0e 100644 --- a/libs/support/tflite/src/kernels/RSQRT.cpp +++ b/libs/support/tflite/src/kernels/RSQRT.cpp @@ -16,7 +16,6 @@ #include "support/tflite/kernels/RSQRT.h" #include "tensorflow/contrib/lite/kernels/kernel_util.h" -#include "tensorflow/contrib/lite/kernels/internal/tensor.h" #include #include @@ -57,7 +56,7 @@ inline TfLiteStatus Eval(TfLiteContext *context, TfLiteNode *node, float float_f case kTfLiteFloat32: { size_t elements = NumElements(input); - const float *in = GetTensorData(input); + const float *in = input->data.f; const float *in_end = in + elements; float *out = output->data.f; for (; in < in_end; in++, out++) diff --git a/libs/support/tflite/src/kernels/SquaredDifference.cpp b/libs/support/tflite/src/kernels/SquaredDifference.cpp index a2f64c6..25e10a8 100644 --- a/libs/support/tflite/src/kernels/SquaredDifference.cpp +++ b/libs/support/tflite/src/kernels/SquaredDifference.cpp @@ -16,7 +16,6 @@ #include "support/tflite/kernels/SquaredDifference.h" #include "tensorflow/contrib/lite/kernels/kernel_util.h" -#include "tensorflow/contrib/lite/kernels/internal/tensor.h" #include @@ -67,8 +66,8 @@ TfLiteStatus EvalSquaredDifference(TfLiteContext *context, TfLiteNode *node) { case kTfLiteFloat32: { - const float *in1 = GetTensorData(input1); - const float *in2 = GetTensorData(input2); + const float *in1 = input1->data.f; + const float *in2 = input2->data.f; const float *in_end1 = in1 + elements; float *out = output->data.f; @@ -79,8 +78,8 @@ TfLiteStatus EvalSquaredDifference(TfLiteContext *context, TfLiteNode *node) } case kTfLiteInt32: { - const int *in1 = GetTensorData(input1); - const int *in2 = GetTensorData(input2); + const int *in1 = input1->data.i32; + const int *in2 = input2->data.i32; const int *in_end1 = in1 + elements; int *out = output->data.i32; @@ -91,8 +90,8 @@ TfLiteStatus EvalSquaredDifference(TfLiteContext *context, TfLiteNode *node) } case kTfLiteInt64: { - const int64_t *in1 = GetTensorData(input1); - const int64_t *in2 = GetTensorData(input2); + const int64_t *in1 = input1->data.i64; + const int64_t *in2 = input1->data.i64; const int64_t *in_end1 = in1 + elements; int64_t *out = output->data.i64;