aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKristofer Jonsson <kristofer.jonsson@arm.com>2023-02-10 13:30:16 +0100
committerKristofer Jonsson <kristofer.jonsson@arm.com>2023-02-10 14:29:03 +0100
commit7716cee237fcbc371a443a39dd0f4c3f6bf8d989 (patch)
tree921ed92577b029bc06176aebf0f0d6ffde89c1ef
parent3f5510fa3444217a442ac2e63ae50b27c9c26cf3 (diff)
downloadethos-u-core-platform-7716cee237fcbc371a443a39dd0f4c3f6bf8d989.tar.gz
Fix size of TFLM arena
The TFLM arena size was incorrectly surrounded by sizeof(), which caused the arena size to be allocated to only 4 bytes. Change-Id: Iea8c76e0ce434973c9d0a7f696cfb51af49a48fd
-rw-r--r--applications/message_handler_openamp/main.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/applications/message_handler_openamp/main.cpp b/applications/message_handler_openamp/main.cpp
index 2aad224..9d3c074 100644
--- a/applications/message_handler_openamp/main.cpp
+++ b/applications/message_handler_openamp/main.cpp
@@ -20,6 +20,7 @@
* Includes
*****************************************************************************/
+#include <cinttypes>
#include <memory>
#include <stdio.h>
@@ -61,7 +62,7 @@ constexpr size_t arenaSize = TENSOR_ARENA_SIZE;
*****************************************************************************/
extern "C" {
-__attribute__((section(".resource_table"))) ResourceTable resourceTable(8, sizeof(arenaSize *NUM_PARALLEL_TASKS));
+__attribute__((section(".resource_table"))) ResourceTable resourceTable(8, arenaSize *NUM_PARALLEL_TASKS);
}
/*****************************************************************************
@@ -98,6 +99,11 @@ int main() {
auto rproc = std::make_shared<RProc>(mailbox, resourceTable.table, sizeof(resourceTable), *mem);
auto messageHandler = std::make_shared<MessageHandler>(*rproc, "ethos-u-0.0");
+ printf("TFLM arena. pa=%" PRIx32 ", da=%" PRIx32 ", len=%" PRIx32 "\n",
+ resourceTable.carveout.da,
+ resourceTable.carveout.pa,
+ resourceTable.carveout.len);
+
std::array<std::shared_ptr<InferenceRunner>, NUM_PARALLEL_TASKS> inferenceRunner;
for (size_t i = 0; i < NUM_PARALLEL_TASKS; i++) {