knagesh
knagesh

Reputation: 51

How to Use different cudnn package other than default one in anaconda

I have a anaconda installation with which I configured python 3.6, tensorflow 1.13 on windows 10. The installation works fine except when I try invoking cudnn code i.e conv2d and similar functions when I greeted with the following error: " E tensorflow/stream_executor/cuda/cuda_dnn.cc:324] Loaded runtime CuDNN library: 7.3.1 but source was compiled with: 7.4.1. CuDNN library major and minor version needs to match or have higher minor version in case of CuDNN 7.0 or later version. If using a binary install, upgrade your CuDNN library".

Which TensorFlow and CUDA version combinations are compatible?. From this post, I tried installing cudnn 7.4.1 on my desktop but looks like anaconda keeps using the default cudnn 7.3.1 only and does not reference the one pointed to by my path variables. Any help in terms of how I can force conda to use the cudnn 7.4.1 will be much appreciated.

Upvotes: 1

Views: 1439

Answers (1)

KyleL
KyleL

Reputation: 11

I don't know if the original poster's problem had been resolved. Just in case someone has the same problem (as I did), one should try this first:

https://towardsdatascience.com/tensorflow-gpu-installation-made-easy-use-conda-instead-of-pip-52e5249374bc

Basically, it recommends you to directly conda tensorflow-gpu and let conda handles cudnn and cuda versions. At least afterward if you conda list it would list the updated (or more current) cudnn version.

But in my case, afterwards, I still had the same error. So I dug a little and found out it was from one of my other packages. You can search, under your anaconda folder, all occurrences of cudnn64_7.dll. For me, it's the mxnet-cu100 package that (even with the newest version) still uses the older cudnn dll. I simply copied the newer cudnn64_7.dll to that site-packages folder (with some risk I guess but at this stage, I had nothing to lose) and it solved the problem.

Upvotes: 1

Related Questions