windows使用nvidia-smi查看gpu信息
python命令查看GPu信息
import torch
print(torch.cuda.is_available()) # 查看GPu设备是否可用
print(torch.cuda.device_count()) # 查看GPu设备数量
print(torch.cuda.get_device_name()) # 查看当前GPu设备名称,默认设备id从0开始
print(torch.cuda.current_device()) # 查看当前GPu设备id