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
Enabled HALF for fill() and zero() methods. Moved them into THTensorFill #17536
Conversation
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.
@izdeby has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
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.
Would be nice if these just got ported to ATen. Doesn't have to be this PR.
@@ -1748,6 +1749,7 @@ | |||
name: _th_zero_ | |||
cname: zero | |||
return: self | |||
cpu_half: True |
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.
Add cpu_half test maybe to test_torch?
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.
zero() and fill() are heavily used in tests, but its a good point about adding a specific test for half type only. this PR is landing right now but i will add these tests as a part of next PR which is in progress right now.
…ill (#17536) Summary: For some additional context on this change, please, see this [PR](pytorch/pytorch#17376) As a part of work on Bool Tensor, we will need to add support for a bool type to _fill() and _zero() methods that are currently located in THTensorMath. As we don't need anything else and those methods are not really math related - we are moving them out into separate THTensorFill for simplicity. Change: -moved _fill() and _zero() from THTensorMath.h to THTensorFill -enabled _fill() and _zero() for HALF type. Pull Request resolved: pytorch/pytorch#17536 Differential Revision: D14242130 Pulled By: izdeby fbshipit-source-id: 1d8bd806f0f5510723b9299d360b70cc4ab96afb
For some additional context on this change, please, see this PR
As a part of work on Bool Tensor, we will need to add support for a bool type to _fill() and _zero() methods that are currently located in THTensorMath. As we don't need anything else and those methods are not really math related - we are moving them out into separate THTensorFill for simplicity.
Change:
-moved _fill() and _zero() from THTensorMath.h to THTensorFill
-enabled _fill() and _zero() for HALF type.