Updating to use hipDeviceMallocUncached (#95)
Use hipDeviceMallocUncached instead of hipDeviceMallocFinegrained on newer ROCm versions.
[ROCm/rccl-tests commit: fc9917e0da]
This commit is contained in:
@@ -880,9 +880,16 @@ testResult_t AllocateBuffs(void **sendbuff, size_t sendBytes, void **recvbuff, s
|
||||
nbytes = nbytes + cache_bytes;
|
||||
}
|
||||
if (memorytype == ncclFine) {
|
||||
CUDACHECK(hipExtMallocWithFlags(sendbuff, nbytes, hipDeviceMallocFinegrained));
|
||||
CUDACHECK(hipExtMallocWithFlags(recvbuff, nbytes, hipDeviceMallocFinegrained));
|
||||
if (datacheck) CUDACHECK(hipExtMallocWithFlags(expected, recvBytes, hipDeviceMallocFinegrained));
|
||||
if(HIP_VERSION >= 50700000) {
|
||||
CUDACHECK(hipExtMallocWithFlags(sendbuff, nbytes, hipDeviceMallocUncached));
|
||||
CUDACHECK(hipExtMallocWithFlags(recvbuff, nbytes, hipDeviceMallocUncached));
|
||||
if (datacheck) CUDACHECK(hipExtMallocWithFlags(expected, recvBytes, hipDeviceMallocUncached));
|
||||
}
|
||||
else {
|
||||
CUDACHECK(hipExtMallocWithFlags(sendbuff, nbytes, hipDeviceMallocFinegrained));
|
||||
CUDACHECK(hipExtMallocWithFlags(recvbuff, nbytes, hipDeviceMallocFinegrained));
|
||||
if (datacheck) CUDACHECK(hipExtMallocWithFlags(expected, recvBytes, hipDeviceMallocFinegrained));
|
||||
}
|
||||
}
|
||||
else if (memorytype == ncclHost) {
|
||||
CUDACHECK(hipHostMalloc(sendbuff, nbytes));
|
||||
|
||||
Reference in New Issue
Block a user