[package] authors = ["nathanielsimard "] categories = ["science", "no-std", "embedded", "wasm"] description = "Flexible and Comprehensive Deep Learning Framework in Rust" documentation = "https://docs.rs/burn-core" edition.workspace = true keywords = ["deep-learning", "machine-learning", "tensor", "pytorch", "ndarray"] license.workspace = true name = "burn-core" readme.workspace = true repository = "https://github.com/tracel-ai/burn/tree/main/crates/burn-core" version.workspace = true [features] dataset = ["burn-dataset"] default = [ "std", "burn-candle?/default", "burn-common/default", "burn-dataset?/default", "burn-ndarray?/default", "burn-tch?/default", "burn-tensor/default", "burn-wgpu?/default", "burn-cuda?/default", "burn-hip?/default", "burn-autodiff?/default", ] doc = [ "std", # Backends "dataset", "candle", "fusion", "ndarray", "tch", "wgpu", "cuda-jit", "hip-jit", "vision", "autodiff", "remote", "server", # Doc features "burn-candle/doc", "burn-common/doc", "burn-dataset/doc", "burn-ndarray/doc", "burn-tch/doc", "burn-tensor/doc", "burn-wgpu/doc", "burn-cuda/doc", "burn-hip/doc", ] network = ["burn-common/network"] sqlite = ["burn-dataset?/sqlite"] sqlite-bundled = ["burn-dataset?/sqlite-bundled"] std = [ "burn-autodiff?/std", "bincode/std", "burn-candle?/std", "burn-common/std", "burn-ndarray?/std", "burn-tensor/std", "burn-wgpu?/std", "burn-cuda?/std", "burn-hip?/std", "flate2", "half/std", "log", "rand/std", "rmp-serde", "serde/std", "serde_json/std", "num-traits/std", ] vision = ["burn-dataset?/vision", "burn-common/network"] # Backend autodiff = ["burn-autodiff"] fusion = ["burn-wgpu?/fusion", "burn-cuda?/fusion"] ## Backend features accelerate = ["burn-candle?/accelerate", "burn-ndarray?/blas-accelerate"] autotune = ["burn-wgpu?/autotune"] blas-netlib = ["burn-ndarray?/blas-netlib"] metal = ["burn-candle?/metal"] openblas = ["burn-ndarray?/blas-openblas"] openblas-system = ["burn-ndarray?/blas-openblas-system"] template = ["burn-wgpu?/template"] remote = ["burn-remote/client"] server = ["burn-remote/server"] candle = ["burn-candle"] candle-cuda = ["candle", "burn-candle/cuda"] cuda-jit = ["burn-cuda"] hip-jit = ["burn-hip"] ndarray = ["burn-ndarray"] tch = ["burn-tch"] wgpu = ["burn-wgpu"] wgpu-spirv = ["wgpu", "burn-wgpu/spirv"] # Custom deserializer for Record that is helpful for importing data, such as PyTorch pt files. record-item-custom-serde = ["thiserror", "regex"] # Serialization formats experimental-named-tensor = ["burn-tensor/experimental-named-tensor"] # Backwards compatibility with previous serialized data format. record-backward-compat = [] 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 = ["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. [dependencies] # ** Please make sure all dependencies support no_std when std is disabled ** burn-common = { path = "../burn-common", version = "0.16.0", default-features = false } burn-dataset = { path = "../burn-dataset", version = "0.16.0", optional = true, default-features = false } burn-derive = { path = "../burn-derive", version = "0.16.0" } burn-tensor = { path = "../burn-tensor", version = "0.16.0", default-features = false } # Backends burn-autodiff = { path = "../burn-autodiff", version = "0.16.0", optional = true } burn-candle = { path = "../burn-candle", version = "0.16.0", optional = true } burn-cuda = { path = "../burn-cuda", version = "0.16.0", optional = true, default-features = false } burn-hip = { path = "../burn-hip", version = "0.16.0", optional = true, default-features = false } burn-ndarray = { path = "../burn-ndarray", version = "0.16.0", optional = true, default-features = false } burn-tch = { path = "../burn-tch", version = "0.16.0", optional = true } burn-wgpu = { path = "../burn-wgpu", version = "0.16.0", optional = true, default-features = false } burn-remote = { path = "../burn-remote", version = "0.16.0", default-features = false, optional = true } data-encoding = { workspace = true } uuid = { workspace = true } derive-new = { workspace = true } log = { workspace = true, optional = true } rand = { workspace = true, features = ["std_rng"] } # Default enables std # The same implementation of HashMap in std but with no_std support (only alloc crate is needed) hashbrown = { workspace = true, features = ["serde"] } # no_std compatible # Serialize Deserialize flate2 = { workspace = true, optional = true } serde = { workspace = true, features = ["derive"] } ahash = { workspace = true } bincode = { workspace = true } half = { workspace = true } num-traits = { workspace = true } regex = { workspace = true, optional = true } rmp-serde = { workspace = true, optional = true } serde_json = { workspace = true, features = ["alloc"] } #Default enables std spin = { workspace = true } # Using in place of use std::sync::Mutex when std is disabled thiserror = { workspace = true, optional = true } [target.'cfg(not(target_has_atomic = "ptr"))'.dependencies] portable-atomic-util = { workspace = true } [dev-dependencies] burn-dataset = { path = "../burn-dataset", version = "0.16.0", features = [ "fake", ] } tempfile = { workspace = true } burn-autodiff = { path = "../burn-autodiff", version = "0.16.0" } burn-ndarray = { path = "../burn-ndarray", version = "0.16.0", default-features = false } [package.metadata.docs.rs] features = ["doc"] rustdoc-args = ["--cfg", "docsrs"]