Check to support older ROCm versions (#963)

[ROCm/rccl commit: 198f14923b]
Tento commit je obsažen v:
Bertan Dogancay
2023-11-15 12:36:31 -07:00
odevzdal GitHub
rodič 2351578d5b
revize 9e8eb41337
2 změnil soubory, kde provedl 24 přidání a 0 odebrání
+4
Zobrazit soubor
@@ -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;
}