# print("Num GPUs Available: ", len(tf.config.list\_physical\_devices('GPU')))

**URL:** <https://forums.developer.nvidia.com/t/print-num-gpus-available-len-tf-config-list-physical-devices-gpu/243506>\
**Category:** CUDA on Windows Subsystem for Linux\
**Tags:** tensorflow, cuda\
**Created:** [February 20, 2023, 8:24pm UTC](https://forums.developer.nvidia.com/t/print-num-gpus-available-len-tf-config-list-physical-devices-gpu/243506 "2023-02-20T20:24:45Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![naseri.naader](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@naseri.naader](https://forums.developer.nvidia.com/u/naseri.naader)\
**Post date:** [February 20, 2023, 8:24pm UTC](https://forums.developer.nvidia.com/t/print-num-gpus-available-len-tf-config-list-physical-devices-gpu/243506/1 "2023-02-20T20:24:45Z")

</div>

TensorFlow 2.11,

±----------------------------------------------------------------------------+  
| NVIDIA-SMI 528.49 Driver Version: 528.49 CUDA Version: 12.0 |  
|-------------------------------±---------------------±---------------------+  
| GPU Name TCC/WDDM | Bus-Id Disp.A | Volatile Uncorr. ECC |  
| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |  
| | | MIG M. |  
|===============================+======================+======================|  
| 0 NVIDIA GeForce … WDDM | 00000000:01:00.0 Off | N/A |  
| N/A 56C P0 26W / 94W | 0MiB / 16384MiB | 0% Default |  
| | | N/A |  
±------------------------------±---------------------±---------------------+

It does not show the print("Num GPUs Available: ", len(tf.config.list\_physical\_devices(‘GPU’))), when I upgraded the cuda 11 to cuda 12
