fix memory type
This commit is contained in:
parent
3fe874078c
commit
2cb579ff3c
@ -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:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user