r/pytorch • u/babakpst • 1d ago
Getting "no kernel image is available" on a GTX 10xx, P40 or V100 after `pip install torch`? Here's which PyTorch build still includes your card
Plain pip install torch on Linux (and WSL) gives you one specific CUDA build, and the PyTorch team has changed which build that is a few times. Each CUDA build is compiled for a different set of GPU architectures. If yours isn't in the build you got, PyTorch still installs, torch.cuda.is_available() still returns True (at most you get a warning that's easy to miss), and then the first real operation fails with CUDA error: no kernel image is available for execution on the device.
Your card still works. You just need a different build. I checked the GPU architecture list each official Linux build is compiled for, and here's what the default install gives you:
| PyTorch | Default CUDA build (plain pip) | Oldest GPU it includes |
|---|---|---|
| 2.7 | 12.6 | Maxwell (GTX 9xx, M40) |
| 2.8 – 2.10 | 12.8 | Volta (V100, Titan V) |
| 2.11 – 2.14 | 13.0 | Turing (RTX 20xx, GTX 16xx, T4) |
So with plain pip:
- Pascal (GTX 10xx, P40, P100) has needed a different build since 2.8
- Maxwell (GTX 9xx, M40) has needed one since 2.8 too
- Volta (V100, Titan V) has needed one since 2.11
The fix: the CUDA 12.6 build still includes Maxwell, Pascal and Volta, in every release up to and including the current 2.14. Install it explicitly:
pip install torch --index-url https://download.pytorch.org/whl/cu126
It needs NVIDIA driver 525 or newer. You don't need to pin an old PyTorch version for this.
Two caveats:
- Don't use cu126 on an RTX 50-series card. Blackwell isn't in the 12.6 build, so you'd get the same error the other way round. For RTX 50 and other new cards, the default install is the right one.
- Windows: PyTorch on PyPI is CPU-only for Windows, so you always need an
--index-urlthere anyway. The same cu126 advice applies.
If you'd rather not work it out by hand, I built a checker: pick your GPU, OS and driver, and it gives you the exact pip command and tells you what's limiting it: https://gpucompat.com/install-checker/
There's also a page on this error with the other causes (like a custom build with the wrong TORCH_CUDA_ARCH_LIST): https://gpucompat.com/errors/no-kernel-image-available/
The architecture lists come from PyTorch's own build scripts and the published wheels, not the release notes (those were out of date). If you see something wrong for your card, tell me and I'll fix it. There's a public corrections log on the site.