From 796edfeeb56f9ea612e68a91f3365689078aa6ea Mon Sep 17 00:00:00 2001 From: Dominik Dabek Date: Mon, 29 Jul 2024 13:36:22 +0000 Subject: [PATCH] performance: enable host usm alloc recycle Enable on pre xe2 platforms. Related-To: NEO-6893 Signed-off-by: Dominik Dabek --- shared/source/os_interface/product_helper_bdw_and_later.inl | 2 +- .../xe_hpc_core/os_agnostic_product_helper_xe_hpc_core.inl | 2 +- .../source/xe_hpg_core/dg2/os_agnostic_product_helper_dg2.inl | 2 +- shared/test/unit_test/os_interface/product_helper_tests.cpp | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/shared/source/os_interface/product_helper_bdw_and_later.inl b/shared/source/os_interface/product_helper_bdw_and_later.inl index ed931f6168..3b01049f58 100644 --- a/shared/source/os_interface/product_helper_bdw_and_later.inl +++ b/shared/source/os_interface/product_helper_bdw_and_later.inl @@ -115,7 +115,7 @@ bool ProductHelperHw::isDeviceUsmAllocationReuseSupported() const { template bool ProductHelperHw::isHostUsmAllocationReuseSupported() const { - return false; + return true; } template diff --git a/shared/source/xe_hpc_core/os_agnostic_product_helper_xe_hpc_core.inl b/shared/source/xe_hpc_core/os_agnostic_product_helper_xe_hpc_core.inl index 16db53820c..9f79200c51 100644 --- a/shared/source/xe_hpc_core/os_agnostic_product_helper_xe_hpc_core.inl +++ b/shared/source/xe_hpc_core/os_agnostic_product_helper_xe_hpc_core.inl @@ -53,7 +53,7 @@ bool ProductHelperHw::isDeviceUsmAllocationReuseSupported() const { template <> bool ProductHelperHw::isHostUsmAllocationReuseSupported() const { - return false; + return true; } template diff --git a/shared/source/xe_hpg_core/dg2/os_agnostic_product_helper_dg2.inl b/shared/source/xe_hpg_core/dg2/os_agnostic_product_helper_dg2.inl index 3d9ef6b17e..8e7480163d 100644 --- a/shared/source/xe_hpg_core/dg2/os_agnostic_product_helper_dg2.inl +++ b/shared/source/xe_hpg_core/dg2/os_agnostic_product_helper_dg2.inl @@ -268,7 +268,7 @@ bool ProductHelperHw::isDeviceUsmAllocationReuseSupported() const { template <> bool ProductHelperHw::isHostUsmAllocationReuseSupported() const { - return false; + return true; } } // namespace NEO diff --git a/shared/test/unit_test/os_interface/product_helper_tests.cpp b/shared/test/unit_test/os_interface/product_helper_tests.cpp index b0fa240a15..694214c8d5 100644 --- a/shared/test/unit_test/os_interface/product_helper_tests.cpp +++ b/shared/test/unit_test/os_interface/product_helper_tests.cpp @@ -845,11 +845,11 @@ HWTEST2_F(ProductHelperTest, givenProductHelperWhenCheckingIsDeviceUsmAllocation } HWTEST2_F(ProductHelperTest, givenProductHelperWhenCheckingIsHostUsmAllocationReuseSupportedThenCorrectValueIsReturned, IsAtMostDg2) { - EXPECT_FALSE(productHelper->isHostUsmAllocationReuseSupported()); + EXPECT_TRUE(productHelper->isHostUsmAllocationReuseSupported()); } HWTEST2_F(ProductHelperTest, givenProductHelperWhenCheckingIsHostUsmAllocationReuseSupportedThenCorrectValueIsReturned, IsXeHpcCore) { - EXPECT_FALSE(productHelper->isHostUsmAllocationReuseSupported()); + EXPECT_TRUE(productHelper->isHostUsmAllocationReuseSupported()); } HWTEST2_F(ProductHelperTest, givenProductHelperWhenCheckingIsHostUsmAllocationReuseSupportedThenCorrectValueIsReturned, IsAtLeastMtl) {