From 1b87d3a4972b4e01cd541ba0ef33211263db6b3d Mon Sep 17 00:00:00 2001 From: Christophe Paquot Date: Fri, 29 Oct 2021 17:41:10 -0700 Subject: [PATCH] SWDEV-307109 - Don't force Persistent for HIP With SAM on, don't force Persistent for allocations in HIP. This makes ROCCLR go down paths we don't want for HIP. Change-Id: If54cc16fa891d4cfdc761c6ab21ad707627e822a [ROCm/clr commit: 52435527680252097d096119663acad128ed0de0] --- projects/clr/rocclr/device/pal/palmemory.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/projects/clr/rocclr/device/pal/palmemory.cpp b/projects/clr/rocclr/device/pal/palmemory.cpp index 8d485b720e..0cbcc76e75 100644 --- a/projects/clr/rocclr/device/pal/palmemory.cpp +++ b/projects/clr/rocclr/device/pal/palmemory.cpp @@ -109,7 +109,7 @@ bool Memory::create(Resource::MemoryType memType, Resource::CreateParams* params // Assume that allocations will be placed into visible heap when ReBar is enabled // Only enable this assumption for small size local buffers constexpr size_t kLargeAlloc = (1ull << 27); - if ((memType == Local) && desc().buffer_ && (size() < kLargeAlloc) && dev().info().largeBar_) { + if (!amd::IS_HIP && (memType == Local) && desc().buffer_ && (size() < kLargeAlloc) && dev().info().largeBar_) { memType = Persistent; } // Create a resource in PAL