From 51efb7442e82e4772f77e3f0f83dff6acba20be3 Mon Sep 17 00:00:00 2001 From: Hui Liu <96135754+amdsc21@users.noreply.github.com> Date: Thu, 2 Nov 2023 10:53:12 -0700 Subject: [PATCH] support HIP for half in coll --- src/collective/coll.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/collective/coll.cc b/src/collective/coll.cc index b1b2db844..3191896f8 100644 --- a/src/collective/coll.cc +++ b/src/collective/coll.cc @@ -25,6 +25,8 @@ template bool constexpr IsFloatingPointV() { #if defined(XGBOOST_USE_CUDA) return std::is_floating_point_v || std::is_same_v; +#elif defined(XGBOOST_USE_HIP) /* hack for HIP/Clang */ + return std::is_floating_point_v || (sizeof(T) == sizeof(unsigned short)); #else return std::is_floating_point_v; #endif // defined(XGBOOST_USE_CUDA)