raft  by rapidsai

CUDA-accelerated primitives for ML/data mining algorithms

created 6 years ago
918 stars

Top 40.5% on sourcepulse

GitHubView on GitHub
Project Summary

RAFT provides CUDA-accelerated C++ primitives and Python bindings for high-performance machine learning and data mining tasks. It serves as a foundational library for building accelerated applications, particularly for data scientists and application developers needing low-level GPU-optimized computations.

How It Works

RAFT employs a header-only C++ template library approach, allowing for flexible integration and compile-time optimizations. It offers an optional shared library for host-accessible runtime APIs, simplifying usage without requiring a CUDA compiler. The library leverages RAPIDS Memory Manager (RMM) for efficient memory handling and mdspan/mdarray for multi-dimensional data representation, enabling seamless interoperability with other GPU-accelerated libraries.

Quick Start & Requirements

  • Install: Conda is the recommended installation method:
    # For CUDA 12.5
    mamba install -c rapidsai -c conda-forge -c nvidia raft-dask pylibraft cuda-version=12.8
    
    Pip installation for Python libraries is also available:
    pip install pylibraft-cu11 --extra-index-url=https://pypi.nvidia.com
    
  • Prerequisites: CUDA Toolkit (version specified during installation), Conda or Mamba.
  • Resources: Installation via Conda is generally quick. C++ compilation from source may require significant build time.
  • Docs: RAFT Reference Documentation, Getting Started

Highlighted Details

  • Vector Search Migration: Vector search and clustering algorithms are migrating to the cuVS library. RAFT headers for these will be removed after the December 2024 release.
  • Interoperability: pylibraft outputs are compatible with libraries supporting __cuda_array_interface__ (CuPy, PyTorch, JAX, TensorFlow) and DLPack, enabling zero-copy conversions.
  • Data Structures: Utilizes mdspan and mdarray for efficient multi-dimensional array handling on host and device.
  • Core Components: Includes primitives for linear algebra, sparse/dense operations, solvers, statistics, and utilities.

Maintenance & Community

RAFT is part of the NVIDIA RAPIDS ecosystem. Community support is available via RAPIDS Community.

Licensing & Compatibility

RAFT is released under the Apache 2.0 License, permitting commercial use and linking with closed-source projects.

Limitations & Caveats

The project explicitly states that vector search and clustering algorithms are being deprecated in RAFT in favor of the cuVS library, with headers to be removed in a future release. Users relying on these specific RAFT components should migrate to cuVS.

Health Check
Last commit

1 day ago

Responsiveness

1 day

Pull Requests (30d)
39
Issues (30d)
12
Star History
44 stars in the last 90 days

Explore Similar Projects

Starred by Andrej Karpathy Andrej Karpathy(Founder of Eureka Labs; Formerly at Tesla, OpenAI; Author of CS 231n), Georgios Konstantopoulos Georgios Konstantopoulos(CTO, General Partner at Paradigm), and
7 more.

ThunderKittens by HazyResearch

0.6%
3k
CUDA kernel framework for fast deep learning primitives
created 1 year ago
updated 4 days ago
Feedback? Help us improve.