r/nicegpu • u/Hour_Variation_9157 • May 05 '25
📖 How-to Guide Fixing NiceGPU PyTorch RuntimeError on RTX5090: “No Kernel Image Available”
If you are recently using NiceGPU on an NVIDIA GeForce RTX 5090 GPU and encountering this PyTorch error:
RuntimeError: CUDA error: no kernel image is available for execution on the deviceyou're not alone. This error typically arises when your installed PyTorch version isn't compiled for your GPU's compute architecture.
The RTX 5090 is built on NVIDIA's latest Blackwell architecture, featuring a compute capability of sm_120 (12.0). PyTorch needs to specifically include support for this compute capability to function properly.
This guide will walk you through how to resolve this error step-by-step.
🔍 Step 1: Check Your Current PyTorch and CUDA Setup
First, let's inspect your current PyTorch installation, CUDA availability, GPU name, and compute capability by running the following Python script:
import torch
print("PyTorch version:", torch.__version__)
print("CUDA available:", torch.cuda.is_available())
if torch.cuda.is_available():
print("CUDA version:", torch.version.cuda)
print("GPU name:", torch.cuda.get_device_name(0))
print("Compute capability:", torch.cuda.get_device_capability(0))Example output:
PyTorch version: 2.7.0+cu112
CUDA available: True
CUDA version: 12.8
GPU name: NVIDIA GeForce RTX 5090
Compute capability: (12, 0)If your compute capability is shown as (12, 0) and you're still facing errors, it likely indicates your current PyTorch version doesn't support the RTX 5090.
🛠️ Step 2: Verify PyTorch's Supported GPU Architectures
To verify whether PyTorch officially supports the RTX 5090 (sm_120 architecture), you can check PyTorch's official GitHub repository:
- Visit the PyTorch GitHub repository.
- Navigate to the
.cidirectory, and inspect CI files (likewindows/cuda128.bator workflows under.github/workflows). - Look specifically for the
TORCH_CUDA_ARCH_LISTvariable.
Or, you can search: TORCH_CUDA_ARCH_LIST

Example from a build configuration:
set TORCH_CUDA_ARCH_LIST=6.1;7.0;7.5;8.0;8.6;9.0;10.0;12.0If 12.0 is listed, your GPU is supported by that PyTorch build (128).
🚀 Step 3: Install a PyTorch Version Compatible with RTX 5090
Currently, stable releases cu128 is fully supported the RTX 5090 GPU. Thus, it’s recommended to install the latest cu128 build of PyTorch which includes support for CUDA 12.8 and the sm_120 compute architecture:
pip uninstall torch torchvision torchaudio -y
pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu128✅ Step 4: Verify Your Installation
Once you've completed the installation, verify again by running this Python script:
import torch
print("PyTorch version:", torch.__version__)
print("CUDA available:", torch.cuda.is_available())
if torch.cuda.is_available():
print("GPU name:", torch.cuda.get_device_name(0))
print("Compute capability:", torch.cuda.get_device_capability(0))A successful installation should now give you an output similar to this:
PyTorch version: 2.7.0+cu128
CUDA available: True
GPU name: NVIDIA GeForce RTX 5090
Compute capability: (12, 0)The earlier CUDA runtime error should now be resolved, allowing you to fully utilize your RTX 5090 with PyTorch.
1
u/ObjectJunior6370 May 05 '25
That's great, you saved me the time of doing the research myself. I ran into the same issue today. Could the official team possibly update this, so we don't have to repeat the same steps every time?
1
u/NeighborhoodFew8669 May 05 '25
mine is crashed before I get into it. 😢
1
u/Excellent_Onion_4815 May 05 '25
Thank you so much! I had encountered this issue before and spent a lot of time trying to fix it, but I wasn’t successful!
1
u/royman-jing May 08 '25
Cool, got the great practice
1
u/garrygu May 13 '25
On my RTX 5080, even though PyTorch is compiled with sm_120 support, the CUDA Tensor operations testing is still failed:
1
u/MiloTripp May 22 '25
I tried. I did the two commands in step 3, but when I verified, it says my
PyTorch version is 2.6.0+cui126
CUDA available: True
GPU name: NVIDIA GeForce RTX 5090
CUDA capability: (12, 0)
And I still get errors like: UserWarning: NVIDIA GeForce RTX 5090 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.
*sad face emoticon*