1.1 Getting started
From installing the package to a Racket program that has loaded RAFT and checked the GPU stack under it.
1.1.1 What you need
Linux on x86-64. No macOS or Windows build, and no CPU fallback.
An NVIDIA GPU of compute capability 7.5 or newer, the architectures RAPIDS supports.
An NVIDIA driver for CUDA 13, release 580 or newer.
glibc 2.28 or later.
Racket 9.3 or later.
1.1.2 Installing
raco pkg install raft
This also installs raft-x86_64-linux, the package that holds the native library, libraftrkt, and the RAPIDS libraries it loads.
The install also fetches cuBLAS from CUDA 13, NVIDIA’s nvidia-cublas wheel from PyPI (a 405 MB download, 560 MB installed, about 1 GB free needed while it unpacks), unless RAFT_CUDA_LIB_PATH names a directory holding libcublas.so.13 and libcublasLt.so.13 or the system loader finds them. If the fetch failed, rerun raco setup --pkgs raft, which fetches into the right place for the install’s scope, or run racket -l- raft/fetch-cuda for a copy of your own.
cuBLAS is under NVIDIA’s licence; raft does not redistribute it.
If (require raft) then fails, the message says what is wrong with the native library and where it looked.
An executable made with raco exe does not find raft-x86_64-linux; run it with RAFT_NATIVE_LIB_PATH set to a directory whose "lib/" holds libraftrkt and the libraries beside it.
1.1.3 A first program
Put this in "hello.rkt" and run it with racket hello.rkt:
#lang racket/base (require raft) (printf "RAFT ~a\n" (raft-version))
> (raft-version) "26.08.00"
The version is a function, as version is.
1.1.4 Checking the stack
raft-abi reports what the library was compiled against: RAFT, RMM, CCCL and the CUDA runtime. A short report is a good first line in a bug report:
> (match-define (raft-abi #:raft raft #:rmm rmm #:cccl cccl #:cuda-runtime cuda-runtime) (raft-abi)) > (printf "raft ~a\nrmm ~a\ncccl ~a\ncuda-runtime ~a\n" raft rmm cccl cuda-runtime)
raft 26.08.00
rmm 26.08.00
cccl 3.4.3
cuda-runtime 13.2
The pattern names only the fields it needs.
'cuda-runtime is the CUDA runtime the library was compiled with. A native binding built on this one, such as cuML’s, checks at load that its headers match (raft-abi).
Last, device-count checks that the driver sees a GPU:
> (device-count) 1
If it raises exn:fail:raft instead (no driver, too old a driver, or no device; the message says which), nothing else in this manual will run. To name the GPU, ask the driver:
nvidia-smi --query-gpu=name,driver_version,compute_cap --format=csv