Expand description
GPU-accelerated HNSW index construction
This module implements HNSW graph construction with a GPU-oriented batched
pipeline that runs as an efficient Pure Rust CPU implementation. Real CUDA
kernels live in the quarantined oxirs-vec-adapter-cuda crate.
§Architecture
The GPU index builder works in phases:
- Vector Upload: Transfer vectors to GPU memory in batches
- Distance Matrix Computation: Compute all-pairs distances via CUDA kernels
- Neighbor Selection: Apply heuristic neighbor selection on GPU
- Graph Assembly: Assemble the HNSW graph structure from GPU results
§Pure Rust Policy
This module is 100% Pure Rust. Real CUDA code is quarantined in the
oxirs-vec-adapter-cuda crate (publish = false).
§Module Layout
crate::gpu::index_builder_types: Config types, distance metrics, graph structurescrate::gpu::index_builder_phases: Builder implementations and pipeline stages
Re-exports§
pub use crate::gpu::index_builder_phases::BatchSizeCalculator;pub use crate::gpu::index_builder_phases::ComputedBatch;pub use crate::gpu::index_builder_phases::GpuBatchDistanceComputer;pub use crate::gpu::index_builder_phases::GpuHnswIndexBuilder;pub use crate::gpu::index_builder_phases::GpuIndexOptimizer;pub use crate::gpu::index_builder_phases::GpuMemoryBudget;pub use crate::gpu::index_builder_phases::IncrementalGpuIndexBuilder;pub use crate::gpu::index_builder_phases::IndexedBatch;pub use crate::gpu::index_builder_phases::PipelinedIndexBuilder;pub use crate::gpu::index_builder_phases::PreparedBatch;pub use crate::gpu::index_builder_types::ComputationCache;pub use crate::gpu::index_builder_types::GpuDistanceMetric;pub use crate::gpu::index_builder_types::GpuIndexBuildStats;pub use crate::gpu::index_builder_types::GpuIndexBuilderConfig;pub use crate::gpu::index_builder_types::HnswGraph;pub use crate::gpu::index_builder_types::HnswNode;