报错1:RuntimeError: ProcessGroupNCCL is only supported with GPUs, no GPUs found!
1,测试GPU是否可用
import torch
#测试GPU是否可用
flag = torch.cuda.is_available()
#获取GPU名称
torch.cuda.get_device_name(0)
#获取GPU版本
torch.version.cuda
2.检索CUDA_VISIBLE_DEVICES是否设置不可用的GPU索引