workaround memoryType and change rccl config

This commit is contained in:
Hui Liu
2024-01-11 13:13:14 -08:00
parent 82d81bca94
commit 7dc152450e
3 changed files with 13 additions and 3 deletions

View File

@@ -71,6 +71,7 @@ bool ArrayInterfaceHandler::IsCudaPtr(void const* ptr) {
if (err == hipErrorInvalidValue) {
return false;
} else if (err == hipSuccess) {
#if HIP_VERSION_MAJOR < 6
switch (attr.memoryType) {
case hipMemoryTypeUnified:
case hipMemoryTypeHost:
@@ -78,6 +79,15 @@ bool ArrayInterfaceHandler::IsCudaPtr(void const* ptr) {
default:
return true;
}
#else
switch (attr.type) {
case hipMemoryTypeUnified:
case hipMemoryTypeHost:
return false;
default:
return true;
}
#endif
return true;
} else {
return false;