Registry / data / libraft-cu12

libraft-cu12

JSON →
library26.6.0pypypiunverified

libraft-cu12 is a core C++ library providing Reusable Algorithms Functions and other Tools (RAFT) for high-performance computing on NVIDIA GPUs. It serves as a foundational component for other RAPIDS libraries, including Python wrappers like `pylibraft`. The current version is 26.4.0, and it follows a monthly release cadence, aligned with the broader RAPIDS ecosystem.

pip install libraft-cu12 --extra-index-url https://pypi.nvidia.com
INSTALL
IMPORT
SIG · LIBRAFT-CU12
L
libraft-cu12
datapythonv26.6.0
Install
33.9s avg
Import
Disk
2765MB
Pass rate
4/ 10
Env Coverage4 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v26.2.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
glibc
py 3.10
✕ build_error
✓ 43.8s
py 3.11
✕ build_error
✓ 33.65s
py 3.12
✕ build_error
✓ 29.75s
py 3.13
✕ build_error
✓ 28.45s
py 3.9
✕ build_error
✕ build_error
2765MB installed
● package 2765MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

No direct Python API
import pylibraft
from libraft_cu12 import SomeClass
libraft-cu12 provides the C++ core for RAFT. Python users typically interact with RAFT functionality via the `pylibraft` package, which depends on `libraft-cu12` for the CUDA 12 toolkit. There are no direct Python symbols exposed by `libraft-cu12` itself.

This quickstart demonstrates usage of `pylibraft`, which is the Python interface to RAFT algorithms. `libraft-cu12` provides the underlying C++ and CUDA implementations that `pylibraft` utilizes. This example builds and queries an approximate nearest neighbor (IVF-PQ) index on GPU data using CuPy arrays.

# libraft-cu12 provides the C++ core for RAFT. # Python users typically interact with RAFT functionality via the `pylibraft` package. # Ensure pylibraft-cu12 is installed (it depends on libraft-cu12): # pip install pylibraft-cu12 --extra-index-url https://pypi.nvidia.com import cupy as cp from pylibraft.neighbors import ivf_pq # Example using pylibraft, which relies on libraft-cu12 n_samples = 5000 n_features = 50 # Generate some random data on GPU using CuPy dataset = cp.random.random_sample((n_samples, n_features), dtype=cp.float32) queries = cp.random.random_sample((100, n_features), dtype=cp.float32) # Build an IVF-PQ index index_params = ivf_pq.IndexParams( n_lists=1024, metric="sqeuclidean", pq_dim=10 ) index = ivf_pq.build(index_params, dataset) # Search the index k = 5 search_params = ivf_pq.SearchParams(n_probes=20) distances, neighbors = ivf_pq.search(search_params, index, queries, k) print(f"Distances shape: {distances.shape}") print(f"Neighbors shape: {neighbors.shape}")
Debug
Known issues
breakingStarting with RAFT v25.12.00, CUDA Toolkit 12.2 or higher is required. Older CUDA versions (e.g., CUDA 11) are no longer supported.
fix
Upgrade your CUDA Toolkit installation to version 12.2+ and ensure your NVIDIA driver supports it. Use `conda` or `mamba` to install `libraft-cu12` with the appropriate `cuda-version` specifier.
affects: >=25.12.00
breakingIn v26.02.00, several major API modules for `neighbors/`, `cluster/`, `distance/`, `spatial/`, and `sparse/neighbors/` were removed.
fix
Review your code for usage of these deprecated APIs. Migrate to newer or alternative functionalities available in `pylibraft` or other RAPIDS libraries (e.g., `cuvs` for distance calculations).
affects: >=26.02.00
gotcha`libraft-cu12` is primarily a C++ library providing low-level CUDA-accelerated primitives. While installable via pip, it does not expose direct Python imports. Python users should install and use `pylibraft-cu12` (or `pylibraft` in conda) to access RAFT's functionalities.
fix
If you intend to use RAFT from Python, ensure you install `pylibraft-cu12` (e.g., `pip install pylibraft-cu12 --extra-index-url https://pypi.nvidia.com`) and import from `pylibraft`.
affects: All versions
breakingAs of v26.04.00, the `lanczos` functionality was renamed, and several deprecated C++ headers were removed.
fix
Update C++ code that uses `lanczos` or any removed headers to reflect the new naming and header structure.
affects: >=26.04.00
Upgrade
Version history
26.6.0latest on PyPI · released Jun 9, 2026
Audit
Dependencies
CUDA ToolkitrequiredRAFT is a CUDA-accelerated library; requires CUDA Toolkit 12.2+ for recent versions.
pylibraftoptionalFor Python users, 'pylibraft' provides Python bindings and is the typical interface to RAFT functionalities, depending on 'libraft-cu12' for the core C++ library.
cupyoptionalOften used with pylibraft for GPU array interoperability, but not a hard dependency.
Agent activity
2 hits · last 30 days
node
2
Resources