Check for fine grain support using memory allocation

This commit is contained in:
Wenkai Du committed 2019-11-01 15:58:49 -07:00
1 parent 90b2921207
commit 669f1951a4
4 files changed
+14 -32

No files matched your search

+9
View File
@@ -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