From fa5a9b38101cb1de0e7bc8ea6d99567a30fcfdc1 Mon Sep 17 00:00:00 2001 From: Christophe Paquot Date: Fri, 3 Apr 2020 13:20:24 -0700 Subject: [PATCH] Default HostMalloc to uncached memory Change-Id: I72e19c7f7820a77fd5afc09f09cfea9acd0b8e84 --- vdi/hip_memory.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/vdi/hip_memory.cpp b/vdi/hip_memory.cpp index 53b1fea00a..afe67a867d 100644 --- a/vdi/hip_memory.cpp +++ b/vdi/hip_memory.cpp @@ -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; }