Skip to content

Commit

Permalink
[CMSIS-NN] Fix memory alignment bug in CMSIS-NN demo (apache#11221)
Browse files Browse the repository at this point in the history
* Updates convert_image.py to include memory alignment
  • Loading branch information
grant-arm authored and Yuanjing Shi committed May 17, 2022
1 parent 5adac43 commit f43d91f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion apps/microtvm/cmsisnn/convert_image.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit f43d91f

Please sign in to comment.