Traceback (most recent call last):
File "tools/train_net.py", line 209, in <module>
launch(
File "/home/e300/code/detectron2/detectron2/engine/launch.py", line 67, in launch
mp.spawn(
File "/home/e300/anaconda3/lib/python3.8/site-packages/torch/multiprocessing/spawn.py", line 247, in spawn
return start_processes(fn, args, nprocs, join, daemon, start_method='spawn')
File "/home/e300/anaconda3/lib/python3.8/site-packages/torch/multiprocessing/spawn.py", line 205, in start_processes
while not context.join():
File "/home/e300/anaconda3/lib/python3.8/site-packages/torch/multiprocessing/spawn.py", line 166, in join
raise ProcessRaisedException(msg, error_index, failed_process.pid)
torch.multiprocessing.spawn.ProcessRaisedException:
-- Process 3 terminated with the following error:
Traceback (most recent call last):
File "/home/e300/anaconda3/lib/python3.8/site-packages/torch/multiprocessing/spawn.py", line 59, in _wrap
fn(i, *args)
File "/home/e300/code/detectron2/detectron2/engine/launch.py", line 108, in _distributed_worker
raise e
File "/home/e300/code/detectron2/detectron2/engine/launch.py", line 98, in _distributed_worker
dist.init_process_group(
File "/home/e300/anaconda3/lib/python3.8/site-packages/torch/distributed/distributed_c10d.py", line 467, in init_process_group
barrier()
File "/home/e300/anaconda3/lib/python3.8/site-packages/torch/distributed/distributed_c10d.py", line 2145, in barrier
work = _default_pg.barrier()
RuntimeError: NCCL error in: ../torch/lib/c10d/ProcessGroupNCCL.cpp:859, invalid usage, NCCL version 2.7.8
ncclInvalidUsage: This usually reflects invalid usage of NCCL library (such as too many async ops, too many collectives at once, mixing streams in a group, etc).
错误原因:
用了多个gpu,根据自己电脑配置修改下gpu个数即可