TensorFlow中的cudnn编译配置

Ale*_*sen 5 tensorflow cudnn

Ubuntu 14.04,CUDA版本7.5.18,每晚构建的Tensorflow

tf.nn.max_pool()在tensorflow中运行操作时,出现以下错误:

[tensorflow / stream_executor / cuda / cuda_dnn.cc:286]已加载的cudnn库:5005,但是源代码是针对4007编译的。如果使用二进制安装,请升级您的cudnn库以使其匹配。如果从源构建,请确保加载的库与您在编译配置期间指定的版本匹配。

W tensorflow / stream_executor / stream.cc:577]尝试使用不具有DNN支持的StreamExecutor执行DNN操作

追溯(最近一次通话):

...

如何在tensorflow的编译配置中指定我的cudnn版本?

Oli*_*rot 2

进入TensorFlow源码目录,然后执行配置文件:/.configure.

以下是TensorFlow 文档中的示例:

$ ./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
Run Code Online (Sandbox Code Playgroud)