Skip to content

Conversation

@pietern
Copy link
Contributor

@pietern pietern commented Apr 29, 2019

Stack:
    :white_circle:  #19901 Finer grained consistency check in reducer  💛
    :black_circle:  #19897 Only call into reducer if torch.is_grad_enabled()  💚

The existing code used expect_autograd_hooks_ as a proxy for the
situation where finalization of the previous iteration is needed. This
is not correct, however, since you may decide to completely ignore the
output of a DDP wrapped module. If this is the case, and no gradients
have been passed to the reducer, it is fine to keep going. This commit
adds a new variable require_finalize_ that tracks whether the
finalization is really needed.

Differential Revision: D15118871

Differential Revision: D15118871
Differential Version: 80866996
@pytorchbot pytorchbot added the oncall: distributed Add this issue/PR to distributed oncall triage queue label Apr 29, 2019
Differential Revision: D15118871
Differential Version: 80867080
Differential Revision: D15118871
Differential Version: 80867290
@facebook-github-bot
Copy link
Contributor

This pull request has been merged in 8413600.

@pietern pietern deleted the export-D15118871 branch April 29, 2019 16:02
soumith pushed a commit that referenced this pull request Apr 29, 2019
Summary:
Pull Request resolved: #19901

The existing code used `expect_autograd_hooks_` as a proxy for the
situation where finalization of the previous iteration is needed. This
is not correct, however, since you may decide to completely ignore the
output of a DDP wrapped module. If this is the case, and no gradients
have been passed to the reducer, it is fine to keep going. This commit
adds a new variable `require_finalize_` that tracks whether the
finalization is really needed.

Reviewed By: mrshenli

Differential Revision: D15118871

fbshipit-source-id: 25938eaf1fe13e2940feae1312892b9d3da8a67d
zhangguanheng66 pushed a commit to zhangguanheng66/pytorch that referenced this pull request May 6, 2019
Summary:
Pull Request resolved: pytorch#19901

The existing code used `expect_autograd_hooks_` as a proxy for the
situation where finalization of the previous iteration is needed. This
is not correct, however, since you may decide to completely ignore the
output of a DDP wrapped module. If this is the case, and no gradients
have been passed to the reducer, it is fine to keep going. This commit
adds a new variable `require_finalize_` that tracks whether the
finalization is really needed.

Reviewed By: mrshenli

Differential Revision: D15118871

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

Labels

oncall: distributed Add this issue/PR to distributed oncall triage queue

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants