2016-06-06 7 views
4

Ubuntu 14.04, CUDA Version 7.5.18, bauen jede Nacht von tensorflowKonfiguration in TensorFlow kompilieren cudnn

Während ein tf.nn.max_pool() Betrieb in tensorflow läuft, bekam ich folgende Fehlermeldung:

E tensorflow/stream_executor/cuda/cuda_dnn.cc:286] Loaded cudnn library: 5005 but source was compiled against 4007. If using a binary install, upgrade your cudnn library to match. If building from sources, make sure the library loaded matches the version you specified during compile configuration.

W tensorflow/stream_executor/stream.cc:577] attempting to perform DNN operation using StreamExecutor without DNN support

Traceback (most recent call last):

...

Wie gebe ich meine cudnn-version in der kompilierkonfiguration von tensorflow?

+1

Ich bin verwirrt, was dieser Fehler bedeutet sogar, bedeutet es, dass Sie eine Version von cudnn haben, aber Tensorflow erwartet eine andere oder was bedeutet es? –

Antwort

1

Gehen Sie in das Verzeichnis des TensorFlow-Quellcodes und führen Sie die Konfigurationsdatei aus: /.configure. Hier

ist ein Beispiel aus der 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

Also gibt es keine Möglichkeit, Tensorflow mit Bazel neu zu kompilieren, um die cudnn Version zu ändern? Ich kann meine aktuelle Installation nicht konfigurieren. –

+1

Beim Ausführen von './Configure' müssen Sie mit bazel neu kompilieren. Vielleicht gibt es eine andere Art, auf die ich nicht weiß! –

+0

Eine Frage: Wie löst man, wenn die Installation von binär ist? – Kyrol

1

scheint, wie Sie cudnn haben 5 installiert. Sie müssen es gesetzt, wenn ./configure

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

Kann ich './Configure' in einer aktuellen Implementierung ausführen, oder muss ich mit Bazel neu kompilieren? –

+1

@GunnarNielsen Sie müssen aus dem Quellcode neu kompilieren – fabrizioM

+0

Hat Gcc-4.9 für Sie arbeiten? – JohnAllen

0

Hinzufügen my 2 cents läuft: In meinem Fall (TF0.12.1 von pip zu Anaconda installiert, ohne sudo Berechtigungen) CuDNNv5 installiert wurde, war aber nicht der Standard.

export LD_LIBRARY_PATH="/usr/local/lib/cuda-8.0/lib64:/usr/local/lib/cudann5/lib64/" Einstellung löste das Problem

0

ich auch dieses inkompatibel Problem wie folgt erfüllen:

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. 

So herunterladen i CuDNN 5.1 (kompatibel mit CUDA8.0) und ersetzen 5.0 mit ihm dann alles gut geht, .

WARN: CuDNN von Nvidia ist unavailable, aber Sie können es von anderen Teilen finden.