libcuvs-cu12
raw JSON → 26.4.0 verified Mon Apr 27 auth: no python
cuVS C++ shared library for GPU-accelerated vector search (includes CAGRA, IVF-PQ, HNSW). Version 26.4.0. Released as part of RAPIDS monthly releases.
pip install libcuvs-cu12 Common errors
error ModuleNotFoundError: No module named 'libcuvs_cu12' ↓
cause Importing the C++ backend directly instead of the Python wrapper.
fix
Install and import the
cuvs package: pip install cuvs ; import cuvs error ImportError: libcuvs_c.so: cannot open shared object file ↓
cause Missing libcuvs-cu12 installation or broken environment.
fix
Reinstall libcuvs-cu12: pip install --upgrade libcuvs-cu12
Warnings
breaking HNSW GPU hierarchy is now default as of v26.04.00. Existing HNSW parameters may need adjustment. ↓
fix Review HNSW build parameters; refer to migration guide.
breaking Static linking of libcudart is now default (v26.04.00). May conflict with existing CUDA runtime libraries. ↓
fix Set CUDA dynamic linking if needed; see RAPIDS docs.
breaking CAGRA C API enums changed to stable values (v25.12.00). Old enum values no longer work. ↓
fix Update enum usage to match new C API header.
deprecated Java bindings: `destroyIndex()` replaced by `close()` (v25.10.00). ↓
fix Use `close()` method instead of `destroyIndex()`.
gotcha libcuvs-cu12 is a C++ library; do not import directly in Python. Instead, use the `cuvs` Python package. ↓
fix Install `cuvs` (pip install cuvs) which depends on libcuvs-cu12.
Imports
- cuvs wrong
import libcuvs_cu12correctimport cuvs - CagraIndex wrong
from libcuvs_cu12 import CagraIndexcorrectfrom cuvs.neighbors import cagra
Quickstart
import cupy as cp
import cuvs
from cuvs.neighbors import cagra
rs = cuvs.raft.RaftResourceManager()
data = cp.random.random((1000, 128))
index = cagra.build(rs, data)
queries = cp.random.random((10, 128))
distances, neighbors = cagra.search(index, queries, k=10)