Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Burn CPU Backend
Burn CubeCL CPU backend
This crate provides a CPU backend for Burn using CubeCL's CPU runtime. It JIT-compiles shared CubeCL kernels to native CPU code through LLVM, with kernel fusion and autotuning enabled by default. LLVM is bundled automatically, no system installation is required.
burn-cpu vs burn-flex
Burn has two independent CPU backends. Neither one is built on top of the other.
burn-cpu |
burn-flex |
|
|---|---|---|
| Implementation | CubeCL kernels compiled through LLVM | Hand-written Rust kernels, gemm, SIMD |
| Execution | JIT-compiled, with fusion and autotune | Eager |
| Native deps | Bundled LLVM, no system install | None (pure Rust) |
no_std / Wasm |
No | Yes |
burn feature |
cpu |
flex |
| Device constructor | Device::cpu() |
Device::flex() |
Use burn-cpu when you want the CubeCL stack (fusion, custom CubeCL kernels shared with the GPU
backends) on the CPU. Use burn-flex for a lightweight, portable CPU backend that also runs on
no_std and WebAssembly targets.
burn-ndarray is the deprecated predecessor of burn-flex; it is not related to burn-cpu.
Usage Example
= { = "0.22", = ["cpu"] }
use ;
let device = cpu;
let tensor = from_data;
Part of the Burn deep learning framework. See the Burn Book and the API documentation.