detectron2报错解决方案 RuntimeError: Default process group has not been initialized, please make sure to c

问题:RuntimeError: Default process group has not been initialized, please make sure to call init_process_group.
解决: github503问题,解决方案,windows环境使用detectron2 # 503

 cuda_num = os.environ['CUDA_VISIBLE_DEVICES']
 cuda_num_list = list(cuda_num.split(","))
	if len(cuda_num_list) == 1:
        import torch.distributed as dist
   
        dist.init_process_group(backend='nccl', init_method='tcp://localhost:23456', rank=0, world_size=1)
    出现报错 RuntimeError: Distributed package doesn't have NCCL built in
    原因分析: windows不支持NCCL backend
    解决方案: 在dist.init_process_group语句之前添加backend=‘gloo’,也就是在windows中使用GLOO替代NCCL

文章出处登录后可见!

已经登录?立即刷新

共计人评分,平均

到目前为止还没有投票!成为第一位评论此文章。

(0)
青葱年少的头像青葱年少普通用户
上一篇 2023年8月17日
下一篇 2023年8月17日

相关推荐