From dcc1ce0f9b64198f3bb82d9858ec79663808a35f Mon Sep 17 00:00:00 2001 From: Kristofer Jonsson Date: Tue, 21 Dec 2021 16:25:19 +0100 Subject: Inference process update Split runJob() into smaller functions to make the code easier to read and maintain. Correct return type of Layer By Layer profiler GetTotalTicks(). Change-Id: Ie414522017b3b6c6da9a09182439dbe4b2efdb1f --- .../inference_process/include/inference_process.hpp | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'applications/inference_process/include') diff --git a/applications/inference_process/include/inference_process.hpp b/applications/inference_process/include/inference_process.hpp index b8b2775..6ab453c 100644 --- a/applications/inference_process/include/inference_process.hpp +++ b/applications/inference_process/include/inference_process.hpp @@ -24,6 +24,14 @@ #include #include +struct TfLiteTensor; + +namespace tflite { +// Forward declarations +class MicroInterpreter; +class MicroResourceVariables; +} // namespace tflite + namespace InferenceProcess { struct DataPtr { void *data; @@ -33,6 +41,9 @@ struct DataPtr { void invalidate(); void clean(); + + char *begin() const; + char *end() const; }; struct InferenceJob { @@ -68,6 +79,13 @@ public: bool runJob(InferenceJob &job); private: + static bool copyIfm(InferenceJob &job, tflite::MicroInterpreter &interpreter); + static bool copyOfm(InferenceJob &job, tflite::MicroInterpreter &interpreter); + static bool compareOfm(InferenceJob &job, tflite::MicroInterpreter &interpreter); + static void printJob(InferenceJob &job, tflite::MicroInterpreter &interpreter); + static void printOutputTensor(TfLiteTensor *output, size_t bytesToPrint); + static void tfluDebugLog(const char *s); + uint8_t *tensorArena; const size_t tensorArenaSize; }; -- cgit v1.2.1