GPU Usage in tensorflow
@SirKnightV If you want to use a gpu for TF , then please follow [this](https://www.tensorflow.org/guide/gpu#:~:text=TensorFlow%20supports%20running%20computations%20on,that%20is%20visible%20to%20TensorFlow.) guide.  This [doc](https://github.com/tensorflow/docs/blob/master/site/en/guide/gpu.ipynb) will give you the instruction how you can use a single gpu or multiple gpus as per your requirement on one or many machines using distribution strategies.  If you want to check whether the gpu is installed or not you can run the following command;
```
import tensorflow as tf
print("Num GPUs Available: ", len(tf.config.list_physical_devices('GPU')))
     
```
Please have a look at this [gist](https://colab.research.google.com/gist/sushreebarsa/7ebd1315789ac41fe4b139267706aa5f/61288.ipynb) as well. 

Thank you! > @SirKnightV If you want to use a gpu for TF , then please follow [this](https://www.tensorflow.org/guide/gpu#:~:text=TensorFlow%20supports%20running%20computations%20on,that%20is%20visible%20to%20TensorFlow.) guide. This [doc](https://github.com/tensorflow/docs/blob/master/site/en/guide/gpu.ipynb) will give you the instruction how you can use a single gpu or multiple gpus as per your requirement on one or many machines using distribution strategies. If you want to check whether the gpu is installed or not you can run the following command;
> 
> ```
> import tensorflow as tf
> print("Num GPUs Available: ", len(tf.config.list_physical_devices('GPU')))
>      
> ```
> 
> Please have a look at this [gist](https://colab.research.google.com/gist/sushreebarsa/7ebd1315789ac41fe4b139267706aa5f/61288.ipynb) as well.
> 
> Thank you!

Hello @sushreebarsa , thanks for the answer, i have tested your code
```
import tensorflow as tf
print("Num GPUs Available: ", len(tf.config.list_physical_devices('GPU')))
```
but it says Num GPUs Available:  0
i see my problem is tensorflow is not detecting my gpu, when i have followed the doc https://www.tensorflow.org/install/gpu?hl=es-419 , in the docs say install cuda v11.2 for tensorflow >= 2.5.0 , my tensorflow version is 2.13.0 , i have instaled cuDNN for version cuda v11.2 , i extracted the files inside cuda instalation, later i have added to path , i have updated my drivers with driver booster pro, but still tensorflow dont detect my gpu, what cuda version i should use then?, or docs are outdated? @SirKnightV Thank you for your kind response!
As per the documentation;
TensorFlow 2.10 was the last TensorFlow release that supported GPU on native-Windows. Starting with TensorFlow 2.11, you will need to install [TensorFlow in WSL2](https://tensorflow.org/install/pip#windows-wsl2), or install tensorflow or tensorflow-cpu and, optionally, try the [TensorFlow-DirectML-Plugin](https://github.com/microsoft/tensorflow-directml-plugin#tensorflow-directml-plugin-).
Thank you! > @SirKnightV Thank you for your kind response! As per the documentation; TensorFlow 2.10 was the last TensorFlow release that supported GPU on native-Windows. Starting with TensorFlow 2.11, you will need to install [TensorFlow in WSL2](https://tensorflow.org/install/pip#windows-wsl2), or install tensorflow or tensorflow-cpu and, optionally, try the [TensorFlow-DirectML-Plugin](https://github.com/microsoft/tensorflow-directml-plugin#tensorflow-directml-plugin-). Thank you!

Hello @sushreebarsa , thanks for answer me again for your patience too, i have uninstalled Tensorflow 2.13.0 and installed tensorflow 2.10 , i have installed Cuda 11.8 refer in https://www.tensorflow.org/install/pip?hl=es-419 , and same version of cudNN, tensorflow is now detecting and using my gpu, but i have a question, if i install in other pc for example, with nvidia gpu too, i install ubuntu last version for example, i can use tensorflow last version with gpu without problems? if is yes what version of cuda is requirement for do that and what cudNN version too?, i hope your answer soon, and thanks :) @SirKnightV Thank you for the quick response!
Glad it worked fine for you.
Yes, you can install the latest version without any issue and to check the compatible version please follow the[ instructions](https://www.tensorflow.org/install/source#gpu) here.  Kindly let us know if the issue is resolved now and move the issue to closed status?
Thank you! This issue is stale because it has been open for 7 days with no activity. It will be closed if no further activity occurs. Thank you. This issue was closed because it has been inactive for 7 days since being marked as stale. Please reopen if you'd like to work on this further. Are you satisfied with the resolution of your issue?
<a href="https://docs.google.com/forms/d/e/1FAIpQLSfaP12TRhd9xSxjXZjcZFNXPGk4kc1-qMdv3gc6bEP90vY1ew/viewform?entry.85265664=Yes&entry.2137816233=https://github.com/tensorflow/tensorflow/issues/61288">Yes</a>
<a href="https://docs.google.com/forms/d/e/1FAIpQLSfaP12TRhd9xSxjXZjcZFNXPGk4kc1-qMdv3gc6bEP90vY1ew/viewform?entry.85265664=No&entry.2137816233=https://github.com/tensorflow/tensorflow/issues/61288">No</a>

### Issue type

Documentation Feature Request

### Have you reproduced the bug with TensorFlow Nightly?

Yes

### Source

source

### TensorFlow version

tf 2.13.0

### Custom code

Yes

### OS platform and distribution

Windows 10 Pro 22H2

### Mobile device

_No response_

### Python version

3.10.0

### Bazel version

_No response_

### GCC/compiler version

_No response_

### CUDA/cuDNN version

8.6.0.163

### GPU model and memory

Nvidia Geforce GTX 1050TI

### Current behavior?

Use Tensorflow With Gpu and not cpu...

1.- I have followed tutorial from this page https://www.tensorflow.org/install/gpu?hl=es-419
2.- I Have Installed cuda_11.2.0_460.89_win10.exe from https://developer.nvidia.com/cuda-11.2.0-download-archive?target_os=Windows&target_arch=x86_64&target_version=10&target_type=exelocal
3.- I Have Downloaded cuDNN from https://developer.nvidia.com/rdp/cudnn-archive , the version 8.6.0 (is the version that documentation says tensorflow supports
4.- Later i installed the cuda, and in the path of cuda in my case is C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.2 , and i have unzip the cuDNN file un format .zip and copied the 3 folder in my cuda path
5.- I have executed those commands modifyng the version of cuda with my current version:
SET PATH=C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.2\bin;%PATH%
SET PATH=C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.2\extras\CUPTI\lib64;%PATH%
SET PATH=C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.2\include;%PATH%
SET PATH=C:\tools\cuda\bin;%PATH%
setx PATH "%PATH%;C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.2\bin;C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.2\libnvvp"
6.- I have restarted the pc and checked with CMD Admin Mode the next command nvcc --version
and i have received fine the output:
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2020 NVIDIA Corporation
Built on Mon_Nov_30_19:15:10_Pacific_Standard_Time_2020
Cuda compilation tools, release 11.2, V11.2.67
Build cuda_11.2.r11.2/compiler.29373293_0

7.- I Have Tried the tutorial from this page too https://www.codingforentrepreneurs.com/blog/install-tensorflow-gpu-windows-cuda-cudnn/ , but i continue without be abble to run tensorflow in gpu mode , i have tried follow the documentation too have tried 4 times, reinstalling and doing again, but didnt worked.
8.- I dont know if i'm doing something bad or i skipped something, if someone can help me i would appreciate it very much..

### Standalone code to reproduce the issue

```shell
# my code is the next
from tensorflow.python.client import device_lib 
print(device_lib.list_local_devices())

import tensorflow as tf

gpus = tf.config.list_physical_devices('GPU')
if gpus:
    for gpu in gpus:
        print("GPU:", gpu)
else:
    print("No Gpu for Tensorflow")

if tf.test.is_built_with_cuda():
    print("Current Tensorflow version support gpu")
else:
    print("Current Version dont support gpu")
```


### Relevant log output

```shell
[name: "/device:CPU:0"
device_type: "CPU"
memory_limit: 268435456
locality {
}
incarnation: 15862100159162906098
xla_global_id: -1
]
No Gpu for Tensorflow
Current Version dont support gpu
```
