Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[reland] move rebuild buckets from end of first iteration to beginning of second iteration #44798

Closed
wants to merge 6 commits into from

Conversation

zhaojuanmao
Copy link
Contributor

@zhaojuanmao zhaojuanmao commented Sep 16, 2020

Stack from ghstack:

[test all]

Update for relanding: in ddp.join(), moved _rebuild_buckets from end of backward to beginning of forward as well.

Part of relanding PR #41954, this refactoring is to move rebuild_buckets call from end of first iteration to beginning of second iteration

Differential Revision: D23735185

NOTE FOR REVIEWERS: This PR has internal Facebook specific changes or comments, please review them on Phabricator!

…g of second iteration

[test all]

Update for relanding: in ddp.join(), moved _rebuild_buckets from end of backward to beginning of forward as well.

Part of relanding PR #41954, this refactoring is to move rebuild_buckets call from end of first iteration to beginning of second iteration
ghstack-source-id: 112011490

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

**NOTE FOR REVIEWERS**: This PR has internal Facebook specific changes or comments, please review them on [Phabricator](https://our.internmc.facebook.com/intern/diff/D23735185/)!

[ghstack-poisoned]
…to beginning of second iteration"

[test all]

Update for relanding: in ddp.join(), moved _rebuild_buckets from end of backward to beginning of forward as well.

Part of relanding PR #41954, this refactoring is to move rebuild_buckets call from end of first iteration to beginning of second iteration

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

**NOTE FOR REVIEWERS**: This PR has internal Facebook specific changes or comments, please review them on [Phabricator](https://our.internmc.facebook.com/intern/diff/D23735185/)!

[ghstack-poisoned]
@dr-ci
Copy link

dr-ci bot commented Sep 16, 2020

💊 CI failures summary and remediations

As of commit 333a3c8 (more details on the Dr. CI page):


  • 1/1 failures introduced in this PR

🕵️ 1 new failure recognized by patterns

The following CI failures do not appear to be due to upstream breakages:

See CircleCI build pytorch_linux_xenial_cuda10_2_cudnn7_py3_ge_config_legacy_test (1/1)

Step: "Run tests" (full log | diagnosis details | 🔁 rerun)

Sep 17 15:13:26 ERROR [5.779s]: test_tensorexpr_cpp_cuda (test_jit.TestJit)
Sep 17 15:13:25   test_factory_ops_requires_grad_fail (jit.test_unsupported_ops.TestUnsupportedOps) ... ok (0.004s) 
Sep 17 15:13:25   test_init_ops (jit.test_unsupported_ops.TestUnsupportedOps) ... ok (0.021s) 
Sep 17 15:13:25   test_ops_bound_in_functional (jit.test_unsupported_ops.TestUnsupportedOps) ... ok (0.003s) 
Sep 17 15:13:26   test_with_as (jit.test_with.TestWith) ... ok (0.084s) 
Sep 17 15:13:26   test_with_errors (jit.test_with.TestWith) ... ok (0.016s) 
Sep 17 15:13:26   test_with_exceptions (jit.test_with.TestWith) ... ok (0.006s) 
Sep 17 15:13:26   test_with_no_as (jit.test_with.TestWith) ... ok (0.085s) 
Sep 17 15:13:26   test_with_no_grad (jit.test_with.TestWith) ... ok (0.020s) 
Sep 17 15:13:26  
Sep 17 15:13:26 ====================================================================== 
Sep 17 15:13:26 ERROR [5.779s]: test_tensorexpr_cpp_cuda (test_jit.TestJit) 
Sep 17 15:13:26 ---------------------------------------------------------------------- 
Sep 17 15:13:26 Traceback (most recent call last): 
Sep 17 15:13:26   File "/opt/conda/lib/python3.6/site-packages/torch/testing/_internal/common_utils.py", line 818, in wrapper 
Sep 17 15:13:26     method(*args, **kwargs) 
Sep 17 15:13:26   File "/var/lib/jenkins/workspace/test/test_jit.py", line 1431, in test_tensorexpr_cpp_cuda 
Sep 17 15:13:26     torch._C._run_tensorexpr_cpp_tests(run_cuda=True) 
Sep 17 15:13:26 RuntimeError: std::fabs((v1[kPaddingSize + i]) - (v2[kPaddingSize + i])) < (abs_error) INTERNAL ASSERT FAILED at "/var/lib/jenkins/workspace/test/cpp/tensorexpr/padded_buffer.h":258, please report a bug to PyTorch. index: 0, v1: (b_v, 688448), v2: (b_ref, 778240) 
Sep 17 15:13:26  
Sep 17 15:13:26 ---------------------------------------------------------------------- 
Sep 17 15:13:26 Ran 2716 tests in 270.304s 

This comment was automatically generated by Dr. CI (expand for details).Follow this link to opt-out of these comments for your Pull Requests.

Please report bugs/suggestions on the GitHub issue tracker or post in the (internal) Dr. CI Users group.

See how this bot performed.

This comment has been revised 26 times.

…to beginning of second iteration"

[test all]

Update for relanding: in ddp.join(), moved _rebuild_buckets from end of backward to beginning of forward as well.

Part of relanding PR #41954, this refactoring is to move rebuild_buckets call from end of first iteration to beginning of second iteration

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

**NOTE FOR REVIEWERS**: This PR has internal Facebook specific changes or comments, please review them on [Phabricator](https://our.internmc.facebook.com/intern/diff/D23735185/)!

[ghstack-poisoned]
…to beginning of second iteration"

[test all]

Update for relanding: in ddp.join(), moved _rebuild_buckets from end of backward to beginning of forward as well.

Part of relanding PR #41954, this refactoring is to move rebuild_buckets call from end of first iteration to beginning of second iteration

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

**NOTE FOR REVIEWERS**: This PR has internal Facebook specific changes or comments, please review them on [Phabricator](https://our.internmc.facebook.com/intern/diff/D23735185/)!

[ghstack-poisoned]
zhaojuanmao added a commit that referenced this pull request Sep 17, 2020
…g of second iteration

Pull Request resolved: #44798

[test all]

Update for relanding: in ddp.join(), moved _rebuild_buckets from end of backward to beginning of forward as well.

Part of relanding PR #41954, this refactoring is to move rebuild_buckets call from end of first iteration to beginning of second iteration
ghstack-source-id: 112244222
ghstack-source-id: 112244222

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

**NOTE FOR REVIEWERS**: This PR has internal Facebook specific changes or comments, please review them on [Phabricator](https://our.internmc.facebook.com/intern/diff/D23735185/)!
…to beginning of second iteration"

[test all]

Update for relanding: in ddp.join(), moved _rebuild_buckets from end of backward to beginning of forward as well.

Part of relanding PR #41954, this refactoring is to move rebuild_buckets call from end of first iteration to beginning of second iteration

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

**NOTE FOR REVIEWERS**: This PR has internal Facebook specific changes or comments, please review them on [Phabricator](https://our.internmc.facebook.com/intern/diff/D23735185/)!

[ghstack-poisoned]
…to beginning of second iteration"

[test all]

Update for relanding: in ddp.join(), moved _rebuild_buckets from end of backward to beginning of forward as well.

Part of relanding PR #41954, this refactoring is to move rebuild_buckets call from end of first iteration to beginning of second iteration

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

**NOTE FOR REVIEWERS**: This PR has internal Facebook specific changes or comments, please review them on [Phabricator](https://our.internmc.facebook.com/intern/diff/D23735185/)!

[ghstack-poisoned]
zhaojuanmao added a commit that referenced this pull request Sep 17, 2020
…g of second iteration

Pull Request resolved: #44798

[test all]

Update for relanding: in ddp.join(), moved _rebuild_buckets from end of backward to beginning of forward as well.

Part of relanding PR #41954, this refactoring is to move rebuild_buckets call from end of first iteration to beginning of second iteration
ghstack-source-id: 112279261
ghstack-source-id: 112279261

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

**NOTE FOR REVIEWERS**: This PR has internal Facebook specific changes or comments, please review them on [Phabricator](https://our.internmc.facebook.com/intern/diff/D23735185/)!
@zhaojuanmao
Copy link
Contributor Author

failures are not related, ci-all tests also passed in #44893

Copy link
Member

@rohan-varma rohan-varma left a comment

Choose a reason for hiding this comment

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

LGTM, the changes in join() will ensure we don't run into desync issues as discussed.

@@ -583,6 +584,15 @@ def forward(self, *inputs, **kwargs):
work, ones, self.ddp_join_divide_by_initial_world_size
)

# Calling _rebuild_buckets before forward compuation,
Copy link
Contributor

Choose a reason for hiding this comment

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

compuation -> computation

@facebook-github-bot
Copy link
Contributor

This pull request has been merged in e14b208.

xuzhao9 pushed a commit that referenced this pull request Sep 18, 2020
…g of second iteration (#44798)

Summary:
Pull Request resolved: #44798

[test all]

Update for relanding: in ddp.join(), moved _rebuild_buckets from end of backward to beginning of forward as well.

Part of relanding PR #41954, this refactoring is to move rebuild_buckets call from end of first iteration to beginning of second iteration
ghstack-source-id: 112279261
ghstack-source-id: 112279261

Test Plan: unit tests

Reviewed By: rohan-varma

Differential Revision: D23735185

fbshipit-source-id: c26e0efeecb3511640120faa1122a2c856cd694e
@facebook-github-bot facebook-github-bot deleted the gh/zhaojuanmao/54/head branch September 21, 2020 14:14
rohan-varma added a commit that referenced this pull request Oct 6, 2020
…_buckets fails

Occasionally users run DDP with models with unused params, in this
case we would like to surface an error message telling them to run with
find_unused_params=True. However, a recent change to rebuild_buckets logic (#44798) made
it so that we raise a size mismatch error when this happens, but the
information about unused parameters is likely to be more useful and likely to
be the most common case of failure. Prefer raising this error over the
subsequent size mismatch errors.

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

[ghstack-poisoned]
rohan-varma added a commit that referenced this pull request Oct 6, 2020
…hen rebuild_buckets fails"

Occasionally users run DDP with models with unused params, in this
case we would like to surface an error message telling them to run with
find_unused_params=True. However, a recent change to rebuild_buckets logic (#44798) made
it so that we raise a size mismatch error when this happens, but the
information about unused parameters is likely to be more useful and likely to
be the most common case of failure. Prefer raising this error over the
subsequent size mismatch errors.

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

[ghstack-poisoned]
rohan-varma added a commit that referenced this pull request Oct 6, 2020
…_buckets fails

Pull Request resolved: #45933

Occasionally users run DDP with models with unused params, in this
case we would like to surface an error message telling them to run with
find_unused_params=True. However, a recent change to rebuild_buckets logic (#44798) made
it so that we raise a size mismatch error when this happens, but the
information about unused parameters is likely to be more useful and likely to
be the most common case of failure. Prefer raising this error over the
subsequent size mismatch errors.
ghstack-source-id: 113713050

Differential Revision: [D24151256](https://our.internmc.facebook.com/intern/diff/D24151256/)
rohan-varma added a commit that referenced this pull request Oct 7, 2020
…hen rebuild_buckets fails"

Occasionally users run DDP with models with unused params, in this
case we would like to surface an error message telling them to run with
find_unused_params=True. However, a recent change to rebuild_buckets logic (#44798) made
it so that we raise a size mismatch error when this happens, but the
information about unused parameters is likely to be more useful and likely to
be the most common case of failure. Prefer raising this error over the
subsequent size mismatch errors.

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

[ghstack-poisoned]
rohan-varma added a commit that referenced this pull request Oct 8, 2020
…hen rebuild_buckets fails"

Occasionally users run DDP with models with unused params, in this
case we would like to surface an error message telling them to run with
find_unused_params=True. However, a recent change to rebuild_buckets logic (#44798) made
it so that we raise a size mismatch error when this happens, but the
information about unused parameters is likely to be more useful and likely to
be the most common case of failure. Prefer raising this error over the
subsequent size mismatch errors.

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

[ghstack-poisoned]
facebook-github-bot pushed a commit that referenced this pull request Oct 9, 2020
…_buckets fails (#45933)

Summary:
Pull Request resolved: #45933

Occasionally users run DDP with models with unused params, in this
case we would like to surface an error message telling them to run with
find_unused_params=True. However, a recent change to rebuild_buckets logic (#44798) made
it so that we raise a size mismatch error when this happens, but the
information about unused parameters is likely to be more useful and likely to
be the most common case of failure. Prefer raising this error over the
subsequent size mismatch errors.
ghstack-source-id: 113914759

Test Plan: Added unittest

Reviewed By: mrshenli

Differential Revision: D24151256

fbshipit-source-id: 5d349a988b4aac7d3e0ef7b3cd84dfdcbe9db675
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants