torch-cuda-compat — will this PyTorch wheel actually run on this GPU?
An RTX 5090 is compute capability 12.0. PyTorch 2.7's cu126 build was compiled for 5.0 through 9.0. It installs perfectly and then dies at the first kernel launch.
$ pip install torch-cuda-compat
$ torch-cuda-compat "RTX 5090" 2.7
GeForce RTX 5090 — compute capability 12.0
PyTorch 2.7
no CUDA 11.8 this build stops at compute capability 9.0; the card is
12.0, so the wheel installs and then fails at the first
kernel launch
no CUDA 12.6 this build stops at compute capability 9.0; the card is
12.0, so the wheel installs and then fails at the first
kernel launch
YES CUDA 12.8 compute capability 12.0 is compiled into this build
pip install torch --index-url https://download.pytorch.org/whl/cu128
needs an NVIDIA driver >= 525
The same package is on npm, and prints byte-identical output:
$ npx torch-cuda-compat "RTX 5090" 2.7
Install
| PyPI | pip install torch-cuda-compat — Python 3.8+ |
| npm | npm install torch-cuda-compat — Node 14+ |
| Licence | CC0-1.0 — public domain, no attribution required |
| Dependencies | none, in either language |
| Network at runtime | none; the data ships inside the package |
As a library
>>> from torch_cuda_compat import resolve
>>> r = resolve("RTX 5090", "2.7")
>>> r["recommended"]["cuda"]
'12.8'
>>> r["recommended"]["install"]
'pip install torch --index-url https://download.pytorch.org/whl/cu128'
The three rules it applies
Most hand-written compatibility tables get at least one of these wrong.
- Compiled in. The wheel's
TORCH_CUDA_ARCH_LISTnames the card's compute capability outright. - Binary compatibility. A cubin runs on any later minor revision of the same major architecture. This is why
cu126, compiled for 8.0 and 8.6 and never mentioning 8.9, runs fine on an RTX 4090. It does not cross a major version: an sm_100 cubin (a data-centre B200) will not run on an sm_120 card (a consumer 5090), even though NVIDIA calls both Blackwell. +PTX. An architecture marked+PTXships as JIT source as well, so the driver compiles it at first launch for any newer card. It works, after a pause the first time.
Where no source states which architectures a build was compiled for, the answer is None — *not known*, rather than *no*. Eighteen of the older pairings (PyTorch 1.12 to 2.5) are in that state and say so.
Every value cites the page it came from
>>> r = resolve("RTX 4090", "2.6")
>>> r["gpu_evidence"]["source"]
'https://developer.nvidia.com/cuda/gpus'
>>> r["gpu_evidence"]["quote"]
'8.9 | NVIDIA L4 NVIDIA L40 NVIDIA L40S | ... GeForce RTX 4090'
The values are read from NVIDIA's CUDA GPU list, NVIDIA's CUDA Toolkit release notes, and PyTorch's RELEASE.md and per-release build scripts. Each one carries the URL and the verbatim quote it was read from, so you can check it rather than trust it. Nothing in the package is a number somebody typed out from memory.
What is in it
441 NVIDIA GPUs with their compute capability, and 45 (PyTorch release, CUDA build) pairings covering PyTorch 1.12 through 2.14 and CUDA 11.3 through 13.2 — each with the Python versions, the cuDNN version, the wheel index URL, the compiled architecture list and the minimum NVIDIA driver.
The two implementations were cross-checked against each other over all 7,497 (GPU × PyTorch release) combinations, with zero disagreements.
The data on its own
The pairings are published as a browsable dataset, and as JSON and CSV you can fetch without installing anything:
- PyTorch release, CUDA build and NVIDIA driver pairings — 45 records, each with its sources and quotes
- NVIDIA compute capability by GPU — the 441-card table
/gpu-cuda-pytorch-compatibility/data.jsonanddata.csv
Nobody else publishes this join. PyTorch's release notes state the CUDA builds but not the driver floor; NVIDIA's release notes state the driver floor but say nothing about PyTorch; and the compiled architecture list exists only inside PyTorch's own build script.
Known gaps
Stated here rather than discovered later:
- Whether a pairing is *stable* or *experimental* is carried on NVIDIA's page by column position, and no sentence on the page states it, so it is not published.
min_driver_familyand the two toolkit-driver fields take their column from position in the same way. The field labels and the source link are the mitigation.- The 18 pairings with no architecture source report *not known*, and are not guessed.