BACK TO BLOG

What is CUDA? From container to GPU execution

CUDA gives software a way to use NVIDIA GPUs for computation. Running that software reliably means understanding which components belong in a workload image, which belong on the node, and where compatibility can break. We separate those responsibilities so a visible GPU does not get mistaken for a node ready to run an inference workload.

What is CUDA?

CUDA is NVIDIA's parallel computing platform and programming model for general-purpose computation on its GPUs. The name comes from Compute Unified Device Architecture. Its software ecosystem includes programming interfaces, compilers, runtime libraries, mathematical libraries, and debugging and profiling tools.

CUDA C++ is one way to write GPU code. Applications can also use CUDA through languages, libraries, and frameworks such as Python and PyTorch. An engineer deploying a model may never write a GPU function directly, yet the framework still depends on the execution stack underneath it.

CUDA uses both the central processing unit (CPU) and GPU. The CPU, called the host, starts the application and coordinates work. The GPU, called the device, executes functions called kernels. Here, kernel means a GPU function, separate from the operating-system kernel that controls the host.

A kernel can run many threads, grouped into blocks and grids, to divide work across the GPU. For example, different threads can process different elements of an array. This parallel execution supports work such as matrix operations in neural networks and numerical simulations. It does not automatically accelerate every part of a program: CPU work, memory movement, and dependencies remain part of the execution path.

The driver, toolkit, and runtime have different jobs

“CUDA is installed” leaves too much unspecified. These components have distinct responsibilities:

Component What it does Where it belongs
NVIDIA driverConnects software to the GPU through user-space libraries and host kernel-mode componentsInstalled on the host; relevant user-space components are exposed to a GPU container
CUDA ToolkitSupplies development tools, including the nvcc compiler, headers, libraries, and debugging toolsA developer environment or build image; selected components can also be needed during execution
CUDA runtimeProvides application-level functions for allocating memory, moving data, and launching GPU kernelsLinked into an application or supplied as a shared library, commonly inside its execution image
NVIDIA Container ToolkitConfigures the container's access to selected GPU devices and driver componentsThe host's container integration layer

The CUDA runtime and a container runtime solve different problems. The CUDA runtime manages GPU operations for a process. A container runtime, such as containerd, starts and manages containers. NVIDIA Container Toolkit connects that container environment to NVIDIA devices.

An application programming interface (API) defines how software requests an operation. On native Linux, the CUDA driver API is exposed through libcuda.so. The CUDA runtime library, libcudart, operates above that API and simplifies tasks such as managing the process's GPU execution context. Some applications call the driver API directly and bypass libcudart.

An execution context holds state needed for GPU work, such as loaded code and memory allocations. The runtime and driver APIs differ in how much of that state the application manages explicitly.

A full development toolkit is unnecessary for an already-built application whose required execution libraries are present. Conversely, having a compiler installed says nothing about whether that application can access a GPU.

How a containerized workload reaches the GPU

A normal GPU container packages application code and its user-space dependencies. It shares the host's operating-system kernel. The host still provides the GPU's kernel-mode driver; adding CUDA libraries to an image does not replace it.

The native Linux execution path has two separate boundaries: the container must receive access to the intended devices, and the application's libraries and GPU code must work with the driver and hardware.

CUDA execution path from application libraries through the driver to an assigned GPU
  1. The application requests GPU work. A framework may call a mathematical library such as cuBLAS, which implements linear algebra, or launch its own kernels.
  2. The execution libraries reach the CUDA driver API. Applications using the CUDA runtime call through it. The usual container path exposes the host's user-space driver library to the process.
  3. The driver connects to the assigned device. Host kernel-mode components mediate GPU access. The GPU executes suitable device code and operates on data in accessible memory.

NVIDIA Container Toolkit 1.20.1 supplies the container integration that makes selected devices and driver components available. It does not compile the application or make an incompatible binary compatible.

The toolkit's Docker configuration distinguishes GPU visibility from driver capabilities, meaning the sets of driver libraries and tools exposed to the container. compute is required for CUDA applications; utility supports management tools such as nvidia-smi. A container with management access alone can report GPU information without having the components needed for CUDA computation.

The host's complete CUDA development toolkit does not need to match the toolkit used to build every container. The relevant relationship is between the workload's actual dependencies, the exposed driver, and the GPU.

A CUDA version number can describe different things

Three software versions often get collapsed into one:

Version evidence What it describes What it does not establish
Driver-reported CUDA versionThe CUDA level supported by the user-mode driverWhich toolkit is installed or which libraries an application loads
Compiler versionThe CUDA compiler selected in that environmentThat a GPU is present or accessible
Application runtime and library versionsThe dependencies linked into or loaded by that applicationThat its device code and requested features work on this node

NVIDIA's documented nvidia-smi output uses CUDA Version for driver 595.91.04 and CUDA UMD Version for driver 610.57.04, where UMD means user-mode driver. In either case, the value describes the driver-supported CUDA level, rather than an inventory of the installed CUDA Toolkit or the application's libraries.

A GPU's compute capability is a separate hardware designation. It describes supported GPU features and helps identify which device code can execute. A compute capability of 8.0 does not mean CUDA Toolkit 8.0.

