From c5b575e00e49cb1f98153a4576eda87e7e1499e8 Mon Sep 17 00:00:00 2001 From: amdsc21 <96135754+amdsc21@users.noreply.github.com> Date: Wed, 24 May 2023 19:40:24 +0200 Subject: [PATCH] fix host __assert_fail --- include/xgboost/span.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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) \