Use PSRAM for impulse deployment on ESP32-S3

Hi

I’ve trained a small classifier model (project id: 563549). For deployment, I want to run this on ESP32S3. So, I exported the Arduino library and tried running the static_buffer.ino example file through Arduino & Platformio both. I’ve been getting this error:

ERR: Failed to allocate persistent buffer of size 512, does not fit in tensor arena and reached EI_MAX_OVERFLOW_BUFFER_COUNT
Guru Meditation Error: Core  1 panic'ed (StoreProhibited). Exception was unhandled.

My esp32 board has an 8mb psram and was wondering if the internal SDK is using the PSRAM or not? If not by default, how can I make use of it such that the model runs on my Edge device?

Thanks!

After trying further and moving past that error, tried running the same code, and I got this return type:

EI_IMPULSE_TFLITE_ARENA_ALLOC_FAILED = -6

Serial output:

ERR: Failed to run classifier (-6)
Edge Impulse standalone inferencing (Arduino)
ERR: failed to allocate tensor arena

It’s hard to pinpoint what could have gone wrong or what else I can try to make it run on the ESP32-S3. Any help is much appreciated, thanks!

PSRAM allocations managed automatically with ESP IDF, see more info here Support for External RAM - ESP32 - — ESP-IDF Programming Guide v5.2.3 documentation
i.e. if you have it enabled, it will be used by firmware the same way normal RAM is used.

Do you have it enabled for your project?
Also how did you “trying further and moving past that error, tried running the same code”? If you increased the arena size and running into ```
ERR: failed to allocate tensor arena