解决win10下CuDNN报错:Loaded runtime CuDNN library: 7.5.0 but source was compiled with:

解决win10下CuDNN报错:Loaded runtime CuDNN library: 7.5.0 but source was compiled with:

背景描述

CUDNN的正确调用,关系着系统能否正常运行。
本人在Eclipse上有个工程项目,一直运转良好,今天突发情况,开始报错。“Loaded runtime CuDNN library: 7.5.0 but source was compiled with: 7.6.0”

网上关于这个问题的帖子有几个,但是都没能解决我的问题。后自行研究,并将其解决。为了帮助更多人避过此坑,故有此文

关联问题

如果你第一次面对该问题,可以先参考如下帖子。如果能解决最好,如果解决不了,可以继续看下面的内容

https://blog.csdn.net/caicaiyunyun/article/details/105334923
https://blog.csdn.net/weixin_48624971/article/details/107652341
https://stackoverflow.com/questions/61039316/loaded-runtime-cudnn-library-7-1-2-but-source-was-compiled-with-7-6-0-ubuntu

新的解决方案:思路分析

1、确实下载了正确版本(7.6以上)的CUDNN
2、确实覆盖了正确的位置C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.0
3、确实更新了环境变量4条(4件套)
4、确实被报错了:“Loaded runtime CuDNN library: 7.5.0”,后边的信息与TF或是其他组件版本有关(可能不同)

新的解决方案:依赖级别查找

提问:Anaconda中的其他开发包中,是否也包括了Cudnn文件呢?
经过研究发现,却有开发包中包含了Cudnn文件,以本项目为例,MXNET、PyTorch中都有cudnn64_7.dll文件。(接近400M的东西多次重复出现,真是令人始料未及)
而这些文件的调用顺序,有可能优先于环境变量中指示的文件。

新的解决方案:解决思路

发现了如上现象,不可不作为。
MXNET与Pytorch中,都还有该文件(重要者?悲哀者?)
其属性如下(主要关注产品名称的版本号)
在这里插入图片描述
而我们从NV下载的新鲜文件,属性是这样的
在这里插入图片描述

新的解决方案:找到头绪,胆大心细,开干

将属性不同的入侵者全都重命名、备份,然后替换。
重新跑起咱们的项目,问题解决!

成功的一瞬间:开心

pciBusID: 0000:01:00.0 name: GeForce RTX 2080 Ti computeCapability: 7.5
coreClock: 1.635GHz coreCount: 68 deviceMemorySize: 11.00GiB deviceMemoryBandwidth: 573.69GiB/s
2020-08-27 15:33:18.479565: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library cudart64_101.dll
2020-08-27 15:33:18.479717: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library cublas64_10.dll
2020-08-27 15:33:18.479869: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library cufft64_10.dll
2020-08-27 15:33:18.480014: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library curand64_10.dll
2020-08-27 15:33:18.480194: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library cusolver64_10.dll
2020-08-27 15:33:18.480341: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library cusparse64_10.dll
2020-08-27 15:33:18.480488: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library cudnn64_7.dll
2020-08-27 15:33:18.480849: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1703] Adding visible gpu devices: 0
2020-08-27 15:33:18.974363: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1102] Device interconnect StreamExecutor with strength 1 edge matrix:
2020-08-27 15:33:18.974544: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1108]      0 
2020-08-27 15:33:18.974644: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1121] 0:   N 
2020-08-27 15:33:18.975212: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1247] Created TensorFlow device (/job:localhost/replica:0/task:0/device:GPU:0 with 8590 MB memory) -> physical GPU (device: 0, name: GeForce RTX 2080 Ti, pci bus id: 0000:01:00.0, compute capability: 7.5)
2020-08-27 15:33:18.976801: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x154c5192e60 initialized for platform CUDA (this does not guarantee that XLA will be used). Devices:
2020-08-27 15:33:18.976994: I tensorflow/compiler/xla/service/service.cc:176]   StreamExecutor device (0): GeForce RTX 2080 Ti, Compute Capability 7.5
processing: TempJPG.jpg
2020-08-27 15:33:20.176386: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library cudnn64_7.dll
2020-08-27 15:33:21.291192: W tensorflow/stream_executor/gpu/redzone_allocator.cc:314] Internal: Invoking GPU asm compilation is supported on Cuda non-Windows platforms only
Relying on driver to perform ptx compilation. 
Modify $PATH to customize ptxas location.
This message will be only logged once.
2020-08-27 15:33:21.383042: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library cublas64_10.dll
All file processed
totally processed:1files
totally passed:0 files
  • 3
    点赞
  • 5
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值