Check for fine grain support using memory allocation

[ROCm/rccl commit: 669f1951a4]
This commit is contained in:
Wenkai Du
2019-11-01 15:58:49 -07:00
rodzic 0d6b476b08
commit 41f6319b33
4 zmienionych plików z 14 dodań i 32 usunięć
+9
Wyświetl plik
@@ -51,4 +51,13 @@ static ncclResult_t ncclCudaMemcpy(T* dst, T* src, size_t nelem) {
return ncclSuccess;
}
static bool hasFineGrainVramPcie() {
int *ptr;
if (hipExtMallocWithFlags((void**)&ptr, sizeof(int), hipDeviceMallocFinegrained) == hipSuccess) {
CUDACHECK(hipFree(ptr));
return true;
}
else
return false;
}
#endif