DEBUG记录 RuntimeError: cuDNN version incompatibility

错误现象

执行pytorch代码时遭遇如下报错

  File "/home/guozhi/miniconda3/envs/torch_env/lib/python3.9/site-packages/torch/backends/cudnn/__init__.py", line 58, in _init
    raise RuntimeError(
RuntimeError: cuDNN version incompatibility: PyTorch was compiled  against (8, 9, 2) but found runtime version (8, 8, 0). PyTorch already comes bundled with cuDNN. One option to resolving this error is to ensure PyTorch can find the bundled cuDNN. Looks like your LD_LIBRARY_PATH contains incompatible version of cudnn. Please either remove it from the path or install cudnn (8, 9, 2)

错误分析

根据报错提示,产生错误的原因为cudnn的版本与pytorch的版本不一致。
具体可能由两个问题导致:
1. 缺少正确版本的cudnn
2. 已经安装的正确版本的cudnn,但是pytorch无法找到

错误解决

根据对错误原因的分析,解决方法是显而易见的,包括
1. 直接重新安装pytorch+cuda
2. 安装/升级cudnn
3. 降低pytorch版本
4. 调整环境变量

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值