Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[microTVM][Zephyr][AOT] Memory Alignment #8474

Closed
mehrdadh opened this issue Jul 14, 2021 · 1 comment
Closed

[microTVM][Zephyr][AOT] Memory Alignment #8474

mehrdadh opened this issue Jul 14, 2021 · 1 comment

Comments

@mehrdadh
Copy link
Member

There's an issue with AOT demo where the zephyr RTOS doesn't guarantee that g_aot_memory start with a 4 bytes alignment memory address. Therefore, it will cause an exception specially on fp32 operations. One simple hack is to add memory alignment to g_aot_memory which is used by stack allocator:

static uint8_t __attribute__((aligned(4))) g_aot_memory[WORKSPACE_SIZE];

We need to investigate more to figure out whether this is a Zephyr RTOS bug or there's a configuration that is missing in our Zephyr AOT demo. Also our current test_zephyr_aot.py doesn't catch this problem. Ideally we should add a test to check this specifically for Zephyr RTOS.

Thanks to @areusch and @gromero for helping to find this issue.

@mehrdadh
Copy link
Member Author

PR is merged now!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant