Cargo Features

[dependencies]
burn-core = { version = "0.15.0", default-features = false, features = ["std", "dataset", "network", "sqlite", "sqlite-bundled", "vision", "doc", "autodiff", "fusion", "accelerate", "autotune", "blas-netlib", "metal", "openblas", "openblas-system", "template", "candle", "candle-cuda", "cuda-jit", "hip-jit", "ndarray", "tch", "wgpu", "wgpu-spirv", "record-item-custom-serde", "experimental-named-tensor", "record-backward-compat", "test-cuda", "test-hip", "test-tch", "test-wgpu", "test-wgpu-spirv"] }
default = std

These default features are set whenever burn-core is added without default-features = false somewhere in the dependency tree.

Enables optional burn-autodiff and optional burn-candle

burn-autodiff:

Backends

and burn-common, burn-tensor, optional burn-cuda, optional burn-dataset, optional burn-hip, optional burn-ndarray, optional burn-tch, and optional burn-wgpu

burn-common:

** Please make sure all dependencies support no_std when std is disabled **

std default doc? = flate2, log, rmp-serde

Enables std of bincode, optional burn-autodiff, optional burn-candle, burn-common, optional burn-cuda, optional burn-hip, optional burn-ndarray, burn-tensor, optional burn-wgpu, half, num-traits, rand, serde, and serde_json

rand:

Default enables std

Affects config::Config.save, config::Config.load, burn-core::data, burn-core::optim, burn-core::lr_scheduler, base::Module.save_file, base::Module.load_file, memory::NamedMpkBytesRecorder, recorder::DefaultRecorder, recorder::CompactRecorder, recorder::SensitiveCompactRecorder, recorder::NoStdTrainingRecorder, recorder::DebugRecordSettings

dataset doc? = burn-dataset

Affects data::dataloader, data::dataset

network

Enables network of burn-common

Affects data::network

sqlite

Enables sqlite of optional burn-dataset

sqlite-bundled

Enables sqlite-bundled of optional burn-dataset

vision doc?

Enables network of burn-common, vision of optional burn-dataset

doc = autodiff, candle, cuda-jit, dataset, fusion, hip-jit, ndarray, std, tch, vision, wgpu

Enables doc of burn-candle, burn-common, burn-cuda, burn-dataset, burn-hip, burn-ndarray, burn-tch, burn-tensor, and burn-wgpu

autodiff doc? = burn-autodiff

Backend

fusion doc?

Enables fusion of optional burn-cuda and optional burn-wgpu

accelerate

Backend features

Enables accelerate of optional burn-candle, blas-accelerate of optional burn-ndarray

autotune

Enables autotune of optional burn-wgpu

blas-netlib

Enables blas-netlib of optional burn-ndarray

metal

Enables metal of optional burn-candle

openblas

Enables blas-openblas of optional burn-ndarray

openblas-system

Enables blas-openblas-system of optional burn-ndarray

template

Enables template of optional burn-wgpu

candle candle-cuda? doc? = burn-candle
candle-cuda = candle

Enables cuda of burn-candle

cuda-jit doc? test-cuda? = burn-cuda
hip-jit doc? test-hip? = burn-hip
ndarray doc? = burn-ndarray
tch doc? test-tch? = burn-tch
wgpu doc? test-wgpu? wgpu-spirv? = burn-wgpu
wgpu-spirv test-wgpu-spirv? = wgpu

Enables spirv of burn-wgpu

record-item-custom-serde = regex, thiserror

Custom deserializer for Record that is helpful for importing data, such as PyTorch pt files.

Affects record::serde

experimental-named-tensor

Serialization formats

Enables experimental-named-tensor of burn-tensor

record-backward-compat

Backwards compatibility with previous serialized data format.

test-cuda = cuda-jit

To use cuda during testing, default uses ndarray.

test-hip = hip-jit

To use hip during testing, default uses ndarray.

test-tch = tch

To use tch during testing, default uses ndarray.

test-wgpu test-wgpu-spirv? = wgpu

To use wgpu during testing, default uses ndarray.

test-wgpu-spirv = test-wgpu, wgpu-spirv

To use wgpu-spirv during testing, default uses ndarray.

Features from optional dependencies

In crates that don't use the dep: syntax, optional dependencies automatically become Cargo features. These features may have been created by mistake, and this functionality may be removed in the future.

burn-dataset dataset? doc?
burn-autodiff autodiff?
burn-candle candle? candle-cuda? doc?
burn-cuda cuda-jit? doc?
burn-hip doc? hip-jit?
burn-ndarray doc? ndarray?
burn-tch doc? tch?
burn-wgpu doc? wgpu? wgpu-spirv?
log std
flate2 std

Enables flate2

Serialize Deserialize

regex record-item-custom-serde?
rmp-serde std
thiserror record-item-custom-serde?

Enables thiserror ^1.0.64