Skip to main content

Crate burn_dispatch

Crate burn_dispatch 

Source
Expand description

Burn multi-backend dispatch.

§Available Backends

The dispatch backend supports the following variants, each enabled via cargo features:

BackendFeatureDescription
CpucpuRust CPU backend (MLIR + LLVM)
CudacudaNVIDIA CUDA backend
MetalmetalApple Metal backend via wgpu (MSL)
RocmrocmAMD ROCm backend
VulkanvulkanVulkan backend via wgpu (SPIR-V)
WgpuwebgpuWebGPU backend via wgpu (WGSL)
FlexflexPure Rust CPU backend using burn-flex
NdArrayndarrayPure Rust CPU backend using ndarray (legacy - prefer flex)
LibTorchtchLibtorch backend via tch
AutodiffautodiffAutodiff-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.

Re-exports§

pub use backend::*;
pub use device::*;
pub use tensor::*;

Modules§

backend
Dispatch backend module.
backends
Backends and devices used.
device
Dispatch device module.
devices
Backend devices.
tensor
Dispatch tensor module.