Enable to pass ValidationTestModel.identifyInputsAndOutputs in pureacl (#2452)
author남궁석/동작제어Lab(SR)/Engineer/삼성전자 <sk.namkoong@samsung.com>
Fri, 24 Aug 2018 02:27:54 +0000 (11:27 +0900)
committer오형석/동작제어Lab(SR)/Staff Engineer/삼성전자 <hseok82.oh@samsung.com>
Fri, 24 Aug 2018 02:27:54 +0000 (11:27 +0900)
- Add checking if building model is finished or not

Signed-off-by: Seok NamKoong <sk.namkoong@samsung.com>
runtimes/pure_arm_compute/src/model.cc

index 84dad11..d93b4ca 100644 (file)
@@ -592,6 +592,11 @@ int ANeuralNetworksModel_identifyInputsAndOutputs(ANeuralNetworksModel *model, u
     return ANEURALNETWORKS_UNEXPECTED_NULL;
   }
 
+  if (model->isFinished())
+  {
+    return ANEURALNETWORKS_BAD_STATE;
+  }
+
   // NOTE ::internal::tflite::operand::Index uses int as its underlying type as various NNAPI
   //      functions such as ANeuralNetworksModel_setOperandValue use int to represent operand index
   //