Cudnn compilation configuration in TensorFlow

Ubuntu 14.04, CUDA Version 7.5.18, nightly build of tensor flow

During the operation tf.nn.max_pool()in the tensor stream, I received the following error:

E tensorflow / stream_executor / cuda / cuda_dnn.cc: 286] The cudnn library: 5005 was loaded, but the source was compiled against 4007. If using a binary, install, update your cudnn library to match it. If you are building sources, make sure the loaded library matches the version you specified in the compilation configuration.

W tensorflow / stream_executor / stream.cc: 577] tries to execute DNN using StreamExecutor without DNN support

Traceback (last last call):

...

How to specify my cudnn version in tenorflow compilation configuration?

+4
source share
4 answers

Go to the source code TensorFlow directory, then run the configuration file /.configure.

Here is an example from the TensorFlow documentation :

$ ./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
source

It looks like you have cudnn 5 installed. You should install it at startup ./configure

Please specify the Cudnn version you want to use. [Leave empty to use system
default]: 5
+1
source

: (TF0.12.1, anaconda pip, sudo) CuDNNv5 , .

export LD_LIBRARY_PATH="/usr/local/lib/cuda-8.0/lib64:/usr/local/lib/cudann5/lib64/"

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, .

WARN: CuDNN from nvidia is not available, but you can find it from another part.

0
source

All Articles