cuda
compatibility_error
ai_generated
true
RuntimeError: CUDA error: no kernel image is available for execution on the device
ID: cuda/cuda-capability-error
88%Fix Rate
90%Confidence
50Evidence
2023-01-01First Seen
Version Compatibility
| Version | Status | Introduced | Deprecated | Notes |
|---|---|---|---|---|
| 12 | active | — | — | — |
Root Cause
PyTorch/binary compiled for different GPU architecture. Need build matching your GPU compute capability.
genericWorkarounds
-
95% success Install PyTorch with correct CUDA version for your GPU: check pytorch.org/get-started
pip install torch --index-url https://download.pytorch.org/whl/cu121
-
80% success Build from source with your GPU's compute capability: TORCH_CUDA_ARCH_LIST='8.9'
TORCH_CUDA_ARCH_LIST='8.9'
Dead Ends
Common approaches that don't work:
-
Install older CUDA toolkit
70% fail
CUDA toolkit version is separate from compute capability
-
Set CUDA_VISIBLE_DEVICES to a different GPU
65% fail
If all GPUs are same architecture, this won't help
Error Chain
Frequently confused with: