summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author서상민/동작제어Lab(SR)/Senior Engineer/삼성전자 <sangmin7.seo@samsung.com>2018-05-29 10:22:40 +0900
committerGitHub Enterprise <noreply-CODE@samsung.com>2018-05-29 10:22:40 +0900
commitfb6456ee1c0477d8a145366bc3840a876d180819 (patch)
tree738bce151cc7cf8ae6fbd869e158df8583aa734a
parent3d7eb51b00eaf8913c7d2630361823296ea06227 (diff)
downloadnnfw-fb6456ee1c0477d8a145366bc3840a876d180819.tar.gz
nnfw-fb6456ee1c0477d8a145366bc3840a876d180819.tar.bz2
nnfw-fb6456ee1c0477d8a145366bc3840a876d180819.zip
Convert TF Lite's DIV to NN API's (#1398)
For #1199 and #1366 This commit links TF Lite's DIV operation to NN API's. It also enables the Div test in the framework test. Signed-off-by: Sangmin Seo <sangmin7.seo@samsung.com>
-rw-r--r--libs/support/tflite/src/nnapi_delegate.cpp5
-rw-r--r--tests/framework/tests/div/broadcast/config.sh1
2 files changed, 4 insertions, 2 deletions
diff --git a/libs/support/tflite/src/nnapi_delegate.cpp b/libs/support/tflite/src/nnapi_delegate.cpp
index 371f2c144..59e109c6a 100644
--- a/libs/support/tflite/src/nnapi_delegate.cpp
+++ b/libs/support/tflite/src/nnapi_delegate.cpp
@@ -242,6 +242,10 @@ void AddOpsAndParams(tflite::Interpreter *interpreter, ANeuralNetworksModel *nn_
nn_op_type = ANEURALNETWORKS_SUB;
add_add_params();
break;
+ case tflite::BuiltinOperator_DIV:
+ nn_op_type = ANEURALNETWORKS_DIV;
+ add_add_params();
+ break;
case tflite::BuiltinOperator_AVERAGE_POOL_2D:
add_pooling_params(node.builtin_data);
nn_op_type = ANEURALNETWORKS_AVERAGE_POOL_2D;
@@ -329,7 +333,6 @@ void AddOpsAndParams(tflite::Interpreter *interpreter, ANeuralNetworksModel *nn_
case tflite::BuiltinOperator_TOPK_V2:
case tflite::BuiltinOperator_TRANSPOSE:
case tflite::BuiltinOperator_MEAN:
- case tflite::BuiltinOperator_DIV:
case tflite::BuiltinOperator_SPLIT:
case tflite::BuiltinOperator_SQUEEZE:
case tflite::BuiltinOperator_STRIDED_SLICE:
diff --git a/tests/framework/tests/div/broadcast/config.sh b/tests/framework/tests/div/broadcast/config.sh
index 4fd08b07f..164b20134 100644
--- a/tests/framework/tests/div/broadcast/config.sh
+++ b/tests/framework/tests/div/broadcast/config.sh
@@ -1,3 +1,2 @@
MODELFILE_SERVER="http://npuarchive.mooo.com/archive/nnfw/nn_framework_test"
MODELFILE_NAME="div_test_broadcast.tflite"
-STATUS="disabled"