TensorRT was linked against cudnn 7.6.3 but loaded cudnn 7.4

when I building up the TensorRT in my computer, after configure in windows, I use the VS2017 to rebuild the mnist sample, then run the generataed exe, it shows can't find cudnn64_7.dll. So search this file in my computer, and copy one to this bin path, then

I meet this warning:

TensorRT was linked against cudnn 7.6.3 but loaded cudnn 7.4

Environment:

  • Windows 10 Home version
  • VS2017
  • GTX1050 Max, cuda 10.0, cudnn7.6.3

Reason, there are two same name cudnn64_7.dll in my computer, one is for torch, and another is for C++, unfortunately, I copied the torch version, so use the C++ version instead of it, then the warning is gone.

Another Tips: there is issue for run the mnist samples due to the *.pgm files can't find. this becasue from 6.0, the *pgm files removed, it seems that we need to download the MNIST data manually, and the use gunzip to unzip the file to get train-labels-idx1-ubyte file. Finally, run generate_pgms.py file to get the picture file(*.pgm files).

There is a file named download_pgms.py in the data folder. So just run it to got the test smaples. If all goes well, you wil got follows result:

### cuDNN 版本不匹配问题分析 当遇到 `cuDNN linked-against version` 和 `compiled-against version` 不一致的情况时,通常是因为编译环境中的 cuDNN 库版本与运行环境中加载的库版本不同。这种差异可能导致程序崩溃或无法正常工作。 MXNet 提供了一个变量 `MXNET_CUDNN_LIB_CHECKING` 来控制是否启用 cuDNN 的版本一致性检查[^1]。如果禁用此检查,则可以绕过版本验证过程;然而,这可能会带来潜在的风险,例如性能下降或未定义行为。 #### 解决方案一:调整环境配置 通过设置环境变量来关闭版本检查功能是一种快速解决方案。具体操作如下: ```bash export MXNET_CUDNN_LIB_CHECKING=0 ``` 上述命令会告诉 MXNet 忽略 cuDNN 版本之间的差异并继续执行[^2]。需要注意的是,在生产环境下建议谨慎使用这种方法,因为即使忽略警告也可能隐藏其他兼容性隐患。 #### 解决方案二:统一cuDNN版本 更推荐的做法是从根本上解决问题——即确保开发阶段使用的cuDNN头文件以及链接器所指向的实际共享对象(.so)都来自同一个版本号。以下是实现这一目标的一些指导原则: 1. **确认安装包**: 验证当前系统已正确安装所需的具体版次(比如8.1.0对应于数值8100,而8.1.1则映射到8101)[^3]; 2. **更新依赖项**: 如果发现存在多个相互冲突的不同修订级别的实例共存现象,那么应当考虑重新构建整个软件栈或者单独替换掉错误的部分; 3. **清理残留数据**: 删除旧有遗留下来的多余副本以防干扰新部署流程; 以上措施能够有效减少因组件间协作不良引发的各种异常状况发生几率. ```python import mxnet as mx print(mx.__version__) ``` 利用上面这段简单的Python脚本来获取正在运行的应用程序内部实际调用的基础框架确切发行标签信息也很重要,这样有助于进一步排查是否存在多版本混杂情况。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值