ExecuTorch adds Cortex-M backend for PyTorch on Arm MCUs
The PyTorch Blog announced that ExecuTorch's Cortex-M backend is available in the repository, letting PyTorch models run directly on Arm Cortex-M CPUs with Arm CMSIS-NN acceleration instead of being converted to another framework format. The backend selects the CMSIS-NN path at compile time for CPU variants from M0 to M85 and supports Scalar, DSP and MVE/Helium tiers, and it can run alongside Ethos-U NPU delegation, with non-delegated operations falling back to CPU kernels inside the same graph. The authors report benchmarking four of the five MLPerf Tiny models on the Alif Ensemble E8, each running in 21.5 ms or less and using under 90 KiB of RAM on a single Cortex-M55 core, with a core runtime under 20 KiB of flash; these figures are the project's own claims and were not independently verified.
For teams that train in PyTorch and deploy to microcontrollers, the backend removes the step of converting models to another format and maintaining a separate toolchain.
TL;DR
- Deploying PyTorch models on microcontrollers has historically required converting to other framework formats, maintaining separate toolchains, and debugging cross-framework numerical mismatches. ExecuTorch eliminates this conversion step entirely.
- The Cortex-M backend enables PyTorch models to run directly on Arm Cortex-M CPUs with Arm CMSIS-NN acceleration. It supports all capability tiers (Scalar, DSP, and MVE/Helium) from a single workflow.
- We benchmark four of the five models from the MLPerf Tiny suite on the Alif Ensemble E8. Each model runs in 21.5 ms or less and uses under 90 KiB of RAM on a single Cortex-M55 core.
- For heterogeneous SoCs, the Cortex-M backend also provides the CPU execution path alongside Ethos-U NPU delegation.
- Minimal binary footprint. The ExecuTorch core runtime is under 20 KiB of flash, and operator selective build links only the operators your model needs, so total code size scales with the model rather than the framework.
Background
Microcontrollers power billions of always-on devices: wearables, industrial sensors, voice interfaces, and smart home appliances. These devices operate under extreme constraints: often less than 1 MB of SRAM, single-digit megabytes of flash, and power budgets measured in milliwatts. Despite these limitations, there’s growing demand to run meaningful ML workloads on these platforms and the hardware is evolving to meet it. Modern Cortex-M based microcontroller units (MCUs) now include DSP & vector ISAs, large tightly-coupled memories (TCMs), and power-efficient NPUs such as the Arm Ethos-U NPU that make ML inference more practical in resource constrained devices.
#ExecuTorch#PyTorch#Arm#CMSIS-NN#Cortex-M#Ethos-U#Alif Ensemble E8#Raspberry Pi Pico 2#MLPerf Tiny