PyTorch and CUDA versions for every NVIDIA GPU, and the RTX 50 "sm_120" fix

KernelMachine is preparing an invite-only beta; no launch date is set. Where this guide describes KernelMachine, it's how it works at launch. Join the waitlist

Short answer: RTX 50-series cards need PyTorch 2.7 or newer built for CUDA 12.8 or newer. Install it with pip install --upgrade torch --index-url https://download.pytorch.org/whl/cu128. Older cards work with any recent build. The driver must also be new enough for that CUDA version: 570 or newer for CUDA 12.8, 580 or newer for CUDA 13.0.

Three version numbers have to agree before a GPU runs your code: the card's generation, the CUDA version your PyTorch (or other library) was built with, and the NVIDIA driver on the machine. Most "CUDA errors" on rented machines are one of these three disagreeing.

Which CUDA each card needs

Every NVIDIA card has a "compute capability", a version number for its generation. Software must be built with code for it (written sm_86, sm_120 and so on), and only CUDA versions from a certain point on can build that code.

CardsGenerationCompute capabilityOldest CUDA that supports it
GTX 16, RTX 20Turing7.5 (sm_75)10.0
A100Ampere (data center)8.0 (sm_80)11.0
RTX 30, A10, A40Ampere8.6 (sm_86)11.1
RTX 40, L4, L40SAda Lovelace8.9 (sm_89)11.8
H100, H200Hopper9.0 (sm_90)11.8
B200Blackwell (data center)10.0 (sm_100)12.8
RTX 50Blackwell12.0 (sm_120)12.8

PyTorch's first official builds with RTX 50 code were version 2.7, for CUDA 12.8 (PyTorch 2.7 release). Anything older can't run on those cards.

Check what you have

$ nvidia-smi $ python -c "import torch; print(torch.__version__, torch.version.cuda, torch.cuda.is_available())" $ python -c "import torch; print(torch.cuda.get_device_name(0), torch.cuda.get_device_capability(0), torch.cuda.get_arch_list())"

The error messages, and what fixes them

You seeCauseFix
NVIDIA GeForce RTX 5090 with CUDA capability sm_120 is not compatible with the current PyTorch installationPyTorch is older than 2.7, or built for CUDA older than 12.8.Reinstall from the cu128 (or newer) wheels, below.
CUDA error: no kernel image is available for execution on the devicePyTorch, or a library with its own GPU code, has no code for this card.Upgrade PyTorch; then check each library with GPU code (xformers, FlashAttention, bitsandbytes, vLLM) has a build for your card.
The NVIDIA driver on your system is too old or CUDA driver version is insufficient for CUDA runtime versionYour software was built for a newer CUDA than the driver supports.Install a build for an older CUDA, or use a machine with a newer driver.
torch.cuda.is_available() is FalseA CPU-only build, or the container can't see the card.Check torch.version.cuda. If it's None, reinstall from the CUDA wheels. If nvidia-smi also fails, it's the machine.

Install a build that works everywhere

A PyTorch build for CUDA 12.8 runs on every card from the GTX 16 and RTX 20 series to the RTX 50 series, on driver 570 or newer:

$ pip install --upgrade torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu128

Newer CUDA builds (for example cu130) work too, as long as the driver supports that CUDA version. The PyTorch install page lists the current choices.

In Docker, start from an image built for CUDA 12.8 or newer, such as pytorch/pytorch:2.7.0-cuda12.8-cudnn9-runtime or nvidia/cuda:12.8.1-cudnn-runtime-ubuntu24.04. The image brings the CUDA libraries; the driver always comes from the machine.

Other libraries with GPU code

Anything that ships its own GPU code needs a build for your card too: xformers, FlashAttention, bitsandbytes, vLLM, llama.cpp and custom CUDA extensions. If one fails on an RTX 50 card while PyTorch works, upgrade that library or check its release notes for RTX 50 (Blackwell) support.

TensorFlow

TensorFlow brings its own CUDA libraries: pip install "tensorflow[and-cuda]". TensorFlow 2.21 then misses one of them (libcusolver.so.11, "Cannot dlopen some GPU libraries") and quietly runs on the processor, in a fresh virtual environment too. Put that library's folder on the library path before starting Python, and it finds the card:

$ export LD_LIBRARY_PATH=$(python3 -c "import nvidia.cusolver; print(list(nvidia.cusolver.__path__)[0])")/lib:$LD_LIBRARY_PATH

In a notebook, load it from Python first, in the cell that imports TensorFlow (before any other cell imports it):

import ctypes, nvidia.cusolver ctypes.CDLL(list(nvidia.cusolver.__path__)[0] + "/lib/libcusolver.so.11") import tensorflow as tf tf.config.list_physical_devices("GPU") # one card

Both checked on an RTX 3090 with our notebook on October 12, 2026; PyTorch in the same notebook keeps working.

On KernelMachine

Hosts run NVIDIA's 580 driver, which supports CUDA 13.0 and older, and our images use PyTorch built for CUDA 12.8 or newer. So the notebook works on every card we rent, RTX 50 included. If you install a different PyTorch version in a notebook, take it from the cu128 or newer wheels. You aren't the administrator in a rental: pip install works (into your workspace), apt-get and sudo don't. What's inside each image

To check a card's versions from your own computer, without opening anything, run one command on it with km run; the card stops as soon as it prints:

$ km run --size 24GB -- python -c "import torch; print(torch.__version__, torch.version.cuda, torch.cuda.get_device_name(0))"

Read next

Questions, answered plainly.

Which PyTorch version supports the RTX 5090?

PyTorch 2.7 and newer, installed from the CUDA 12.8 (cu128) or newer wheels. Older builds have no code for the RTX 50 series (compute capability 12.0, sm_120) and fail with "no kernel image is available for execution on the device".

What does "CUDA Version" in nvidia-smi mean?

The newest CUDA version the installed driver supports, not the CUDA version your PyTorch was built with. Driver 580 shows CUDA 13.0, and runs software built for that or any older CUDA.

Why does torch.cuda.is_available() return False?

Usually because a CPU-only PyTorch build is installed (pip's default on some systems), or the container can't see the card. Check torch.version.cuda: if it prints None, reinstall from the CUDA wheels.

Preparing an invite-only beta

Get an email when access opens.

No launch date is set. We'll email you once when KernelMachine opens. Nothing else.

I want to
We use your email only for this. Privacy