Skip to content
Timothy Overton
Go back

Getting PyTorch running on an RTX 5070 Ti (sm_120)

TechAlso on Substack ↗

In August 2025, for an after-hours project, I got my hands on a laptop with an NVIDIA GeForce RTX 5070 Ti, one of the first Blackwell GPUs. It’s a lovely piece of hardware for local machine learning: 12 GB of GDDR7 and 8,960 CUDA cores in a laptop. The first time I tried to train a model on it, PyTorch refused to use it.

I wrote up the fix in a small GitHub repo, NVIDIA-GeForce-RTX-5070-Ti-Laptop-GPU-sm_120-py-support. It quietly became my most popular repo, because a lot of people were hitting exactly the same wall at the same time. This post is the story behind it.

The error

Every NVIDIA GPU has a compute capability, a version number for the instruction set its kernels are compiled for. Blackwell consumer cards (RTX 5070 Ti, 5080, 5090) introduced sm_120. PyTorch ships precompiled CUDA kernels for a fixed list of architectures, and at the time the standard builds simply didn’t include it:

NVIDIA GeForce RTX 5070 Ti with CUDA capability sm_120 is not compatible with the current PyTorch installation.
The current PyTorch install supports CUDA capabilities sm_50 sm_60 sm_61 sm_70 sm_75 sm_80 sm_86 sm_90.

torch.cuda.is_available() would happily return True, the GPU name would print correctly, and then the first real operation would fail. That’s a confusing combination when you’re new to it.

What didn’t work

I tried the obvious things first:

The key thing to understand is that the PyTorch wheel brings its own CUDA runtime. Your local toolkit version mostly doesn’t matter; what matters is which CUDA version the wheel was built against.

The fix: the cu128 build

After a fair bit of digging through PyTorch forum threads and GitHub issues (ComfyUI and the Stable Diffusion web UI had plenty of people with the same card), the answer turned out to be simple. Blackwell support arrived with CUDA 12.8, so you need a PyTorch build compiled against it: the cu128 wheels. The cu124 and cu121 builds will never work on this card, however new they are.

At the time that meant the nightly channel:

Install PyTorch built for CUDA 12.8
pip uninstall torch torchvision -y
pip install --pre torch torchvision --index-url https://download.pytorch.org/whl/nightly/cu128

It’s a big download (around 3 GB), so go and make a coffee.

Update: that was August 2025. Stable PyTorch releases now ship cu128 (and newer) builds with Blackwell support, so these days you can drop --pre and nightly/ and use the stable index for your CUDA version. The rule still holds: pick a build for CUDA 12.8 or later.

Checking it actually works

is_available() isn’t proof, as I found out. Run a real operation on the GPU:

check_gpu.py
import torch
print("PyTorch:", torch.__version__)
print("CUDA build:", torch.version.cuda)
print("Available:", torch.cuda.is_available())
print("Device:", torch.cuda.get_device_name(0))
print("Capability:", torch.cuda.get_device_capability(0))
# The real test: this fails on a build without sm_120 kernels
x = torch.randn(4096, 4096, device="cuda")
y = x @ x
torch.cuda.synchronize()
print("Matmul OK, memory used:", torch.cuda.memory_allocated() // 2**20, "MB")

On the laptop that printed CUDA 12.8, capability (12, 0), and a completed matrix multiply. The repo also includes a slightly bigger test that trains a small transformer model for a few epochs and checks the loss goes down, plus a tiny standalone CUDA C program (test_cuda_sm120.cu) for checking the toolkit side with nvcc.

Why I published it

None of this was secret. The pieces were scattered across a dozen forum threads, each with a slightly different half-answer, and several of them were Linux-only. What was missing was one page that said: here’s the error, here’s why, here’s the one command, here’s how to prove it worked. So I wrote that page.

A few takeaways that apply well beyond this one card:

  1. New hardware is ahead of the software. If you buy a GPU in its first few months, expect to be on preview builds for a while.
  2. Read the error literally. The message listed exactly which architectures the build supported. Once you know what sm_ means, the problem is obvious.
  3. The wheel’s CUDA version is what counts, not the toolkit you installed.
  4. Write it down. A short README with the exact error text is easy to find in search and saves the next person an evening. It’s also how this blog started.

The full guide, test scripts and references are on GitHub: Timothyoverton/NVIDIA-GeForce-RTX-5070-Ti-Laptop-GPU-sm_120-py-support.


Share this post:

Previous Post
Hello world: why I'm writing this blog