Skip to content

Conversation

@gchanan
Copy link
Contributor

@gchanan gchanan commented Aug 10, 2018

This should just work now that sizes/strides are unified between TH and ATen.

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.
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.

gchanan has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

@gchanan
Copy link
Contributor Author

gchanan commented Aug 10, 2018

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.

gchanan has imported 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 Aug 10, 2018
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
goodlux pushed a commit to goodlux/pytorch that referenced this pull request Aug 15, 2018
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
@ezyang ezyang added the merged label Jun 26, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants