检查 GPU 兼容性
NVIDIA 网站:https://developer.nvidia.com/cuda-gpus
安装 CUDA
NVIDIA 网站:https://developer.nvidia.com/cuda-downloads


安装 Python
Python 网站:https://www.python.org/downloads/windows/



Visual Studio 添加 Python 虚拟环境


安装 PyTorch

检查 PyTorch
import torch
print(torch.cuda.is_available())
>>> true
print(torch.cuda.device(0))
>>> >> 1
print(torch.cuda.get_device_name(0))
>>> 'Geforce RTX 3090'