Why GPU not detected?

'm running with the following environment:

Windows 10
python 3.8.10
CUDA Version: 11.3  (according to `nvidia-smi`)
torch: 1.12.1
CUDNN_MAJOR 8       (according to `cudnn_version`)
CUDNN_MINOR 1

I’m running the following code:

import torch
print(f"Version: {torch.__version__}, GPU: {torch.cuda.is_available()}, NUM_GPU: {torch.cuda.device_count()}")

And I’m getting:

Version: 1.12.1+cpu, GPU: False, NUM_GPU: 0

According to: https://pytorch.org/ it seems the right version.

  1. So, Why I can’t use GPU when using torch, What is wrong ?
  2. Why torch version show CPU ? how can I install the GPU version of torch ?
  1. You’ve installed the CPU-only binary as seen in Version: 1.12.1+cpu
  2. Select the right CUDA runtime from the install instructions and run the command in your terminal.