- 2Blackwell GPUs the engine loads its own cubins onto
- 3memory classes a lease can hold
- 13.1the CUDA version the build defaults to
Raw FFI for an architecture nobody had wrapped
In the Inference Fabric I was targeting CUDA 13 and NVIDIA Blackwell when no Rust CUDA crate supported either, and I needed to ship compiled kernels to remote workers and control streams, events and devices directly.
I chose raw CUDA Driver API FFI from Rust, because no wrapper supported the toolkit and the architecture, and because cubin loading had to stay under my control. The Driver API is the same across the Blackwell generation.
I work at the level of contexts, modules, streams and host memory registration when the higher-level tools do not yet reach the hardware I am using.
One primary context for a moving thread pool
The analytics service runs on Tokio, and CUDA calls happen on blocking-pool threads that change from one call to the next.
Pinning host memory for leases
The Vector Shard Manager's lease layer calls libcuda directly to pin host memory with cuMemHostRegister. A type-only lease crate is the boundary between storage and CUDA, so storage code reaches the GPU only through it; the storage daemon never links CUDA, and a build-time check enforces that boundary.
A doorbell the GPU waits on
Where latency matters, the GPU waits and the host does no polling.