PyTorch 不支持旧GPU的异常状态与解决方案:CUDNN_STATUS_NOT_SUPPORTED_ARCH_MISMATCH

问题

d:\anaconda3\envs***\lib\site-packages\torch\cuda_init _.py:262: UserWarning:
Found GPU0 GeForce GT 710 which is of cuda capability 3.5.
PyTorch no longer supports this GPU because it is too old.
The minimum cuda capability supported by this library is 3.7.

warnings.warn(

RuntimeError Traceback (most recent call last)

Cell In[3], line 906

(...)

--> 906 model = RnnNet().to(device)

907 # model = ResNet().to(device)

908 # model = SelfAttentionNet().to(device)

909 # model = TransformerNet().to(device)

(...)

RuntimeError: cuDNN error: CUDNN_STATUS_NOT_SUPPORTED_ARCH_MISMATCH
Output is truncated. View as a scrollable element or open in a text editor. Adjust cell output settings...

解决方案

你遇到的错误说明你的 GPU(NVIDIA GeForce GT 710, CUDA 3.5过旧不再被 PyTorch 支持。下面是详细解释与解决方案:


❌ 报错核心含义

text 复制代码
UserWarning:
Found GPU0 GeForce GT 710 which is of cuda capability 3.5.
PyTorch no longer supports this GPU because it is too old.
The minimum cuda capability supported by this library is 3.7.

并最终导致:

text 复制代码
RuntimeError: cuDNN error: CUDNN_STATUS_NOT_SUPPORTED_ARCH_MISMATCH

✅ 解决方案(推荐方案)

方法一:强制使用 CPU

因为你的 GPU 不再被支持,所以最直接的办法是切换到 CPU 运算,代码中这样写:

python 复制代码
device = torch.device("cpu")  # 强制使用 CPU

model = RnnNet().to(device)

并确保 所有张量也使用 CPU,例如:

python 复制代码
x = x.to(device)
y = y.to(device)

方法二:升级 GPU(如考虑 10 系列以上)

  • 推荐 CUDA Compute Capability ≥ 3.7 的 GPU,比如:
    • GTX 1050 / 1060 / 1660
    • RTX 系列
    • 或笔记本中的 MX450、RTX 2050 等
  • 当前你的 GT 710(CC 3.5)已停止支持,不能再用于当前 PyTorch 版本中的 GPU 运算。

方法三(不推荐):安装旧版 PyTorch

可尝试安装支持 CUDA 3.5 的旧版本 PyTorch,例如:

bash 复制代码
pip install torch==1.7.1+cu101 -f https://download.pytorch.org/whl/torch_stable.html

⚠️ 不推荐:旧版本可能兼容问题多、安全性差。


✅ 建议的代码示例(改为 CPU 模式)

python 复制代码
device = torch.device("cpu")

model = RnnNet().to(device)

# 推理/训练时,张量也应在 CPU 上
for batch_x, batch_y in train_loader:
    batch_x, batch_y = batch_x.to(device), batch_y.to(device)
    output = model(batch_x)

相关推荐
飞机火车巴雷特29 分钟前
【论文阅读】LightThinker: Thinking Step-by-Step Compression (EMNLP 2025)
论文阅读·人工智能·大模型·cot
张较瘦_32 分钟前
[论文阅读] 人工智能 + 软件工程 | ReCode:解决LLM代码修复“贵又慢”!细粒度检索+真实基准让修复准确率飙升
论文阅读·人工智能·软件工程
极客小张35 分钟前
【项目思路】基于STM32+ZigBee的智能家居--浴室场景设计
c语言·python·stm32·智能家居·课程设计·项目设计·企业项目
万岳科技程序员小金2 小时前
餐饮、跑腿、零售多场景下的同城外卖系统源码扩展方案
人工智能·小程序·软件开发·app开发·同城外卖系统源码·外卖小程序·外卖app开发
桐果云3 小时前
解锁桐果云零代码数据平台能力矩阵——赋能零售行业数字化转型新动能
大数据·人工智能·矩阵·数据挖掘·数据分析·零售
二向箔reverse4 小时前
深度学习中的学习率优化策略详解
人工智能·深度学习·学习
幂简集成4 小时前
基于 GPT-OSS 的在线编程课 AI 助教追问式对话 API 开发全记录
人工智能·gpt·gpt-oss
AI浩4 小时前
【面试题】介绍一下BERT和GPT的训练方式区别?
人工智能·gpt·bert
Ronin-Lotus5 小时前
深度学习篇---SENet网络结构
人工智能·深度学习
n12352355 小时前
AI IDE+AI 辅助编程,真能让程序员 “告别 996” 吗?
ide·人工智能