From 9a12451f1cb7246595c53ff6d9495abf90d59005 Mon Sep 17 00:00:00 2001 From: =?utf8?q?=EB=82=A8=EA=B6=81=EC=84=9D/=EB=8F=99=EC=9E=91=EC=A0=9C?= =?utf8?q?=EC=96=B4Lab=28SR=29/Engineer/=EC=82=BC=EC=84=B1=EC=A0=84?= =?utf8?q?=EC=9E=90?= Date: Fri, 24 Aug 2018 11:27:54 +0900 Subject: [PATCH] Enable to pass ValidationTestModel.identifyInputsAndOutputs in pureacl (#2452) - Add checking if building model is finished or not Signed-off-by: Seok NamKoong --- runtimes/pure_arm_compute/src/model.cc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/runtimes/pure_arm_compute/src/model.cc b/runtimes/pure_arm_compute/src/model.cc index 84dad11..d93b4ca 100644 --- a/runtimes/pure_arm_compute/src/model.cc +++ b/runtimes/pure_arm_compute/src/model.cc @@ -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 // -- 2.7.4