GPU Acceleration
GPU acceleration is optional and compile-time gated in storage-engine.
Compile-Time Gate
- Storage-engine feature:
gpu-accel - CUDA-specific code inside plugin crate is behind plugin feature
cuda
Without CUDA-enabled runtime support, GPU paths report no device and execution stays on CPU paths.
Code anchors:
services/storage-engine/Cargo.tomlplugins/gpu-accel/src/lib.rsservices/storage-engine/src/hnsw/distance/dispatch.rs
Runtime Variables
Representative variables (see plugins/gpu-accel/src/config.rs):
GPU_ACCEL_ENABLEDGPU_ACCEL_DEVICE_IDGPU_ACCEL_BATCH_THRESHOLDGPU_ACCEL_MAX_MEMORY_MBGPU_ACCEL_VECTOR_CACHE_MBGPU_ACCEL_BLOCK_SIZEGPU_ACCEL_PRIORITY_SCHEDULINGGPU_ACCEL_MULTI_QUERY_BATCHINGGPU_ACCEL_GPU_RERANKING
Build Example
cd services/storage-engine
cargo build --release --features gpu-accel