[Tensorflow v 2.3.0] tf.config.list_physical_devices('GPU') shows empty list in PythonSlicer.exe

Hi,
I am attempting to check if tensorflow installed in 3DSlicer is able to access the GPU for its computation. I get the following outputs in “PythonSlicer.exe”

Does anybody know what is missing here? Tensorflow was able to detect the GPU as well as CUDA runtime (cudart64_101.dll). Is it necessary to install cuDNN?


--- --- > **System Info** > 1. Windows 10 > 2. 3D Slicer (*4.11.0-2020-09-05 r29359 / 5513baa*) > - PythonSlicer: C:\Users\\AppData\Local\NA-MIC\Slicer 4.11.0-2020-09-05\bin\PythonSlilcer.exe > 3. Tensorflow - 2.3.0 > - slicer.util.pip_install('tensorflow') > 4. CUDA Toolkit - 10.1 > 5. GPU - Nvidia GTX 2080Ti (Driver Version = 451.48)

Solution
So it turns out that installing cuDNN is required.

For any people referring to this in the future, you can use this link on tensorflows website to determine the CUDA and cuDNN version to use corresponding to a tensorflow version.

Latest tensorflow version (2.3.0) uses CUDA 10.1 with cuDNN (7.6.5)

Thanks a lot for sharing the solution.

1 Like