Add copy= keyword to Tensor.to#12571
Closed
t-vi wants to merge 2 commits intopytorch:masterfrom
Closed
Conversation
Contributor
|
ASAN police: |
Collaborator
Author
|
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
approved these changes
Oct 11, 2018
Contributor
ezyang
left a comment
There was a problem hiding this comment.
C++ has some bad boolean blindness now, but I'm not sure what a good fix for this is.
Contributor
facebook-github-bot
left a comment
There was a problem hiding this comment.
SsnL is landing this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
zdevito
pushed a commit
to zdevito/ATen
that referenced
this pull request
Oct 12, 2018
Summary: Fixes: #12454 Pull Request resolved: pytorch/pytorch#12571 Differential Revision: D10356994 Pulled By: SsnL fbshipit-source-id: d87416078a5a8e5ffa690cd73c09fa6b4e16aa25
ssnl
reviewed
Oct 12, 2018
| "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.
t-vi
added a commit
to t-vi/pytorch
that referenced
this pull request
Oct 12, 2018
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.
facebook-github-bot
pushed a commit
that referenced
this pull request
Oct 17, 2018
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
laurentdupin
pushed a commit
to laurentdupin/pytorch
that referenced
this pull request
Apr 24, 2026
Summary: Fixes: pytorch#12454 Pull Request resolved: pytorch#12571 Differential Revision: D10356994 Pulled By: SsnL fbshipit-source-id: d87416078a5a8e5ffa690cd73c09fa6b4e16aa25
laurentdupin
pushed a commit
to laurentdupin/pytorch
that referenced
this pull request
Apr 24, 2026
Summary: 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. Thank you SsnL for noticing. Pull Request resolved: pytorch#12617 Differential Revision: D10392053 Pulled By: ezyang fbshipit-source-id: b67a5def7993189b4b47193abc7b741b7d07512c
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes: #12454