skillfed

libraft-cu12

RAFT: Reusable Algorithms Functions and other Tools (C++)

libraft-cu12 v26.8.0 366.9K downloads/30d#7,201 on PyPI1,037
Permissive license Apache-2.0 Active released

What it is and what it does

libraft-cu12 is a CUDA-accelerated C++ library providing low-level, reusable primitives for machine learning and data mining. It includes accelerated functions for dense and sparse linear algebra, matrix operations, solvers, statistical computations, and GPU infrastructure utilities. The library is designed as a building block for developers creating high-performance GPU applications, not for direct use by data scientists—it centralizes core computations to reduce maintenance burden and enable future optimizations across dependent projects.

The package offers both C++ APIs (header-only with optional shared library for faster compilation) and Python bindings through pylibraft, which wraps host-accessible runtime APIs. Python users can pass objects supporting the __cuda_array_interface__ directly to RAFT functions. The library depends on cuda-toolkit, librmm-cu12, nvidia-nccl-cu12, nvidia-nvjitlink-cu12, and rapids-logger, making it suitable for environments with compatible GPUs.

Use it for:

  • Accelerate pairwise distance computations between large GPU-resident arrays for nearest-neighbor search.
  • Build distributed multi-GPU machine learning workflows using raft-dask infrastructure.
  • Implement custom GPU-accelerated algorithms by reusing RAFT's linear algebra and solver primitives.
  • Optimize sparse and dense matrix operations on GPU without writing custom CUDA kernels.
  • Integrate GPU-accelerated statistical sampling and model evaluation into existing GPU pipelines.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

libraft-cu12 provides CUDA-accelerated primitives and algorithms for machine learning and data mining, including dense and sparse linear algebra, solvers, statistics, and GPU infrastructure utilities.

Yes, if you have a compatible NVIDIA GPU and are building GPU-accelerated machine learning or data mining applications. The library is actively maintained, permissively licensed under Apache-2.0, and provides well-tested primitives that reduce development time. Install only if you need low-level GPU acceleration for algorithms—it is not intended for direct data science experimentation. Requires Python 3.11+, CUDA Toolkit, and medium install friction due to GPU runtime dependencies.

Install

libraft-cu12 on PyPI

pip

pip install libraft-cu12

uv

uv add libraft-cu12

poetry

poetry add libraft-cu12

Installing libraft-cu12

Before you install

Medium install friction due to CUDA toolkit and NVIDIA runtime dependencies (librmm-cu12, nvidia-nccl-cu12, nvidia-nvjitlink-cu12). Actively maintained with recent releases; requires Python 3.11 or later.

License in practice

Apache-2.0 permissive license allows commercial and private use with minimal restrictions, making it suitable for most production environments.

Quickstart

pip install libraft-cu12

from libraft-cu12 import device_resources

handle = device_resources()
# Use handle with RAFT primitives for GPU-accelerated computations

Requires CUDA Toolkit, compatible NVIDIA GPU, and Python 3.11 or later.

Verify before relying

  • Whether the C++ header-only library and optional shared library are both included in the cu12 wheel.
  • Specific GPU architectures and CUDA compute capabilities supported by this release.
  • Complete list of algorithms and primitives exposed in the Python API for version 26.8.0.
  • Interoperability details with external libraries beyond what the description excerpt covers.

Package facts

License Apache-2.0 (permissive)
Python support supports the current Python release (>=3.11)
Install friction medium — platform-specific wheel
Runtime dependencies 5 — cuda-toolkit, librmm-cu12, nvidia-nccl-cu12, nvidia-nvjitlink-cu12, rapids-logger
Maintenance actively maintained — 8 days since the last release
Last repo commit
First released
Downloads 366,894/month — #7,201 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: libraft_cu12-26.8.0-py3-none-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl; libraft_cu12-26.8.0-py3-none-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl

Intended Audience :: Developers

Tags

cuda accelerated machine learning primitivesgpu linear algebra librarycuda algorithms and toolsaccelerated data mining functionsrapids gpu computing
gpu-acceleratedcudamachine-learning-primitives

More Scientific/Engineering packages

Further reading