Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Tensorflow 0.7.1 with Cuda Toolkit 7.5 and cuDNN 7.0

I recently tried to upgrade my Tensorflow installation from 0.6 to 0.7.1 (Ubuntu 15.10, Python 2.7) because it is described to be compatible with more up-to-date Cuda libraries. Everything works well including the simple test from the Tensorflow getting started page. However I'm not able to use cuDNN. When running a program using cuDNN, I first get a warning

"Unable to load cuDNN DSO"

and later the program crashes with

I tensorflow/core/common_runtime/gpu/gpu_device.cc:717] Creating TensorFlow device (/gpu:0) -> (device: 0, name: GeForce GTX 980, pci bus id: 0000:01:00.0)
I tensorflow/core/common_runtime/gpu/gpu_bfc_allocator.cc:73] Allocating 3.30GiB bytes.
I tensorflow/core/common_runtime/gpu/gpu_bfc_allocator.cc:83] GPU 0 memory begins at 0x704a80000 extends to 0x7d80c8000
F tensorflow/stream_executor/cuda/cuda_dnn.cc:204] could not find cudnnCreate in cudnn DSO; dlerror: /usr/local/lib/python2.7/dist-packages/tensorflow/python/_pywrap_tensorflow.so: undefined symbol: cudnnCreate

The files I downloaded for the Cuda Installation were

  • cuda-repo-ubuntu1504-7-5-local_7.5-18_amd64.deb and
  • cudnn-7.0-linux-x64-v4.0-prod.tgz

I followed the instructions on the Tensorflow getting started page with the exception of using cuDNN 7.0 instead of 6.5. $LD_LIBRARY_PATH is "/usr/local/cuda/lib64"

I have no clue why cudnnCreate is not found. Is there somebody who has successfully installed this configuration and can give me advice?

like image 976
Peter W Avatar asked Feb 29 '16 14:02

Peter W


People also ask

What version of CUDA works with TensorFlow?

Hardware requirements. Note: TensorFlow binaries use AVX instructions which may not run on older CPUs. The following GPU-enabled devices are supported: NVIDIA® GPU card with CUDA® architectures 3.5, 5.0, 6.0, 7.0, 7.5, 8.0 and higher.

Can I run TensorFlow without cuDNN?

Based on the information on the Tensorflow website, Tensorflow with GPU support requires a cuDNN version of at least 7.2. In order to download CuDNN, you have to register to become a member of the NVIDIA Developer Program (which is free).

What is Cuda and cuDNN?

The NVIDIA CUDA® Deep Neural Network library (cuDNN) is a GPU-accelerated library of primitives for deep neural networks. cuDNN provides highly tuned implementations for standard routines such as forward and backward convolution, pooling, normalization, and activation layers.


2 Answers

I get the same error when I forgot to set the LD_LIBRARY_PATH and CUDA_HOME environment variables:

export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/usr/local/cuda/lib64" export CUDA_HOME=/usr/local/cuda

like image 179
Sven Podlech Avatar answered Nov 11 '22 14:11

Sven Podlech


I am following this instructions to install TensorFlow in archlinux: https://github.com/ddigiorg/AI-TensorFlow/blob/master/install/install-TF_2016-02-27.md

It seems you need cuDNN v2 or above, which you can get by register for their Accelerated Computing Developer Program, which usually takes 2 days: https://developer.nvidia.com/accelerated-computing-developer

UPDATE: It seems you already have cuDNNv2

like image 1
jorgemf Avatar answered Nov 11 '22 16:11

jorgemf