# 运行时错误：当前设备架构不支持张量核心（计算能力 < 7.0）

- **ID:** `cuda/tensor-core-unsupported-arch`
- **领域:** cuda
- **类别:** type_error
- **错误码:** `CUDNN_STATUS_ARCH_MISMATCH`
- **验证级别:** ai_generated
- **修复率:** 90%

## 根因

GPU 计算能力低于 7.0（Volta），这是张量核心操作（如使用 float16 或 bfloat16 的混合精度训练）所必需的。

## 版本兼容性

| 版本 | 状态 | 引入 | 弃用 |
|------|------|------|------|
| CUDA 11.0 | active | — | — |
| CUDA 12.1 | active | — | — |
| CUDA 12.4 | active | — | — |

## 解决方案

1. ```
   Disable Tensor Core usage by setting torch.backends.cuda.matmul.allow_tf32 = False and torch.backends.cudnn.allow_tf32 = False, and use float32 precision instead of float16. For example: model.half() should be replaced with model.float(); and in training, use torch.amp.autocast(device_type='cuda', enabled=False).
   ```
2. ```
   If Tensor Cores are essential, migrate to a GPU with compute capability >= 7.0 (e.g., Tesla V100, RTX 20 series, or newer). Check your GPU's compute capability at https://developer.nvidia.com/cuda-gpus.
   ```

## 无效尝试

- **** — Upgrading the CUDA toolkit does not add Tensor Core support to older GPU architectures. (90% 失败率)
- **** — Setting environment variable CUDA_LAUNCH_BLOCKING=1 does not enable Tensor Cores; it only serializes kernel launches. (80% 失败率)
