Skip to content

Conversation

@colesbury
Copy link
Member

Fixes #20755

(Was broken in #20685)

cc @vadimkantorov

Copy link
Contributor

@facebook-github-bot facebook-github-bot left a 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.

Copy link
Contributor

@facebook-github-bot facebook-github-bot left a 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.

@colesbury
Copy link
Member Author

@pytorchbot rebase this please

Copy link
Contributor

@facebook-github-bot facebook-github-bot left a 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.

@vadimkantorov
Copy link
Contributor

:)

self.assertEqual(y[:, 40], range(4000, 4100))

y = torch.empty(100, 100, dtype=torch.double)
y.copy_(x)
Copy link
Contributor

@vadimkantorov vadimkantorov May 21, 2019

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

Copy link
Member Author

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.

@facebook-github-bot
Copy link
Contributor

@colesbury merged this pull request in 7a0c6d5.

zdevito pushed a commit to zdevito/ATen that referenced this pull request May 22, 2019
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Type conversion from float64 to float32 (cpu) sometimes crashes

6 participants