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

mousius 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 9e404f0957 [CMSIS-NN] Fix memory alignment bug in CMSIS-NN demo 
(#11221)
9e404f0957 is described below

commit 9e404f09574c8ea82f15d5e6582530a7f7d95b8d
Author: Grant Watson <[email protected]>
AuthorDate: Mon May 9 21:11:53 2022 +0100

    [CMSIS-NN] Fix memory alignment bug in CMSIS-NN demo (#11221)
    
    * Updates convert_image.py to include memory alignment
---
 apps/microtvm/cmsisnn/convert_image.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/apps/microtvm/cmsisnn/convert_image.py 
b/apps/microtvm/cmsisnn/convert_image.py
index 0b56c8dee2..b7930ff73e 100755
--- a/apps/microtvm/cmsisnn/convert_image.py
+++ b/apps/microtvm/cmsisnn/convert_image.py
@@ -34,7 +34,7 @@ def create_header_file(name, tensor_name, tensor_data, 
output_path):
         header_file.write(
             "\n"
             + f"const size_t {tensor_name}_len = {tensor_data.size};\n"
-            + f'int8_t {tensor_name}[] = "'
+            + f'__attribute__((section(".data.tvm"), aligned(16))) int8_t 
{tensor_name}[] = "'
         )
 
         data_hexstr = tensor_data.tobytes().hex()

Reply via email to