Expand description
The Burn backend for every CubeCL runtime.
CubeBackend implements Burn’s tensor operations as CubeCL kernels, compiled just in time
for the device they run on. CUDA, ROCm, Metal, Vulkan, WebGPU, wgpu and the CubeCL CPU
runtime all share this one backend type: a tensor’s CubeDevice says which runtime it
uses. Cube is the type dispatch uses, wrapped in burn_fusion::Fusion when the fusion
feature is on.
Applications reach this backend through a burn feature such as cuda, wgpu or cpu
and a Device constructor; the runtime crates (burn-cuda, burn-wgpu, burn-rocm,
burn-cpu) are thin wrappers that select a runtime. Use this crate directly to write
custom kernels: kernel and ops hold the building blocks, and cubecl is
re-exported so kernels use the same CubeCL version.
§Feature flags
cuda,hip,wgpu,metal,vulkan,webgpu,cpu: compile in a CubeCL runtime.fusion: kernel fusion throughburn-fusion.autotune: benchmark kernel variants at runtime and keep the fastest.fft: FFT kernels.template: launch hand-written, non-JIT kernels.tracing: instrument operations with thetracingcrate.
Re-exports§
pub use element::BoolElement;pub use element::CubeElement;pub use element::FloatElement;pub use element::IntElement;pub use cubecl;
Modules§
- element
- Elements for JIT backend
- fusion
fusion - Module for interacting with fusion
- kernel
- Kernel module
- ops
- Utilities for implementing JIT kernels
- tensor
- Tensor module.
Structs§
- Cube
Backend - Tensor backend that compiles just-in-time for whichever runtime its device names.
- Cube
Graph - A captured launch sequence, tagged with the device it was captured on.
- Cube
Tune Id - ID used to identify a Just-in-Time environment.
Enums§
- Cube
Autotune Key - Key for all autotune-enabled operations
- Cube
Device - The device a cube tensor lives on.
Type Aliases§
- Cube
fusion - The tensor backend for every cubecl runtime, fusing operations across
streams. See
CubeBackendfor the unfused type.