Search code examples
ubuntujupyter-notebooktensorflow2.0nvidiacudnn

Tensorflow 2.9 nvidia graphics compatibility issues


I am trying to enable my nvidia gtx 1050 mobile gpu for tensorflow v2.9. Here is what I have so far:

The proper driver for my graphics card is 470.xx as per this question. I have installed 470.129.06 . When I do nvidia-smi in terminal I get:

enter image description here

My cuda tookit is 11.4:

enter image description here

My cuDNN is v8.2.4:

enter image description here

All of these dependencies should be compatible with each other as per these docs.

However, when I try to see whether GPU is available in tensorflow I get this:

enter image description here

With the error: Could not load dynamic library 'libcudnn.so.8'.

Contrary to the above support matrix of cuDNN in these docs it says that for tensorflow v2.9 I need cuDNN v8.1 and cuda v11.2.

Does anyone know what is causing the error above? Or what is the proper combination of these libraries is?


Solution

  • The way to solve your compatibility issues, is to install the recommended cuda-toolkit and cuDNN libraries from the tensorflow compatibility site. You don't necessarily install the graphics driver that's compatible with your cuda-toolkit, but the one that's compatible with your gpu. For me it was any driver 470.xx for a nvidia gtx 1050 mobile. More precisely, 470.129.06, along with cuda toolkit v11.2 and cuDNN v8.1.