-
Notifications
You must be signed in to change notification settings - Fork 25.7k
CopyBackward: Remove redundant src_device and unnecessary copy=True #60025
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
Conversation
`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]
💊 CI failures summary and remediationsAs 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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
|
@albanD the rest of the stack has been merged now. |
|
@albanD has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator. |
Stack from ghstack:
toalready copies unconditionally ifsrc.device() != options.device()sospecifying the copy argument is unnecessary.
src.device()is also completely equivalent tosrc.options().device()sostoring both is redundant.
Differential Revision: D29698627