Default HostMalloc to uncached memory

Change-Id: I72e19c7f7820a77fd5afc09f09cfea9acd0b8e84
此提交包含在:
Christophe Paquot authored and Christophe Paquot committed 2020-04-03 19:19:33 -04:00
1 父節點 74dc32537e
當前提交 b820c66c55
1 file changed
+2 -1
+2 -1
查看文件
@@ -209,7 +209,8 @@ hipError_t hipHostMalloc(void** ptr, size_t sizeBytes, unsigned int flags) {
}
unsigned int ihipFlags = CL_MEM_SVM_FINE_GRAIN_BUFFER | (flags << 16);
if (flags & (hipHostMallocCoherent | hipHostMallocMapped) ||
if (flags == 0 ||
flags & (hipHostMallocCoherent | hipHostMallocMapped) ||
(!(flags & hipHostMallocNonCoherent) && HIP_HOST_COHERENT)) {
ihipFlags |= CL_MEM_SVM_ATOMICS;
}