You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by GitBox <gi...@apache.org> on 2022/05/06 09:05:29 UTC

[GitHub] [tvm] Mousius commented on pull request #11221: [CMSIS-NN] Fix memory alignment bug in CMSIS-NN demo

Mousius commented on PR #11221:
URL: https://github.com/apache/tvm/pull/11221#issuecomment-1119408205

   > @grant-arm Thanks for the PR. Just for my understanding, why do we need to align .rodata to 16 bytes? I have seen this for constants in the code generated C files as well. Also, does it hold good for all variations of Arm® Cortex®-M processors?
   
   Hi @ashutosh-arm, the reason is because we default the workspace allocation alignment to 16 bytes in a few places, for example:
   https://github.com/apache/tvm/blob/eae836cdf66f54f1e81e78e48bfa051431e8556f/src/relay/backend/aot_executor_codegen.cc#L831-L832
   
   Which means we have to ensure we start on a 16 byte boundary to avoid overflows when we round up the allocations in memory planning. I believe we chose this because it's the max alignment required across all devices (including microNPUs), we could actually detect this and align as per the architecture at some point but the savings are minimal.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org