diff --git a/ai/neural_network_runtime/common/nnrt_utils.cpp b/ai/neural_network_runtime/common/nnrt_utils.cpp index f4c7a61d4cf7c2bb4d378a76d87c15f4e97cff1a..8692dffc3c73f8f24f82fc263cbb73ba60fc8e7c 100644 --- a/ai/neural_network_runtime/common/nnrt_utils.cpp +++ b/ai/neural_network_runtime/common/nnrt_utils.cpp @@ -262,7 +262,7 @@ int ExecutorWithMemory(OH_NNExecutor *executor, const OHNNGraphArgs &graphArgs, } else if (std::find(graphArgs.outputIndices.begin(), graphArgs.outputIndices.end(), i) != graphArgs.outputIndices.end()) { OH_NN_Memory *outputMemory = OH_NNExecutor_AllocateOutputMemory(executor, outputIndex, - operandTem.length); + operandTem.length); ret = OH_NNExecutor_SetOutputWithMemory(executor, outputIndex, outputMemory); if (ret != OH_NN_SUCCESS) { LOGE("[NNRtTest] OH_NNExecutor_SetOutputWithMemory failed! ret=%d\n", ret);