[package]
edition = "2024"
name = "topos"
version = "0.11.0"
build = false
exclude = ["topos.png"]
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "A tiny autograd engine for the GPU-poor, written in idiomatic Rust."
documentation = "https://docs.rs/topos"
readme = "README.md"
keywords = [
"autograd",
"autodiff",
"backpropagation",
"machine-learning",
"educational",
]
categories = [
"science",
"mathematics",
]
license = "MIT OR Apache-2.0"
repository = "https://github.com/shergin/topos"
[package.metadata.docs.rs]
all-features = true
[features]
accelerate = []
cuda = ["dep:libloading"]
evcxr = ["dep:malevich"]
evcxr-pixel = [
"evcxr",
"malevich?/pixel",
]
metal = [
"dep:objc2",
"dep:objc2-foundation",
"dep:objc2-metal",
]
simd = ["dep:matrixmultiply"]
[lib]
name = "topos"
path = "src/lib.rs"
bench = false
[[example]]
name = "chain"
path = "examples/chain.rs"
[[example]]
name = "cifar10"
path = "examples/cifar10/main.rs"
[[example]]
name = "cifar10_grading"
path = "examples/cifar10/grading.rs"
[[example]]
name = "gpt2"
path = "examples/gpt2/main.rs"
[[example]]
name = "gradient_descent"
path = "examples/gradient_descent.rs"
[[example]]
name = "makemore_attention_grading"
path = "examples/makemore/attention_grading.rs"
[[example]]
name = "makemore_bigram"
path = "examples/makemore/bigram.rs"
[[example]]
name = "makemore_embedding_map"
path = "examples/makemore/embedding_map.rs"
[[example]]
name = "makemore_mlp"
path = "examples/makemore/mlp.rs"
[[example]]
name = "makemore_mlp_adam"
path = "examples/makemore/mlp_adam.rs"
[[example]]
name = "makemore_mlp_batchnorm"
path = "examples/makemore/mlp_batchnorm.rs"
[[example]]
name = "makemore_mlp_compiled"
path = "examples/makemore/mlp_compiled.rs"
[[example]]
name = "makemore_mlp_emitted"
path = "examples/makemore/mlp_emitted.rs"
[[example]]
name = "makemore_mlp_facade"
path = "examples/makemore/mlp_facade.rs"
[[example]]
name = "makemore_mlp_parallel"
path = "examples/makemore/mlp_parallel.rs"
[[example]]
name = "makemore_transformer"
path = "examples/makemore/transformer.rs"
[[example]]
name = "mlp_xor"
path = "examples/mlp_xor.rs"
[[example]]
name = "mnist"
path = "examples/mnist/main.rs"
[[example]]
name = "mnist_grading"
path = "examples/mnist/grading.rs"
[[example]]
name = "moons"
path = "examples/moons.rs"
[[example]]
name = "regression"
path = "examples/regression.rs"
[[example]]
name = "throughput"
path = "examples/throughput.rs"
[[bench]]
name = "broadcast"
path = "benches/broadcast.rs"
test = false
harness = false
[[bench]]
name = "elementwise"
path = "benches/elementwise.rs"
test = false
harness = false
[[bench]]
name = "gemm"
path = "benches/gemm.rs"
test = false
harness = false
[[bench]]
name = "memory"
path = "benches/memory.rs"
test = false
harness = false
[[bench]]
name = "record"
path = "benches/record.rs"
test = false
harness = false
[[bench]]
name = "run"
path = "benches/run.rs"
test = false
harness = false
[[bench]]
name = "scale"
path = "benches/scale.rs"
test = false
harness = false
[[bench]]
name = "train"
path = "benches/train.rs"
test = false
harness = false
[dependencies.cow_vec]
version = "1.4"
[dependencies.malevich]
version = "1.15.0"
features = ["evcxr"]
optional = true
[dependencies.matrixmultiply]
version = "0.3.11"
optional = true
[dependencies.smallvec]
version = "1.15.2"
[dependencies.static_assertions]
version = "1.1"
[dev-dependencies.criterion]
version = "0.8.2"
features = ["cargo_bench_support"]
default-features = false
[dev-dependencies.malevich]
version = "1.15.0"
features = ["pixel"]
[dev-dependencies.rayon]
version = "1.12.0"
[dev-dependencies.serde]
version = "1.0.228"
features = ["derive"]
[dev-dependencies.serde_json]
version = "1.0.151"
[target.'cfg(target_os = "linux")'.dependencies.libloading]
version = "0.9"
optional = true
[target.'cfg(target_os = "macos")'.dependencies.objc2]
version = "0.6"
optional = true
[target.'cfg(target_os = "macos")'.dependencies.objc2-foundation]
version = "0.3"
optional = true
[target.'cfg(target_os = "macos")'.dependencies.objc2-metal]
version = "0.3"
optional = true
[profile.bench]
codegen-units = 1