Do we specifically need cuDNN v5.1 (as suggested) for TensorFlow, or would the latest version (v6.0) work as well? Is there backward compatibility in cuDNN versions?
No, cuDNN 6.0 is not supported in the latest 1.2 version. But there is a hope: the official release notes tell the following:
TensorFlow 1.2 may be the last time we build with cuDNN 5.1. Starting
with TensorFlow 1.3, we will try to build all our prebuilt binaries
with cuDNN 6.0. While we will try to keep our source code compatible
with cuDNN 5.1, it will be best effort.
So hopefully the next 1.3 version will use cuDNN 6.0. Especially now, when 7.0 is right around the corner.
Today ( 21 August 2017 ) I installed the latest Tensorflow release v1.3 and I can confirm that it REQUIRES cuDNN v6.0 and WILL NOT WORK with v5.1 . It will ask in fact for the library libcudnn.so.6 and not the libcudnn.so.5
P.s. If you want it to work with cuDNN 5.1. you can install a previous version e.g. v1.2 which is at this link:
https://www.tensorflow.org/versions/r0.12/get_started/os_setup#virtualenv_installation
This would be an updated answer of Salvador Dali's response.
I have upgraded the tensorflow version to 1.2.1 and then cudnn 6.0 seems to work with no problem. I used pip
pip install tensorflow
pip install --upgrade tensorflow
Installation details are here.
Related
I get this error when I run the model.fit_generator code to train images using the CNN model. I don't understand the error, and what should I do? Can anyone help me?
this is the full error description
`Loaded runtime CuDNN library: 8.0.5, but the source was compiled with: 8.1.0. CuDNN library needs to have a matching major version and equal or higher minor version. If using a binary install, upgrade your CuDNN library. If building from sources, ensure the library loaded at runtime is compatible with the version specified during compile configuration.
I had the same error "tensorflow/stream_executor/cuda/cuda_dnn.cc:362] Loaded runtime CuDNN library: 8.0.5 but source was compiled with: 8.1.0."
I solved it by downgrading the TensorFlow version, here it says that you use a new version of TensorFlow that is not compatible with the google colab CuDNN version. I used TensorFlow 2.4.0 plus all the dependence required on version 2.4.0.
Here it says which version of TensorFlow to use for cudnn compatibility, https://www.tensorflow.org/install/source
You should always have version of libraries installed that is matching the version dependency you want to use is compiled with.
You can download the version you need from nvidia website or use conda for package management. It will handle all dependencies for you.
You can miniconda and type conda install -c anaconda tensorflow-gpu to get it sorted for you. If you need a specific version of python, you can create environment with it.
My solution:
After confirming that my cuda and cudnn versions are compatible with tensorflow, I first thought that the system did not synchronize after the installation was completed. After several restarts, it was found that it was not and could not be the problem, so I started to check all the cuda in the system. For the software that depends on cudnn, matlab was uninstalled during the period but it was useless. Later, I thought that pytorch is also related to cuda and cudnn. I checked the version of pytorch and found that I was using torch 1.8, and the cuda it was adapted to was 11.1 , The corresponding cudnn is 8.0.5, now the case is solved. Finally upgraded pytorch and solved it.
I have faced the same issue. It seems like if TensorFlow versions requires specific cuDNN version.
Check the link for required versions.
https://www.tensorflow.org/install/source#gpu
Thanks for This answer.
My solution:
After confirming that my cuda and cudnn versions are compatible with
tensorflow, I first thought that the system ...
It helps me a lot,but I use different way to solve this problem.
I found that pytorch 1.8 is compatible with cudnn 8.1.0. So, instead of upgrade pytorch version, I overwrite the cudnn 8.0.5 dll library with cudnn 8.1.0 in directory D:\Program Files\Python37\Lib\site-packages\torch\lib. You can find this location with Everything, which is always helpful.
There is no install that says cudnn for cuda 11.2 so I was wondering if that was even possible.
cuDNN Release 8.1.0 has just been made available, in case you are still interested.
https://docs.nvidia.com/deeplearning/cudnn/release-notes/rel_8.html#rel-810
Yes, you can. Follow the installation instructions as per the guide here: https://docs.nvidia.com/deeplearning/cudnn/install-guide, but ignore the version suggestion in the guide. Use any of the libcudnn versions as listed here that's compatible with CUDA v11.2: https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/
I have seen the list of tested TF version and it's CUDA version compatibility Here, but I am having a doubt whether every TF version can be build from source with any CUDA version or not. For example:- can TF 1.14 build with CUDA 11.1 or not?
No, T.F. 1x is not compatible with CUDA 11.1. For CUDA 11.1 you need to go for T.F. 2.3 or higher.
If you wish to use T.F. 1.x then the best will be to use CUDA 10.0-10.2
The requirements of the current version of tensorflow 1.11 to run on GPU are
CUDA® Toolkit —TensorFlow supports CUDA 9.0.
cuDNN SDK (>= 7.2)
However the CuDNN downlad page only lists
Download cuDNN v7.2.1 (August 7, 2018), for CUDA 9.2
Given that CuDNN comes with different binaries for minor revisions of the CUDA toolkit (e.g. CuDNN 7.1.3 has one binary for CUDA 9.1 and another for CUDA 9.0), I suppose that this binary of CuDNN 7.2 is not compatible with CUDA 9.0.
Is is a documentation bug? If not, how to fullfill the requirements of TF 1.11?
I found the below answer by modifying the addresses from the publicly available libraries: https://developer.nvidia.com/compute/machine-learning/cudnn/secure/v7.2.1/prod/9.0_20180806/cudnn-9.0-windows10-x64-v7.2.1.38
As #emilyfy suggested, addresses for other, hosted but not published versions and OSs can also be acquired.
Go to this page instead. https://developer.nvidia.com/rdp/cudnn-download
It has the link for
Download cuDNN v7.3.0 (Sept 19, 2018), for CUDA 9.0
cuDNN v7.2.1 for CUDA 9.0 used to be there but now that they have v7.3.0 it's not in the archives anymore. I'm having the same problems too with a model I built on another PC. Luckily I hadn't deleted the installers. I'll share them (only the deb installers for Linux) here.
I have a machine with cuda 9.0 and cudnn 7.1.
I've tried using tensorflow 1.7.0 on this machine but it does not work since this version of tensorflow has been created for cudnn 7.0
I'm getting this error when launching a training on my gpu:
Loaded runtime CuDNN library: 7102 (compatibility version 7100) but source was compiled with 7005 (compatibility version 7000).
Is there a tensorflow version that is compatible with my cuda and cudnn versions? I also need this working tensorflow version to be >=1.7.0.
I have googled this, searched every question but I never got answers for these particular versions of cuda and cudnn.
This should be possible with tensorflow_gpu-1.9.0. Linked below is a table which displays compatibilities of CUDA and cuDNN with varying versions of tensorflow.
https://www.tensorflow.org/install/install_sources#tested_source_configurations
Ok, seems I missed some installation steps.
By installing the last version of tensorflow, which at the time of writing is 1.9.0, it did work on my machine.