← Back to list

burn-backends
by johnzfitch
Comprehensive Claude Code plugin for the Burn deep learning framework
⭐ 1🍴 0📅 Jan 19, 2026
SKILL.md
name: burn-backends description: This skill should be used when the user asks about "Burn backend", "WGPU", "NdArray", "Candle", "LibTorch", "custom kernel", "CubeCL", "quantization", "WebAssembly", "no_std", or backend selection and extension. version: 0.1.0
Burn Backends
Knowledge for selecting, configuring, and extending Burn compute backends.
Available Backends
| Backend | Use Case | Features Flag |
|---|---|---|
| WGPU | GPU, cross-platform | wgpu |
| NdArray | CPU, testing | ndarray |
| Candle | Hugging Face ecosystem | candle |
| LibTorch | PyTorch interop | tch |
Backend Selection
Choose in Cargo.toml:
[dependencies]
burn = { version = "0.16", features = ["wgpu"] }
Use in code:
use burn::backend::Wgpu;
type MyBackend = Wgpu;
// Or with autodiff:
type MyBackend = Autodiff<Wgpu>;
let device = WgpuDevice::default();
Device Configuration
Each backend has its device type:
// WGPU
let device = WgpuDevice::default(); // Auto-select GPU
let device = WgpuDevice::Cpu; // Force CPU
// NdArray (CPU only)
let device = NdArrayDevice::Cpu;
// LibTorch
let device = LibTorchDevice::Cuda(0); // GPU 0
let device = LibTorchDevice::Cpu;
Backend Portability
Write backend-agnostic code with generics:
fn train<B: AutodiffBackend>(device: B::Device) {
let model: Model<B> = ModelConfig::new().init(&device);
// Training code works with any backend
}
Custom Kernels (CubeCL)
For performance-critical operations:
use burn_cube::prelude::*;
#[cube(launch)]
fn custom_kernel<F: Float>(input: &Tensor<F>, output: &mut Tensor<F>) {
let idx = ABSOLUTE_POS;
output[idx] = input[idx] * F::new(2.0);
}
Quantization
Reduce model size and improve inference speed:
use burn::module::Quantizer;
let quantizer = Quantizer::new(QuantizationScheme::Symmetric);
let quantized_model = quantizer.quantize(model);
WebAssembly Deployment
Burn supports WASM targets:
[dependencies]
burn = { version = "0.16", features = ["wgpu", "wasm-bindgen"] }
Build with:
wasm-pack build --target web
Additional Resources
Consult references/topic-map-backends.md for:
- Detailed backend comparison
- Custom WGPU kernel guide
- Quantization schemes and calibration
- No-std embedded deployment
Score
Total Score
60/100
Based on repository quality metrics
✓SKILL.md
SKILL.mdファイルが含まれている
+20
✓LICENSE
ライセンスが設定されている
+10
○説明文
100文字以上の説明がある
0/10
○人気
GitHub Stars 100以上
0/15
○最近の活動
3ヶ月以内に更新がある
0/10
○フォーク
10回以上フォークされている
0/5
✓Issue管理
オープンIssueが50未満
+5
✓言語
プログラミング言語が設定されている
+5
○タグ
1つ以上のタグが設定されている
0/5
Reviews
💬
Reviews coming soon