Skip to content

Add example for placing tensor arena in external RAM #906

@andresovela

Description

@andresovela

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions