From d4594531ef481820b73ab81c4e7bfe3030be07b9 Mon Sep 17 00:00:00 2001 From: Saleel Kudchadker Date: Tue, 7 Jan 2025 18:25:44 +0000 Subject: [PATCH] SWDEV-506251 - Disable blit copy thresold for OpenCL Change-Id: Id0ca43b13d5792791a42da263f6aa4496382cea6 [ROCm/clr commit: 39801b5750429035701ff357f1b73a307d519790] --- projects/clr/rocclr/device/device.cpp | 9 +++++++-- projects/clr/rocclr/utils/flags.hpp | 2 +- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/projects/clr/rocclr/device/device.cpp b/projects/clr/rocclr/device/device.cpp index ebfdc49782..7f78675e18 100644 --- a/projects/clr/rocclr/device/device.cpp +++ b/projects/clr/rocclr/device/device.cpp @@ -1092,9 +1092,14 @@ Settings::Settings() : value_(0) { waitCommand_ = AMD_OCL_WAIT_COMMAND; supportDepthsRGB_ = false; fenceScopeAgent_ = AMD_OPT_FLUSH; - if (amd::IS_HIP) { + + // Amend certain flags for OpenCL + if (!amd::IS_HIP) { if (flagIsDefault(GPU_SINGLE_ALLOC_PERCENT)) { - GPU_SINGLE_ALLOC_PERCENT = 100; + GPU_SINGLE_ALLOC_PERCENT = 85; + } + if (flagIsDefault(GPU_FORCE_BLIT_COPY_SIZE)) { + GPU_FORCE_BLIT_COPY_SIZE = 0; } } diff --git a/projects/clr/rocclr/utils/flags.hpp b/projects/clr/rocclr/utils/flags.hpp index 00d1b4ce76..1ed6237b3a 100644 --- a/projects/clr/rocclr/utils/flags.hpp +++ b/projects/clr/rocclr/utils/flags.hpp @@ -92,7 +92,7 @@ release(size_t, GPU_XFER_BUFFER_SIZE, 0, \ "Transfer buffer size for image copy optimization in KB") \ release(bool, GPU_IMAGE_DMA, true, \ "Enable DRM DMA for image transfers") \ -release(uint, GPU_SINGLE_ALLOC_PERCENT, 85, \ +release(uint, GPU_SINGLE_ALLOC_PERCENT, 100, \ "Maximum size of a single allocation as percentage of total") \ release(uint, GPU_NUM_COMPUTE_RINGS, 2, \ "GPU number of compute rings. 0 - disabled, 1 , 2,.. - the number of compute rings") \