Skip to content
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

[ENH] Add __half overloads to math API wrappers #1542

Open
Nyrio opened this issue May 22, 2023 · 0 comments
Open

[ENH] Add __half overloads to math API wrappers #1542

Nyrio opened this issue May 22, 2023 · 0 comments
Labels
0 - Backlog In queue waiting for assignment cpp improvement Improvement / enhancement to an existing function

Comments

@Nyrio
Copy link
Contributor

Nyrio commented May 22, 2023

The wrappers in https://github.com/rapidsai/raft/blob/branch-23.06/cpp/include/raft/core/math.hpp delegate work to the appropriate CUDA intrinsic. However, the CUDA intrinsics for square root, trigonometry functions, etc, have different names for __half (e.g hsqrt instead of sqrt).

To facilitate templated code, we could add overloads of sqrt calling hsqrt on the device and similarly for trigonometry functions.
On host, we can either not define those, or use the fp32 functions.

@Nyrio Nyrio added improvement Improvement / enhancement to an existing function 0 - Backlog In queue waiting for assignment cpp labels May 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0 - Backlog In queue waiting for assignment cpp improvement Improvement / enhancement to an existing function
Projects
None yet
Development

No branches or pull requests

1 participant