# RuntimeError: CUDA error: CUBLAS_STATUS_ARCH_MISMATCH when calling cublasSgemm

- **ID:** `cuda/cublas-api-not-found`
- **Domain:** cuda
- **Category:** runtime_error
- **Error Code:** `CUBLAS_STATUS_ARCH_MISMATCH`
- **Verification:** ai_generated
- **Fix Rate:** 82%

## Root Cause

The GPU's compute capability is too low for the cuBLAS kernel being invoked, typically because the code was compiled for sm_80+ but the GPU only supports sm_70 or earlier.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| CUDA 11.8 | active | — | — |
| cuBLAS 11.11 | active | — | — |
| PyTorch 2.0.1 | active | — | — |
| NVIDIA Driver 525.85.05 | active | — | — |

## Workarounds

1. **export CUBLAS_WORKSPACE_CONFIG=":4096:8" && python your_script.py** (70% success)
   ```
   export CUBLAS_WORKSPACE_CONFIG=":4096:8" && python your_script.py
   ```
2. **export TORCH_CUDA_ARCH_LIST='7.0;7.5' && pip install --no-cache-dir torch --verbose** (85% success)
   ```
   export TORCH_CUDA_ARCH_LIST='7.0;7.5' && pip install --no-cache-dir torch --verbose
   ```

## Dead Ends

- **** — Reinstallation does not change the GPU hardware or the compiled architecture targets; the mismatch persists. (90% fail)
- **** — Driver updates do not alter cuBLAS library architecture requirements; the kernel still expects a higher compute capability. (85% fail)
