Cargo Features

dfdx = { version = "0.13.0", default-features = false, features = ["no-std", "std", "nightly", "fast-alloc", "cpu", "cuda", "cudnn", "f16", "numpy", "safetensors", "test-amp-f16", "test-integrations", "ci-check"] }
default = cpu, fast-alloc, std

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

no-std = no-std-compat

Enables spin, libm of num-traits, no-std of optional cudarc ^0.9.13

std default fast-alloc numpy? safetensors?

Enables std_math of rand_distr, std of optional cudarc ^0.9.13 and optional gemm ^0.15.4


Enables nightly of optional gemm ^0.15.4 and use-intrinsics of optional half



fast-alloc default = std
cpu default

Enables gemm ^0.15.4 and rayon

cuda cudnn?

Enables cudarc ^0.9.13 and glob

Affects dtypes::SafeZeros, tensor::AutoDevice

cudnn = cuda

Enables cudnn of optional cudarc ^0.9.13

f16 test-amp-f16? test-f16?

Enables half, f16 of optional cudarc ^0.9.13

numpy = std

Enables zip

safetensors = std

Enables memmap2 ^0.5 and safetensors ^0.3

Affects tensor::safetensors

test-f16 test-amp-f16 = f16
test-f64 test-integrations

Enables ci-check of optional cudarc ^0.9.13

Features from optional dependencies

In crates that don't use the dep: syntax, optional dependencies automatically become Cargo features.

no-std-compat no-std?