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
Cubecpu, cuda, metal, rocm, vulkan, webgpu, wgpuEvery cubecl runtime. One backend: the features decide which runtimes are compiled in, and a tensor’s device says which one it runs on
FlexflexPure Rust CPU backend using burn-flex
NdArrayndarrayPure Rust CPU backend using ndarray (deprecated - use flex)
LibTorchtchLibtorch backend via tch (deprecated - use a CubeCL backend)
AutodiffautodiffAutodiff-enabled backend (used in combination with any of the backends above)

Note: The features can be combined freely. The cubecl-backed ones all select the same backend, so they share the one DispatchDevice::Cube variant — enabling several compiles several runtimes in, and the device a tensor carries is what picks between them.

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.