Merge branch 'sync-2024Jan24' into master-rocm

This commit is contained in:
Hui Liu 2024-01-26 15:47:12 -08:00
commit cf8c7e63af

View File

@ -20,7 +20,7 @@ void ArrayInterfaceHandler::SyncCudaStream(std::int64_t stream) {
* case where 0 might be given should either use None, 1, or 2 instead for * case where 0 might be given should either use None, 1, or 2 instead for
* clarity. * clarity.
*/ */
#if !defined(XGBOOST_USE_HIP) #ifndef XGBOOST_USE_HIP
LOG(FATAL) << "Invalid stream ID in array interface: " << stream; LOG(FATAL) << "Invalid stream ID in array interface: " << stream;
#endif #endif
case 1: case 1:
@ -73,7 +73,6 @@ bool ArrayInterfaceHandler::IsCudaPtr(void const* ptr) {
} else if (err == hipSuccess) { } else if (err == hipSuccess) {
#if HIP_VERSION_MAJOR < 6 #if HIP_VERSION_MAJOR < 6
switch (attr.memoryType) { switch (attr.memoryType) {
case hipMemoryTypeUnified:
case hipMemoryTypeHost: case hipMemoryTypeHost:
return false; return false;
default: default:
@ -81,7 +80,7 @@ bool ArrayInterfaceHandler::IsCudaPtr(void const* ptr) {
} }
#else #else
switch (attr.type) { switch (attr.type) {
case hipMemoryTypeUnified: case hipMemoryTypeUnregistered:
case hipMemoryTypeHost: case hipMemoryTypeHost:
return false; return false;
default: default: