Skip to content

The software stack

Note

In one minute

  • A GPU workload stacks five layers: driver, CUDA (or its equivalent), container runtime, framework, serving software.
  • With passthrough, the host needs almost nothing and the guest has the whole stack. With vGPU, the host runs the vendor's manager and the guest driver must be compatible with it.
  • Most version problems come from a mismatch between two adjacent layers.

Before you start. Sharing a GPU. This page is background, with NVIDIA as the example; AMD's equivalent of CUDA is ROCm.

The layers

Layer What it does Where it lives
Host driver or vGPU manager Drives the physical GPU, or splits it into vGPUs The hypervisor (compute node)
Guest driver Drives the GPU or vGPU the VM sees Inside the VM
CUDA runtime and libraries The programming interface that frameworks call Inside the VM, often inside each container
Container toolkit Gives containers access to the GPU Inside the VM, if workloads run in containers
Framework PyTorch and similar: run the model's maths Inside the container
Serving software Loads the model, batches requests, exposes an API Inside the container

Who installs what

Passthrough vGPU
On the compute node IOMMU on, the GPU bound to the vfio-pci driver, no vendor driver The vendor's vGPU manager, matching the host kernel
In the guest The normal data-centre driver A vGPU guest driver from a release the host manager supports, plus a licence
Operator's burden Low on the host Host and guest drivers upgraded together; licence server to run

For an OpenStack operator, the split matters: the host part is yours (compute node images, kernels, Kolla-Ansible hosts), the guest part is usually your users', unless you publish ready-made GPU images.

Compatibility chain

Each layer accepts a range of versions of the layer below:

  • The driver supports CUDA up to a given version. An application built for a newer CUDA fails on an older driver.
  • The framework is built for a CUDA version.
  • With vGPU, the guest driver must be a release that the host manager supports; NVIDIA publishes the compatible combinations in the release notes of each vGPU software release.

The safe habit is to fix one driver version per GPU host image, publish guest images that match it, and upgrade both on purpose.

Common mistakes

  • "Install the driver in the container." The kernel driver belongs to the host (passthrough: the guest kernel). A container brings CUDA libraries, not the kernel driver.
  • "Upgrading the compute node driver is a host-only change." With vGPU, every guest driver may need the same upgrade.
  • "Any GPU image will do." An image built for passthrough may lack the vGPU guest driver and licence configuration.

Check yourself

With passthrough, which vendor driver runs on the compute node?

None for the GPU itself: the device is bound to vfio-pci and handed to the VM, which runs the vendor driver.

You upgrade the vGPU manager on the compute nodes. What else must you check?

That the guest drivers of the VMs on those hosts belong to a compatible vGPU release, and that licensing still works.

Where does the CUDA runtime usually live when workloads run in containers?

In each container image, matching what the framework was built for, with the driver underneath supporting that CUDA version.

Go further