GPU Glossary
Host Software·2 min read

CUDA Driver API

The low-level, closed-source userspace API of the NVIDIA CUDA drivers, used to manage GPU memory, kernels and devices.

The CUDA Driver API is the userspace component of the NVIDIA CUDA drivers. Its utilities will feel familiar to anyone who knows the C standard library: for example, cuMalloc allocates memory on a GPU device.

The CUDA Toolkit. The CUDA Driver API sits between applications or other toolkit components and the GPU. Adapted from the Professional CUDA C Programming Guide.
The CUDA Toolkit. The CUDA Driver API sits between applications or other toolkit components and the GPU. Adapted from the Professional CUDA C Programming Guide.

Who uses it#

Very few CUDA programs call the Driver API directly. Most use the CUDA Runtime API, which wraps it. NVIDIA compares the two in this section of the Driver API docs.

Linking and compatibility#

The Driver API is generally linked dynamically rather than statically, usually as libcuda.so on Linux.

It is binary-compatible: an application compiled against an older version runs on systems with a newer version. The operating system's loader can load the newer library and the program behaves the same.

Key idea Programs built against an old Driver API keep working when the system's driver is upgraded.

For guidance on distributing CUDA C/C++ applications, see NVIDIA's CUDA C/C++ Best Practices Guide.

Source and alternatives#

The Driver API is closed source. Its documentation is here.

A few projects provide or use open source alternatives, though they aren't widely used. Examples are LibreCuda and tinygrad; see tinygrad's source for details.