Check to support older ROCm versions (#963)

[ROCm/rccl commit: 198f14923b]
This commit is contained in:
Bertan Dogancay
2023-11-15 12:36:31 -07:00
committed by GitHub
parent 2351578d5b
commit 9e8eb41337
2 changed files with 24 additions and 0 deletions
+4
View File
@@ -14,7 +14,11 @@ static ncclResult_t CudaPtrCheck(const void* pointer, struct ncclComm* comm, con
WARN("%s : %s %p is not a valid pointer", opname, ptrname, pointer);
return ncclInvalidArgument;
}
#if ROCM_VERSION < 50500
if (attr.memoryType == cudaMemoryTypeDevice && attr.device != comm->cudaDev) {
#else
if (attr.type == cudaMemoryTypeDevice && attr.device != comm->cudaDev) {
#endif
WARN("%s : %s allocated on device %d mismatchs with NCCL device %d", opname, ptrname, attr.device, comm->cudaDev);
return ncclInvalidArgument;
}