报错:
E tensorflow/stream_executor/cuda/cuda_dnn.cc:390]Loaded runtime CuDNN library: 7100 (compatibility version 7100) but source wascompiled with 7200 (compatibility version 7200). If using a binary install, upgrade your CuDNNlibrary to match. If building fromsources, make sure the library loaded at runtime matches a compatible versionspecified during compile configuration.
F tensorflow/core/kernels/conv_ops.cc:605]Check failed: stream->parent()->GetConvolveAlgorithms(&algorithms)
已放弃 (核心已转储)
编译需要的cudnn版本7.2以上,我的是7.1
解决方法:
1.下载新版本cudnn
你可以在官网下载,当然需要自己login和survey,然后选择download -> I Agree…… -> Archived cuDNN Releases -> 找到匹配你的CUDA的cudnn的需要版本(cudnn 7.3.1.20)
2.删除原来的cudnn
包括原来解压的cudnn目录、原来/usr/local/cuda-9.0/lib64中的旧版本libcudnn.so、libcudnn.so.x、libcudnn.so.x.x.x
#命令行操作
cd /usr/local/cuda-9.0/lib64/ sudo rm -rf libcudnn.so libcudnn.so.7 libcudnn.so.7.1.10
进入你下载的cudnn解压目录
sudo cp lib64/lib* /usr/local/cuda-9.0/lib64
sudo cp include/cudnn.h /usr/local/cuda-9.0/include
再进入/usr/local/cuda-9.0/lib64 目录下
sudo chmod +r libcudnn.so.7.3.1
sudo ln -sf libcudnn.so.7.3.1 libcudnn.so.7
sudo ln -sf libcudnn.so.7 libcudnn.so
sudo ldconfig
大功告成!