-
Notifications
You must be signed in to change notification settings - Fork 25.7k
[WIP] Support abs for half on CUDA and bool on both CPU and CUDA. #23579
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
| break; | ||
| case ScalarType::Half: | ||
| gpu_kernel(iter, []GPU_LAMBDA(at::Half a) -> half { | ||
| at::Half nega = -a; |
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.
This has incorrect behavior for -0.0. abs(-0.0) = 0.0, but this will return -0.0.
(Please also add a test case for this if there isn't one present)
) Summary: As pointed out by colesbury in #23579 (comment) Pull Request resolved: #23701 Differential Revision: D16623781 Pulled By: mrshenli fbshipit-source-id: f48a29499128b08d2ac8bc9e466f2326112ead94
|
Hi @xuhdev! Thank you for your pull request. We require contributors to sign our Contributor License Agreement, and yours needs attention. You currently have a record in our system, but we do not have a signature on file. In order for us to review and merge your code, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA. If you have received this in error or have any questions, please contact us at cla@fb.com. Thanks! |
|
Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks! |
|
Looks like this PR hasn't been updated in a while so we're going to go ahead and mark this as |
|
Looks like this PR hasn't been updated in a while so we're going to go ahead and mark this as |
Stack from ghstack: