Skip to content

Conversation

@mrshenli
Copy link
Contributor

@mrshenli mrshenli commented May 8, 2019

C++ Scatter and Gather always set autograd history for input data tensors regardless whether they require grad. This hits assertion failure in set_history(Tensor, shared_ptr<Function> grad_fn)
where grad_fn cannot be nullptr. After this PR, C++ Scatter and Gather only record grad_fn when required.

input data tensors regardless whether they require grad. This hits
assertion failure in set_history(Tensor, shared_ptr<Function> grad_fn)
where grad_fn cannot be nullptr. After this PR, C++ Scatter and
Gather only record grad_fn when necessary.
@pytorchbot pytorchbot added the module: autograd Related to torch.autograd, and the autograd engine in general label May 8, 2019
@mrshenli
Copy link
Contributor Author

mrshenli commented May 8, 2019

blocking #20238

Copy link
Contributor

@facebook-github-bot facebook-github-bot left a comment

Choose a reason for hiding this comment

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

@mrshenli has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

@mrshenli mrshenli added the oncall: distributed Add this issue/PR to distributed oncall triage queue label May 8, 2019
@mrshenli mrshenli requested a review from pietern May 8, 2019 21:07
Copy link
Contributor

@facebook-github-bot facebook-github-bot left a comment

Choose a reason for hiding this comment

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

@mrshenli has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

@mrshenli
Copy link
Contributor Author

mrshenli commented May 9, 2019

@pytorchbot retest this please

@facebook-github-bot
Copy link
Contributor

@mrshenli merged this pull request in d6815e1.

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

Labels

Merged module: autograd Related to torch.autograd, and the autograd engine in general 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