From 4c763e45a1249afaec5560650d55e6beef2b1a0f Mon Sep 17 00:00:00 2001 From: German Andryeyev Date: Thu, 27 Jun 2024 10:56:41 -0400 Subject: [PATCH] SWDEV-470585 - Disable double copy in HIP - HIP path doesn't support resource tracking. Thus, double copy can't be enabled, because it requires resource tracking. Change-Id: I0f9c4e185b5b2d2b1abde041fca21bb099db9ccd --- rocclr/device/pal/paldevice.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/rocclr/device/pal/paldevice.cpp b/rocclr/device/pal/paldevice.cpp index 98954d529a..7be88eb827 100644 --- a/rocclr/device/pal/paldevice.cpp +++ b/rocclr/device/pal/paldevice.cpp @@ -1659,9 +1659,8 @@ pal::Memory* Device::createBuffer(amd::Memory& owner, bool directAccess) const { // If direct access failed if (!result) { - // Don't use cached allocation - // if size is biger than max single alloc - if (owner.getSize() > info().maxMemAllocSize_) { + // Don't use cached allocation if size is biger than max single alloc or it's HIP + if (amd::IS_HIP || (owner.getSize() > info().maxMemAllocSize_)) { delete gpuMemory; return nullptr; }