From 2cb579ff3cd90dd7c551d39e480621acc735809d Mon Sep 17 00:00:00 2001 From: Hui Liu <96135754+hliuca@users.noreply.github.com> Date: Fri, 26 Jan 2024 15:46:42 -0800 Subject: [PATCH] fix memory type --- src/data/array_interface.cu | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/data/array_interface.cu b/src/data/array_interface.cu index 569196407..2ce80b91a 100644 --- a/src/data/array_interface.cu +++ b/src/data/array_interface.cu @@ -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 * clarity. */ -#if !defined(XGBOOST_USE_HIP) +#ifndef XGBOOST_USE_HIP LOG(FATAL) << "Invalid stream ID in array interface: " << stream; #endif case 1: @@ -73,7 +73,6 @@ bool ArrayInterfaceHandler::IsCudaPtr(void const* ptr) { } else if (err == hipSuccess) { #if HIP_VERSION_MAJOR < 6 switch (attr.memoryType) { - case hipMemoryTypeUnified: case hipMemoryTypeHost: return false; default: @@ -81,7 +80,7 @@ bool ArrayInterfaceHandler::IsCudaPtr(void const* ptr) { } #else switch (attr.type) { - case hipMemoryTypeUnified: + case hipMemoryTypeUnregistered: case hipMemoryTypeHost: return false; default: