Skip to content

Add AllReduce distributed strategy design#373

Open
QiJune wants to merge 5 commits into
developfrom
allreduce_design
Open

Add AllReduce distributed strategy design#373
QiJune wants to merge 5 commits into
developfrom
allreduce_design

Conversation

@QiJune

@QiJune QiJune commented Oct 27, 2020

Copy link
Copy Markdown
Collaborator

Here is for beter review

@QiJune QiJune changed the title [WIP] Add AllReduce distributed strategy design Add AllReduce distributed strategy design Oct 28, 2020
@codecov

codecov Bot commented Oct 28, 2020

Copy link
Copy Markdown

Codecov Report

Merging #373 into develop will decrease coverage by 0.06%.
The diff coverage is n/a.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop     #373      +/-   ##
===========================================
- Coverage    87.75%   87.69%   -0.07%     
===========================================
  Files           33       33              
  Lines         1503     1503              
===========================================
- Hits          1319     1318       -1     
- Misses         121      122       +1     
  Partials        63       63              
Impacted Files Coverage Δ
vision/imageloader/imageloader.go 90.41% <0.00%> (-0.69%) ⬇️

Comment thread doc/allreduce.md

Single-process multi-GPU is not the recommended mode,
becase of its overhead of scatter/gather and GIL contention in every forward pass.
So, let's focus on DistributedDataParallel.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

GoTorch does not have GIL, does single-process multi-GPU mode fits GoTorch?

@QiJune QiJune Oct 29, 2020

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The answer is no. There are two reasons:

  • The overhead of scatter/gather is also nonnegligible. We once use scatter/parallel do/gather to support multi-GPU AllReduce in Paddle with C++. From the experience, the speedup ratio is not very good.

  • We could only use scatter/gather in multi-GPU of one node. It could not be scaled to multi-node multi-GPU.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants