PyTorch support for sm_120: NVIDIA GeForce RTX 5060

Issue: PyTorch not supporting CUDA compute capability 12.0 (sm_120), required for the NVIDIA GeForce RTX 5060.

Goal: I want to use my RTX 5060 GPU with PyTorch in a local development setup (translation model fine-tuning and semantic search). I’m willing to test nightlies or custom builds.

System Info:

  • GPU: NVIDIA GeForce RTX 5060 (sm_120)
  • OS: [Windows 11 with Ubuntu 24.04 under WSL2]
  • Python: 3.10.x
  • CUDA Toolkit: 12.1 / 12.6
  • Driver: 550.x / 576.x
  • PyTorch tried: 2.3.1+cu121 and 2.8.0.dev20250618+cu128

Symptoms:

  • torch.cuda.is_available() = True
  • But tensor operations raise:
    RuntimeError: CUDA error: no kernel image is available for execution on the device

Request:
Solution or workaround?

Thanks!

What kind of tensor operations and what does torch.randn(1).cuda() return?

Here’s what happens when I run torch.randn(1).cuda() on my setup:

>>> import torch
>>> print(torch.__version__)
2.5.1+cu121
>>> print(torch.cuda.is_available())
True
>>> x = torch.randn(1).cuda()

And here’s the error I get:

RuntimeError: CUDA error: no kernel image is available for execution on the device
CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.

I also tried printing the tensor:

>>> x = torch.randn(1).cuda()
>>> print(x)

Which triggers the same no kernel image is available error.

My GPU is an RTX 5060, which has Compute Capability 12.0 (sm_120), and it looks like PyTorch 2.5.1+cu121 does not yet include compiled kernels for sm_120.

You are using an old PyTorch binary (version 2.5.1) with CUDA 12.1 instead of the latest stable release (version 2.7.1) with CUDA 12.8 as required.

This is true since PyTorch 2.5.1 as well as CUDA 12.1 were released before the Blackwell launch and thus do not support future Hardware.

1 Like

Can you confirm a specific nightly build of PyTorch that includes working sm_120 support?
Does torch.compile() or inference-only code work reliably yet on sm_120, or are even basic ops unstable?

All of out nightly and stable builds with CUDA 12.8 support Blackwell GPUs, so just install any binary with CUDA 12.8 runtime dependencies by selecting the install command from our install matrix.

1 Like

works with this link → pip install --pre torchvision torchaudio --index-url https://download.pytorch.org/whl/nightly/cu128

But i have not been able to install a llama ccp that works using the gpu.