Pytorch 英伟达40系显卡换50系显卡报错:CUDA capability sm_120 is not compatible with the current PyTorch installation
问题描述:
NVIDIA GeForce RTX 5080 with CUDA capability sm_120 is not compatible with the current PyTorch installation
大概原因:
之前安装的Pytorch版本太旧了,跟CUDA版本不一致,50系显卡建议必须安装CUDA 12.8版本(低于此版本会报错)
解决方案:
安装支持CUDA 12.8及以上版本的PyTorch预览版或最新稳定版
建议同步安装对应版本的cuDNN库
查看电脑安装的CUDA版本
电脑安装的是最新驱动,CUDA版本13.0

编辑
1、卸载系统原有PyTorch版本,或者创建新的虚拟环境
pip uninstall torchaudio torch2、访问Pytorch官网

https://pytorch.org/get-started/locally/

编辑3、执行以下命令安装
pip install torch torchvision --index-url https://download.pytorch.org/whl/cu126其他建议:
创建新的虚拟环境避免与旧CUDA版本冲突
推荐Python 3.10+/3.11环境
Pytorch 英伟达40系显卡换50系显卡报错:CUDA capability sm_120 is not compatible with the current PyTorch installation
https://www.devpilot.cloud/archives/pytorch-ying-wei-da-40xi-xian-qia-huan-50xi-xian-qia-bao-cuo-cuda-capability-sm_120-is-not-compatible-with-the-current-pytorch-installation-425LzA63
评论