Skip to main content

Module gpu

Module gpu 

Source
Expand description

GPU-accelerated vector search and k-means.

Two independent GPU backends, both via runtime libloading — no compile-time GPU SDK required. Either backend returns None when its hardware/libraries are absent; callers fall back to CPU automatically.

  • NVIDIA CUDA: cuBLAS SGEMM via dlopen of libcudart + libcublas.
  • AMD ROCm: hipBLAS SGEMM via dlopen of libamdhip64 + libhipblas.

Functions§

try_nvidia_kmeans
k-means on an NVIDIA GPU via cuBLAS SGEMM.
try_nvidia_search_batch
Batch top-k vector search on an NVIDIA GPU via cuBLAS SGEMM.
try_rocm_kmeans
k-means on an AMD ROCm GPU.
try_rocm_search_batch
Batch top-k vector search on an AMD ROCm GPU via hipBLAS SGEMM.