KEMBAR78
CopyBackward: Remove redundant src_device and unnecessary copy=True by peterbell10 · Pull Request #60025 · pytorch/pytorch · GitHub
Skip to content

Conversation

@peterbell10
Copy link
Collaborator

@peterbell10 peterbell10 commented Jun 15, 2021

Stack from ghstack:

to already copies unconditionally if src.device() != options.device() so
specifying the copy argument is unnecessary.

src.device() is also completely equivalent to src.options().device() so
storing both is redundant.

Differential Revision: D29698627

`to` already copies unconditionally if `src.device() != options.device()` so
specifying the copy argument is unnecessary.

`src.device()` is also completely equivalent to `src.options().device()` so
storing both is redundant.

[ghstack-poisoned]
@facebook-github-bot
Copy link
Contributor

facebook-github-bot commented Jun 15, 2021

💊 CI failures summary and remediations

As of commit dae2cef (more details on the Dr. CI page and at hud.pytorch.org/pr/60025):


💚 💚 Looks good so far! There are no failures yet. 💚 💚


Preview docs built from this PR

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 to the (internal) Dr. CI Users group.

Click here to manually regenerate this comment.

peterbell10 added a commit that referenced this pull request Jun 15, 2021
`to` already copies unconditionally if `src.device() != options.device()` so
specifying the copy argument is unnecessary.

`src.device()` is also completely equivalent to `src.options().device()` so
storing both is redundant.

ghstack-source-id: 171159b
Pull Request resolved: #60025
Copy link
Collaborator

@albanD albanD left a comment

Choose a reason for hiding this comment

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

LGTM

@peterbell10
Copy link
Collaborator Author

@albanD the rest of the stack has been merged now.

@albanD
Copy link
Collaborator

albanD commented Jul 14, 2021

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

@facebook-github-bot
Copy link
Contributor

@albanD merged this pull request in 5407108.

@facebook-github-bot facebook-github-bot deleted the gh/peterbell10/75/head branch July 19, 2021 14:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants