npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

torch-cuda-compat

v0.1.0

Published

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

Readme

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(), data | the 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.