aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--applications/inference_process/src/inference_process.cpp4
-rw-r--r--lib/layer_by_layer_profiler/CMakeLists.txt17
2 files changed, 16 insertions, 5 deletions
diff --git a/applications/inference_process/src/inference_process.cpp b/applications/inference_process/src/inference_process.cpp
index 2a0b687..09439f8 100644
--- a/applications/inference_process/src/inference_process.cpp
+++ b/applications/inference_process/src/inference_process.cpp
@@ -24,7 +24,7 @@
#include "tensorflow/lite/schema/schema_generated.h"
#include "arm_profiler.hpp"
-#ifdef ETHOSU
+#ifdef LAYER_BY_LAYER_PROFILER
#include "layer_by_layer_profiler.hpp"
#endif
#include "ethosu_log.h"
@@ -204,7 +204,7 @@ bool InferenceProcess::runJob(InferenceJob &job) {
// Create the TFL micro interpreter
tflite::AllOpsResolver resolver;
-#ifdef ETHOSU
+#ifdef LAYER_BY_LAYER_PROFILER
tflite::LayerByLayerProfiler profiler;
#else
tflite::ArmProfiler profiler;
diff --git a/lib/layer_by_layer_profiler/CMakeLists.txt b/lib/layer_by_layer_profiler/CMakeLists.txt
index 7a16da2..1e3d012 100644
--- a/lib/layer_by_layer_profiler/CMakeLists.txt
+++ b/lib/layer_by_layer_profiler/CMakeLists.txt
@@ -21,6 +21,17 @@ if (NOT TARGET ethosu_core_driver)
endif()
add_library(layer_by_layer_profiler INTERFACE)
-target_link_libraries(layer_by_layer_profiler INTERFACE ethosu_core_driver tflu event_recorder ethosu_log)
-target_include_directories(layer_by_layer_profiler INTERFACE include)
-target_sources(layer_by_layer_profiler INTERFACE src/layer_by_layer_profiler.cpp)
+
+target_link_libraries(layer_by_layer_profiler INTERFACE
+ ethosu_core_driver
+ tflu event_recorder
+ ethosu_log)
+
+target_include_directories(layer_by_layer_profiler INTERFACE
+ include)
+
+target_sources(layer_by_layer_profiler INTERFACE
+ src/layer_by_layer_profiler.cpp)
+
+target_compile_definitions(layer_by_layer_profiler INTERFACE
+ LAYER_BY_LAYER_PROFILER)