commit | 165f00a87716ef7fd8527134a61b7aa61adfe7a7 | [log] [tgz] |
---|---|---|
author | Davide Grohmann <davide.grohmann@arm.com> | Wed Feb 09 14:53:58 2022 +0100 |
committer | Davide Grohmann <davide.grohmann@arm.com> | Wed Feb 09 14:54:46 2022 +0100 |
tree | 4f0b3c3e649c30aa1aaa05f9636e6ba750ecd4b4 | |
parent | 5a15bf4c86fad79523517afff5f2df2f6298d8da [diff] |
Do not set external context if NULL This avoids a warning in TFLu Change-Id: I90f6d6cefbe69c720d3c65c550d7f65e727c48fb
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 @@ 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();