From 068524523e59db352af88dfe850134719230e201 Mon Sep 17 00:00:00 2001 From: =?utf8?q?=EC=98=A4=ED=98=95=EC=84=9D/On-Device=20Lab=28SR=29/Staff?= =?utf8?q?=20Engineer/=EC=82=BC=EC=84=B1=EC=A0=84=EC=9E=90?= Date: Tue, 22 Jan 2019 10:37:21 +0900 Subject: [PATCH] Update frontend execution API (#4282) - Free execution object - Return bad state when setInput & setOutput using memory object (NYI) Signed-off-by: Hyeongseok Oh --- runtimes/neurun/src/frontend/execution.cc | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/runtimes/neurun/src/frontend/execution.cc b/runtimes/neurun/src/frontend/execution.cc index bea3b12..fa03013 100644 --- a/runtimes/neurun/src/frontend/execution.cc +++ b/runtimes/neurun/src/frontend/execution.cc @@ -365,7 +365,7 @@ int ANeuralNetworksExecution_startCompute(ANeuralNetworksExecution *execution, return ANEURALNETWORKS_NO_ERROR; } -void ANeuralNetworksExecution_free(ANeuralNetworksExecution * /* execution */) {} +void ANeuralNetworksExecution_free(ANeuralNetworksExecution *execution) { delete execution; } int ANeuralNetworksExecution_setInputFromMemory(ANeuralNetworksExecution *execution, int32_t /* index */, @@ -379,7 +379,8 @@ int ANeuralNetworksExecution_setInputFromMemory(ANeuralNetworksExecution *execut } // NYI - return ANEURALNETWORKS_NO_ERROR; + VERBOSE(NNAPI::Execution) << "setInputFromMemory: Cannot handle input from memory yet"; + return ANEURALNETWORKS_BAD_STATE; } int ANeuralNetworksExecution_setOutputFromMemory(ANeuralNetworksExecution *execution, @@ -394,5 +395,6 @@ int ANeuralNetworksExecution_setOutputFromMemory(ANeuralNetworksExecution *execu } // NYI - return ANEURALNETWORKS_NO_ERROR; + VERBOSE(NNAPI::Execution) << "setOutputFromMemory: Cannot handle output from memory yet"; + return ANEURALNETWORKS_BAD_STATE; } -- 2.7.4