From db52486bbf9101ce4885b1bcb2509926b0c28c7a Mon Sep 17 00:00:00 2001 From: Mateusz Jablonski Date: Wed, 23 Aug 2023 14:45:48 +0000 Subject: [PATCH] refactor: move MTL specific definition of ProductHelper to Xe Lpg Related-To: NEO-8187 Signed-off-by: Mateusz Jablonski --- .../mem_obj/buffer_pool_alloc_tests.cpp | 42 ++++++++++- .../unit_test/xe_hpg_core/dg2/CMakeLists.txt | 1 - .../dg2/buffer_pool_alloc_tests_dg2.cpp | 75 ------------------- .../xe_hpg_core/dg2/excludes_ocl_dg2.cpp | 1 - .../unit_test/xe_hpg_core/mtl/CMakeLists.txt | 1 - .../mtl/buffer_pool_alloc_tests_mtl.cpp | 75 ------------------- .../xe_hpg_core/mtl/excludes_ocl_mtl.cpp | 1 - .../definitions/device_ids_configs_base.h | 4 +- .../linux/product_helper_mtl_and_later.inl | 4 + shared/source/os_interface/product_helper.inl | 1 + .../product_helper_xehp_and_later.inl | 1 + .../xe_hpg_core/linux/product_helper_mtl.cpp | 42 +---------- .../windows/product_helper_mtl.cpp | 16 +--- .../source/xe_hpg_core/xe_lpg/CMakeLists.txt | 12 +++ .../device_ids_configs_xe_lpg.h} | 2 +- .../xe_hpg_core/xe_lpg/linux/CMakeLists.txt | 11 +++ .../linux/product_helper_xe_lpg_linux.inl | 36 +++++++++ .../os_agnostic_product_helper_xe_lpg.inl} | 4 + .../xe_hpg_core/xe_lpg/windows/CMakeLists.txt | 11 +++ .../windows/product_helper_xe_lpg_windows.inl | 16 ++++ .../os_interface/product_helper_tests.cpp | 34 ++++++++- .../dg2/excludes_xe_hpg_core_dg2.cpp | 3 - .../dg2/product_config_helper_tests_dg2.cpp | 30 -------- .../gfx_core_helper_tests_xe_hpg_core.cpp | 7 +- .../mtl/excludes_xe_hpg_core_mtl.cpp | 3 - .../mtl/product_config_helper_tests_mtl.cpp | 4 - .../mtl/product_helper_tests_mtl.cpp | 26 ------- 27 files changed, 178 insertions(+), 285 deletions(-) delete mode 100644 opencl/test/unit_test/xe_hpg_core/dg2/buffer_pool_alloc_tests_dg2.cpp delete mode 100644 opencl/test/unit_test/xe_hpg_core/mtl/buffer_pool_alloc_tests_mtl.cpp create mode 100644 shared/source/xe_hpg_core/xe_lpg/CMakeLists.txt rename shared/source/xe_hpg_core/{mtl/device_ids_configs_mtl.h => xe_lpg/device_ids_configs_xe_lpg.h} (83%) create mode 100644 shared/source/xe_hpg_core/xe_lpg/linux/CMakeLists.txt create mode 100644 shared/source/xe_hpg_core/xe_lpg/linux/product_helper_xe_lpg_linux.inl rename shared/source/xe_hpg_core/{mtl/os_agnostic_product_helper_mtl.inl => xe_lpg/os_agnostic_product_helper_xe_lpg.inl} (92%) create mode 100644 shared/source/xe_hpg_core/xe_lpg/windows/CMakeLists.txt create mode 100644 shared/source/xe_hpg_core/xe_lpg/windows/product_helper_xe_lpg_windows.inl diff --git a/opencl/test/unit_test/mem_obj/buffer_pool_alloc_tests.cpp b/opencl/test/unit_test/mem_obj/buffer_pool_alloc_tests.cpp index 6425350978..b512051bbc 100644 --- a/opencl/test/unit_test/mem_obj/buffer_pool_alloc_tests.cpp +++ b/opencl/test/unit_test/mem_obj/buffer_pool_alloc_tests.cpp @@ -96,7 +96,7 @@ class AggregatedSmallBuffersKernelTest : public AggregatedSmallBuffersTestTempla using AggregatedSmallBuffersDefaultTest = AggregatedSmallBuffersTestTemplate<-1>; -HWTEST_F(AggregatedSmallBuffersDefaultTest, givenDifferentFlagValuesAndSingleOrMultiDeviceContextWhenCheckIfEnabledThenReturnCorrectValue) { +HWTEST2_F(AggregatedSmallBuffersDefaultTest, givenDifferentFlagValuesAndSingleOrMultiDeviceContextWhenCheckIfEnabledThenReturnCorrectValue, IsNotXeHpgCore) { DebugManagerStateRestore restore; // Single device context { @@ -136,6 +136,46 @@ HWTEST_F(AggregatedSmallBuffersDefaultTest, givenDifferentFlagValuesAndSingleOrM context->devices.pop_back(); } +HWTEST2_F(AggregatedSmallBuffersDefaultTest, givenDifferentFlagValuesAndSingleOrMultiDeviceContextWhenCheckIfEnabledThenReturnCorrectValue, IsXeHpgCore) { + DebugManagerStateRestore restore; + // Single device context + { + DebugManager.flags.ExperimentalSmallBufferPoolAllocator.set(-1); + EXPECT_TRUE(context->getBufferPoolAllocator().isAggregatedSmallBuffersEnabled(context.get())); + } + { + DebugManager.flags.ExperimentalSmallBufferPoolAllocator.set(0); + EXPECT_FALSE(context->getBufferPoolAllocator().isAggregatedSmallBuffersEnabled(context.get())); + } + { + DebugManager.flags.ExperimentalSmallBufferPoolAllocator.set(1); + EXPECT_TRUE(context->getBufferPoolAllocator().isAggregatedSmallBuffersEnabled(context.get())); + } + { + DebugManager.flags.ExperimentalSmallBufferPoolAllocator.set(2); + EXPECT_TRUE(context->getBufferPoolAllocator().isAggregatedSmallBuffersEnabled(context.get())); + } + // Multi device context + context->devices.push_back(nullptr); + { + DebugManager.flags.ExperimentalSmallBufferPoolAllocator.set(-1); + EXPECT_FALSE(context->getBufferPoolAllocator().isAggregatedSmallBuffersEnabled(context.get())); + } + { + DebugManager.flags.ExperimentalSmallBufferPoolAllocator.set(0); + EXPECT_FALSE(context->getBufferPoolAllocator().isAggregatedSmallBuffersEnabled(context.get())); + } + { + DebugManager.flags.ExperimentalSmallBufferPoolAllocator.set(1); + EXPECT_FALSE(context->getBufferPoolAllocator().isAggregatedSmallBuffersEnabled(context.get())); + } + { + DebugManager.flags.ExperimentalSmallBufferPoolAllocator.set(2); + EXPECT_TRUE(context->getBufferPoolAllocator().isAggregatedSmallBuffersEnabled(context.get())); + } + context->devices.pop_back(); +} + using AggregatedSmallBuffersDisabledTest = AggregatedSmallBuffersTestTemplate<0>; TEST_F(AggregatedSmallBuffersDisabledTest, givenAggregatedSmallBuffersDisabledWhenBufferCreateCalledThenDoNotUsePool) { diff --git a/opencl/test/unit_test/xe_hpg_core/dg2/CMakeLists.txt b/opencl/test/unit_test/xe_hpg_core/dg2/CMakeLists.txt index 9ba13c45af..6474055b0e 100644 --- a/opencl/test/unit_test/xe_hpg_core/dg2/CMakeLists.txt +++ b/opencl/test/unit_test/xe_hpg_core/dg2/CMakeLists.txt @@ -14,7 +14,6 @@ if(TESTS_DG2) ${IGDRCL_SRCS_tests_xe_hpg_core_dg2_excludes} ${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt ${CMAKE_CURRENT_SOURCE_DIR}/command_queue_tests_dg2.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/buffer_pool_alloc_tests_dg2.cpp ${CMAKE_CURRENT_SOURCE_DIR}/get_device_info_dg2.cpp ${CMAKE_CURRENT_SOURCE_DIR}/test_cmds_programming_dg2.cpp ${CMAKE_CURRENT_SOURCE_DIR}/test_cl_device_caps_dg2.cpp diff --git a/opencl/test/unit_test/xe_hpg_core/dg2/buffer_pool_alloc_tests_dg2.cpp b/opencl/test/unit_test/xe_hpg_core/dg2/buffer_pool_alloc_tests_dg2.cpp deleted file mode 100644 index f019ca6179..0000000000 --- a/opencl/test/unit_test/xe_hpg_core/dg2/buffer_pool_alloc_tests_dg2.cpp +++ /dev/null @@ -1,75 +0,0 @@ -/* - * Copyright (C) 2022-2023 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/xe_hpg_core/hw_cmds_dg2.h" -#include "shared/test/common/helpers/debug_manager_state_restore.h" -#include "shared/test/common/test_macros/header/per_product_test_definitions.h" -#include "shared/test/common/test_macros/test.h" - -#include "opencl/test/unit_test/fixtures/cl_device_fixture.h" -#include "opencl/test/unit_test/fixtures/context_fixture.h" -#include "opencl/test/unit_test/mocks/mock_cl_device.h" -#include "opencl/test/unit_test/mocks/mock_context.h" -using namespace NEO; -namespace Ult { -class AggregatedSmallBuffersDg2DefaultTest : public ContextFixture, - public ClDeviceFixture, - public testing::Test { - protected: - void SetUp() override { - ClDeviceFixture::setUp(); - cl_device_id device = pClDevice; - ContextFixture::setUp(1, &device); - } - - void TearDown() override { - ContextFixture::tearDown(); - ClDeviceFixture::tearDown(); - } -}; - -DG2TEST_F(AggregatedSmallBuffersDg2DefaultTest, givenDifferentFlagValuesAndSingleOrMultiDeviceContextWhenCheckIfEnabledThenReturnCorrectValue) { - DebugManagerStateRestore restore; - // Single device context - { - DebugManager.flags.ExperimentalSmallBufferPoolAllocator.set(-1); - EXPECT_TRUE(pContext->getBufferPoolAllocator().isAggregatedSmallBuffersEnabled(pContext)); - } - { - DebugManager.flags.ExperimentalSmallBufferPoolAllocator.set(0); - EXPECT_FALSE(pContext->getBufferPoolAllocator().isAggregatedSmallBuffersEnabled(pContext)); - } - { - DebugManager.flags.ExperimentalSmallBufferPoolAllocator.set(1); - EXPECT_TRUE(pContext->getBufferPoolAllocator().isAggregatedSmallBuffersEnabled(pContext)); - } - { - DebugManager.flags.ExperimentalSmallBufferPoolAllocator.set(2); - EXPECT_TRUE(pContext->getBufferPoolAllocator().isAggregatedSmallBuffersEnabled(pContext)); - } - // Multi device context - pContext->devices.push_back(nullptr); - { - DebugManager.flags.ExperimentalSmallBufferPoolAllocator.set(-1); - EXPECT_FALSE(pContext->getBufferPoolAllocator().isAggregatedSmallBuffersEnabled(pContext)); - } - { - DebugManager.flags.ExperimentalSmallBufferPoolAllocator.set(0); - EXPECT_FALSE(pContext->getBufferPoolAllocator().isAggregatedSmallBuffersEnabled(pContext)); - } - { - DebugManager.flags.ExperimentalSmallBufferPoolAllocator.set(1); - EXPECT_FALSE(pContext->getBufferPoolAllocator().isAggregatedSmallBuffersEnabled(pContext)); - } - { - DebugManager.flags.ExperimentalSmallBufferPoolAllocator.set(2); - EXPECT_TRUE(pContext->getBufferPoolAllocator().isAggregatedSmallBuffersEnabled(pContext)); - } - pContext->devices.pop_back(); -} - -} // namespace Ult diff --git a/opencl/test/unit_test/xe_hpg_core/dg2/excludes_ocl_dg2.cpp b/opencl/test/unit_test/xe_hpg_core/dg2/excludes_ocl_dg2.cpp index d009363da3..0be4c08a66 100644 --- a/opencl/test/unit_test/xe_hpg_core/dg2/excludes_ocl_dg2.cpp +++ b/opencl/test/unit_test/xe_hpg_core/dg2/excludes_ocl_dg2.cpp @@ -14,4 +14,3 @@ HWTEST_EXCLUDE_PRODUCT(ProgramTests, givenAtLeastXeHpgCoreWhenGetInternalOptions HWTEST_EXCLUDE_PRODUCT(CmdsProgrammingTestsXeHpgCore, givenL3ToL1DebugFlagWhenStatelessMocsIsProgrammedThenItHasL1CachingOn, IGFX_DG2); HWTEST_EXCLUDE_PRODUCT(CmdsProgrammingTestsXeHpgCore, givenAlignedCacheableReadOnlyBufferThenChoseOclBufferConstPolicy, IGFX_DG2); HWTEST_EXCLUDE_PRODUCT(CmdsProgrammingTestsXeHpgCore, whenAppendingRssThenProgramWBPL1CachePolicy, IGFX_DG2); -HWTEST_EXCLUDE_PRODUCT(AggregatedSmallBuffersDefaultTest, givenDifferentFlagValuesAndSingleOrMultiDeviceContextWhenCheckIfEnabledThenReturnCorrectValue, IGFX_DG2); diff --git a/opencl/test/unit_test/xe_hpg_core/mtl/CMakeLists.txt b/opencl/test/unit_test/xe_hpg_core/mtl/CMakeLists.txt index 21dfb7c9d2..62fb976637 100644 --- a/opencl/test/unit_test/xe_hpg_core/mtl/CMakeLists.txt +++ b/opencl/test/unit_test/xe_hpg_core/mtl/CMakeLists.txt @@ -13,7 +13,6 @@ if(TESTS_MTL) set(IGDRCL_SRCS_tests_xe_hpg_core_mtl ${IGDRCL_SRCS_tests_xe_hpg_core_mtl_excludes} ${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt - ${CMAKE_CURRENT_SOURCE_DIR}/buffer_pool_alloc_tests_mtl.cpp ${CMAKE_CURRENT_SOURCE_DIR}/get_device_info_mtl.cpp ${CMAKE_CURRENT_SOURCE_DIR}/image_tests_mtl.cpp ${CMAKE_CURRENT_SOURCE_DIR}/test_cl_device_caps_mtl.cpp diff --git a/opencl/test/unit_test/xe_hpg_core/mtl/buffer_pool_alloc_tests_mtl.cpp b/opencl/test/unit_test/xe_hpg_core/mtl/buffer_pool_alloc_tests_mtl.cpp deleted file mode 100644 index 53008d5042..0000000000 --- a/opencl/test/unit_test/xe_hpg_core/mtl/buffer_pool_alloc_tests_mtl.cpp +++ /dev/null @@ -1,75 +0,0 @@ -/* - * Copyright (C) 2022-2023 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/xe_hpg_core/hw_cmds_mtl.h" -#include "shared/test/common/helpers/debug_manager_state_restore.h" -#include "shared/test/common/test_macros/header/per_product_test_definitions.h" -#include "shared/test/common/test_macros/test.h" - -#include "opencl/test/unit_test/fixtures/cl_device_fixture.h" -#include "opencl/test/unit_test/fixtures/context_fixture.h" -#include "opencl/test/unit_test/mocks/mock_cl_device.h" -#include "opencl/test/unit_test/mocks/mock_context.h" -using namespace NEO; -namespace Ult { -class AggregatedSmallBuffersMtlDefaultTest : public ContextFixture, - public ClDeviceFixture, - public testing::Test { - protected: - void SetUp() override { - ClDeviceFixture::setUp(); - cl_device_id device = pClDevice; - ContextFixture::setUp(1, &device); - } - - void TearDown() override { - ContextFixture::tearDown(); - ClDeviceFixture::tearDown(); - } -}; - -MTLTEST_F(AggregatedSmallBuffersMtlDefaultTest, givenDifferentFlagValuesAndSingleOrMultiDeviceContextWhenCheckIfEnabledThenReturnCorrectValue) { - DebugManagerStateRestore restore; - // Single device context - { - DebugManager.flags.ExperimentalSmallBufferPoolAllocator.set(-1); - EXPECT_TRUE(pContext->getBufferPoolAllocator().isAggregatedSmallBuffersEnabled(pContext)); - } - { - DebugManager.flags.ExperimentalSmallBufferPoolAllocator.set(0); - EXPECT_FALSE(pContext->getBufferPoolAllocator().isAggregatedSmallBuffersEnabled(pContext)); - } - { - DebugManager.flags.ExperimentalSmallBufferPoolAllocator.set(1); - EXPECT_TRUE(pContext->getBufferPoolAllocator().isAggregatedSmallBuffersEnabled(pContext)); - } - { - DebugManager.flags.ExperimentalSmallBufferPoolAllocator.set(2); - EXPECT_TRUE(pContext->getBufferPoolAllocator().isAggregatedSmallBuffersEnabled(pContext)); - } - // Multi device context - pContext->devices.push_back(nullptr); - { - DebugManager.flags.ExperimentalSmallBufferPoolAllocator.set(-1); - EXPECT_FALSE(pContext->getBufferPoolAllocator().isAggregatedSmallBuffersEnabled(pContext)); - } - { - DebugManager.flags.ExperimentalSmallBufferPoolAllocator.set(0); - EXPECT_FALSE(pContext->getBufferPoolAllocator().isAggregatedSmallBuffersEnabled(pContext)); - } - { - DebugManager.flags.ExperimentalSmallBufferPoolAllocator.set(1); - EXPECT_FALSE(pContext->getBufferPoolAllocator().isAggregatedSmallBuffersEnabled(pContext)); - } - { - DebugManager.flags.ExperimentalSmallBufferPoolAllocator.set(2); - EXPECT_TRUE(pContext->getBufferPoolAllocator().isAggregatedSmallBuffersEnabled(pContext)); - } - pContext->devices.pop_back(); -} - -} // namespace Ult diff --git a/opencl/test/unit_test/xe_hpg_core/mtl/excludes_ocl_mtl.cpp b/opencl/test/unit_test/xe_hpg_core/mtl/excludes_ocl_mtl.cpp index a91c676b6b..87e031c57e 100644 --- a/opencl/test/unit_test/xe_hpg_core/mtl/excludes_ocl_mtl.cpp +++ b/opencl/test/unit_test/xe_hpg_core/mtl/excludes_ocl_mtl.cpp @@ -10,4 +10,3 @@ HWTEST_EXCLUDE_PRODUCT(CommandStreamReceiverFlushTaskDg2AndLaterTests, givenProgramExtendedPipeControlPriorToNonPipelinedStateCommandEnabledWhenPerDssBackedBufferThenThereIsPipeControlPriorToIt_MatcherIsRTCapable, IGFX_METEORLAKE); HWTEST_EXCLUDE_PRODUCT(CommandStreamReceiverFlushTaskXeHPAndLaterTests, givenProgramExtendedPipeControlPriorToNonPipelinedStateCommandEnabledAndStateSipWhenItIsRequiredThenThereIsPipeControlPriorToIt, IGFX_METEORLAKE); HWTEST_EXCLUDE_PRODUCT(CommandStreamReceiverFlushTaskXeHPAndLaterTests, givenProgramExtendedPipeControlPriorToNonPipelinedStateCommandEnabledAndStateBaseAddressWhenItIsRequiredThenThereIsPipeControlPriorToIt, IGFX_METEORLAKE); -HWTEST_EXCLUDE_PRODUCT(AggregatedSmallBuffersDefaultTest, givenDifferentFlagValuesAndSingleOrMultiDeviceContextWhenCheckIfEnabledThenReturnCorrectValue, IGFX_METEORLAKE); diff --git a/shared/source/helpers/definitions/device_ids_configs_base.h b/shared/source/helpers/definitions/device_ids_configs_base.h index d690f29f7f..6927df9c48 100644 --- a/shared/source/helpers/definitions/device_ids_configs_base.h +++ b/shared/source/helpers/definitions/device_ids_configs_base.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2022 Intel Corporation + * Copyright (C) 2022-2023 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -12,7 +12,7 @@ #include "device_ids_configs_dg2.h" #endif #ifdef SUPPORT_MTL -#include "shared/source/xe_hpg_core/mtl/device_ids_configs_mtl.h" +#include "shared/source/xe_hpg_core/xe_lpg/device_ids_configs_xe_lpg.h" #endif #endif diff --git a/shared/source/os_interface/linux/product_helper_mtl_and_later.inl b/shared/source/os_interface/linux/product_helper_mtl_and_later.inl index 481a3d56c0..232506b0ce 100644 --- a/shared/source/os_interface/linux/product_helper_mtl_and_later.inl +++ b/shared/source/os_interface/linux/product_helper_mtl_and_later.inl @@ -5,7 +5,11 @@ * */ +#include "shared/source/os_interface/product_helper_hw.h" + +namespace NEO { template <> bool ProductHelperHw::isPlatformQuerySupported() const { return true; } +} // namespace NEO diff --git a/shared/source/os_interface/product_helper.inl b/shared/source/os_interface/product_helper.inl index 8af9a7be33..031268b4c6 100644 --- a/shared/source/os_interface/product_helper.inl +++ b/shared/source/os_interface/product_helper.inl @@ -11,6 +11,7 @@ #include "shared/source/execution_environment/root_device_environment.h" #include "shared/source/helpers/cache_policy.h" #include "shared/source/helpers/constants.h" +#include "shared/source/helpers/hw_info.h" #include "shared/source/helpers/hw_mapper.h" #include "shared/source/helpers/local_memory_access_modes.h" #include "shared/source/helpers/preamble.h" diff --git a/shared/source/os_interface/product_helper_xehp_and_later.inl b/shared/source/os_interface/product_helper_xehp_and_later.inl index 47fdb14b9c..19c506abab 100644 --- a/shared/source/os_interface/product_helper_xehp_and_later.inl +++ b/shared/source/os_interface/product_helper_xehp_and_later.inl @@ -5,6 +5,7 @@ * */ +#include "shared/source/helpers/hw_info.h" #include "shared/source/os_interface/product_helper.h" namespace NEO { diff --git a/shared/source/xe_hpg_core/linux/product_helper_mtl.cpp b/shared/source/xe_hpg_core/linux/product_helper_mtl.cpp index 0066110ef2..015c45e088 100644 --- a/shared/source/xe_hpg_core/linux/product_helper_mtl.cpp +++ b/shared/source/xe_hpg_core/linux/product_helper_mtl.cpp @@ -5,47 +5,11 @@ * */ -#include "shared/source/helpers/hw_info.h" -#include "shared/source/kernel/kernel_properties.h" -#include "shared/source/os_interface/product_helper.h" -#include "shared/source/os_interface/product_helper.inl" -#include "shared/source/os_interface/product_helper_dg2_and_later.inl" -#include "shared/source/os_interface/product_helper_xehp_and_later.inl" #include "shared/source/xe_hpg_core/hw_cmds_mtl.h" constexpr static auto gfxProduct = IGFX_METEORLAKE; -namespace NEO { -#include "shared/source/os_interface/linux/product_helper_mtl_and_later.inl" -} // namespace NEO +#include "shared/source/xe_hpg_core/xe_lpg/linux/product_helper_xe_lpg_linux.inl" +#include "shared/source/xe_hpg_core/xe_lpg/os_agnostic_product_helper_xe_lpg.inl" -#include "shared/source/xe_hpg_core/mtl/os_agnostic_product_helper_mtl.inl" - -namespace NEO { -template <> -int ProductHelperHw::configureHardwareCustom(HardwareInfo *hwInfo, OSInterface *osIface) const { - enableCompression(hwInfo); - - enableBlitterOperationsSupport(hwInfo); - - auto &kmdNotifyProperties = hwInfo->capabilityTable.kmdNotifyProperties; - kmdNotifyProperties.enableKmdNotify = true; - kmdNotifyProperties.delayKmdNotifyMicroseconds = 150; - kmdNotifyProperties.enableQuickKmdSleepForDirectSubmission = true; - kmdNotifyProperties.delayQuickKmdSleepForDirectSubmissionMicroseconds = 20; - - return 0; -} - -template <> -bool ProductHelperHw::isBlitterForImagesSupported() const { - return true; -} - -template <> -bool ProductHelperHw::isVmBindPatIndexProgrammingSupported() const { - return true; -} - -template class ProductHelperHw; -} // namespace NEO +template class NEO::ProductHelperHw; diff --git a/shared/source/xe_hpg_core/windows/product_helper_mtl.cpp b/shared/source/xe_hpg_core/windows/product_helper_mtl.cpp index e652eb71ed..b013f42e70 100644 --- a/shared/source/xe_hpg_core/windows/product_helper_mtl.cpp +++ b/shared/source/xe_hpg_core/windows/product_helper_mtl.cpp @@ -5,23 +5,11 @@ * */ -#include "shared/source/kernel/kernel_properties.h" -#include "shared/source/os_interface/product_helper.h" -#include "shared/source/os_interface/product_helper.inl" -#include "shared/source/os_interface/product_helper_dg2_and_later.inl" -#include "shared/source/os_interface/product_helper_xehp_and_later.inl" #include "shared/source/xe_hpg_core/hw_cmds_mtl.h" constexpr static auto gfxProduct = IGFX_METEORLAKE; -#include "shared/source/xe_hpg_core/mtl/os_agnostic_product_helper_mtl.inl" - -namespace NEO { - -template <> -bool ProductHelperHw::isTimestampWaitSupportedForEvents() const { - return true; -} +#include "shared/source/xe_hpg_core/xe_lpg/os_agnostic_product_helper_xe_lpg.inl" +#include "shared/source/xe_hpg_core/xe_lpg/windows/product_helper_xe_lpg_windows.inl" template class NEO::ProductHelperHw; -} // namespace NEO \ No newline at end of file diff --git a/shared/source/xe_hpg_core/xe_lpg/CMakeLists.txt b/shared/source/xe_hpg_core/xe_lpg/CMakeLists.txt new file mode 100644 index 0000000000..0aa2061f52 --- /dev/null +++ b/shared/source/xe_hpg_core/xe_lpg/CMakeLists.txt @@ -0,0 +1,12 @@ +# +# Copyright (C) 2023 Intel Corporation +# +# SPDX-License-Identifier: MIT +# + +set_property(GLOBAL APPEND PROPERTY NEO_CORE_HELPERS + ${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt + ${CMAKE_CURRENT_SOURCE_DIR}/device_ids_configs_xe_lpg.h + ${CMAKE_CURRENT_SOURCE_DIR}/os_agnostic_product_helper_xe_lpg.inl +) +add_subdirectories() diff --git a/shared/source/xe_hpg_core/mtl/device_ids_configs_mtl.h b/shared/source/xe_hpg_core/xe_lpg/device_ids_configs_xe_lpg.h similarity index 83% rename from shared/source/xe_hpg_core/mtl/device_ids_configs_mtl.h rename to shared/source/xe_hpg_core/xe_lpg/device_ids_configs_xe_lpg.h index d963e9ca65..a7ce3848ae 100644 --- a/shared/source/xe_hpg_core/mtl/device_ids_configs_mtl.h +++ b/shared/source/xe_hpg_core/xe_lpg/device_ids_configs_xe_lpg.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2022 Intel Corporation + * Copyright (C) 2022-2023 Intel Corporation * * SPDX-License-Identifier: MIT * diff --git a/shared/source/xe_hpg_core/xe_lpg/linux/CMakeLists.txt b/shared/source/xe_hpg_core/xe_lpg/linux/CMakeLists.txt new file mode 100644 index 0000000000..2ab36bd887 --- /dev/null +++ b/shared/source/xe_hpg_core/xe_lpg/linux/CMakeLists.txt @@ -0,0 +1,11 @@ +# +# Copyright (C) 2023 Intel Corporation +# +# SPDX-License-Identifier: MIT +# + +set_property(GLOBAL APPEND PROPERTY NEO_CORE_HELPERS + ${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt + ${CMAKE_CURRENT_SOURCE_DIR}/product_helper_xe_lpg_linux.inl +) +add_subdirectories() diff --git a/shared/source/xe_hpg_core/xe_lpg/linux/product_helper_xe_lpg_linux.inl b/shared/source/xe_hpg_core/xe_lpg/linux/product_helper_xe_lpg_linux.inl new file mode 100644 index 0000000000..8c1efee0a2 --- /dev/null +++ b/shared/source/xe_hpg_core/xe_lpg/linux/product_helper_xe_lpg_linux.inl @@ -0,0 +1,36 @@ +/* + * Copyright (C) 2023 Intel Corporation + * + * SPDX-License-Identifier: MIT + * + */ + +#include "shared/source/helpers/hw_info.h" +#include "shared/source/os_interface/linux/product_helper_mtl_and_later.inl" +#include "shared/source/os_interface/product_helper_hw.h" +namespace NEO { +template <> +int ProductHelperHw::configureHardwareCustom(HardwareInfo *hwInfo, OSInterface *osIface) const { + enableCompression(hwInfo); + + enableBlitterOperationsSupport(hwInfo); + + auto &kmdNotifyProperties = hwInfo->capabilityTable.kmdNotifyProperties; + kmdNotifyProperties.enableKmdNotify = true; + kmdNotifyProperties.delayKmdNotifyMicroseconds = 150; + kmdNotifyProperties.enableQuickKmdSleepForDirectSubmission = true; + kmdNotifyProperties.delayQuickKmdSleepForDirectSubmissionMicroseconds = 20; + + return 0; +} + +template <> +bool ProductHelperHw::isBlitterForImagesSupported() const { + return true; +} + +template <> +bool ProductHelperHw::isVmBindPatIndexProgrammingSupported() const { + return true; +} +} // namespace NEO diff --git a/shared/source/xe_hpg_core/mtl/os_agnostic_product_helper_mtl.inl b/shared/source/xe_hpg_core/xe_lpg/os_agnostic_product_helper_xe_lpg.inl similarity index 92% rename from shared/source/xe_hpg_core/mtl/os_agnostic_product_helper_mtl.inl rename to shared/source/xe_hpg_core/xe_lpg/os_agnostic_product_helper_xe_lpg.inl index 860461a60c..99a1857a33 100644 --- a/shared/source/xe_hpg_core/mtl/os_agnostic_product_helper_mtl.inl +++ b/shared/source/xe_hpg_core/xe_lpg/os_agnostic_product_helper_xe_lpg.inl @@ -8,6 +8,10 @@ #include "shared/source/command_stream/command_stream_receiver.h" #include "shared/source/helpers/gfx_core_helper.h" #include "shared/source/memory_manager/allocation_type.h" +#include "shared/source/os_interface/product_helper.h" +#include "shared/source/os_interface/product_helper.inl" +#include "shared/source/os_interface/product_helper_dg2_and_later.inl" +#include "shared/source/os_interface/product_helper_xehp_and_later.inl" #include "aubstream/product_family.h" #include "platforms.h" diff --git a/shared/source/xe_hpg_core/xe_lpg/windows/CMakeLists.txt b/shared/source/xe_hpg_core/xe_lpg/windows/CMakeLists.txt new file mode 100644 index 0000000000..2d8f4e9c08 --- /dev/null +++ b/shared/source/xe_hpg_core/xe_lpg/windows/CMakeLists.txt @@ -0,0 +1,11 @@ +# +# Copyright (C) 2023 Intel Corporation +# +# SPDX-License-Identifier: MIT +# + +set_property(GLOBAL APPEND PROPERTY NEO_CORE_HELPERS + ${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt + ${CMAKE_CURRENT_SOURCE_DIR}/product_helper_xe_lpg_windows.inl +) +add_subdirectories() diff --git a/shared/source/xe_hpg_core/xe_lpg/windows/product_helper_xe_lpg_windows.inl b/shared/source/xe_hpg_core/xe_lpg/windows/product_helper_xe_lpg_windows.inl new file mode 100644 index 0000000000..5327b7758e --- /dev/null +++ b/shared/source/xe_hpg_core/xe_lpg/windows/product_helper_xe_lpg_windows.inl @@ -0,0 +1,16 @@ +/* + * Copyright (C) 2023 Intel Corporation + * + * SPDX-License-Identifier: MIT + * + */ + +#include "shared/source/os_interface/product_helper.h" + +namespace NEO { + +template <> +bool ProductHelperHw::isTimestampWaitSupportedForEvents() const { + 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 f681bd5e46..a9dc84c25f 100644 --- a/shared/test/unit_test/os_interface/product_helper_tests.cpp +++ b/shared/test/unit_test/os_interface/product_helper_tests.cpp @@ -696,7 +696,7 @@ HWTEST2_F(ProductHelperTest, givenProductHelperWhenIsPlatformQueryNotSupportedTh EXPECT_FALSE(productHelper->isPlatformQuerySupported()); } -HWTEST_F(ProductHelperTest, givenDebugFlagWhenCheckingIsResolveDependenciesByPipeControlsSupportedThenCorrectValueIsReturned) { +HWTEST2_F(ProductHelperTest, givenDebugFlagWhenCheckingIsResolveDependenciesByPipeControlsSupportedThenCorrectValueIsReturned, IsNotXeHpgCore) { DebugManagerStateRestore restorer; auto mockDevice = std::unique_ptr(MockDevice::createWithNewExecutionEnvironment(nullptr)); @@ -722,10 +722,40 @@ HWTEST_F(ProductHelperTest, givenDebugFlagWhenCheckingIsResolveDependenciesByPip EXPECT_TRUE(productHelper->isResolveDependenciesByPipeControlsSupported(pInHwInfo, true, 3, csr)); } -HWTEST_F(ProductHelperTest, givenProductHelperWhenCheckingIsBufferPoolAllocatorSupportedThenCorrectValueIsReturned) { +HWTEST2_F(ProductHelperTest, givenDebugFlagWhenCheckingIsResolveDependenciesByPipeControlsSupportedThenCorrectValueIsReturned, IsXeHpgCore) { + DebugManagerStateRestore restorer; + + auto mockDevice = std::unique_ptr(MockDevice::createWithNewExecutionEnvironment(nullptr)); + MockCommandStreamReceiver csr(*mockDevice->getExecutionEnvironment(), mockDevice->getRootDeviceIndex(), mockDevice->getDeviceBitfield()); + csr.taskCount = 2; + + // ResolveDependenciesViaPipeControls = -1 (default) + EXPECT_TRUE(productHelper->isResolveDependenciesByPipeControlsSupported(pInHwInfo, false, 2, csr)); + EXPECT_FALSE(productHelper->isResolveDependenciesByPipeControlsSupported(pInHwInfo, true, 2, csr)); + EXPECT_FALSE(productHelper->isResolveDependenciesByPipeControlsSupported(pInHwInfo, false, 3, csr)); + EXPECT_FALSE(productHelper->isResolveDependenciesByPipeControlsSupported(pInHwInfo, true, 3, csr)); + + DebugManager.flags.ResolveDependenciesViaPipeControls.set(0); + EXPECT_FALSE(productHelper->isResolveDependenciesByPipeControlsSupported(pInHwInfo, false, 2, csr)); + EXPECT_FALSE(productHelper->isResolveDependenciesByPipeControlsSupported(pInHwInfo, true, 2, csr)); + EXPECT_FALSE(productHelper->isResolveDependenciesByPipeControlsSupported(pInHwInfo, false, 3, csr)); + EXPECT_FALSE(productHelper->isResolveDependenciesByPipeControlsSupported(pInHwInfo, true, 3, csr)); + + DebugManager.flags.ResolveDependenciesViaPipeControls.set(1); + EXPECT_TRUE(productHelper->isResolveDependenciesByPipeControlsSupported(pInHwInfo, false, 2, csr)); + EXPECT_TRUE(productHelper->isResolveDependenciesByPipeControlsSupported(pInHwInfo, true, 2, csr)); + EXPECT_TRUE(productHelper->isResolveDependenciesByPipeControlsSupported(pInHwInfo, false, 3, csr)); + EXPECT_TRUE(productHelper->isResolveDependenciesByPipeControlsSupported(pInHwInfo, true, 3, csr)); +} + +HWTEST2_F(ProductHelperTest, givenProductHelperWhenCheckingIsBufferPoolAllocatorSupportedThenCorrectValueIsReturned, IsNotXeHpgCore) { EXPECT_FALSE(productHelper->isBufferPoolAllocatorSupported()); } +HWTEST2_F(ProductHelperTest, givenProductHelperWhenCheckingIsBufferPoolAllocatorSupportedThenCorrectValueIsReturned, IsXeHpgCore) { + EXPECT_TRUE(productHelper->isBufferPoolAllocatorSupported()); +} + HWTEST_F(ProductHelperTest, givenProductHelperWhenCheckingIsUnlockingLockedPtrNecessaryThenReturnFalse) { EXPECT_FALSE(productHelper->isUnlockingLockedPtrNecessary(pInHwInfo)); } diff --git a/shared/test/unit_test/xe_hpg_core/dg2/excludes_xe_hpg_core_dg2.cpp b/shared/test/unit_test/xe_hpg_core/dg2/excludes_xe_hpg_core_dg2.cpp index 819f2d04b3..1e660f75c6 100644 --- a/shared/test/unit_test/xe_hpg_core/dg2/excludes_xe_hpg_core_dg2.cpp +++ b/shared/test/unit_test/xe_hpg_core/dg2/excludes_xe_hpg_core_dg2.cpp @@ -15,14 +15,12 @@ HWTEST_EXCLUDE_PRODUCT(ProductHelperTest, givenProductHelperWhenAskedIfAllocatio HWTEST_EXCLUDE_PRODUCT(ProductHelperTest, givenProductHelperWhenAskedIfPrefetchDisablingIsRequiredThenFalseIsReturned, IGFX_DG2); HWTEST_EXCLUDE_PRODUCT(ProductHelperTest, givenProductHelperWhenAskedIfPipeControlPriorToNonPipelinedStateCommandsWARequiredThenFalseIsReturned, IGFX_DG2); HWTEST_EXCLUDE_PRODUCT(ProductHelperTest, givenProductHelperWhenAskedIfTile64With3DSurfaceOnBCSIsSupportedThenTrueIsReturned, IGFX_DG2); -HWTEST_EXCLUDE_PRODUCT(ProductHelperTest, givenProductHelperWhenCheckingIsBufferPoolAllocatorSupportedThenCorrectValueIsReturned, IGFX_DG2); HWTEST_EXCLUDE_PRODUCT(ProductHelperTest, WhenAllowRenderCompressionIsCalledThenTrueIsReturned, IGFX_DG2); HWTEST_EXCLUDE_PRODUCT(ProductHelperTest, whenConvertingTimestampsToCsDomainThenNothingIsChanged, IGFX_DG2); HWTEST_EXCLUDE_PRODUCT(ProductHelperTest, givenProductHelperWhenAskedIfStorageInfoAdjustmentIsRequiredThenFalseIsReturned, IGFX_DG2); HWTEST_EXCLUDE_PRODUCT(CompilerProductHelperFixture, givenAtLeastXeHpgCoreWhenGetCachingPolicyOptionsThenReturnWriteByPassPolicyOption_IsAtLeastXeHpgCore, IGFX_DG2); HWTEST_EXCLUDE_PRODUCT(ProductHelperTest, givenProductHelperWhenGetL1CachePolicyThenReturnWriteByPass_IsAtLeastXeHpgCore, IGFX_DG2); HWTEST_EXCLUDE_PRODUCT(ProductHelperTest, givenAtLeastXeHpgCoreWhenGetL1CachePolicyThenReturnCorrectValue_IsAtLeastXeHpgCore, IGFX_DG2); -HWTEST_EXCLUDE_PRODUCT(ProductHelperTest, givenDebugFlagWhenCheckingIsResolveDependenciesByPipeControlsSupportedThenCorrectValueIsReturned, IGFX_DG2); HWTEST_EXCLUDE_PRODUCT(AILTests, whenModifyKernelIfRequiredIsCalledThenDontChangeKernelSources, IGFX_DG2); HWTEST_EXCLUDE_PRODUCT(CommandEncodeStatesTest, givenSlmTotalSizeEqualZeroWhenDispatchingKernelThenSharedMemorySizeIsSetCorrectly, IGFX_DG2); HWTEST_EXCLUDE_PRODUCT(MemoryManagerTests, givenEnabledLocalMemoryWhenAllocateInternalAllocationInDevicePoolThen32BitAllocationIsCreated, IGFX_DG2); @@ -31,7 +29,6 @@ HWTEST_EXCLUDE_PRODUCT(MemoryManagerTests, givenEnabledLocalMemoryWhenAllocateKe HWTEST_EXCLUDE_PRODUCT(SbaTest, givenStateBaseAddressAndDebugFlagSetWhenAppendExtraCacheSettingsThenProgramCorrectL1CachePolicy_IsAtLeastXeHpgCore, IGFX_DG2); HWTEST_EXCLUDE_PRODUCT(XeHpgSbaTest, givenSpecificProductFamilyWhenAppendingSbaThenProgramWBPL1CachePolicy, IGFX_DG2); HWTEST_EXCLUDE_PRODUCT(GfxCoreHelperTest, GivenZeroSlmSizeWhenComputeSlmSizeIsCalledThenCorrectValueIsReturned, IGFX_DG2); -HWTEST_EXCLUDE_PRODUCT(ProductHelperTestXeHpgCore, givenProductHelperWhenCheckTimestampWaitSupportForEventsThenReturnFalse, IGFX_DG2); HWTEST_EXCLUDE_PRODUCT(ProductHelperTestXeHpgCore, givenProductHelperWhenCheckDummyBlitWaRequiredThenReturnTrue, IGFX_DG2); HWTEST_EXCLUDE_PRODUCT(CommandEncodeStatesTestDg2AndLater, GivenVariousSlmTotalSizesAndSettingRevIDToDifferentValuesWhenSetAdditionalInfoIsCalledThenCorrectValuesAreSet_IsXeHpgCore, IGFX_DG2); HWTEST_EXCLUDE_PRODUCT(ProductHelperCommonTest, givenHwHelperWhenIsFusedEuDisabledForDpasCalledThenFalseReturned, IGFX_DG2); diff --git a/shared/test/unit_test/xe_hpg_core/dg2/product_config_helper_tests_dg2.cpp b/shared/test/unit_test/xe_hpg_core/dg2/product_config_helper_tests_dg2.cpp index 04f5b5df77..ec8f0ac543 100644 --- a/shared/test/unit_test/xe_hpg_core/dg2/product_config_helper_tests_dg2.cpp +++ b/shared/test/unit_test/xe_hpg_core/dg2/product_config_helper_tests_dg2.cpp @@ -838,33 +838,3 @@ DG2TEST_F(ProductHelperTestDg2, givenProductHelperWhenGettingEvictIfNecessaryFla EXPECT_TRUE(productHelper->isEvictionIfNecessaryFlagSupported()); } - -DG2TEST_F(ProductHelperTestDg2, givenDebugFlagWhenCheckingIsResolveDependenciesByPipeControlsSupportedThenCorrectValueIsReturned) { - DebugManagerStateRestore restorer; - - auto mockDevice = std::unique_ptr(MockDevice::createWithNewExecutionEnvironment(nullptr)); - MockCommandStreamReceiver csr(*mockDevice->getExecutionEnvironment(), mockDevice->getRootDeviceIndex(), mockDevice->getDeviceBitfield()); - csr.taskCount = 2; - - // ResolveDependenciesViaPipeControls = -1 (default) - EXPECT_TRUE(productHelper->isResolveDependenciesByPipeControlsSupported(pInHwInfo, false, 2, csr)); - EXPECT_FALSE(productHelper->isResolveDependenciesByPipeControlsSupported(pInHwInfo, true, 2, csr)); - EXPECT_FALSE(productHelper->isResolveDependenciesByPipeControlsSupported(pInHwInfo, false, 3, csr)); - EXPECT_FALSE(productHelper->isResolveDependenciesByPipeControlsSupported(pInHwInfo, true, 3, csr)); - - DebugManager.flags.ResolveDependenciesViaPipeControls.set(0); - EXPECT_FALSE(productHelper->isResolveDependenciesByPipeControlsSupported(pInHwInfo, false, 2, csr)); - EXPECT_FALSE(productHelper->isResolveDependenciesByPipeControlsSupported(pInHwInfo, true, 2, csr)); - EXPECT_FALSE(productHelper->isResolveDependenciesByPipeControlsSupported(pInHwInfo, false, 3, csr)); - EXPECT_FALSE(productHelper->isResolveDependenciesByPipeControlsSupported(pInHwInfo, true, 3, csr)); - - DebugManager.flags.ResolveDependenciesViaPipeControls.set(1); - EXPECT_TRUE(productHelper->isResolveDependenciesByPipeControlsSupported(pInHwInfo, false, 2, csr)); - EXPECT_TRUE(productHelper->isResolveDependenciesByPipeControlsSupported(pInHwInfo, true, 2, csr)); - EXPECT_TRUE(productHelper->isResolveDependenciesByPipeControlsSupported(pInHwInfo, false, 3, csr)); - EXPECT_TRUE(productHelper->isResolveDependenciesByPipeControlsSupported(pInHwInfo, true, 3, csr)); -} - -DG2TEST_F(ProductHelperTestDg2, givenProductHelperWhenCheckingIsBufferPoolAllocatorSupportedThenCorrectValueIsReturned) { - EXPECT_TRUE(productHelper->isBufferPoolAllocatorSupported()); -} diff --git a/shared/test/unit_test/xe_hpg_core/gfx_core_helper_tests_xe_hpg_core.cpp b/shared/test/unit_test/xe_hpg_core/gfx_core_helper_tests_xe_hpg_core.cpp index 4dfd43f0b1..3d994d4f79 100644 --- a/shared/test/unit_test/xe_hpg_core/gfx_core_helper_tests_xe_hpg_core.cpp +++ b/shared/test/unit_test/xe_hpg_core/gfx_core_helper_tests_xe_hpg_core.cpp @@ -159,11 +159,6 @@ XE_HPG_CORETEST_F(GfxCoreHelperTestXeHpgCore, WhenCheckingSipWAThenFalseIsReturn EXPECT_FALSE(gfxCoreHelper.isSipWANeeded(pDevice->getHardwareInfo())); } -XE_HPG_CORETEST_F(ProductHelperTestXeHpgCore, givenProductHelperWhenCheckTimestampWaitSupportForEventsThenReturnFalse) { - auto &productHelper = getHelper(); - EXPECT_FALSE(productHelper.isTimestampWaitSupportedForEvents()); -} - XE_HPG_CORETEST_F(ProductHelperTestXeHpgCore, givenProductHelperWhenCheckDummyBlitWaRequiredThenReturnTrue) { auto &productHelper = getHelper(); EXPECT_TRUE(productHelper.isDummyBlitWaRequired()); @@ -324,4 +319,4 @@ XE_HPG_CORETEST_F(GfxCoreHelperTestXeHpgCore, givenGfxCoreHelperWhenCallCopyThro mockProductHelper.returnedIsUnlockingLockedPtrNecessary = true; EXPECT_FALSE(gfxCoreHelper.copyThroughLockedPtrEnabled(hardwareInfo, mockProductHelper)); } -} \ No newline at end of file +} diff --git a/shared/test/unit_test/xe_hpg_core/mtl/excludes_xe_hpg_core_mtl.cpp b/shared/test/unit_test/xe_hpg_core/mtl/excludes_xe_hpg_core_mtl.cpp index 2b2435fe09..326f4ee91a 100644 --- a/shared/test/unit_test/xe_hpg_core/mtl/excludes_xe_hpg_core_mtl.cpp +++ b/shared/test/unit_test/xe_hpg_core/mtl/excludes_xe_hpg_core_mtl.cpp @@ -21,6 +21,3 @@ HWTEST_EXCLUDE_PRODUCT(ComputeModeRequirements, givenComputeModeProgrammingWhenR HWTEST_EXCLUDE_PRODUCT(ProductHelperTest, givenProductHelperWhenAskedIfPatIndexProgrammingSupportedThenReturnFalse, IGFX_METEORLAKE); HWTEST_EXCLUDE_PRODUCT(ProductHelperTest, givenProductHelperWhenIsAdjustWalkOrderAvailableCallThenFalseReturn, IGFX_METEORLAKE); HWTEST_EXCLUDE_PRODUCT(ProductHelperTest, whenCheckIsCachingOnCpuAvailableThenAlwaysTrue, IGFX_METEORLAKE); -HWTEST_EXCLUDE_PRODUCT(ProductHelperTest, givenProductHelperWhenCheckingIsBufferPoolAllocatorSupportedThenCorrectValueIsReturned, IGFX_METEORLAKE); -HWTEST_EXCLUDE_PRODUCT(ProductHelperTest, givenDebugFlagWhenCheckingIsResolveDependenciesByPipeControlsSupportedThenCorrectValueIsReturned, IGFX_METEORLAKE); -HWTEST_EXCLUDE_PRODUCT(ProductHelperTestXeHpgCore, givenProductHelperWhenCheckTimestampWaitSupportForEventsThenReturnFalse, IGFX_METEORLAKE); diff --git a/shared/test/unit_test/xe_hpg_core/mtl/product_config_helper_tests_mtl.cpp b/shared/test/unit_test/xe_hpg_core/mtl/product_config_helper_tests_mtl.cpp index 4b2feefd68..75ee94a7c8 100644 --- a/shared/test/unit_test/xe_hpg_core/mtl/product_config_helper_tests_mtl.cpp +++ b/shared/test/unit_test/xe_hpg_core/mtl/product_config_helper_tests_mtl.cpp @@ -42,8 +42,4 @@ MTLTEST_F(ProductConfigHelperMtlTests, givenMtlConfigsWhenSearchForDeviceAcronym auto acronym = productConfigHelper->getAcronymForProductConfig(config); EXPECT_NE(std::find(deviceAcronyms.begin(), deviceAcronyms.end(), acronym), deviceAcronyms.end()); } -} - -MTLTEST_F(ProductHelperMtlTests, givenProductHelperWhenCheckingIsBufferPoolAllocatorSupportedThenCorrectValueIsReturned) { - EXPECT_TRUE(productHelper->isBufferPoolAllocatorSupported()); } \ No newline at end of file diff --git a/shared/test/unit_test/xe_hpg_core/mtl/product_helper_tests_mtl.cpp b/shared/test/unit_test/xe_hpg_core/mtl/product_helper_tests_mtl.cpp index ce614d3984..64e069f41b 100644 --- a/shared/test/unit_test/xe_hpg_core/mtl/product_helper_tests_mtl.cpp +++ b/shared/test/unit_test/xe_hpg_core/mtl/product_helper_tests_mtl.cpp @@ -219,32 +219,6 @@ MTLTEST_F(MtlProductHelper, givenCompilerProductHelperWhenGetDefaultHwIpVersionT EXPECT_EQ(compilerProductHelper->getDefaultHwIpVersion(), AOT::MTL_M_A0); } -MTLTEST_F(MtlProductHelper, givenDebugFlagWhenCheckingIsResolveDependenciesByPipeControlsSupportedThenCorrectValueIsReturned) { - DebugManagerStateRestore restorer; - - auto mockDevice = std::unique_ptr(MockDevice::createWithNewExecutionEnvironment(nullptr)); - MockCommandStreamReceiver csr(*mockDevice->getExecutionEnvironment(), mockDevice->getRootDeviceIndex(), mockDevice->getDeviceBitfield()); - csr.taskCount = 2; - - // ResolveDependenciesViaPipeControls = -1 (default) - EXPECT_TRUE(productHelper->isResolveDependenciesByPipeControlsSupported(pInHwInfo, false, 2, csr)); - EXPECT_FALSE(productHelper->isResolveDependenciesByPipeControlsSupported(pInHwInfo, true, 2, csr)); - EXPECT_FALSE(productHelper->isResolveDependenciesByPipeControlsSupported(pInHwInfo, false, 3, csr)); - EXPECT_FALSE(productHelper->isResolveDependenciesByPipeControlsSupported(pInHwInfo, true, 3, csr)); - - DebugManager.flags.ResolveDependenciesViaPipeControls.set(0); - EXPECT_FALSE(productHelper->isResolveDependenciesByPipeControlsSupported(pInHwInfo, false, 2, csr)); - EXPECT_FALSE(productHelper->isResolveDependenciesByPipeControlsSupported(pInHwInfo, true, 2, csr)); - EXPECT_FALSE(productHelper->isResolveDependenciesByPipeControlsSupported(pInHwInfo, false, 3, csr)); - EXPECT_FALSE(productHelper->isResolveDependenciesByPipeControlsSupported(pInHwInfo, true, 3, csr)); - - DebugManager.flags.ResolveDependenciesViaPipeControls.set(1); - EXPECT_TRUE(productHelper->isResolveDependenciesByPipeControlsSupported(pInHwInfo, false, 2, csr)); - EXPECT_TRUE(productHelper->isResolveDependenciesByPipeControlsSupported(pInHwInfo, true, 2, csr)); - EXPECT_TRUE(productHelper->isResolveDependenciesByPipeControlsSupported(pInHwInfo, false, 3, csr)); - EXPECT_TRUE(productHelper->isResolveDependenciesByPipeControlsSupported(pInHwInfo, true, 3, csr)); -} - using ProductHelperTestMtl = Test; MTLTEST_F(ProductHelperTestMtl, givenMtlWhenCheckIsCachingOnCpuAvailableThenAlwaysFalse) {