Loaded runtime CuDNN library: 7500 (compatibility version 7500) but source was compiled with 7004

在尝试运行TensorFlow程序时,遇到了CuDNN版本不匹配的问题,具体表现为运行时库加载的版本7500与源代码编译时的版本7004不符。解决方案包括卸载当前的CuDNN 7500并安装匹配的CuDNN 7000版本。此外,还提到在处理视频帧时遇到的错误,某些帧可能是NoneType,导致程序异常,可以通过检查并跳过NoneType帧来修复程序。
摘要由CSDN通过智能技术生成
wu@wu-X555LF:~/YOLOv3_TensorFlow-master$ python video_test.py ./data/demo_data/video.mp4
2019-07-26 23:20:59.087061: I tensorflow/core/platform/cpu_feature_guard.cc:140] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 FMA
2019-07-26 23:20:59.211459: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:898] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero
2019-07-26 23:20:59.211931: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1212] Found device 0 with properties:
name: GeForce 930M major: 5 minor: 0 memoryClockRate(GHz): 0.941
pciBusID: 0000:04:00.0
totalMemory: 1.96GiB freeMemory: 1.79GiB
2019-07-26 23:20:59.211955: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1312] Adding visible gpu devices: 0
2019-07-26 23:21:00.990866: I tensorflow/core/common_runtime/gpu/gpu_device.cc:993] Creating TensorFlow device (/job:localhost/replica:0/task:0/device:GPU:0 with 1558 MB memory) -> physical GPU (device: 0, name: GeForce 930M, pci bus id: 0000:04:00.0, compute capability: 5.0)
2019-07-26 23:21:11.568484: E tensorflow/stream_executor/cuda/cuda_dnn.cc:378] Loaded runtime CuDNN library: 7500 (compatibility version 7500) but source was compiled with 7004 (compatibility version 7000).  If using a binary install, upgrade your CuDNN library to match.  If building from sources, make sure the library loaded at runtime matches a compatible version specified during compile configuration.
2019-07-26 23:21:11.569469: F tensorflow/core/kernels/conv_ops.cc:717] Check failed: stream->parent()->GetConvolveAlgorithms( conv_parameters.ShouldIncludeWinogradNonfusedAlgo<T>(), &algorithms)
Aborted (core dumped)

wu@wu-X555LF:~/YOLOv3_TensorFlow-master$ python video_test.py ./data/demo_data/video.mp4
2019-07-26 23:20:59.087061: I tensorflow/core/platform/cpu_feature_guard.cc:140] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 FMA
2019-07-26 23:20:59.211459: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:898] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero
2019-07-26 23:20:59.211931: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1212] Found device 0 with properties:
name: GeForce 930M major: 5 minor: 0 memoryClockRate(GHz): 0.941
pciBusID: 0000:04:00.0
totalMemory: 1.96GiB freeMemory: 1.79GiB
2019-07-26 23:20:59.211955: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1312] Adding visible gpu devices: 0
2019-07-26 23:21:00.990866: I tensorflow/core/common_runtime/gpu/gpu_device.cc:993] Creating TensorFlow device (/job:localhost/replica:0/task:0/device:GPU:0 with 1558 MB memory) -> physical GPU (device: 0, name: GeForce 930M, pci bus id: 0000:04:00.0, compute capability: 5.0)
2019-07-26 23:21:11.568484: E tensorflow/stream_executor/cuda/cuda_dnn.cc:378] Loaded runtime CuDNN library: 7500 (compatibility version 7500) but source was compiled with 7004 (compatibility version 7000).  If using a binary install, upgrade your CuDNN library to match.  If building from sources, make sure the library loaded at runtime matches a compatible version specified during compile configuration.
2019-07-26 23:21:11.569469: F tensorflow/core/kernels/conv_ops.cc:717] Check failed: stream->parent()->GetConvolveAlgorithms( conv_parameters.ShouldIncludeWinogradNonfusedAlgo<T>(), &algorithms)
Aborted (core dumped)

该错误为 cuDNN的版本号不匹配,导致命令中止。本程序需要 cuDNN的版本号 7000版本,而本机安装的cuDNN的版本号7500,所以需要卸载cuDNN 7500,安装cuDNN 7000

相关命令:

查看cuda版本 :      nvcc -V

查看位置  :            which nvcc

查看NVIDIA动态使用情况:  watch -n 1 nvidia-smi  

cuda 版本    :    cat /usr/local/cuda/version.txt

cudnn 版本  :    cat /usr/local/cuda/include/cudnn.h | grep CUDNN_MAJOR -A 2

NVIDIA 驱动版本  :  cat /proc/driver/nvidia/version

查看环境变量  :           env

LD_DEBUG=all cat

卸载cuda :                 sudo  /usr/local/cuda-8.0/bin/uninstall_cuda_8.0.pl

卸载NVIDIA Driver :   sudo  /usr/bin/nvidia-uninstall

wu@wu-X555LF:~/YOLOv3_TensorFlow-master$ cat /usr/local/cuda/version.txt
CUDA Version 9.0.176
wu@wu-X555LF:~/YOLOv3_TensorFlow-master$ cat /usr/local/cuda/include/cudnn.h | grep CUDNN_MAJOR -A 2
#define CUDNN_MAJOR 7
#define CUDNN_MINOR 5
#define CUDNN_PATCHLEVEL 0
--
#define CUDNN_VERSION (CUDNN_MAJOR * 1000 + CUDNN_MINOR * 100 + CUDNN_PATCHLEVEL)

#include "driver_types.h"

CuDNN版本为 7.5.0

卸载cudnn 7.5.0:

wu@wu-X555LF:~/YOLOv3_TensorFlow-master$ sudo rm -rf /usr/local/cuda/include/cudnn.h
wu@wu-X555LF:~/YOLOv3_TensorFlow-master$ sudo rm -rf /usr/local/cuda/lib64/libcudnn*
wu@wu-X555LF:~/YOLOv3_TensorFlow-master$

执行安装命令cudnn 7.0.5 :

 sudo dpkg -i libcudnn7_7.0.5.15-1+cuda9.0_amd64.deb

sudo dpkg -i libcudnn7-dev_7.0.5.15-1+cuda9.0_amd64.deb

sudo dpkg -i libcudnn7-doc_7.0.5.1

  • 0
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值