Skip to content

Latest commit

History

History
71 lines (54 loc) · 4.5 KB

File metadata and controls

71 lines (54 loc) · 4.5 KB

Backends

Backend Overview

ExecuTorch backends provide hardware acceleration for specific hardware targets, enabling models to run efficiently on devices ranging from mobile phones to embedded systems and DSPs. During the export and lowering process, ExecuTorch optimizes your model for the chosen backend, resulting in a .pte file specialized for that hardware. To support multiple platforms (e.g., Core ML on iOS, Arm CPU on Android), you typically generate a dedicated .pte file for each backend.

The choice of backend is informed by the hardware your model will run on. Each backend has its own hardware requirements and level of model/operator support. See the documentation for each backend for details.

As part of .pte file creation, ExecuTorch identifies model partitions supported by the backend. These are processed ahead of time for efficient execution. Operators not supported by the delegate are executed using the portable CPU fallback (e.g., XNNPACK), allowing for partial acceleration. You can also specify multiple partitioners in order of priority, so unsupported GPU ops can fall back to CPU, for example.


Why Backends Matter

Backends are the bridge between your exported model and the hardware it runs on. Choosing the right backend ensures your model takes full advantage of device-specific acceleration, balancing performance, compatibility, and resource usage.


Choosing a Backend

BackendPlatform(s)Hardware TypeTypical Use Case
XNNPACKAllCPUGeneral-purpose, fallback
CUDALinux/WindowsGPUNVIDIA GPU acceleration
Core MLiOS, macOSNPU/GPU/CPUApple devices, high performance
MLXiOS (experimental), macOSGPUApple Silicon GPU (MLX)
VulkanAndroid, Linux, WindowsGPUAndroid devices (mature); Desktops (experimental)
WebGPUBrowser, Linux, macOSGPUCross-platform and browser GPU execution (experimental)
QualcommAndroidNPUQualcomm SoCs
MediaTekAndroidNPUMediaTek SoCs
Arm Ethos-UEmbeddedNPUArm MCUs
Arm Cortex-MEmbeddedCPUArm Cortex-M MCUs
Arm VGFAndroidGPUArm platforms
OpenVINOEmbeddedCPU/GPU/NPUIntel SoCs
NXPEmbeddedNPUNXP SoCs
CadenceEmbeddedDSPDSP-optimized workloads
Samsung ExynosAndroidCPU/GPU/NPUSamsung Devices, Samsung SoCs; High Performance

Tip: For best performance, export a .pte file for each backend you plan to support.


Best Practices

  • Test on all target devices: Operator support may vary by backend.
  • Use fallback wisely: If a backend doesn't support an operator, ExecuTorch will run it on CPU.
  • Consult backend docs: Each backend has unique setup and tuning options.

:maxdepth: 3
:hidden:
:caption: Backend Overview
backends/xnnpack/xnnpack-overview
backends/cuda/cuda-overview
backends/coreml/coreml-overview
backends/mlx/mlx-overview
backends/vulkan/vulkan-overview
backends/webgpu/webgpu-overview
backends-qualcomm
backends-mediatek
backends/arm-ethos-u/arm-ethos-u-overview
backends/arm-cortex-m/arm-cortex-m-overview
backends/arm-vgf/arm-vgf-overview
build-run-openvino
backends/nxp/nxp-overview
backends-cadence
Samsung Exynos Backend <backends/samsung/samsung-overview>