Ubuntu 14.04,CUDA版本7.5.18,每晚构建张量流
在tensorflow中运行tf.nn.max_pool()
操作时,出现以下错误:
E tensorflow / stream_executor / cuda / cuda_dnn.cc:286]加载的cudnn library:5005但是source是针对4007编译的。如果使用二进制文件 安装,升级您的cudnn库以匹配。如果建设 来源,确保加载的库与您的版本匹配 在编译配置期间指定。
W tensorflow / stream_executor / stream.cc:577]尝试执行DNN 使用没有DNN支持的StreamExecutor进行操作
追踪(最近一次呼叫最后一次):
...
如何在tensorflow的编译配置中指定我的cudnn版本?
答案 0 :(得分:2)
进入TensorFlow源代码目录,然后执行配置文件:/.configure
。
$ ./configure
Please specify the location of python. [Default is /usr/bin/python]:
Do you wish to build TensorFlow with GPU support? [y/N] y
GPU support will be enabled for TensorFlow
Please specify which gcc nvcc should use as the host compiler. [Default is
/usr/bin/gcc]: /usr/bin/gcc-4.9
Please specify the Cuda SDK version you want to use, e.g. 7.0. [Leave
empty to use system default]: 7.5
Please specify the location where CUDA 7.5 toolkit is installed. Refer to
README.md for more details. [default is: /usr/local/cuda]: /usr/local/cuda
Please specify the Cudnn version you want to use. [Leave empty to use system
default]: 4.0.4
Please specify the location where the cuDNN 4.0.4 library is installed. Refer to
README.md for more details. [default is: /usr/local/cuda]: /usr/local/cudnn-r4-rc/
Please specify a list of comma-separated Cuda compute capabilities you want to
build with. You can find the compute capability of your device at:
https://developer.nvidia.com/cuda-gpus.
Please note that each additional compute capability significantly increases your
build time and binary size. [Default is: \"3.5,5.2\"]: 3.5
Setting up Cuda include
Setting up Cuda lib64
Setting up Cuda bin
Setting up Cuda nvvm
Setting up CUPTI include
Setting up CUPTI lib64
Configuration finished
答案 1 :(得分:1)
好像你已经安装了cudnn 5。您需要在运行./configure
Please specify the Cudnn version you want to use. [Leave empty to use system
default]: 5
答案 2 :(得分:0)
添加我的2美分:在我的情况下(TF0.12.1,从UPDATE t
SET USER_FNM = bauser.user_fnm
FROM @Users t
INNER JOIN bauser ON bauser.user_key = t.USER_KEY
安装到anaconda,没有pip
权限)安装了CuDNNv5,但不是默认值。
设置sudo
解决了问题
答案 3 :(得分:0)
我也遇到了这样一个不兼容的问题:
Loaded runtime CuDNN library: 5005 (compatibility version 5000) but source wascompiled with 5110 (compatibility version 5100). 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.
所以我下载了CuDNN 5.1(与CUDA8.0兼容)并用它替换5.0然后一切顺利。
警告:来自nvidia的CuDNN是不可用的,但您可以从其他人的共享中找到它。