# \[Tensorflow v 2.3.0\] tf.config.list\_physical\_devices('GPU') shows empty list in PythonSlicer.exe

**URL:** <https://discourse.slicer.org/t/tensorflow-v-2-3-0-tf-config-list-physical-devices-gpu-shows-empty-list-in-pythonslicer-exe/13712>\
**Category:** Support\
**Tags:** cuda, gpu, tensorflow\
**Created:** [September 26, 2020, 2:42pm UTC](https://discourse.slicer.org/t/tensorflow-v-2-3-0-tf-config-list-physical-devices-gpu-shows-empty-list-in-pythonslicer-exe/13712 "2020-09-26T14:42:48Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![strider\_hunter](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/strider_hunter/32/8253_2.png) [@strider\_hunter](https://discourse.slicer.org/u/strider_hunter)\
**Post date:** [September 26, 2020, 2:42pm UTC](https://discourse.slicer.org/t/tensorflow-v-2-3-0-tf-config-list-physical-devices-gpu-shows-empty-list-in-pythonslicer-exe/13712/1 "2020-09-26T14:42:48Z")

</div>

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”

 ![GPU_Tensorflow_Issue](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/5/d/5d0b9b077caf2a9e9743e6951c2d928ddb61ff9a.png)

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)

---

<div class="post-metadata">

**Author:** ![strider\_hunter](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/strider_hunter/32/8253_2.png) [@strider\_hunter](https://discourse.slicer.org/u/strider_hunter)\
**Post date:** [September 26, 2020, 2:53pm UTC](https://discourse.slicer.org/t/tensorflow-v-2-3-0-tf-config-list-physical-devices-gpu-shows-empty-list-in-pythonslicer-exe/13712/2 "2020-09-26T14:53:57Z")

</div>

**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](https://www.tensorflow.org/install/source#tested_build_configurations) 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)

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [September 26, 2020, 4:44pm UTC](https://discourse.slicer.org/t/tensorflow-v-2-3-0-tf-config-list-physical-devices-gpu-shows-empty-list-in-pythonslicer-exe/13712/3 "2020-09-26T16:44:03Z")

</div>

Thanks a lot for sharing the solution.
