fix host __assert_fail

This commit is contained in:
amdsc21 2023-05-24 19:40:24 +02:00
parent 1354138b7d
commit c5b575e00e

View File

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