aboutsummaryrefslogtreecommitdiff
path: root/applications
diff options
context:
space:
mode:
authorJonathan Strandberg <jonathan.strandberg@arm.com>2021-03-19 10:31:18 +0100
committerKristofer Jonsson <kristofer.jonsson@arm.com>2021-04-29 09:09:55 +0000
commitd2afc51a4e1a13fc3ad846e18c8ac098e3cd6bc7 (patch)
treee4ce9cd8c832ccf7e92431798adb6675400b3c9c /applications
parente3b6b96e011b962488ce777b34d5ca4442fc1243 (diff)
downloadethos-u-core-platform-d2afc51a4e1a13fc3ad846e18c8ac098e3cd6bc7.tar.gz
Add script to simplify testing networks on model
The script will build the platform, optimize the network through vela, run it on the model and present relevant statistics from the run. Change-Id: I6bf7d77caa68e64c52f7b523e6b79af9271b6500
Diffstat (limited to 'applications')
-rw-r--r--applications/baremetal/CMakeLists.txt10
-rw-r--r--applications/baremetal/main.cpp4
2 files changed, 11 insertions, 3 deletions
diff --git a/applications/baremetal/CMakeLists.txt b/applications/baremetal/CMakeLists.txt
index 129fd3f..c9d965b 100644
--- a/applications/baremetal/CMakeLists.txt
+++ b/applications/baremetal/CMakeLists.txt
@@ -16,6 +16,14 @@
# limitations under the License.
#
+set(BAREMETAL_PATH "" CACHE PATH "Path to input, output and network for baremetal")
+
+if (IS_DIRECTORY ${BAREMETAL_PATH})
+ ethosu_add_executable_test(baremetal_custom PRIVATE
+ SOURCES main.cpp)
+ target_include_directories(baremetal_custom PRIVATE ${BAREMETAL_PATH})
+endif()
+
ethosu_add_executable_test(baremetal_keyword_cnn PRIVATE
SOURCES main.cpp)
target_include_directories(baremetal_keyword_cnn PRIVATE models/keyword_spotting_cnn_small_int8)
@@ -26,4 +34,4 @@ target_include_directories(baremetal_keyword_dnn PRIVATE models/keyword_spotting
ethosu_add_executable_test(baremetal_keyword_ds_dnn PRIVATE
SOURCES main.cpp)
-target_include_directories(baremetal_keyword_ds_dnn PRIVATE models/keyword_spotting_ds_dnn_large_clustered_int8) \ No newline at end of file
+target_include_directories(baremetal_keyword_ds_dnn PRIVATE models/keyword_spotting_ds_dnn_large_clustered_int8)
diff --git a/applications/baremetal/main.cpp b/applications/baremetal/main.cpp
index e1e01de..4c0bf50 100644
--- a/applications/baremetal/main.cpp
+++ b/applications/baremetal/main.cpp
@@ -47,7 +47,7 @@ __attribute__((section(".bss.tensor_arena"), aligned(16))) uint8_t TFLuTensorAre
InferenceProcess::InferenceProcess inferenceProcess(TFLuTensorArena, TENSOR_ARENA_SIZE);
-uint8_t outputData[176] __attribute__((aligned(16), section("output_data_sec")));
+uint8_t outputData[sizeof(expectedOutputData)] __attribute__((aligned(16), section("output_data_sec")));
int runInference() {
// Load inference data
@@ -81,4 +81,4 @@ int runInference() {
int main() {
int ret = runInference();
return ret;
-} \ No newline at end of file
+}