From 6b873b8a8632e7bb6ee40ef0e320fd4378a2e2af Mon Sep 17 00:00:00 2001 From: kjayapra-amd Date: Mon, 9 Jan 2023 15:03:48 -0800 Subject: [PATCH] SWDEV-376697 - Use PCIE fine grain memory pool when hipDeviceMallocUncached flag is used. Change-Id: I7234d456ef2df42b0b9b9e0d2647ee9bded565f9 --- rocclr/device/rocm/rocmemory.cpp | 2 +- rocclr/platform/memory.hpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/rocclr/device/rocm/rocmemory.cpp b/rocclr/device/rocm/rocmemory.cpp index 8aacd09dad..d267e0d03f 100644 --- a/rocclr/device/rocm/rocmemory.cpp +++ b/rocclr/device/rocm/rocmemory.cpp @@ -788,7 +788,7 @@ bool Buffer::create(bool alloc_local) { } else { assert(!isHostMemDirectAccess() && "Runtime doesn't support direct access to GPU memory!"); deviceMemory_ = dev().deviceLocalAlloc(size(), (memFlags & CL_MEM_SVM_ATOMICS) != 0, - (memFlags & ROCCLR_MEM_HSA_PSEUDO_FINE_GRAIN) != 0); + (memFlags & ROCCLR_MEM_HSA_UNCACHED) != 0); } owner()->setSvmPtr(deviceMemory_); } else { diff --git a/rocclr/platform/memory.hpp b/rocclr/platform/memory.hpp index 0b6ace9fde..ba89e18cca 100644 --- a/rocclr/platform/memory.hpp +++ b/rocclr/platform/memory.hpp @@ -41,7 +41,7 @@ #define ROCCLR_MEM_HSA_SIGNAL_MEMORY (1u << 30) #define ROCCLR_MEM_INTERNAL_MEMORY (1u << 29) #define CL_MEM_VA_RANGE_AMD (1u << 28) -#define ROCCLR_MEM_HSA_PSEUDO_FINE_GRAIN (1u << 27) +#define ROCCLR_MEM_HSA_UNCACHED (1u << 27) namespace device { class Memory;