-
Notifications
You must be signed in to change notification settings - Fork 26.3k
Remove TH compatibility calls for strides. #10414
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
This does the following: 1) Delete USE_TH_SCALAR ifdefs, since this is now enabled. 2) sizes_, strides_ in THTensor are always at least size 1 (and may have is_zero_dim_ set). A future PR will remove is_zero_dim_, so sizes_ and strides_ will just be size 0. 3) Allow IntList sizes with nullptr; this wasn't allowed previously because sizes were always at least size 1 in TH. 4) Get rid of get_intlist_size_th compatibility call in ATen; we now just use the IntList size directly. We still use the stride compatibility call; a future PR will remove this. 5) Fix a case in TensorIterator where a tensor was resized with shape length 0 and stride length 1.
This should "just work" now that sizes/strides are unified between TH and ATen.
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.
gchanan has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
|
This is stacked on top of #10412; the correct review to do is https://github.com/pytorch/pytorch/pull/10414/commits/92659bc54baf8f608682c307167792224f26762f..HEAD. |
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.
gchanan has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
Summary: This should just work now that sizes/strides are unified between TH and ATen. Pull Request resolved: pytorch/pytorch#10414 Differential Revision: D9274681 Pulled By: gchanan fbshipit-source-id: 69eb766f4e3a5b6c57b15837cffdef513b6d7817
Summary: This should just work now that sizes/strides are unified between TH and ATen. Pull Request resolved: pytorch#10414 Differential Revision: D9274681 Pulled By: gchanan fbshipit-source-id: 69eb766f4e3a5b6c57b15837cffdef513b6d7817
This should just work now that sizes/strides are unified between TH and ATen.