-
Notifications
You must be signed in to change notification settings - Fork 26.3k
Fix copy_transpose_valid check #20759
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
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.
@colesbury has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
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.
@colesbury has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
|
@pytorchbot rebase this please |
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.
@colesbury has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
|
:) |
| self.assertEqual(y[:, 40], range(4000, 4100)) | ||
|
|
||
| y = torch.empty(100, 100, dtype=torch.double) | ||
| y.copy_(x) |
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.
@colesbury This tests copy from a transposed float array (x) to a contiguous float/double array (y). Though in my example it's double->float direction that breaks. Not sure it changes much though
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.
The test captures the aspect that it's copying between different data types, which is all that matters here.
|
@colesbury merged this pull request in 7a0c6d5. |
Summary: Fixes #20755 (Was broken in #20685) cc vadimkantorov Pull Request resolved: pytorch/pytorch#20759 Differential Revision: D15433712 Pulled By: colesbury fbshipit-source-id: 29f612f7d4d7b73158d6f5dc1e46fd2f8fb09a2f
Fixes #20755
(Was broken in #20685)
cc @vadimkantorov