check current version of cudnn

$ dpkg -l | grep -i cudnn
ii  libcudnn7                                                                        amd64        cuDNN runtime libraries
ii  libcudnn7-dev                                                                    amd64        cuDNN development libraries and headers

my current gpu uses CUDA10.0 which can be verified from nvidia-smi

$ nvidia-smi<br>
Sun Jun 23 21:13:55 2019       <br>
| NVIDIA-SMI 410.104      Driver Version: 410.104      CUDA Version: 10.0     |<br>
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |<br>
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |<br>
|   0  GeForce GTX 960M    Off  | 00000000:02:00.0 Off |                  N/A |<br>
| N/A   66C    P0    N/A /  N/A |   3974MiB /  4046MiB |     98%      Default |<br>

The current version of cudnn is meant for CUDA10.1.
It seems that this somehow creates a conflict and I cannot load and run my model in tensorflow-gpu 1.13.1.

In order to fix this, I had to downgrade my current cudnn installation version to a version that is compatible with CUDA 10.0

Search for available version of libcudnn7 package.

$ sudo apt-cache policy libcudnn7
  Version table: 500
        500  Packages
 *** 500
        500  Packages
        100 /var/lib/dpkg/status 500
        500  Packages 500
        500  Packages 500
        500  Packages 500
        500  Packages 500
        500  Packages 500
        500  Packages

There I can see which is cudnn 7.5.1 version that is compatible with CUDA 10.0.

To force downgrading to this specific version, use this command.

$ sudo apt install libcudnn7=

After this, do the same for libcudnn7-dev package, just to make sure.

$ sudo apt install libcudnn7-dev=

After doing these two, I was able to load and run my model successfully with tensorflow-gpu 1.13.1.

The changes made for two packages will be overriden in the next apt update && apt upgrade. To avoid this problem, the user must make apt to not update for these two specific packages.


Leave a Reply

Your email address will not be published.