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

Add example for placing tensor arena in external RAM #906

Open
andresovela opened this issue Jul 16, 2024 · 1 comment · May be fixed by #907
Open

Add example for placing tensor arena in external RAM #906

andresovela opened this issue Jul 16, 2024 · 1 comment · May be fixed by #907

Comments

@andresovela
Copy link
Contributor

In the same spirit as #903, it would be nice to have an example that shows how to place the tensor arena in external RAM.

If I understand correctly, this should be much easier to do than moving the weights to RAM. Looking at the two_models_one_arena example, it should be fairly simple to just add -DSHARED_TENSOR_ARENA to the APP_FLAGS in the Makefile, and add declare the array as follows

// Place in BSS - zero-initialise in bootstrap - do not occupy space in the flash image
__attribute__ ((section(".ExtMem.bss")))
uint8_t tensor_arena[LARGEST_TENSOR_ARENA_SIZE] ALIGN(8);

I'm not exactly sure if there's anything else to be done (I haven't tried this yet), but I think this would be a very valuable example to have.

@andresovela andresovela linked a pull request Jul 16, 2024 that will close this issue
@panickal-xmos
Copy link
Collaborator

Hi @andresovela, thank you for raising this and putting up an example. I'll get back to you.

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

Successfully merging a pull request may close this issue.

2 participants