2023-01-02 08:21:08 +08:00
|
|
|
[package]
|
|
|
|
authors = ["nathanielsimard <nathaniel.simard.42@gmail.com>"]
|
2023-02-25 22:38:01 +08:00
|
|
|
categories = ["science", "no-std", "embedded", "wasm"]
|
2023-06-15 21:20:53 +08:00
|
|
|
description = "Flexible and Comprehensive Deep Learning Framework in Rust"
|
2023-12-12 22:39:07 +08:00
|
|
|
edition.workspace = true
|
2023-01-02 08:21:08 +08:00
|
|
|
keywords = ["deep-learning", "machine-learning", "tensor", "pytorch", "ndarray"]
|
2023-12-12 22:39:07 +08:00
|
|
|
license.workspace = true
|
2023-02-25 22:38:01 +08:00
|
|
|
name = "burn-core"
|
2023-12-12 22:39:07 +08:00
|
|
|
readme.workspace = true
|
2024-05-10 03:40:05 +08:00
|
|
|
repository = "https://github.com/tracel-ai/burn/tree/main/crates/burn-core"
|
2023-12-12 22:39:07 +08:00
|
|
|
version.workspace = true
|
2023-01-02 08:21:08 +08:00
|
|
|
|
|
|
|
[features]
|
2023-12-01 22:48:28 +08:00
|
|
|
default = [
|
|
|
|
"std",
|
|
|
|
"burn-candle?/default",
|
2024-02-02 01:47:46 +08:00
|
|
|
"burn-common/default",
|
|
|
|
"burn-dataset?/default",
|
|
|
|
"burn-ndarray?/default",
|
2023-12-01 22:48:28 +08:00
|
|
|
"burn-tch?/default",
|
|
|
|
"burn-tensor/default",
|
2024-02-02 01:47:46 +08:00
|
|
|
"burn-wgpu?/default",
|
2024-08-09 04:19:39 +08:00
|
|
|
"burn-cuda?/default",
|
2024-04-05 04:01:17 +08:00
|
|
|
"burn-autodiff?/default",
|
2023-12-01 22:48:28 +08:00
|
|
|
]
|
2023-02-25 22:38:01 +08:00
|
|
|
std = [
|
2024-04-05 04:01:17 +08:00
|
|
|
"burn-autodiff?/std",
|
2024-02-02 01:47:46 +08:00
|
|
|
"bincode/std",
|
|
|
|
"burn-candle?/std",
|
|
|
|
"burn-common/std",
|
|
|
|
"burn-ndarray?/std",
|
|
|
|
"burn-tensor/std",
|
|
|
|
"burn-wgpu?/std",
|
2024-08-09 04:19:39 +08:00
|
|
|
"burn-cuda?/std",
|
2023-10-05 22:29:13 +08:00
|
|
|
"flate2",
|
2024-02-02 01:47:46 +08:00
|
|
|
"half/std",
|
2023-10-05 22:29:13 +08:00
|
|
|
"log",
|
|
|
|
"rand/std",
|
|
|
|
"rmp-serde",
|
|
|
|
"serde/std",
|
|
|
|
"serde_json/std",
|
2024-04-08 23:16:20 +08:00
|
|
|
"num-traits/std",
|
2024-02-02 01:47:46 +08:00
|
|
|
]
|
|
|
|
doc = [
|
|
|
|
"std",
|
2024-02-02 03:50:38 +08:00
|
|
|
# Backends
|
|
|
|
"dataset",
|
|
|
|
"candle",
|
|
|
|
"fusion",
|
|
|
|
"ndarray",
|
|
|
|
"tch",
|
|
|
|
"wgpu",
|
|
|
|
"vision",
|
|
|
|
"autodiff",
|
|
|
|
# Doc features
|
2024-02-02 01:47:46 +08:00
|
|
|
"burn-candle/doc",
|
|
|
|
"burn-common/doc",
|
|
|
|
"burn-dataset/doc",
|
|
|
|
"burn-ndarray/doc",
|
|
|
|
"burn-tch/doc",
|
|
|
|
"burn-tensor/doc",
|
|
|
|
"burn-wgpu/doc",
|
2024-08-09 04:19:39 +08:00
|
|
|
"burn-cuda/doc",
|
2023-02-25 22:38:01 +08:00
|
|
|
]
|
2023-12-01 22:48:28 +08:00
|
|
|
dataset = ["burn-dataset"]
|
2024-02-11 00:54:33 +08:00
|
|
|
network = ["burn-common/network"]
|
2023-12-01 22:48:28 +08:00
|
|
|
sqlite = ["burn-dataset?/sqlite"]
|
|
|
|
sqlite-bundled = ["burn-dataset?/sqlite-bundled"]
|
2024-02-11 00:54:33 +08:00
|
|
|
vision = ["burn-dataset?/vision", "burn-common/network"]
|
2023-09-01 21:28:58 +08:00
|
|
|
|
2023-09-06 21:16:36 +08:00
|
|
|
# Backend
|
2023-09-04 21:13:52 +08:00
|
|
|
autodiff = ["burn-autodiff"]
|
2024-02-09 00:28:02 +08:00
|
|
|
fusion = ["burn-wgpu?/fusion"]
|
2023-09-04 21:13:52 +08:00
|
|
|
|
2023-12-01 22:48:28 +08:00
|
|
|
## Backend features
|
2024-01-09 05:41:34 +08:00
|
|
|
metal = ["burn-candle?/metal"]
|
2023-12-01 22:48:28 +08:00
|
|
|
accelerate = ["burn-candle?/accelerate", "burn-ndarray?/blas-accelerate"]
|
|
|
|
openblas = ["burn-ndarray?/blas-openblas"]
|
|
|
|
openblas-system = ["burn-ndarray?/blas-openblas-system"]
|
|
|
|
blas-netlib = ["burn-ndarray?/blas-netlib"]
|
2024-02-09 00:28:02 +08:00
|
|
|
autotune = ["burn-wgpu?/autotune"]
|
2024-04-06 00:58:10 +08:00
|
|
|
template = ["burn-wgpu?/template"]
|
2023-09-04 21:13:52 +08:00
|
|
|
|
2023-12-01 22:48:28 +08:00
|
|
|
ndarray = ["burn-ndarray"]
|
2023-09-04 21:13:52 +08:00
|
|
|
tch = ["burn-tch"]
|
2023-10-23 22:00:39 +08:00
|
|
|
candle = ["burn-candle"]
|
2024-04-30 21:46:29 +08:00
|
|
|
candle-cuda = ["candle", "burn-candle/cuda"]
|
2023-12-01 22:48:28 +08:00
|
|
|
wgpu = ["burn-wgpu"]
|
2024-08-09 04:19:39 +08:00
|
|
|
cuda-jit = ["burn-cuda"]
|
2023-10-23 22:00:39 +08:00
|
|
|
|
2024-01-25 23:20:09 +08:00
|
|
|
# Custom deserializer for Record that is helpful for importing data, such as PyTorch pt files.
|
2024-04-08 23:16:20 +08:00
|
|
|
record-item-custom-serde = ["thiserror", "regex"]
|
2024-01-25 23:20:09 +08:00
|
|
|
|
2023-03-23 23:02:46 +08:00
|
|
|
# Serialization formats
|
|
|
|
experimental-named-tensor = ["burn-tensor/experimental-named-tensor"]
|
2023-08-17 20:50:08 +08:00
|
|
|
|
2024-06-27 08:22:19 +08:00
|
|
|
# Backwards compatibility with previous serialized data format.
|
|
|
|
record-backward-compat = []
|
|
|
|
|
2024-08-23 01:44:26 +08:00
|
|
|
test-tch = ["tch"] # To use tch during testing, default uses ndarray.
|
|
|
|
test-wgpu = ["wgpu"] # To use wgpu during testing, default uses ndarray.
|
2024-08-13 06:22:27 +08:00
|
|
|
test-cuda = ["cuda-jit"] # To use cuda during testing, default uses ndarray.
|
2023-01-02 08:21:08 +08:00
|
|
|
|
|
|
|
[dependencies]
|
|
|
|
|
2023-02-25 22:38:01 +08:00
|
|
|
# ** Please make sure all dependencies support no_std when std is disabled **
|
2023-01-02 08:21:08 +08:00
|
|
|
|
2024-08-28 02:12:54 +08:00
|
|
|
burn-common = { path = "../burn-common", version = "0.15.0", default-features = false }
|
|
|
|
burn-dataset = { path = "../burn-dataset", version = "0.15.0", optional = true, default-features = false }
|
|
|
|
burn-derive = { path = "../burn-derive", version = "0.15.0" }
|
|
|
|
burn-tensor = { path = "../burn-tensor", version = "0.15.0", default-features = false }
|
2023-09-06 21:16:36 +08:00
|
|
|
|
|
|
|
# Backends
|
2024-08-28 02:12:54 +08:00
|
|
|
burn-ndarray = { path = "../burn-ndarray", version = "0.15.0", optional = true, default-features = false }
|
|
|
|
burn-wgpu = { path = "../burn-wgpu", version = "0.15.0", optional = true, default-features = false }
|
|
|
|
burn-cuda = { path = "../burn-cuda", version = "0.15.0", optional = true, default-features = false }
|
|
|
|
burn-autodiff = { path = "../burn-autodiff", version = "0.15.0", optional = true }
|
|
|
|
burn-tch = { path = "../burn-tch", version = "0.15.0", optional = true }
|
|
|
|
burn-candle = { path = "../burn-candle", version = "0.15.0", optional = true }
|
2023-01-02 08:21:08 +08:00
|
|
|
|
2023-10-05 22:29:13 +08:00
|
|
|
derive-new = { workspace = true }
|
2023-08-17 20:50:08 +08:00
|
|
|
log = { workspace = true, optional = true }
|
2024-02-20 23:52:36 +08:00
|
|
|
rand = { workspace = true, features = ["std_rng"] } # Default enables std
|
2024-04-08 23:16:20 +08:00
|
|
|
|
2023-02-25 22:38:01 +08:00
|
|
|
# The same implementation of HashMap in std but with no_std support (only alloc crate is needed)
|
2023-08-17 20:50:08 +08:00
|
|
|
hashbrown = { workspace = true, features = ["serde"] } # no_std compatible
|
2023-02-25 22:38:01 +08:00
|
|
|
|
|
|
|
# Serialize Deserialize
|
2023-08-17 20:50:08 +08:00
|
|
|
flate2 = { workspace = true, optional = true }
|
|
|
|
serde = { workspace = true, features = ["derive"] }
|
2023-03-23 23:02:46 +08:00
|
|
|
|
2023-08-17 20:50:08 +08:00
|
|
|
bincode = { workspace = true }
|
|
|
|
half = { workspace = true }
|
|
|
|
rmp-serde = { workspace = true, optional = true }
|
2024-02-20 23:52:36 +08:00
|
|
|
serde_json = { workspace = true, features = ["alloc"] } #Default enables std
|
2024-01-25 23:20:09 +08:00
|
|
|
thiserror = { workspace = true, optional = true }
|
|
|
|
regex = { workspace = true, optional = true }
|
2024-04-08 23:16:20 +08:00
|
|
|
num-traits = { workspace = true }
|
2024-08-23 19:39:39 +08:00
|
|
|
spin = { workspace = true } # Using in place of use std::sync::Mutex when std is disabled
|
|
|
|
|
|
|
|
[target.'cfg(not(target_has_atomic = "ptr"))'.dependencies]
|
|
|
|
portable-atomic-util = { workspace = true }
|
2023-01-02 08:21:08 +08:00
|
|
|
|
|
|
|
[dev-dependencies]
|
2023-08-17 20:50:08 +08:00
|
|
|
tempfile = { workspace = true }
|
2024-08-28 02:12:54 +08:00
|
|
|
burn-dataset = { path = "../burn-dataset", version = "0.15.0", features = [
|
2023-10-05 22:29:13 +08:00
|
|
|
"fake",
|
2023-08-17 20:50:08 +08:00
|
|
|
] }
|
2023-02-21 21:35:24 +08:00
|
|
|
|
2024-08-28 02:12:54 +08:00
|
|
|
burn-ndarray = { path = "../burn-ndarray", version = "0.15.0", default-features = false }
|
|
|
|
burn-autodiff = { path = "../burn-autodiff", version = "0.15.0" }
|
2024-02-02 01:47:46 +08:00
|
|
|
|
|
|
|
[package.metadata.docs.rs]
|
|
|
|
features = ["doc"]
|