You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 713e159
Browse filesBrowse the repository at this point in the historyBrowse files
Arm backend: Support memory planning in arm_executor_runner (pytorch#21774)
Support explicitly tagging tensors with mem_id = 2 for putting them in a
SLOW_MEMORY_REGION and mem_id = 3 for putting in FAST_MEMORY_REGION.
Keep default mem_id = 1 in SLOW_MEMORY_REGION. This gives users more
flexibility in memory planning their programs.
Add a new .fast_memory input section in .sram.bss that backs the fast
memory allocator. The size of the memory area is set by a new cmake flag
ET_ARM_BAREMETAL_PLANNED_FAST_MEMORY_SIZE. The slow memory region can
still be allocated like planned et tensors are currently.
cc @digantdesai@freddan80@per@zingo@oscarandersson8218@mansnils@Sebastian-Larsson@robell@rascani
Signed-off-by: Erik Lundell <erik.lundell@arm.com>
Copy file name to clipboardExpand all lines: examples/arm/ethos-u-porting-guide.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -89,6 +89,7 @@ way, depending on the `ETHOSU_ARENA` parameter, the linker knows whether the inp
89
89
its value is derived based on the memory mode parameter that is passed to the `examples/arm/run.sh` shell script. Then, at link time, the .ddr.bss section is always placed in the external memory and the .sram.bss is always placed in the SRAM.
90
90
Finally, note that in the `examples/arm/executor_runner/arm_executor_runner.cpp` application code, we place the buffers for the Ethos-u scratch and the neural network in the correct symbol from the linker script. For instance,
91
91
the Ethos-u scratch buffer corresponds to the the `.bss.tensor_arena` input section in the linker script, In the application code, when we allocate memory for the Ethos-u scratch buffer, we place this array in the .bss.tensor_arena section in the memory map.
92
+
The same runner also supports ExecuTorch memory-planned tensors in `SLOW_MEMORY_REGION` for `mem_id=1` and `mem_id=2`, and in `FAST_MEMORY_REGION` for `mem_id=3`, backed by the `.fast_memory` input section in `.sram.bss` and sized with `ET_ARM_BAREMETAL_PLANNED_FAST_MEMORY_SIZE`.
0 commit comments