-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCargo.toml
More file actions
257 lines (205 loc) · 7.5 KB
/
Cargo.toml
File metadata and controls
257 lines (205 loc) · 7.5 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
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
[package]
name = "ndarray"
version = "0.17.2"
edition = "2021"
rust-version = "1.95"
authors = [
"Ulrik Sverdrup \"bluss\"",
"Jim Turner"
]
license = "MIT OR Apache-2.0"
readme = "README-crates.io.md"
repository = "https://github.com/rust-ndarray/ndarray"
documentation = "https://docs.rs/ndarray/"
description = "An n-dimensional array for general elements and for numerics. Lightweight array views and slicing; views support chunking and splitting."
keywords = ["array", "data-structure", "multidimensional", "matrix", "blas"]
categories = ["data-structures", "science"]
include = [
"/src/**/*.rs",
"LICENSE-MIT",
"LICENSE-APACHE",
"RELEASES.md",
"README.rst",
"README-quick-start.md"
]
resolver = "2"
[lib]
name = "ndarray"
bench = false
test = true
[[example]]
name = "ocr_benchmark"
required-features = ["std"]
[dependencies]
num-integer = { workspace = true }
num-traits = { workspace = true }
num-complex = { workspace = true }
approx = { workspace = true, optional = true }
rayon = { version = "1.10.0", optional = true }
# Use via the `blas` crate feature
cblas-sys = { workspace = true, optional = true }
libc = { version = "0.2.82", optional = true }
matrixmultiply = { version = "0.3.2", default-features = false, features=["cgemm"] }
# blake3 — gated behind `hpc-extras` (integrity hashing in
# plane/seal/merkle_tree/vsa/spo_bundle/crystal_encoder/compression_curves/
# deepnsm). Optional + opt-in because the transitive dep `constant_time_eq`
# does not declare `#![no_std]`, so unconditionally including blake3 breaks
# the `thumbv6m-none-eabi --no-default-features` nostd build with
# `error[E0463]: can't find crate for std`.
blake3 = { version = "1", optional = true }
# p64 + fractal — specialized convergence / manifold math. Gated behind
# `hpc-extras` since they pull in a dep tree burn-ndarray doesn't need.
p64 = { path = "crates/p64", optional = true }
fractal = { path = "crates/fractal", default-features = false, optional = true }
serde = { version = "1.0", optional = true, default-features = false, features = ["alloc"] }
rawpointer = { version = "0.2" }
# Cranelift JIT (optional, behind "jit-native" feature)
# For AVX-512 VPOPCNTDQ/VNNI/VPTERNLOG/BITALG support, use the patched fork:
# cranelift-codegen = { git = "https://github.com/AdaWorldAPI/wasmtime.git", branch = "main", optional = true }
cranelift-codegen = { version = "0.116", optional = true }
cranelift-jit = { version = "0.116", optional = true }
cranelift-module = { version = "0.116", optional = true }
cranelift-frontend = { version = "0.116", optional = true }
target-lexicon = { version = "0.13", optional = true }
[dev-dependencies]
defmac = "0.2"
quickcheck = { workspace = true }
approx = { workspace = true, default-features = true }
itertools = { workspace = true }
ndarray-gen = { workspace = true }
criterion = { version = "0.5", features = ["html_reports"] }
[[bench]]
name = "append"
harness = false
[[bench]]
name = "bench1"
harness = false
[[bench]]
name = "chunks"
harness = false
[[bench]]
name = "construct"
harness = false
[[bench]]
name = "gemv_gemm"
harness = false
[[bench]]
name = "higher-order"
harness = false
[[bench]]
name = "iter"
harness = false
[[bench]]
name = "numeric"
harness = false
[[bench]]
name = "par_rayon"
harness = false
required-features = ["rayon"]
[[bench]]
name = "reserve"
harness = false
[[bench]]
name = "to_shape"
harness = false
[[bench]]
name = "zip"
harness = false
[features]
default = ["std", "hpc-extras"]
# Enable blas usage
# See README for more instructions
blas = ["dep:cblas-sys", "dep:libc"]
serde = ["dep:serde"]
std = ["num-traits/std", "matrixmultiply/std"]
rayon = ["dep:rayon", "std"]
# Portable-SIMD backend (NIGHTLY ONLY). Routes `crate::simd::*` types
# through `core::simd::*` instead of the architecture-specific intrinsics
# in `simd_avx512.rs` / `simd_avx2.rs` / `simd_neon.rs`. The point is
# miri compatibility: miri can execute `core::simd` semantics but treats
# `_mm*_*` intrinsics as opaque. With this feature on, miri-run tests
# exercise the actual SIMD code paths in consumer code (`hpc/byte_scan`,
# `hpc/framebuffer`, etc.) and catch UB that the intrinsics backend hides.
#
# Requires `cargo +nightly` because `src/simd_nightly.rs` is gated on
# `#![feature(portable_simd)]` (Rust unstable issue #86656). The default
# build (stable 1.95) does NOT touch this; the existing intrinsics
# cfg-dispatch in `simd.rs` remains the production path.
nightly-simd = ["std"]
# HPC extras: blake3 hashing, p64 palette/NARS bridge, fractal manifold.
# These pull in a non-trivial dependency tree; downstream crates such as
# burn-ndarray that only need the core array layer can disable this with
# `default-features = false` (and re-enable `std` explicitly if needed).
hpc-extras = ["std", "dep:p64", "dep:fractal", "fractal/std", "dep:blake3"]
matrixmultiply-threading = ["matrixmultiply/threading"]
# JITSON: JSON parser + validator + template + scan pipeline (no Cranelift)
jitson = []
# JIT native compilation via Cranelift (jitson_cranelift module)
jit-native = ["jitson", "dep:cranelift-codegen", "dep:cranelift-jit", "dep:cranelift-module", "dep:cranelift-frontend", "dep:target-lexicon"]
# HPC backend feature gates (mutually exclusive)
native = ["std"]
intel-mkl = ["std"]
openblas = ["std"]
# no_std polyfill for `static LazyLock` in `src/simd.rs` (sprint A12).
# Pulls in `portable-atomic` with the `critical-section` impl plus the
# `critical-section` runtime so we can build a once-cell-style cache for
# the SIMD tier without `std::sync::LazyLock`. The unconditional
# `portable-atomic` dependency below is itself optional, gated on this
# feature; the target-specific block keeps the un-optional copy alive on
# platforms that need it for atomic-pointer fallback.
portable-atomic-critical-section = [
"dep:portable-atomic",
"dep:critical-section",
"portable-atomic/critical-section",
]
[dependencies.portable-atomic]
version = "1"
optional = true
default-features = false
[dependencies.critical-section]
version = "1"
optional = true
[target.'cfg(not(target_has_atomic = "ptr"))'.dependencies]
portable-atomic = { version = "1.6.0" }
portable-atomic-util = { version = "0.2.0", features = [ "alloc" ] }
[workspace]
members = [
"ndarray-rand",
"crates/*",
]
exclude = ["crates/burn"]
default-members = [
".",
"ndarray-rand",
"crates/ndarray-gen",
"crates/numeric-tests",
"crates/serialization-tests",
# exclude blas-tests and blas-mock-tests that activate "blas" feature
]
[workspace.dependencies]
ndarray = { version = "0.17", path = ".", default-features = false }
ndarray-rand = { path = "ndarray-rand" }
ndarray-gen = { path = "crates/ndarray-gen" }
num-integer = { version = "0.1.39", default-features = false }
num-traits = { version = "0.2", default-features = false }
num-complex = { version = "0.4", default-features = false }
approx = { version = "0.5", default-features = false }
quickcheck = { version = "1.0", default-features = false }
rand = { version = "0.9.0", features = ["small_rng"] }
rand_distr = { version = "0.5.0" }
itertools = { version = "0.13.0", default-features = false, features = ["use_std"] }
cblas-sys = { version = "0.1.4", default-features = false }
[profile.bench]
debug = true
[profile.test.package.numeric-tests]
opt-level = 2
[profile.test.package.blas-tests]
opt-level = 2
# Config for cargo-release
[package.metadata.release]
tag-name = "{{version}}"
# Config specific to docs.rs
[package.metadata.docs.rs]
features = ["approx", "serde", "rayon"]
# Define the configuration attribute `docsrs`
rustdoc-args = ["--cfg", "docsrs"]