CUDA ERROR
nvcc fatal: Unsupported gpu architecture
Your nvcc and -arch flag disagree. On CUDA 12.6, sm_30 failed with nvcc's fatal line while deprecated sm_60 still compiled.
Your nvcc and your -arch flag disagree about which GPU architectures exist: either the toolkit dropped your target, or your target postdates the toolkit.
| Kind | Compile-time; no cudaError code |
| Emitted by | nvcc, before any code is compiled |
Note the spacing before you build a log filter: nvcc writes three spaces before the colon in nvcc fatal :. A page or grep that normalises it to one space will not match a paste.
Strings a reader might paste
Measured on this project's own toolchain, from code/errors/_toolchain/evidence/run-2026-09-01.txt, CUDA 12.6 (V12.6.85):
$ nvcc -arch=sm_30 -c hello.cu
nvcc fatal : Value 'sm_30' is not defined for option 'gpu-architecture'
And the same session's counterpoint: nvcc -arch=sm_60 -c hello.cu still exits 0 on 12.6, deprecated but accepted. On CUDA 13.x the sm_60 form fails too, as nvcc fatal : Unsupported gpu architecture 'sm_60', verified on nvcc 13.3.0 via Compiler Explorer (checked 2026-08-29). The other direction, a toolkit older than the card, reads nvcc fatal : Unsupported gpu architecture 'compute_120' and friends; reported at https://github.com/NVIDIA/cuda-samples/issues/367 and https://forums.developer.nvidia.com/t/nvcc-fatal-unsupported-gpu-architecture-compute-86/161424 (both checked 2026-08-29).
Cause 1: your toolkit is newer than the architecture
CUDA 13.0 removed offline compilation below sm_75, so Maxwell, Pascal and Volta targets fail (https://docs.nvidia.com/cuda/archive/13.0.1/cuda-toolkit-release-notes/index.html#deprecated-architectures , checked 2026-08-29). The trap with reach: Kaggle's free default GPU is a P100, which is sm_60, so the default free tier cannot compile CUDA 13 code at all; pick T4 x2 instead (https://www.kaggle.com/docs/efficient-gpu-usage , checked 2026-08-29). Fix: target sm_75 or higher, or install a CUDA 12.x toolkit for the old card, which is exactly what this course's own T4 node runs.
Cause 2: your toolkit is older than the architecture
Building cuda-samples that target Blackwell with a 12.6 toolkit fails on compute_100. Fix: upgrade the toolkit; the samples maintainer's own answer on issue 367 is "To build the latest version of the samples you need to have CUDA Toolkit 12.9 installed."
Cause 3: a Makefile listing every architecture it ever supported
One dead entry fails the whole build even though your card's entry is fine. Fix: delete the dead entries, or drive the list from CMAKE_CUDA_ARCHITECTURES so there is one list.
Confirm it
nvcc --list-gpu-arch
nvcc --version
The first command prints exactly what this toolkit accepts, which answers the question in one line and almost nobody publishes it. Related default worth knowing: with no -arch at all, nvcc 13.x targets sm_75 (https://docs.nvidia.com/cuda/cuda-compiler-driver-nvcc/index.html#gpu-architecture-arch , checked 2026-08-29), while this 12.6 toolkit defaults lower; an omitted flag does not fail here, it fails later, at run time, as error 209.
Prevention
- Pin the architecture list in one place per project and comment which compute capability each entry serves.
- When a build breaks right after a toolkit upgrade, check this page's cause 1 before touching the code.
Related errors
no kernel image is available for execution on the device(209): the run-time version of the same mismatch, measured on this node.invalid device function(98): the per-symbol variant.fatal error: cuda_runtime.h: No such file or directory: the other way a build dies before any CUDA runs.
The lesson
/setup/install-cuda (day 3) owns picking a toolkit that matches your card; day 46 explains what the compute_XX and sm_XX halves of the flag each mean. The full runtime code table is on the error hub.
Written 2026-09-01. Transcript from code/errors/_toolchain/evidence/run-2026-09-01.txt, captured 2026-09-01 with CUDA 12.6 (V12.6.85) via micromamba, host g++ 13. Author and reviewer: not yet assigned; this page does not publish until both are named.