Repository navigation
Expand file tree
/
Copy pathCargo.toml
More file actions
133 lines (109 loc) · 2.93 KB
/
Copy pathCargo.toml
File metadata and controls
133 lines (109 loc) · 2.93 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
[package]
name = "numr"
version = "0.7.0"
edition = "2024"
rust-version = "1.89"
description = "High-performance numerical computing with multi-backend GPU acceleration (CPU/CUDA/WebGPU)"
license = "Apache-2.0"
repository = "https://github.com/ml-rust/numr"
documentation = "https://docs.rs/numr"
keywords = ["tensor", "ndarray", "linear-algebra", "gpu", "fft"]
categories = ["science", "mathematics", "data-structures"]
[package.metadata.docs.rs]
features = ["f16", "sparse", "fp8", "wgpu"]
# Everything that builds without a vendor SDK is documented. `wgpu` needs a GPU
# adapter to RUN, not to compile, so the WebGPU backend is documented too.
# `cuda` is excluded because build.rs invokes nvcc, which docs.rs does not have.
# `distributed` is excluded because it pulls nexar; a dependency that fails to
# resolve takes the whole docs build down with it.
[features]
default = ["rayon"]
cuda = ["dep:cudarc"]
nccl = ["cuda", "cudarc?/nccl"]
distributed = ["dep:nexar", "dep:tokio"]
distributed-gpu = ["distributed", "nccl", "dep:nexar-nccl"]
wgpu = ["dep:wgpu", "dep:pollster"]
rayon = ["dep:rayon"]
f16 = [
"dep:half",
"cudarc?/f16",
] # Half-precision floats (F16, BF16) - optional reduced-precision support
fp8 = [
] # 8-bit floats (FP8E4M3, FP8E5M2) - optional ultra-low-precision support
sparse = [] # Sparse tensor formats (CSR, CSC, COO) and operations
[dependencies]
# Core
thiserror = "2.0"
smallvec = "1"
bytemuck = { version = "1.25", features = ["derive"] }
num-traits = "0.2"
parking_lot = "0.12"
# Optional: Parallelism
rayon = { version = "1.12", optional = true }
# Zero-copy serialization for embedded data (used by sobol_data)
rkyv = "0.8"
# Optional: Half-precision floats
half = { version = "2.7", optional = true, features = [
"bytemuck",
"num-traits",
] }
# Optional: Inter-node distributed communication
nexar = { version = "0.1", optional = true }
nexar-nccl = { version = "0.1", optional = true }
tokio = { version = "1", features = ["rt"], optional = true }
# Optional: CUDA backend
cudarc = { version = "0.19", optional = true, features = [
"cuda-version-from-build-system",
] }
# Optional: WebGPU backend
wgpu = { version = "29.0", optional = true }
pollster = { version = "0.4", optional = true }
paste = "1.0"
[dev-dependencies]
approx = "0.5"
rand = "0.10"
fluxbench = "0.1"
ndarray = "0.17"
nalgebra = "0.35"
[[bench]]
name = "matmul"
harness = false
[[bench]]
name = "matmul_int"
harness = false
[[bench]]
name = "reduce"
harness = false
[[bench]]
name = "fft"
harness = false
[[bench]]
name = "indexing"
harness = false
[[bench]]
name = "shape_ops"
harness = false
[[bench]]
name = "parallelism"
harness = false
[[bench]]
name = "ci_regression"
harness = false
[[bench]]
name = "gemm_epilogue"
harness = false
[[bench]]
name = "conv"
harness = false
[[bench]]
name = "softmax"
harness = false
[[bench]]
name = "norm"
harness = false
[profile.release]
lto = "thin"
codegen-units = 1
[profile.bench]
lto = "thin"
codegen-units = 1