You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by ar...@apache.org on 2022/04/04 01:33:40 UTC

[tvm] branch main updated: Fix Arduino workspace alignment (#10886)

This is an automated email from the ASF dual-hosted git repository.

areusch pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tvm.git


The following commit(s) were added to refs/heads/main by this push:
     new fcdf4636d8 Fix Arduino workspace alignment (#10886)
fcdf4636d8 is described below

commit fcdf4636d866fefbf3e2a55daa614565ce97203a
Author: Gavin Uberti <gu...@users.noreply.github.com>
AuthorDate: Sun Apr 3 19:33:34 2022 -0600

    Fix Arduino workspace alignment (#10886)
    
    * Fix Arduino workspace alignment
    
    * Fix linter error
    
    * Rerun tests
---
 apps/microtvm/arduino/template_project/src/example_project/model.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/apps/microtvm/arduino/template_project/src/example_project/model.c b/apps/microtvm/arduino/template_project/src/example_project/model.c
index 25d609dacc..46f43752ef 100644
--- a/apps/microtvm/arduino/template_project/src/example_project/model.c
+++ b/apps/microtvm/arduino/template_project/src/example_project/model.c
@@ -23,8 +23,9 @@
 #include "standalone_crt/include/dlpack/dlpack.h"
 #include "standalone_crt/include/tvm/runtime/crt/stack_allocator.h"
 
-// AOT memory array
-static uint8_t g_aot_memory[WORKSPACE_SIZE];
+// AOT memory array, stack allocator wants it aligned
+static uint8_t g_aot_memory[WORKSPACE_SIZE]
+    __attribute__((aligned(TVM_RUNTIME_ALLOC_ALIGNMENT_BYTES)));
 tvm_workspace_t app_workspace;
 
 // Blink code for debugging purposes