New:Microsoft Teams Notifications Are Now Available in Socket.Learn more →
Get Started

torch-cuda-compat

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

torch-cuda-compat

Which PyTorch wheel runs on which NVIDIA GPU, with the vendor's own words as evidence

latest
npmnpm
Version
0.1.0
Version published
Weekly downloads
24
-85.45%
Maintainers
1
Weekly downloads
 
Created
Source

torch-cuda-compat

Tells you which PyTorch wheel runs on a given NVIDIA GPU, and shows you the line on NVIDIA's or PyTorch's own page that says so.

$ npx 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
const { resolve } = require('torch-cuda-compat');

const 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'
r.recommended.evidence[0].quote;           // 'TORCH_CUDA_ARCH_LIST="7.5;8.0;8.6;9.0;10.0;12.0+PTX"'

Ships TypeScript declarations. npm install torch-cuda-compat.

The thing this gets right

A PyTorch wheel only runs on a GPU whose compute capability was compiled into it, and that list is not the same as "CUDA supports this card". An RTX 5090 is compute capability 12.0; the cu126 build of PyTorch 2.7 was compiled for 5.0 through 9.0. It installs perfectly and then dies at the first kernel launch. cu128 was compiled for 12.0 and works.

Three rules decide it, and all three are applied here:

  • Compiled in. The wheel's TORCH_CUDA_ARCH_LIST names 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 — the case a hand-written table usually gets wrong. It does not cross a major: an sm_100 cubin (data-centre Blackwell, a B200) does not run on an sm_120 card (consumer Blackwell, a 5090), even though both are called Blackwell.
  • +PTX. An architecture marked +PTX ships as JIT source too, 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, runs is null — not known, rather than no.

Every value cites its source

const r = resolve('RTX 4090', '2.6');

r.gpuEvidence.source;
// 'https://developer.nvidia.com/cuda/gpus'
r.gpuEvidence.quote;                       // the row the 8.9 was read out of
// '8.9 | NVIDIA L4 NVIDIA L40 NVIDIA L40S | ... GeForce RTX 4090'
r.recommended.evidence.map((e) => e.source);
// ['.../pytorch/release/2.6/.ci/manywheel/build_cuda.sh',
//  'https://docs.nvidia.com/cuda/cuda-toolkit-release-notes/index.html']

That is the point of the package. The values come from NVIDIA's CUDA GPU list, NVIDIA's CUDA Toolkit release notes and PyTorch's RELEASE.md and per-release build scripts, and each one carries the URL and the verbatim quote it was read from, so you can check it instead of trusting it. Nothing here is a value 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. About 300 KB of JSON, no dependencies, and no network access at runtime.

API

resolve(gpu, torch)the answer: every CUDA build of that release, each with runs, why and its evidence, plus recommended
computeCapability(gpu)the GPU table entry; throws GPUNotFound rather than guessing
architectures(pairing)the compute capabilities a build was compiled for
gpus(), pairings(), datathe shipped dataset

GPU names are matched leniently: "RTX 5090", "rtx-5090" and the "NVIDIA GeForce RTX 5090" that torch.cuda.get_device_name() returns all find the same card. An ambiguous name throws and lists the candidates instead of picking one.

Data and licence

Browse the dataset, one page per record, at https://referencesource.org/gpu-cuda-pytorch-compatibility/.

The compilation is CC0-1.0. The underlying facts come from PyTorch (BSD-3-Clause) and NVIDIA's technical documentation; each value cites its source, and short attributed quotes are all that is reproduced.

A Python package shipping the identical data is on PyPI as torch-cuda-compat.

Keywords

pytorch

FAQs

Package last updated on 20 Sep 2026

Related posts