Skip to content

[WIP][Grad Compression] Unittest to verify allreduce_hook parity#50851

Closed
rohan-varma wants to merge 4 commits intogh/rohan-varma/218/basefrom
gh/rohan-varma/218/head
Closed

[WIP][Grad Compression] Unittest to verify allreduce_hook parity#50851
rohan-varma wants to merge 4 commits intogh/rohan-varma/218/basefrom
gh/rohan-varma/218/head

Conversation

@rohan-varma
Copy link
Copy Markdown
Contributor

@rohan-varma rohan-varma commented Jan 20, 2021

Stack from ghstack:

Improves upon the previous unittest to ensure allreduce_hook results in the same gradients as vanilla allreduce in DDP.

Differential Revision: D25963654

Improves upon the previous unittest to ensure allreduce_hook results in the same gradients as vanilla allreduce in DDP.

Note that this diff removes the powerSGD hook test, will add that in the next PR as it needs to be slightly different (gradients will no longer be equal)

Differential Revision: [D25963654](https://our.internmc.facebook.com/intern/diff/D25963654/)

[ghstack-poisoned]
@facebook-github-bot facebook-github-bot added cla signed oncall: distributed Add this issue/PR to distributed oncall triage queue labels Jan 20, 2021
@rohan-varma rohan-varma changed the title [Grad Compression] Unittest to verify allreduce_hook parity [WIP][Grad Compression] Unittest to verify allreduce_hook parity Jan 20, 2021
…parity"


Improves upon the previous unittest to ensure allreduce_hook results in the same gradients as vanilla allreduce in DDP.

Differential Revision: [D25963654](https://our.internmc.facebook.com/intern/diff/D25963654/)

[ghstack-poisoned]
rohan-varma added a commit that referenced this pull request Jan 21, 2021
Pull Request resolved: #50851

Improves upon the previous unittest to ensure allreduce_hook results in the same gradients as vanilla allreduce in DDP.

ghstack-source-id: 120082598

Differential Revision: [D25963654](https://our.internmc.facebook.com/intern/diff/D25963654/)
@wayi1
Copy link
Copy Markdown
Contributor

wayi1 commented Jan 21, 2021

Since this test is only for allreduce_hook, it will be better to add it rather than replace the test for PowerSGD_hook.

@codecov
Copy link
Copy Markdown

codecov Bot commented Jan 21, 2021

Codecov Report

Merging #50851 (60da270) into gh/rohan-varma/218/base (57fb2c0) will decrease coverage by 0.34%.
The diff coverage is 24.44%.

@@                     Coverage Diff                     @@
##           gh/rohan-varma/218/base   #50851      +/-   ##
===========================================================
- Coverage                    81.00%   80.65%   -0.35%     
===========================================================
  Files                         1916     1916              
  Lines                       209532   209560      +28     
===========================================================
- Hits                        169728   169026     -702     
- Misses                       39804    40534     +730     

…parity"


Improves upon the previous unittest to ensure allreduce_hook results in the same gradients as vanilla allreduce in DDP.

Differential Revision: [D25963654](https://our.internmc.facebook.com/intern/diff/D25963654/)

[ghstack-poisoned]
rohan-varma added a commit that referenced this pull request Jan 21, 2021
Pull Request resolved: #50851

Improves upon the previous unittest to ensure allreduce_hook results in the same gradients as vanilla allreduce in DDP.

ghstack-source-id: 120108788

Differential Revision: [D25963654](https://our.internmc.facebook.com/intern/diff/D25963654/)
@wayi1 wayi1 self-requested a review January 21, 2021 23:29
…parity"


Improves upon the previous unittest to ensure allreduce_hook results in the same gradients as vanilla allreduce in DDP.

Differential Revision: [D25963654](https://our.internmc.facebook.com/intern/diff/D25963654/)

[ghstack-poisoned]
rohan-varma added a commit that referenced this pull request Jan 22, 2021
Pull Request resolved: #50851

Improves upon the previous unittest to ensure allreduce_hook results in the same gradients as vanilla allreduce in DDP.

ghstack-source-id: 120229103

Differential Revision: [D25963654](https://our.internmc.facebook.com/intern/diff/D25963654/)
@facebook-github-bot
Copy link
Copy Markdown
Contributor

This pull request has been merged in 5a661e0.

@facebook-github-bot facebook-github-bot deleted the gh/rohan-varma/218/head branch January 26, 2021 15:21
laurentdupin pushed a commit to laurentdupin/pytorch that referenced this pull request Apr 24, 2026
…orch#50851)

Summary:
Pull Request resolved: pytorch#50851

Improves upon the previous unittest to ensure allreduce_hook results in the same gradients as vanilla allreduce in DDP.

ghstack-source-id: 120229103

Test Plan:
buck build mode/dev-nosan //caffe2/test/distributed:distributed_nccl_fork --keep-going
BACKEND=nccl WORLD_SIZE=2 ~/fbcode/buck-out/dev/gen/caffe2/test/distributed/distributed_nccl_fork#binary.par -r test_ddp_hook_parity

Reviewed By: SciPioneer

Differential Revision: D25963654

fbshipit-source-id: d55eee0aee9cf1da52aa0c4ba1066718aa8fd9a4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla signed Merged oncall: distributed Add this issue/PR to distributed oncall triage queue

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants