torch报错

报错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索引

【1】ProcessGroupNCCL can not find GPUs - PyTorch Forums

你可能感兴趣的:(pytorch,深度学习,python)