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