Replies: 5 comments
|
#include "executor.hpp" // Linker symbols for .pte in QSPI flash // Tensor arena in SRAM int main() { } |
|
Hi @asimhusain-ai ! Thank you for sharing your example. I believe there might be a few API differences compared to the current ExecuTorch runtime:
So your snippet may compile against an experimental branch, but not against the current mainline ExecuTorch :/ Thanks again for sharing it |
|
@JacobSzwejbka @psiddh @digantdesai Do you have any suggestions on how to best handle this? |
|
@Faboulou Thanks for raising this issue, One option I could think of is to follow our recently added Pico2 bare metal tutorial which demonstrates exactly this - loading and executing .pte files in bare metal environments with BufferDataLoader
tl;dr: The Pico2 bare-metal stcok tutorial uses BufferDataLoader with embedded .pte data. Try:
Let us know if this helps! |
|
Hey @psiddh I was able to use BufferDataLoader, seems to work ( I just upgrade my executorch to v0.7 to v1.0.0) Thanks for the pico2 tutorial, it was useful :) |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Hello !
Problem Description
I’m currently working on deploying ExecuTorch on a bare-metal microcontroller featuring an Arm Cortex-M + Ethos-U55 NPU.
The .pte model is stored in external QSPI flash and must be executed XIP.
However, when configuring the CMake build for bare-metal, the system disables all data loader extensions:
-DEXECUTORCH_BUILD_ARM_BAREMETAL=ON
-DEXECUTORCH_BUILD_EXTENSION_DATA_LOADER=OFF # (forced by compatibility)
In the current ExecuTorch examples and documentation — particularly in
backends/cadence/executor_runner.cpp
— the BufferDataLoader is the only documented method to load a .pte.
Unfortunately, this class resides in the extensions module and cannot be used in a bare-metal build. That leaves some uncertainty about how to properly load a model directly from external flash (XIP) when extensions are disabled.
I’m hoping to clarify a few key points and open discussion around the official or recommended path for this scenario.
Questions
Thanks in advance
All reactions