AI and LLM integration · Decision guide
PyTorch stops with no kernel image is available for the GPU
Short answer
The PyTorch build you installed carries no compiled GPU code for your card's compute capability. PyTorch 2.15 wheels ship kernels only for Turing (7.5) and newer, so older cards like Pascal fail, while very old wheels lack Blackwell (12.0). Compare torch.cuda.get_device_capability() with torch.cuda.get_arch_list(), then install a wheel or rebuild an extension that lists your sm number.
A PyTorch wheel carries compiled GPU code only for a fixed list of architectures. When your card's compute capability is not in that list, the first kernel launch fails with this error, even though torch.cuda.is_available() can still say True. So the whole problem is two numbers: what your GPU is, and what your wheel was built for.
Print both, then follow the row that fits. The cause depends on the generation of the card relative to the build.
Find your case
- If your card is older than Turing, such as Pascal (6.x) or Volta (7.0)Current wheels no longer include your architecture.
- If your card is a new Blackwell (10.0 or 12.0) and the wheel is oldThe wheel predates native Blackwell code.
- If torch works but one package with its own CUDA code failsThat extension was compiled for other GPUs.
Print the two numbers
get_device_capability returns your card's compute capability as a pair, and get_arch_list lists the sm_ targets compiled into this PyTorch. If your pair, such as (8, 6), has no matching sm_86 in the list, the error is explained. If it is in the list, the problem is something else and the last section applies.
Version, CUDA, capability, compiled targets
python -c "import torch; print(torch.__version__, torch.version.cuda, torch.cuda.get_device_capability(0), torch.cuda.get_arch_list())"Card older than the wheel supports
PyTorch's release document lists what each build contains. For 2.15 wheels on Linux x86 and Windows it is Turing (sm_75), Ampere (sm_80, sm_86), Hopper (sm_90) and Blackwell (sm_100, sm_120), as SASS only. A Pascal or Volta card has no code to run. Wheels drop old architectures as releases move on, so an older release may still carry yours.
Check the previous-versions page for a release and CUDA build that lists your architecture, install it, then print get_arch_list again to confirm before you rely on it. If no published wheel includes your target, the options are building PyTorch from source for your card or moving the job to a newer GPU.
Try an earlier release, then confirm
pip uninstall -y torch
pip install torch==2.14.1 --index-url https://download.pytorch.org/whl/cu126
python -c "import torch; print(torch.cuda.get_arch_list())"New Blackwell card, old wheel
NVIDIA's Blackwell compatibility guide says binaries that hold only code for older architectures must be rebuilt, and native Blackwell code needs CUDA 12.8 or later. A wheel built for CUDA 11.8 or 12.4 has none, and the symptom is an arch list that stops at sm_90 with a card reporting (12, 0) or (10, 0). Install a current wheel from the selector on PyTorch's Get Started page.
Current wheel (CUDA 13.2 build)
pip uninstall -y torch torchvision torchaudio
pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu132A compiled extension built for other cards
Libraries that compile CUDA code through torch.utils.cpp_extension contain kernels only for the capabilities chosen at build time. A prebuilt package made for another GPU fails on yours while plain PyTorch works. Rebuild it here with TORCH_CUDA_ARCH_LIST set to your capability; adding +PTX to the last entry lets newer GPUs compile it at runtime.
Rebuild for your card
export TORCH_CUDA_ARCH_LIST="8.6+PTX"
pip install --no-build-isolation --no-binary :all: --force-reinstall <the-extension-package>Your target is in the list and it still fails
Set CUDA_LAUNCH_BLOCKING=1 for one run, which makes the error name the kernel that really failed rather than a later call. A driver older than the wheel's CUDA version produces different errors and needs a driver update, not a new wheel.
In short
- Compare
get_device_capabilitywithget_arch_listfirst. - Old card: find an earlier wheel that lists it. New card: install a recent wheel.
- Extensions need rebuilding with TORCH_CUDA_ARCH_LIST.
Sources
How was this page made?
I drafted this page with AI assistance from the official documents listed under Sources. I have not reproduced this fix on a machine of my own yet, so read it as documented guidance, not a test report. Found a mistake? Tell me.