-
Notifications
You must be signed in to change notification settings - Fork 26.3k
Add copy= keyword to Tensor.to #12571
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
|
ASAN police: |
|
Oops. Reading args 0, 1, 2, 4 in a tuple of four elements... |
Oops. Thanks @ezyang and ASAN! Also add a test so our own test fails on that.
ezyang
left a comment
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.
C++ has some bad boolean blindness now, but I'm not sure what a good fix for this is.
facebook-github-bot
left a comment
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.
SsnL is landing this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
Summary: Fixes: #12454 Pull Request resolved: pytorch/pytorch#12571 Differential Revision: D10356994 Pulled By: SsnL fbshipit-source-id: d87416078a5a8e5ffa690cd73c09fa6b4e16aa25
| "to(Device device=None, ScalarType dtype=None, bool non_blocking=False)", | ||
| "to(ScalarType dtype, bool non_blocking=False)", | ||
| "to(Tensor tensor, bool non_blocking=False)", | ||
| "to(Device device=None, ScalarType dtype=None, bool non_blocking=False, bool copy=False)", |
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
Module.to uses the Tensor.to parsing facility. It should not, however, accept "copy" as a keyword/fourth positional argument. See pytorch#12571 for discussion.
Summary: Module.to uses the Tensor.to parsing facility. It should not, however, accept "copy" as a keyword/fourth positional argument. See #12571 for discussion. Thank you SsnL for noticing. Pull Request resolved: #12617 Differential Revision: D10392053 Pulled By: ezyang fbshipit-source-id: b67a5def7993189b4b47193abc7b741b7d07512c
Fixes: #12454