From ebf7fad2581b02c26da6e212abcd71fbc23c6f65 Mon Sep 17 00:00:00 2001 From: German Date: Thu, 8 Dec 2022 10:45:33 -0500 Subject: [PATCH] SWDEV-370901 - Force sysmem allocation Adobe AE allocates/destroys system memory per each frame in some effects, which is a very expensive operation. Disable pinning and force sysmem allocation in VidMM. That allows to trigger resource cache in runtime and avoid paging operations, caused by pinning. The actual benchmark doesn't have significant improvement from the change, but GPU view traces are much cleaner. Change-Id: I92cdd87d37c64611788f05250f71d6fe489b4d7e [ROCm/clr commit: 8cf53e7dfff259d54332568eb25cdf289c7b7521] --- projects/clr/rocclr/device/pal/paldevice.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/projects/clr/rocclr/device/pal/paldevice.cpp b/projects/clr/rocclr/device/pal/paldevice.cpp index 328bf29282..8532852d12 100644 --- a/projects/clr/rocclr/device/pal/paldevice.cpp +++ b/projects/clr/rocclr/device/pal/paldevice.cpp @@ -1507,8 +1507,10 @@ pal::Memory* Device::createBuffer(amd::Memory& owner, bool directAccess) const { // GPU will be reading from this host memory buffer, // so assume Host write into it type = Resource::RemoteUSWC; - remoteAlloc = true; + } else { + type = Resource::Remote; } + remoteAlloc = true; } // Make sure owner has a valid hostmem pointer and it's not COPY if (!remoteAlloc && (owner.getHostMem() != nullptr)) {