From: 오형석/동작제어Lab(SR)/Staff Engineer/삼성전자 Date: Fri, 7 Dec 2018 00:50:43 +0000 (+0900) Subject: Return error for not finished model compile (#3897) X-Git-Tag: 0.3~174 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=bae3ed52528fac18122a08342e98297fca21613d;p=platform%2Fcore%2Fml%2Fnnfw.git Return error for not finished model compile (#3897) When NNAPI call try to compile model not finished, return BAD_STATE error Signed-off-by: Hyeongseok Oh --- diff --git a/runtimes/neurun/src/frontend/compilation.cc b/runtimes/neurun/src/frontend/compilation.cc index a135eda..9b0719f 100644 --- a/runtimes/neurun/src/frontend/compilation.cc +++ b/runtimes/neurun/src/frontend/compilation.cc @@ -32,6 +32,11 @@ int ANeuralNetworksCompilation_create(ANeuralNetworksModel *model, return ANEURALNETWORKS_UNEXPECTED_NULL; } + if (!model->isFinished()) + { + return ANEURALNETWORKS_BAD_STATE; + } + std::shared_ptr internal; model->release(internal);