From eff2d1cde89fafe01ac62c3b76cfc5cea6f6af41 Mon Sep 17 00:00:00 2001 From: Tomasz Biernacik Date: Tue, 15 Apr 2025 09:02:34 +0000 Subject: [PATCH] performance: change usage for semaphoreBuffer on integrated devices Related-To: NEO-9421 Signed-off-by: Tomasz Biernacik --- shared/source/gmm_helper/cache_settings_helper.cpp | 2 +- shared/test/unit_test/gmm_helper/gmm_helper_tests.cpp | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/shared/source/gmm_helper/cache_settings_helper.cpp b/shared/source/gmm_helper/cache_settings_helper.cpp index 21e80384ef..0bbf2a0aab 100644 --- a/shared/source/gmm_helper/cache_settings_helper.cpp +++ b/shared/source/gmm_helper/cache_settings_helper.cpp @@ -60,7 +60,7 @@ GMM_RESOURCE_USAGE_TYPE_ENUM CacheSettingsHelper::getDefaultUsageTypeWithCaching } if (hwInfo->capabilityTable.isIntegratedDevice) { - if (AllocationType::ringBuffer == allocationType) { + if (AllocationType::ringBuffer == allocationType || AllocationType::semaphoreBuffer == allocationType) { return GMM_RESOURCE_USAGE_OCL_SYSTEM_MEMORY_BUFFER; } } diff --git a/shared/test/unit_test/gmm_helper/gmm_helper_tests.cpp b/shared/test/unit_test/gmm_helper/gmm_helper_tests.cpp index e4d3571b30..84bb824610 100644 --- a/shared/test/unit_test/gmm_helper/gmm_helper_tests.cpp +++ b/shared/test/unit_test/gmm_helper/gmm_helper_tests.cpp @@ -767,6 +767,7 @@ TEST(GmmTest, givenAllocationTypeWhenGettingUsageTypeThenReturnCorrectValue) { case AllocationType::internalHostMemory: case AllocationType::mapAllocation: case AllocationType::ringBuffer: + case AllocationType::semaphoreBuffer: case AllocationType::svmCpu: case AllocationType::svmZeroCopy: case AllocationType::tagBuffer: @@ -895,6 +896,7 @@ TEST(GmmTest, givenAllocationTypeAndMitigatedDcFlushWhenGettingUsageTypeThenRetu break; case AllocationType::fillPattern: case AllocationType::ringBuffer: + case AllocationType::semaphoreBuffer: expectedUsage = GMM_RESOURCE_USAGE_OCL_SYSTEM_MEMORY_BUFFER; break; default: @@ -919,6 +921,7 @@ TEST(GmmTest, givenAllocationTypeAndMitigatedDcFlushWhenGettingUsageTypeThenRetu case AllocationType::internalHostMemory: case AllocationType::mapAllocation: case AllocationType::ringBuffer: + case AllocationType::semaphoreBuffer: case AllocationType::svmCpu: case AllocationType::svmZeroCopy: case AllocationType::tagBuffer: