numr 0.5.1

High-performance numerical computing with multi-backend GPU acceleration (CPU/CUDA/WebGPU)
Documentation
# THIS FILE IS AUTOMATICALLY GENERATED BY CARGO
#
# When uploading crates to the registry Cargo will automatically
# "normalize" Cargo.toml files for maximal compatibility
# with all versions of Cargo and also rewrite `path` dependencies
# to registry (e.g., crates.io) dependencies.
#
# If you are reading this file be aware that the original Cargo.toml
# will likely look very different (and much more reasonable).
# See Cargo.toml.orig for the original contents.

[package]
edition = "2024"
rust-version = "1.89"
name = "numr"
version = "0.5.1"
build = "build.rs"
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "High-performance numerical computing with multi-backend GPU acceleration (CPU/CUDA/WebGPU)"
documentation = "https://docs.rs/numr"
readme = "README.md"
keywords = [
    "tensor",
    "ndarray",
    "linear-algebra",
    "gpu",
    "fft",
]
categories = [
    "science",
    "mathematics",
    "data-structures",
]
license = "Apache-2.0"
repository = "https://github.com/ml-rust/numr"

[package.metadata.docs.rs]
features = [
    "f16",
    "sparse",
]

[features]
cuda = ["dep:cudarc"]
default = ["rayon"]
distributed = [
    "dep:nexar",
    "dep:tokio",
]
distributed-gpu = [
    "distributed",
    "nccl",
    "dep:nexar-nccl",
]
f16 = [
    "dep:half",
    "cudarc?/f16",
]
fp8 = []
nccl = [
    "cuda",
    "cudarc?/nccl",
]
rayon = ["dep:rayon"]
sparse = []
wgpu = [
    "dep:wgpu",
    "dep:pollster",
]

[lib]
name = "numr"
path = "src/lib.rs"

[[example]]
name = "autograd_linear_regression"
path = "examples/autograd_linear_regression.rs"

[[example]]
name = "backend_switch_cpu_wgpu"
path = "examples/backend_switch_cpu_wgpu.rs"

[[example]]
name = "basic_tensor_ops"
path = "examples/basic_tensor_ops.rs"

[[example]]
name = "conv_unfold_im2col"
path = "examples/conv_unfold_im2col.rs"

[[example]]
name = "fft_roundtrip"
path = "examples/fft_roundtrip.rs"

[[example]]
name = "sparse_coo_csr_workflow"
path = "examples/sparse_coo_csr_workflow.rs"

[[test]]
name = "backend_parity_all"
path = "tests/backend_parity_all.rs"

[[test]]
name = "cpu_runtime"
path = "tests/cpu_runtime.rs"

[[test]]
name = "external_backend_api"
path = "tests/external_backend_api.rs"

[[test]]
name = "ml_dtype_audit"
path = "tests/ml_dtype_audit.rs"

[[test]]
name = "wgpu_buffer_lifetime"
path = "tests/wgpu_buffer_lifetime.rs"

[[test]]
name = "wgpu_integer_ops"
path = "tests/wgpu_integer_ops.rs"

[[bench]]
name = "ci_regression"
path = "benches/ci_regression.rs"
harness = false

[[bench]]
name = "fft"
path = "benches/fft.rs"
harness = false

[[bench]]
name = "indexing"
path = "benches/indexing.rs"
harness = false

[[bench]]
name = "matmul"
path = "benches/matmul.rs"
harness = false

[[bench]]
name = "parallelism"
path = "benches/parallelism.rs"
harness = false

[[bench]]
name = "reduce"
path = "benches/reduce.rs"
harness = false

[[bench]]
name = "shape_ops"
path = "benches/shape_ops.rs"
harness = false

[dependencies.bytemuck]
version = "1.24"
features = ["derive"]

[dependencies.cudarc]
version = "0.19"
features = ["cuda-version-from-build-system"]
optional = true

[dependencies.half]
version = "2.7"
features = [
    "bytemuck",
    "num-traits",
]
optional = true

[dependencies.nexar]
version = "0.1"
optional = true

[dependencies.nexar-nccl]
version = "0.1"
optional = true

[dependencies.num-traits]
version = "0.2"

[dependencies.parking_lot]
version = "0.12"

[dependencies.paste]
version = "1.0"

[dependencies.pollster]
version = "0.4"
optional = true

[dependencies.rayon]
version = "1.11"
optional = true

[dependencies.rkyv]
version = "0.8"

[dependencies.smallvec]
version = "1"

[dependencies.thiserror]
version = "2.0"

[dependencies.tokio]
version = "1"
features = ["rt"]
optional = true

[dependencies.wgpu]
version = "28.0"
optional = true

[dev-dependencies.approx]
version = "0.5"

[dev-dependencies.fluxbench]
version = "0.1"

[dev-dependencies.nalgebra]
version = "0.33"

[dev-dependencies.ndarray]
version = "0.16"

[dev-dependencies.rand]
version = "0.9"

[profile.bench]
lto = "thin"
codegen-units = 1

[profile.release]
lto = "thin"
codegen-units = 1