Skip to content

Conversation

@gchanan
Copy link
Contributor

@gchanan gchanan commented Jul 12, 2018

This is to unify the handling of empty tensors in std/var between the dimension reduce and all reduce cases.
Also to avoid triggering ubsan errors around divide by 0.

This is to unify the handling of empty tensors in std/var between the dimension reduce and all reduce cases.
Also to avoid triggering ubsan errors around divide by 0.
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.

Copy link
Contributor

@ezyang ezyang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are there some UBSAN exclusions we get to remove now?

@gchanan
Copy link
Contributor Author

gchanan commented Jul 13, 2018

Good question! @yf225 can you explain how UBSAN works with divide by 0 now? I did this because I saw #9220 failing with divide-by-zero in the UBSAN tests (and it made sense to unify the implementations here), but I don't know the high level picture here.

zdevito pushed a commit to zdevito/ATen that referenced this pull request Jul 13, 2018
Summary:
This is to unify the handling of empty tensors in std/var between the dimension reduce and all reduce cases.
Also to avoid triggering ubsan errors around divide by 0.
Pull Request resolved: pytorch/pytorch#9400

Reviewed By: ezyang

Differential Revision: D8828879

Pulled By: gchanan

fbshipit-source-id: 6b9306805c94251eec28bd12e234618338bff4e3
zdevito pushed a commit to zdevito/ATen that referenced this pull request Jul 13, 2018
Summary:
This is to unify the handling of empty tensors in std/var between the dimension reduce and all reduce cases.
Also to avoid triggering ubsan errors around divide by 0.
Pull Request resolved: pytorch/pytorch#9400

Reviewed By: ezyang

Differential Revision: D8828879

Pulled By: gchanan

fbshipit-source-id: 6b9306805c94251eec28bd12e234618338bff4e3
goodlux pushed a commit to goodlux/pytorch that referenced this pull request Aug 15, 2018
Summary:
This is to unify the handling of empty tensors in std/var between the dimension reduce and all reduce cases.
Also to avoid triggering ubsan errors around divide by 0.
Pull Request resolved: pytorch#9400

Reviewed By: ezyang

Differential Revision: D8828879

Pulled By: gchanan

fbshipit-source-id: 6b9306805c94251eec28bd12e234618338bff4e3
@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