For node acceptance, “CUDA 13” is therefore an incomplete specification. The GPU model, driver release, workload image, runtime libraries, and compiled GPU targets all matter.

Compatibility crosses several boundaries

Driver compatibility does not require identical version numbers

Backward compatibility allows applications built with an older CUDA Toolkit to run on a newer compatible NVIDIA driver. That promise does not add missing application libraries or restore support for hardware outside the driver's supported range.

Minor-version compatibility permits applications from the same CUDA major family to run on an older driver, with restrictions. NVIDIA documents these driver-branch floors:

Toolkit family Driver branch floor for minor-version compatibility
CUDA 12.xR525
CUDA 13.xR580

These are branch-level compatibility floors, not a complete deployment specification or a driver-lifecycle recommendation. CUDA 12.x applications can also run on newer driver branches through backward compatibility.

The restrictions matter. The application needs suitable compiled GPU machine code, often packaged as a cubin, or CUDA binary. PTX, short for Parallel Thread Execution, is an intermediate code representation that the driver can compile into GPU machine code at execution time. An older driver's compiler may not understand PTX produced by a newer toolkit. Features spanning both toolkit and driver can also require a newer driver. Those are explicit minor-version compatibility limits.

For a concrete version boundary, CUDA Toolkit 13.5 corresponds to driver branch R620. Existing CUDA 13.x applications retain the R580 minor-compatibility floor, while CUDA 13.5's new features and newly enabled platforms require an R620-or-later driver that supports them. The CUDA 13.5 release notes distinguish these cases.

Forward compatibility is a specific supported configuration

CUDA forward compatibility uses a compatibility package containing newer user-space driver libraries with an older Linux kernel-mode driver. This is an exception to the ordinary host-library path, rather than permission to combine arbitrary driver components.

It applies to supported NVIDIA Data Center GPUs, selected NGC Server Ready RTX configurations, and Jetson systems, subject to the relevant platform requirements. The package, installed driver branch, and required features must form a supported combination. It does not replace the host kernel-mode driver, and features requiring newer kernel-mode support remain limited. NVIDIA's forward-compatibility matrix defines the permitted combinations.

The application's GPU code must fit the hardware

Driver/runtime compatibility is only one relationship. The application also needs a usable binary for the target GPU, or suitable PTX that the available driver can compile.

An image can contain GPU binaries for several architectures. It can also carry PTX for supported later targets. These choices are made when the application and its libraries are built. A newer driver cannot make a binary compiled only for an incompatible GPU architecture execute on every GPU.

This explains why a container that works on one node can fail on another despite similar-looking CUDA version labels. The image contents and GPU architecture are part of the compatibility contract.

Failure signals identify the broken boundary

The point at which execution stops is often more informative than the presence of a toolkit directory. These documented failure categories identify different problems. NVIDIA Management Library (NVML) serves GPU management tools; SELinux enforces Linux security policy.

Signal Boundary it identifies What it does not prove
Container rejected by a CUDA or driver requirementThe image's declared constraints and exposed host configuration disagreeThat the application itself has executed
NVML reports insufficient permissionsGPU management access is denied; NVIDIA documents this with some SELinux configurationsThat the CUDA runtime version is wrong
cudaErrorInsufficientDriverThe loaded driver cannot satisfy the runtime's requirementsThat the host needs a development compiler
cudaErrorCallRequiresNewerDriverA particular operation needs a newer driverThat every other operation is incompatible
cudaErrorUnsupportedPtxVersionThe driver-side compiler cannot handle the supplied PTX toolchain versionThat the GPU hardware has failed
cudaErrorNoKernelImageForDeviceNo suitable kernel image is available for this GPUThat matching the toolkit label alone will solve it

The CUDA error meanings are specified in the CUDA 13.5 runtime reference. A framework may wrap them in different wording.

Access failures belong to a separate branch of the investigation. The workload's assigned devices, effective user and groups, device-access controls, and host security policy determine its access. An intentional denial remains a denial even when every version is compatible. NVIDIA's container permission guidance also makes an important security distinction: disabling SELinux labeling removes a separation boundary. It is not a neutral compatibility fix.

What CUDA readiness establishes

We treat CUDA readiness as a claim about a specific workload on a specific node. A useful acceptance record ties together:

  • The GPU model and compute capability.
  • The host driver release and the user-space driver libraries exposed to the process, including any compatibility package.
  • The workload image digest, which identifies fixed image contents, and its runtime, mathematical libraries, and compiled GPU targets.
  • The scheduler's device assignment and the workload's effective permissions, including expected denied access.
  • Successful GPU execution and correct results from the intended application path.

A compiler's presence establishes tool availability. A GPU listed by a management interface establishes visibility through that interface. Neither establishes application execution, numerical correctness, or production performance.

CUDA readiness also does not establish cross-node communication, storage behavior, or recovery. Those have their own acceptance boundaries. Our InfiniBand and Ethernet guide explains the network decision once work crosses servers.

For the full path from racked hardware to workload acceptance, use our GPU cluster build guide.