Update nnapi_delegation for Space_To_BatchND (#2904)
authorShubham Gupta/System SW /SRI-Bangalore/Engineer/삼성전자 <shub98.gupta@samsung.com>
Fri, 5 Oct 2018 04:06:59 +0000 (09:36 +0530)
committer오형석/동작제어Lab(SR)/Staff Engineer/삼성전자 <hseok82.oh@samsung.com>
Fri, 5 Oct 2018 04:06:59 +0000 (13:06 +0900)
This patch will add nnapi delegaion for Space_to_BatchND

Signed-off-by: shubham <shub98.gupta@samsung.com>
libs/support/tflite/src/nnapi_delegate.cpp

index 9de80c1..4a4a416 100644 (file)
@@ -484,6 +484,10 @@ void AddOpsAndParams(tflite::Interpreter* interpreter,
         add_strided_slice_params(node.builtin_data);
         nn_op_type = ANEURALNETWORKS_STRIDED_SLICE;
         break;
+      case tflite::BuiltinOperator_SPACE_TO_BATCH_ND:
+        nnapi_version = 11;  // require NNAPI 1.1
+        nn_op_type = ANEURALNETWORKS_SPACE_TO_BATCH_ND;
+        break;
       case tflite::BuiltinOperator_CAST:
         CHECK_NN(ANeuralNetworksModel_addOperationEx(
             nn_model, ANEURALNETWORKS_CAST_EX,
@@ -544,7 +548,6 @@ void AddOpsAndParams(tflite::Interpreter* interpreter,
       case tflite::BuiltinOperator_PADV2:
       case tflite::BuiltinOperator_CALL:
       case tflite::BuiltinOperator_SKIP_GRAM:
-      case tflite::BuiltinOperator_SPACE_TO_BATCH_ND:
       case tflite::BuiltinOperator_BATCH_TO_SPACE_ND:
       case tflite::BuiltinOperator_SQUEEZE:
       case tflite::BuiltinOperator_LOG_SOFTMAX: