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

Add support to __half and nv_bfloat16 to most math functions #1554

Merged
merged 12 commits into from
Jun 2, 2023
10 changes: 10 additions & 0 deletions cpp/include/raft/core/detail/macros.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,12 @@
#endif
#endif

#if defined(_RAFT_HAS_CUDA)
#define CUDA_ONLY_CONDITION(condition) condition
#else
#define CUDA_ONLY_CONDITION(condition) true
#endif
Nyrio marked this conversation as resolved.
Show resolved Hide resolved

#ifndef _RAFT_HOST_DEVICE
#if defined(_RAFT_HAS_CUDA)
#define _RAFT_DEVICE __device__
Expand All @@ -40,6 +46,10 @@
#define RAFT_INLINE_FUNCTION _RAFT_HOST_DEVICE _RAFT_FORCEINLINE
#endif

#ifndef RAFT_DEVICE_INLINE_FUNCTION
#define RAFT_DEVICE_INLINE_FUNCTION _RAFT_DEVICE _RAFT_FORCEINLINE
#endif

// The RAFT_INLINE_CONDITIONAL is a conditional inline specifier that removes
// the inline specification when RAFT_COMPILED is defined.
//
Expand Down
Loading