Enable NNAPI I/O identify validation check (#4810)
author오형석/On-Device Lab(SR)/Staff Engineer/삼성전자 <hseok82.oh@samsung.com>
Thu, 21 Mar 2019 05:06:46 +0000 (14:06 +0900)
committerGitHub Enterprise <noreply-CODE@samsung.com>
Thu, 21 Mar 2019 05:06:46 +0000 (14:06 +0900)
Enable ValidationTestIdentify.DuplicateInputs and ValidationTestIdentify.DuplicateOutputs for acl_cl kernel
Enable all ValidationTestIdentify test for cpu kernel

Signed-off-by: Hyeongseok Oh <hseok82.oh@samsung.com>
runtimes/neurun/frontend/nnapi/wrapper/model.cc
tests/nnapi/nnapi_gtest.skip.armv7l-linux.neurun
tests/nnapi/nnapi_gtest.skip.armv7l-linux.neurun.cpu
tests/nnapi/nnapi_gtest.skip.x86_64-linux.neurun

index c845251..6575a75 100644 (file)
@@ -164,6 +164,13 @@ bool ANeuralNetworksModel::addModelOutput(uint32_t index) noexcept
   try
   {
     const neurun::model::operand::Index ind{index};
+
+    // Duplicated output is not allowed
+    if (_model->getOutputs().contains(ind))
+    {
+      return false;
+    }
+
     _model->addOutput(ind);
   }
   catch (const std::exception &e)
index 3386be3..e14489e 100644 (file)
@@ -3,8 +3,6 @@
 #
 # Not support operations
 ValidationTestCompilation.Finish
-ValidationTestIdentify.DuplicateInputs
-ValidationTestIdentify.DuplicateOutputs
 ValidationTestExecution.SetInput
 ValidationTestExecution.SetOutput
 ValidationTestExecution.SetInputFromMemory
index 3fb6ae1..a527f27 100644 (file)
@@ -9,11 +9,6 @@ TrivialTest.BroadcastMulTwo
 ValidationTestCompilation.SetPreference
 ValidationTestCompilation.CreateExecution
 ValidationTestCompilation.Finish
-ValidationTestIdentify.InputIsOutput
-ValidationTestIdentify.OutputIsInput
-ValidationTestIdentify.DuplicateInputs
-ValidationTestIdentify.DuplicateOutputs
-ValidationTestIdentify.Ok
 ValidationTestExecution.SetInput
 ValidationTestExecution.SetOutput
 ValidationTestExecution.SetInputFromMemory
index 4eed396..6969cca 100644 (file)
@@ -9,11 +9,6 @@ TrivialTest.BroadcastMulTwo
 ValidationTestCompilation.SetPreference
 ValidationTestCompilation.CreateExecution
 ValidationTestCompilation.Finish
-ValidationTestIdentify.InputIsOutput
-ValidationTestIdentify.OutputIsInput
-ValidationTestIdentify.DuplicateInputs
-ValidationTestIdentify.DuplicateOutputs
-ValidationTestIdentify.Ok
 ValidationTestExecution.SetInput
 ValidationTestExecution.SetOutput
 ValidationTestExecution.SetInputFromMemory