diff options
author | Davide Grohmann <davide.grohmann@arm.com> | 2022-02-09 14:53:58 +0100 |
---|---|---|
committer | Davide Grohmann <davide.grohmann@arm.com> | 2022-02-09 14:54:46 +0100 |
commit | 165f00a87716ef7fd8527134a61b7aa61adfe7a7 (patch) | |
tree | 4f0b3c3e649c30aa1aaa05f9636e6ba750ecd4b4 | |
parent | 5a15bf4c86fad79523517afff5f2df2f6298d8da (diff) | |
download | ethos-u-core-software-165f00a87716ef7fd8527134a61b7aa61adfe7a7.tar.gz |
Do not set external context if NULL
This avoids a warning in TFLu
Change-Id: I90f6d6cefbe69c720d3c65c550d7f65e727c48fb
-rw-r--r-- | applications/inference_process/src/inference_process.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/applications/inference_process/src/inference_process.cpp b/applications/inference_process/src/inference_process.cpp index 4c65005..4ab0353 100644 --- a/applications/inference_process/src/inference_process.cpp +++ b/applications/inference_process/src/inference_process.cpp @@ -171,7 +171,9 @@ bool InferenceProcess::runJob(InferenceJob &job) { model, resolver, tensorArena, tensorArenaSize, &errorReporter, nullptr, &profiler); // Set external context - interpreter.SetMicroExternalContext(job.externalContext); + if (job.externalContext != nullptr) { + interpreter.SetMicroExternalContext(job.externalContext); + } // Allocate tensors TfLiteStatus status = interpreter.AllocateTensors(); |