問題:RuntimeError: Default process group has not been initialized, please make sure to call init_process_group.
解決: github503問題,解決方案,windows環(huán)境使用detectron2 # 503文章來源地址http://www.zghlxwxcb.cn/news/detail-522707.html
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)
出現(xiàn)報(bào)錯(cuò) RuntimeError: Distributed package doesn't have NCCL built in
原因分析: windows不支持NCCL backend
解決方案: 在dist.init_process_group語(yǔ)句之前添加backend=‘gloo’,也就是在windows中使用GLOO替代NCCL
文章來源:http://www.zghlxwxcb.cn/news/detail-522707.html
到了這里,關(guān)于detectron2報(bào)錯(cuò)解決方案 RuntimeError: Default process group has not been initialized, please make sure to c的文章就介紹完了。如果您還想了解更多內(nèi)容,請(qǐng)?jiān)谟疑辖撬阉鱐OY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!