How to Update Cudnn to a Newer Version

How to install latest cuDNN to conda?

This was not possible to do it with conda at the time the question was made. That is way it was suggested to try this. However, now it is possible. Follow the other answers

Anaconda installs Cudnn 7.3.1 in environment directory--causes Tensorflow 2.0 to fail

Seems like Anaconda just updated their build to include cudnn 7.6 and cudatoolkit 10.1.168. So this problem should go away now. The simple solution, if you hit this problem, is to activate your environment with

conda activate <environment_name>

Then update the packages in your environment

conda update --all

Or you could also update just the individual packages instead of the entire environment.

I already have a CUDA toolkit installed, why is conda installing CUDA again?


  1. Why is it happening?

Conda expects to manage any packages you install and all their dependencies. The intention is that you literally never have to install anything else by hand for any packages they distribute in their own channel. If a GPU accelerated package requires a CUDA runtime, conda will try to select and install a correctly versioned CUDA runtime for the version of the Python package it has selected for installation.


  1. How to stop conda from installing cuda and cudnn again?

You probably can't, or at least can't without winding up with a non-functional Tensorflow installation. But see here -- what conda installs is only the necessary, correctly versioned CUDA runtime components to make their GPU accelerated packages work. All they don't/can't install is a GPU driver for the hardware.


  1. Can I just use cuda and cudnn that I have already installed?

You say you installed CUDA 11.2. If you look at the conda output, you can see that it wants to install a CUDA 10.2 runtime. As you are now fully aware, versioning is critical to Tensorflow and a Tensorflow build requiring CUDA 10.2 won't work with CUDA 11.2. So even if you were to stop conda from performing the dependency installation, there is a version mismatch so it wouldn't work.


  1. If yes, how?

See above.

get the CUDA and CUDNN version on windows with Anaconda installe

You could also run conda list from the anaconda command line:

conda list cudnn

# packages in environment at C:\Anaconda2:
#
# Name Version Build Channel
cudnn 6.0 0


Related Topics



Leave a reply



Submit