[package]
edition = "2024"
name = "hive-gpu"
version = "0.2.0"
authors = ["HiveLLM Contributors"]
build = "build.rs"
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "High-performance GPU acceleration for vector operations with Device Info API (Metal, CUDA, ROCm)"
homepage = "https://github.com/hivellm/hive-gpu"
documentation = "https://docs.rs/hive-gpu"
readme = "README.md"
keywords = [
"gpu",
"vector-search",
"hnsw",
"metal",
"cuda",
]
categories = [
"hardware-support",
"algorithms",
]
license = "Apache-2.0"
repository = "https://github.com/hivellm/hive-gpu"
[features]
cuda = ["dep:cudarc"]
default = ["metal-native"]
intel = [
"dep:ash",
"dep:naga",
]
metal-native = [
"objc2-metal",
"objc2-foundation",
"objc2",
]
rocm = ["dep:libloading"]
[lib]
name = "hive_gpu"
path = "src/lib.rs"
[[example]]
name = "cuda_basic"
path = "examples/cuda_basic.rs"
required-features = ["cuda"]
[[example]]
name = "metal_basic"
path = "examples/metal_basic.rs"
required-features = ["metal-native"]
[[test]]
name = "cuda_device_info"
path = "tests/cuda_device_info.rs"
[[test]]
name = "cuda_ivf"
path = "tests/cuda_ivf.rs"
[[test]]
name = "cuda_smoke"
path = "tests/cuda_smoke.rs"
[[test]]
name = "cuda_vector_ops"
path = "tests/cuda_vector_ops.rs"
[[test]]
name = "device_info_tests"
path = "tests/device_info_tests.rs"
[[test]]
name = "gpu_detection_tests"
path = "tests/gpu_detection_tests.rs"
[[test]]
name = "gpu_memory_tests"
path = "tests/gpu_memory_tests.rs"
[[test]]
name = "gpu_performance_tests"
path = "tests/gpu_performance_tests.rs"
[[test]]
name = "gpu_stress_tests"
path = "tests/gpu_stress_tests.rs"
[[test]]
name = "gpu_vector_ops_tests"
path = "tests/gpu_vector_ops_tests.rs"
[[test]]
name = "gpu_vram_tests"
path = "tests/gpu_vram_tests.rs"
[[test]]
name = "integration_tests"
path = "tests/integration_tests.rs"
[[test]]
name = "intel_ivf"
path = "tests/intel_ivf.rs"
[[test]]
name = "intel_smoke"
path = "tests/intel_smoke.rs"
[[test]]
name = "metal_bruteforce"
path = "tests/metal_bruteforce.rs"
[[test]]
name = "metal_ivf"
path = "tests/metal_ivf.rs"
[[test]]
name = "rocm_ivf"
path = "tests/rocm_ivf.rs"
[[test]]
name = "rocm_smoke"
path = "tests/rocm_smoke.rs"
[[bench]]
name = "cuda_ivf"
path = "benches/cuda_ivf.rs"
harness = false
required-features = ["cuda"]
[[bench]]
name = "cuda_ops"
path = "benches/cuda_ops.rs"
harness = false
required-features = ["cuda"]
[[bench]]
name = "gpu_operations"
path = "benches/gpu_operations.rs"
harness = false
required-features = ["metal-native"]
[dependencies.bytemuck]
version = "1.14"
features = ["derive"]
[dependencies.half]
version = "1.8"
features = ["serde"]
[dependencies.log]
version = "0.4"
[dependencies.serde]
version = "1.0"
features = ["derive"]
[dependencies.serde_json]
version = "1.0"
[dependencies.thiserror]
version = "1.0"
[dependencies.tokio]
version = "1.40"
features = ["full"]
[dependencies.tracing]
version = "0.1"
[dev-dependencies.criterion]
version = "0.5"
features = ["html_reports"]
[dev-dependencies.tempfile]
version = "3.8"
[dev-dependencies.tokio]
version = "1.40"
features = ["full"]
[target.'cfg(any(target_os = "linux", target_os = "windows"))'.dependencies.ash]
version = "0.38"
optional = true
[target.'cfg(any(target_os = "linux", target_os = "windows"))'.dependencies.cudarc]
version = "0.13"
features = [
"driver",
"cublas",
"cuda-12040",
"dynamic-linking",
]
optional = true
default-features = false
[target.'cfg(any(target_os = "linux", target_os = "windows"))'.build-dependencies.naga]
version = "23"
features = [
"wgsl-in",
"spv-out",
]
optional = true
[target.'cfg(target_os = "linux")'.dependencies.libloading]
version = "0.8"
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