-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathCargo.toml
More file actions
74 lines (62 loc) · 1.93 KB
/
Cargo.toml
File metadata and controls
74 lines (62 loc) · 1.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
[package]
name = "fastkmeans-rs"
version = "0.1.7"
edition = "2021"
description = "A fast and efficient k-means clustering implementation in Rust, compatible with ndarray"
license = "Apache-2.0"
repository = "https://github.com/lightonai/fastkmeans-rs"
homepage = "https://github.com/lightonai/fastkmeans-rs"
documentation = "https://docs.rs/fastkmeans-rs"
keywords = ["kmeans", "clustering", "machine-learning", "ndarray"]
categories = ["science", "algorithms"]
[dependencies]
ndarray = { version = "0.16", features = ["rayon"] }
ndarray-rand = "0.15"
rand = "0.8"
rand_chacha = "0.3"
rayon = "1.10"
num-traits = "0.2"
thiserror = "2.0"
ndarray-npy = { version = "0.9", optional = true }
# BLAS backends (optional)
blas-src = { version = "0.10", optional = true }
openblas-src = { version = "0.10", features = [
"cblas",
"system",
], optional = true }
accelerate-src = { version = "0.3", optional = true }
# CUDA dependencies (optional)
cudarc = { version = "0.12", features = ["cuda-version-from-build-system", "cublas"], optional = true }
[dev-dependencies]
criterion = { version = "0.5", features = ["html_reports"] }
approx = "0.5"
[features]
default = []
npy = ["ndarray-npy"]
# BLAS acceleration features
# Use system OpenBLAS (requires libopenblas-dev on Linux, brew install openblas on macOS)
openblas = ["blas-src", "openblas-src", "ndarray/blas"]
# Use Apple Accelerate framework (macOS only, recommended for macOS)
accelerate = ["blas-src", "accelerate-src", "ndarray/blas"]
# CUDA GPU acceleration
# Requires CUDA toolkit installed (nvcc in PATH)
cuda = ["cudarc"]
[[bin]]
name = "compare-kmeans"
path = "src/bin/compare_kmeans.rs"
required-features = ["npy"]
[[bin]]
name = "compare-kmeans-cuda"
path = "src/bin/compare_kmeans_cuda.rs"
required-features = ["npy", "cuda"]
[[bench]]
name = "kmeans_benchmark"
harness = false
[profile.release]
lto = true
codegen-units = 1
opt-level = 3
[profile.bench]
lto = true
codegen-units = 1
opt-level = 3