To install gpu enabled torch, run the following command:
pip3 install torch --index-url https://download.pytorch.org/whl/cu117
Note: this is for cuda 11.7
Details is found on the link: https://pytorch.org/get-started/locally/#supported-windows-distributions
without using this command, cuda enabled gpu will not be detected by torch.