video-recognition icon indicating copy to clipboard operation
video-recognition copied to clipboard

About synchronize between difference gpus

Open yifanjiang19 opened this issue 4 years ago • 0 comments

Hi, I noticed that you use torch.nn.DistributedDataParallel. This program will launch n process (n=gpu number) and calculate the loss in different gpus individually. Is the synchronization (like torch.distributed.all_reduce()) needed before loss.backward() to synchronize the loss in all gpus?

Thanks!

yifanjiang19 avatar Dec 26 '19 18:12 yifanjiang19