Skip to content

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

Open
@Nyrio

Description

@Nyrio

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    0 - BacklogIn queue waiting for assignmentcppimprovementImprovement / enhancement to an existing function

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions