# CUDA error: no kernel image is available for execution on the device (cudaErrorNoKernelImageAvailable)

- **ID:** `cuda/device-incompatible-cubin`
- **Domain:** cuda
- **Category:** build_error
- **Error Code:** `cudaErrorNoKernelImageAvailable`
- **Verification:** ai_generated
- **Fix Rate:** 90%

## Root Cause

The compiled CUDA binary (cubin) was generated for a different GPU architecture than the one currently in use, e.g., sm_80 vs sm_86.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| CUDA 12.0 | active | — | — |
| PyTorch 2.0.0 | active | — | — |
| NVIDIA A100 (sm_80) | active | — | — |

## Workarounds

1. **Recompile the kernel with the correct architecture. For PyTorch, set environment variable `TORCH_CUDA_ARCH_LIST='8.6'` for Ampere GPUs. For custom CUDA code, compile with `-arch=sm_86`.** (90% success)
   ```
   Recompile the kernel with the correct architecture. For PyTorch, set environment variable `TORCH_CUDA_ARCH_LIST='8.6'` for Ampere GPUs. For custom CUDA code, compile with `-arch=sm_86`.
   ```

## Dead Ends

- **** — The issue is architecture-specific, not CUDA version. (80% fail)
- **** — Caching only affects runtime memory, not compiled code. (95% fail)
