CUDA sm80 explained: which GPUs it covers, how to compile for it, and how to fix "no kernel image is available"
The sm80 build target for NVIDIA's Ampere-generation GPUs is drawing fresh attention as developers hit compatibility errors and tune AI workloads.
sm80 is the CUDA compile target for GPUs with compute capability 8.0. In practice that means two NVIDIA data-centre cards: the A100 and the A30. It does not cover the RTX 3090, 3080, 3070 or 3060, which are also Ampere but use compute capability 8.6, so their target is sm86. Most sm80 problems come from that one mix-up: code built for sm80 alone will not run on an RTX 30-series card, and you get the error "no kernel image is available for execution on the device".
This guide gives the GPU table, the exact flags for nvcc, PyTorch and CMake, and the fix for the error.
Which GPU is which target
"sm" stands for streaming multiprocessor, and the number is the compute capability with the dot removed. Compute capability 8.0 becomes sm80 (written sm_80 in flags).
GPU | Compute capability | Target |
|---|---|---|
A100, A30 | 8.0 | sm_80 |
A10, A40, A2, A16, RTX A6000 | 8.6 | sm_86 |
RTX 3090, 3080, 3070, 3060 | 8.6 | sm_86 |
Jetson AGX Orin | 8.7 | sm_87 |
L4, L40, RTX 4090 (Ada) | 8.9 | sm_89 |
H100 (Hopper) | 9.0 | sm_90 |
B200 (Blackwell) | 10.0 | sm_100 |
To find your card's number, run:nvidia-smi --query-gpu=name,compute_cap --format=csv
If your driver is too old for that query, the full list is on NVIDIA's CUDA GPUs page (linked below).
What you need
CUDA 11.0 or later. Ampere support arrived in CUDA 11.0; earlier toolkits cannot produce sm80 code.
A driver that supports your toolkit. A "CUDA driver version is insufficient" error means the driver, not the compiler, is the problem.
How to compile for sm80
nvcc, directly:
nvcc -gencode arch=compute_80,code=sm_80 -gencode arch=compute_80,code=compute_80 kernel.cu -o kernel
The first -gencode builds a binary for A100-class cards. The second embeds PTX (portable intermediate code) for compute 8.0, so newer GPUs such as the H100 can compile it at run time instead of failing.
PyTorch extensions:export TORCH_CUDA_ARCH_LIST="8.0;8.6"
pip install . --no-build-isolation
List every architecture you will run on. "8.0;8.6" covers A100 and RTX 30-series. Add +PTX to the last entry ("8.0;8.6+PTX") for forward compatibility.
CMake (3.18 or later):
cmake -DCMAKE_CUDA_ARCHITECTURES="80;86" ..
Fixing "no kernel image is available for execution on the device"
This error means the binary you are running contains no code for the GPU in the machine. It is a build problem, not a hardware fault.
Check the GPU's compute capability with the
nvidia-smicommand above.Check what the binary was built for:
cuobjdump --list-elf your_binaryshows thesm_targets inside it.If your GPU's target is missing, rebuild with it added, or with PTX for an older architecture so the driver can JIT-compile.
For pip-installed libraries, pick a wheel built for your CUDA version, or build from source with
TORCH_CUDA_ARCH_LISTset.
Two related mistakes that look the same:
Building for
sm_86and running on an A100 fails, because 8.0 is older than 8.6. Binaries do not run backwards.Building for
sm_80and running on an RTX 3090 fails unless PTX is embedded, because 8.6 is a different binary target even though it is newer.
Why builds with many targets are slow
Each -gencode entry compiles every kernel again. A list of six architectures takes roughly six times as long. For development, build only for the card on your desk. For release, build for the cards your users have and add one PTX entry rather than every architecture NVIDIA has shipped.
Cloud GPUs
On AWS, Azure and GCP, A100 instances are sm80 and A10-class instances (such as AWS g5) are sm86. Pin the instance type in your deployment config so a cheaper substitute doesn't silently change the target under you.
FAQ
Does sm80 code run on an RTX 3090? Not as a plain binary. The 3090 is compute capability 8.6. Either add sm_86 to the build, or embed compute_80 PTX so the driver can compile it for 8.6 at run time.
Does sm80 code run on an H100? Only if PTX is embedded. The H100 is 9.0 and will JIT-compile compute_80 PTX, with a start-up delay the first time. For full performance, build for sm_90 as well.
What is the difference between sm_80 and compute_80? sm_80 is a finished binary for 8.0 hardware. compute_80 is PTX, an intermediate form that any 8.0-or-newer GPU can compile when the program starts.
Which CUDA version do I need for sm80? CUDA 11.0 or later.
My build has the right target but still fails. What else? Check that the driver supports your CUDA toolkit version, and that the Python wheel you installed was built for the same CUDA major version as your system.