aboutsummaryrefslogtreecommitdiff
path: root/applications/inference_process/include/inference_process.hpp
diff options
context:
space:
mode:
authorKristofer Jonsson <kristofer.jonsson@arm.com>2021-12-21 16:25:19 +0100
committerKristofer Jonsson <kristofer.jonsson@arm.com>2022-01-27 12:37:31 +0100
commitdcc1ce0f9b64198f3bb82d9858ec79663808a35f (patch)
tree17be381106669a64ad3c6e05b00691a3b5a30f37 /applications/inference_process/include/inference_process.hpp
parent40d886e7d3facda35558448f408fa99ab61a5963 (diff)
downloadethos-u-core-software-dcc1ce0f9b64198f3bb82d9858ec79663808a35f.tar.gz
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
Diffstat (limited to 'applications/inference_process/include/inference_process.hpp')
-rw-r--r--applications/inference_process/include/inference_process.hpp18
1 files changed, 18 insertions, 0 deletions
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 <string>
#include <vector>
+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;
};