burn-cuda 0.22.0

CUDA backend for the Burn framework
docs.rs failed to build burn-cuda-0.22.0
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.
Visit the last successful build: burn-cuda-0.22.0-pre.3

Burn CUDA Backend

Burn CUDA backend

Current Crates.io Version Documentation license

This crate provides a CUDA backend for Burn using the cubecl and cudarc crates.

Usage Example

For application code, enable Burn's cuda feature and select the device at runtime:

burn = { version = "0.22", features = ["cuda"] }
use burn::tensor::{Device, Tensor};

let device = Device::cuda(0);
let input = Tensor::<2>::ones([2, 3], &device);
let output = input + 1.0;

For training, enable autodiff (also enabled by train) and use device.autodiff() before initializing model parameters and inputs. Tensor and model types have no backend parameter. Use Device::configure for dtype defaults; the low-level Cuda alias no longer takes element type parameters.

Dependencies

Requires CUDA 12.x to be installed and on the PATH.


Part of the Burn deep learning framework. See the Burn Book and the API documentation.