Expand description
Burn multi-backend dispatch.
§Available Backends
The dispatch backend supports the following variants, each enabled via cargo features:
| Backend | Feature | Description |
|---|---|---|
Cpu | cpu | Rust CPU backend (MLIR + LLVM) |
Cuda | cuda | NVIDIA CUDA backend |
Metal | metal | Apple Metal backend via wgpu (MSL) |
Rocm | rocm | AMD ROCm backend |
Vulkan | vulkan | Vulkan backend via wgpu (SPIR-V) |
Wgpu | webgpu | WebGPU backend via wgpu (WGSL) |
Flex | flex | Pure Rust CPU backend using burn-flex |
NdArray | ndarray | Pure Rust CPU backend using ndarray (legacy - prefer flex) |
LibTorch | tch | Libtorch backend via tch |
Autodiff | autodiff | Autodiff-enabled backend (used in combination with any of the backends above) |
Note: All backends, including the WGPU-based ones (wgpu, metal, vulkan, webgpu),
can be combined freely. Each enabled wgpu backend appears as its own
DispatchDevice variant.