diff --git a/include/xgboost/span.h b/include/xgboost/span.h index f85faa09b..fad8c16fb 100644 --- a/include/xgboost/span.h +++ b/include/xgboost/span.h @@ -42,6 +42,11 @@ #include #elif defined(__HIP_PLATFORM_AMD__) #include + +extern "C" void __assert_fail (const char *__assertion, const char *__file, + unsigned int __line, const char *__function) + noexcept (true) __attribute__ ((__noreturn__)); + #endif /*! @@ -122,7 +127,7 @@ namespace common { #define __ASSERT_STR_HELPER(x) #x -#if 0 /* need to fix __assert_fail, without __host__ */ +#if 1 #define HIP_KERNEL_CHECK(cond) \ (XGBOOST_EXPECT((cond), true) \ ? static_cast(0) \