From 35c1f34672a5649972346a321e52931b255d31d5 Mon Sep 17 00:00:00 2001 From: Mateusz Jablonski Date: Thu, 16 Nov 2023 14:24:12 +0000 Subject: [PATCH] refactor: move number of threads per eu to release helper Related-To: HSD-18034098647 Signed-off-by: Mateusz Jablonski --- .../helper/l0_gfx_core_helper_tests.cpp | 14 +++---- .../linux/prelim/test_debug_api_linux.cpp | 6 +-- .../fixtures/multicontext_aub_fixture.cpp | 8 ++-- .../sync_buffer_handler_tests.cpp | 6 +-- .../source/ocloc_arg_helper.cpp | 2 +- .../source/offline_compiler.cpp | 4 +- .../source/offline_compiler.h | 2 +- .../source/offline_linker.cpp | 5 ++- shared/source/gen11/hw_cmds_ehl.h | 6 +-- shared/source/gen11/hw_cmds_icllp.h | 10 ++--- shared/source/gen11/hw_cmds_lkf.h | 6 +-- shared/source/gen11/hw_info_ehl.cpp | 15 ++++--- shared/source/gen11/hw_info_icllp.cpp | 29 +++++++------ shared/source/gen11/hw_info_lkf.cpp | 17 ++++---- shared/source/gen12lp/hw_cmds_adln.h | 6 +-- shared/source/gen12lp/hw_cmds_adlp.h | 6 +-- shared/source/gen12lp/hw_cmds_adls.h | 6 +-- shared/source/gen12lp/hw_cmds_dg1.h | 6 +-- shared/source/gen12lp/hw_cmds_rkl.h | 6 +-- shared/source/gen12lp/hw_cmds_tgllp.h | 8 ++-- shared/source/gen12lp/hw_info_adln.cpp | 15 ++++--- shared/source/gen12lp/hw_info_adlp.cpp | 15 ++++--- shared/source/gen12lp/hw_info_adls.cpp | 15 ++++--- shared/source/gen12lp/hw_info_dg1.cpp | 17 ++++---- shared/source/gen12lp/hw_info_rkl.cpp | 15 ++++--- shared/source/gen12lp/hw_info_tgllp.cpp | 23 +++++------ shared/source/gen8/hw_cmds_bdw.h | 12 +++--- shared/source/gen8/hw_info_bdw.cpp | 35 ++++++++-------- .../enable_compiler_product_helper_bxt.cpp | 5 --- .../enable_compiler_product_helper_glk.cpp | 5 --- shared/source/gen9/hw_cmds_bxt.h | 8 ++-- shared/source/gen9/hw_cmds_cfl.h | 14 +++---- shared/source/gen9/hw_cmds_glk.h | 8 ++-- shared/source/gen9/hw_cmds_kbl.h | 14 +++---- shared/source/gen9/hw_cmds_skl.h | 14 +++---- shared/source/gen9/hw_info_bxt.cpp | 23 +++++------ shared/source/gen9/hw_info_cfl.cpp | 41 +++++++++---------- shared/source/gen9/hw_info_glk.cpp | 23 +++++------ shared/source/gen9/hw_info_kbl.cpp | 41 +++++++++---------- shared/source/gen9/hw_info_skl.cpp | 41 +++++++++---------- .../source/helpers/compiler_product_helper.h | 2 - .../compiler_product_helper_before_xe_hp.inl | 4 -- ...ompiler_product_helper_xe_hp_and_later.inl | 5 --- shared/source/helpers/hw_info.cpp | 4 +- shared/source/helpers/hw_info.h | 6 +-- shared/source/os_interface/device_factory.cpp | 15 ++++--- shared/source/os_interface/linux/drm_neo.cpp | 4 +- shared/source/os_interface/linux/drm_neo.h | 4 +- .../os_interface/linux/product_helper_drm.cpp | 9 +++- shared/source/release_helper/release_helper.h | 2 + .../release_helper/release_helper_base.inl | 5 +++ shared/source/xe_hpc_core/hw_cmds_pvc.h | 6 +-- shared/source/xe_hpc_core/hw_info_pvc.cpp | 16 ++++---- shared/source/xe_hpg_core/hw_cmds_arl.h | 6 +-- shared/source/xe_hpg_core/hw_cmds_dg2.h | 6 +-- shared/source/xe_hpg_core/hw_cmds_mtl.h | 6 +-- shared/source/xe_hpg_core/hw_info_arl.cpp | 16 ++++---- shared/source/xe_hpg_core/hw_info_dg2.cpp | 16 ++++---- shared/source/xe_hpg_core/hw_info_mtl.cpp | 16 ++++---- .../test/common/mocks/mock_release_helper.h | 1 + shared/test/common/tests_configuration.cpp | 9 ++-- ...d_stream_receiver_tests_xehp_and_later.cpp | 6 +-- ...mulated_common_hw_tests_xehp_and_later.cpp | 6 +-- .../command_stream/get_devices_tests.cpp | 11 ++--- ...d_stream_receiver_tests_xehp_and_later.cpp | 6 +-- .../unit_test/device/neo_device_tests.cpp | 10 ++--- .../gen11/ehl/test_product_helper_ehl.cpp | 6 +-- .../gen11/icllp/test_product_helper_icllp.cpp | 6 +-- .../gen11/lkf/test_product_helper_lkf.cpp | 9 ++-- .../gen12lp/adln/test_product_helper_adln.cpp | 3 +- .../adlp/linux/product_helper_tests_adlp.cpp | 6 +-- .../gen12lp/adlp/test_product_helper_adlp.cpp | 3 +- .../gen12lp/adls/test_product_helper_adls.cpp | 3 +- .../gen12lp/dg1/hw_info_tests_dg1.cpp | 6 +-- .../gen12lp/dg1/test_product_helper_dg1.cpp | 6 +-- .../gen12lp/rkl/test_product_helper_rkl.cpp | 3 +- .../tgllp/product_helper_tests_tgllp.cpp | 14 +++---- .../gen8/bdw/test_product_helper_bdw.cpp | 9 ++-- .../gen9/bxt/test_product_helper_bxt.cpp | 6 +-- .../gen9/cfl/test_product_helper_cfl.cpp | 6 +-- .../gen9/glk/test_product_helper_glk.cpp | 6 +-- .../gen9/kbl/test_product_helper_kbl.cpp | 8 ++-- .../skl/linux/product_helper_tests_skl.cpp | 4 +- .../gen9/skl/test_product_helper_skl.cpp | 8 ++-- .../linux/drm_system_info_tests.cpp | 14 +++---- .../os_interface/linux/drm_tests.cpp | 2 +- .../release_helper_12_55_tests.cpp | 1 + .../release_helper_12_56_tests.cpp | 1 + .../release_helper_12_57_tests.cpp | 1 + .../release_helper_12_60_tests.cpp | 1 + .../release_helper_12_70_tests.cpp | 1 + .../release_helper_12_71_tests.cpp | 1 + .../xe_hpc_core/pvc/hw_info_tests_pvc.cpp | 7 +++- .../dg2/product_config_helper_tests_dg2.cpp | 6 +-- ...s_agnostic_product_helper_xe_lpg_tests.cpp | 16 +++++--- 95 files changed, 434 insertions(+), 478 deletions(-) diff --git a/level_zero/core/test/unit_tests/sources/helper/l0_gfx_core_helper_tests.cpp b/level_zero/core/test/unit_tests/sources/helper/l0_gfx_core_helper_tests.cpp index 4101641fa9..13e765ad0b 100644 --- a/level_zero/core/test/unit_tests/sources/helper/l0_gfx_core_helper_tests.cpp +++ b/level_zero/core/test/unit_tests/sources/helper/l0_gfx_core_helper_tests.cpp @@ -7,9 +7,9 @@ #include "shared/source/helpers/aligned_memory.h" #include "shared/source/helpers/basic_math.h" -#include "shared/source/helpers/compiler_product_helper.h" #include "shared/source/helpers/gfx_core_helper.h" #include "shared/source/helpers/ptr_math.h" +#include "shared/source/release_helper/release_helper.h" #include "shared/test/common/helpers/debug_manager_state_restore.h" #include "shared/test/common/helpers/default_hw_info.h" #include "shared/test/common/helpers/gtest_helpers.h" @@ -129,8 +129,8 @@ HWTEST_F(L0GfxCoreHelperTest, givenSliceSubsliceEuAndThreadIdsWhenGettingBitmask const auto threadsPerEu = (hwInfo.gtSystemInfo.ThreadCount / hwInfo.gtSystemInfo.EUCount); - auto &compilerProductHelper = executionEnvironment.rootDeviceEnvironments[0]->getHelper(); - auto bytesPerEu = Math::divideAndRoundUp(compilerProductHelper.getNumThreadsPerEu(), 8u); + auto releaseHelper = executionEnvironment.rootDeviceEnvironments[0]->getReleaseHelper(); + auto bytesPerEu = releaseHelper ? Math::divideAndRoundUp(releaseHelper->getNumThreadsPerEu(), 8u) : 1u; const auto maxEUsInAtt = hwInfo.gtSystemInfo.MaxEuPerSubSlice > 8 ? 8 : hwInfo.gtSystemInfo.MaxEuPerSubSlice; const auto threadsSizePerSubSlice = maxEUsInAtt * bytesPerEu; @@ -221,8 +221,8 @@ HWTEST_F(L0GfxCoreHelperTest, givenSingleThreadsWhenGettingBitmaskThenCorrectBit l0GfxCoreHelper.getAttentionBitmaskForSingleThreads(threads, hwInfo, bitmask, size); - auto &compilerProductHelper = executionEnvironment.rootDeviceEnvironments[0]->getHelper(); - auto numBytesPerThread = Math::divideAndRoundUp(compilerProductHelper.getNumThreadsPerEu(), 8u); + auto releaseHelper = executionEnvironment.rootDeviceEnvironments[0]->getReleaseHelper(); + auto numBytesPerThread = releaseHelper ? Math::divideAndRoundUp(releaseHelper->getNumThreadsPerEu(), 8u) : 1u; auto data = bitmask.get(); EXPECT_EQ(1u << 3, data[0]); @@ -337,8 +337,8 @@ HWTEST_F(L0GfxCoreHelperTest, givenEu0To1Threads0To3BitmaskWhenGettingThreadsThe MockExecutionEnvironment executionEnvironment; auto &l0GfxCoreHelper = executionEnvironment.rootDeviceEnvironments[0]->getHelper(); - auto &compilerProductHelper = executionEnvironment.rootDeviceEnvironments[0]->getHelper(); - auto numBytesPerEu = Math::divideAndRoundUp(compilerProductHelper.getNumThreadsPerEu(), 8u); + auto releaseHelper = executionEnvironment.rootDeviceEnvironments[0]->getReleaseHelper(); + auto numBytesPerEu = releaseHelper ? Math::divideAndRoundUp(releaseHelper->getNumThreadsPerEu(), 8u) : 1u; uint8_t data[4]{}; data[0] = 0x0f; diff --git a/level_zero/tools/test/unit_tests/sources/debug/linux/prelim/test_debug_api_linux.cpp b/level_zero/tools/test/unit_tests/sources/debug/linux/prelim/test_debug_api_linux.cpp index 55cc5ff145..df164ce5df 100644 --- a/level_zero/tools/test/unit_tests/sources/debug/linux/prelim/test_debug_api_linux.cpp +++ b/level_zero/tools/test/unit_tests/sources/debug/linux/prelim/test_debug_api_linux.cpp @@ -14,10 +14,10 @@ #include "shared/source/gmm_helper/gmm_helper.h" #include "shared/source/helpers/aligned_memory.h" #include "shared/source/helpers/basic_math.h" -#include "shared/source/helpers/compiler_product_helper.h" #include "shared/source/os_interface/linux/drm_debug.h" #include "shared/source/os_interface/linux/engine_info.h" #include "shared/source/os_interface/os_interface.h" +#include "shared/source/release_helper/release_helper.h" #include "shared/test/common/helpers/debug_manager_state_restore.h" #include "shared/test/common/helpers/gtest_helpers.h" #include "shared/test/common/helpers/variable_backup.h" @@ -5627,8 +5627,8 @@ TEST_F(DebugApiLinuxTest, GivenResumeWARequiredWhenCallingResumeThenWaIsAppliedT config.pid = 0x1234; auto &l0GfxCoreHelper = neoDevice->getRootDeviceEnvironment().getHelper(); - auto &compilerProductHelper = neoDevice->getRootDeviceEnvironment().getHelper(); - auto numBytesPerThread = Math::divideAndRoundUp(compilerProductHelper.getNumThreadsPerEu(), 8u); + auto releaseHelper = neoDevice->getRootDeviceEnvironment().getReleaseHelper(); + auto numBytesPerThread = releaseHelper ? Math::divideAndRoundUp(releaseHelper->getNumThreadsPerEu(), 8u) : 1u; auto sessionMock = std::make_unique(config, device, 10); ASSERT_NE(nullptr, sessionMock); SIP::version version = {2, 0, 0}; diff --git a/opencl/test/unit_test/aub_tests/fixtures/multicontext_aub_fixture.cpp b/opencl/test/unit_test/aub_tests/fixtures/multicontext_aub_fixture.cpp index f56a360c94..5a2367ee96 100644 --- a/opencl/test/unit_test/aub_tests/fixtures/multicontext_aub_fixture.cpp +++ b/opencl/test/unit_test/aub_tests/fixtures/multicontext_aub_fixture.cpp @@ -9,9 +9,9 @@ #include "shared/source/command_stream/aub_command_stream_receiver.h" #include "shared/source/helpers/api_specific_config.h" -#include "shared/source/helpers/compiler_product_helper.h" #include "shared/source/helpers/gfx_core_helper.h" #include "shared/source/helpers/hw_info.h" +#include "shared/source/release_helper/release_helper.h" #include "shared/test/common/helpers/ult_hw_config.h" #include "shared/test/common/helpers/variable_backup.h" #include "shared/test/common/mocks/mock_device.h" @@ -174,7 +174,7 @@ void MulticontextAubFixture::overridePlatformConfigForAllEnginesSupport(Hardware bool setupCalled = false; - auto compilerProductHelper = CompilerProductHelper::create(localHwInfo.platform.eProductFamily); + auto releaseHelper = ReleaseHelper::create(localHwInfo.ipVersion); if (localHwInfo.platform.eRenderCoreFamily == IGFX_XE_HPG_CORE) { #ifdef SUPPORT_DG2 @@ -182,7 +182,7 @@ void MulticontextAubFixture::overridePlatformConfigForAllEnginesSupport(Hardware ASSERT_TRUE(numberOfEnabledTiles == 1); setupCalled = true; - Dg2HwConfig::setupHardwareInfo(&localHwInfo, true, *compilerProductHelper); + Dg2HwConfig::setupHardwareInfo(&localHwInfo, true, releaseHelper.get()); // Mock values localHwInfo.gtSystemInfo.SliceCount = 8; @@ -201,7 +201,7 @@ void MulticontextAubFixture::overridePlatformConfigForAllEnginesSupport(Hardware if (localHwInfo.platform.eProductFamily == IGFX_PVC) { setupCalled = true; - PvcHwConfig::setupHardwareInfo(&localHwInfo, true, *compilerProductHelper); + PvcHwConfig::setupHardwareInfo(&localHwInfo, true, releaseHelper.get()); // Mock values localHwInfo.gtSystemInfo.SliceCount = 8; diff --git a/opencl/test/unit_test/command_queue/sync_buffer_handler_tests.cpp b/opencl/test/unit_test/command_queue/sync_buffer_handler_tests.cpp index bad7806040..5a4efc4e01 100644 --- a/opencl/test/unit_test/command_queue/sync_buffer_handler_tests.cpp +++ b/opencl/test/unit_test/command_queue/sync_buffer_handler_tests.cpp @@ -5,9 +5,9 @@ * */ -#include "shared/source/helpers/compiler_product_helper.h" #include "shared/source/helpers/gfx_core_helper.h" #include "shared/source/program/sync_buffer_handler.h" +#include "shared/source/release_helper/release_helper.h" #include "shared/test/common/mocks/ult_device_factory.h" #include "shared/test/common/test_macros/hw_test.h" @@ -34,8 +34,8 @@ class SyncBufferEnqueueHandlerTest : public EnqueueHandlerTest { void SetUp() override { hardwareInfo = *defaultHwInfo; hardwareInfo.capabilityTable.blitterOperationsSupported = true; - auto compilerProductHelper = CompilerProductHelper::create(hardwareInfo.platform.eProductFamily); - hardwareInfoSetup[productFamily](&hardwareInfo, true, 0, *compilerProductHelper); + auto releaseHelper = ReleaseHelper::create(hardwareInfo.ipVersion); + hardwareInfoSetup[productFamily](&hardwareInfo, true, 0, releaseHelper.get()); setUpImpl(&hardwareInfo); } diff --git a/shared/offline_compiler/source/ocloc_arg_helper.cpp b/shared/offline_compiler/source/ocloc_arg_helper.cpp index c0d5980a26..7481f7eeb9 100644 --- a/shared/offline_compiler/source/ocloc_arg_helper.cpp +++ b/shared/offline_compiler/source/ocloc_arg_helper.cpp @@ -201,8 +201,8 @@ void OclocArgHelper::setHwInfoForHwInfoConfig(NEO::HardwareInfo &hwInfo, uint64_ UNRECOVERABLE_IF(compilerProductHelper == nullptr); uint64_t config = hwInfoConfig ? hwInfoConfig : compilerProductHelper->getHwInfoConfig(hwInfo); setHwInfoValuesFromConfig(config, hwInfo); - NEO::hardwareInfoBaseSetup[hwInfo.platform.eProductFamily](&hwInfo, true, *compilerProductHelper); releaseHelper = NEO::ReleaseHelper::create(hwInfo.ipVersion); + NEO::hardwareInfoBaseSetup[hwInfo.platform.eProductFamily](&hwInfo, true, releaseHelper.get()); } void OclocArgHelper::saveOutput(const std::string &filename, const void *pData, const size_t &dataSize) { diff --git a/shared/offline_compiler/source/offline_compiler.cpp b/shared/offline_compiler/source/offline_compiler.cpp index 95db0a018b..1716213261 100644 --- a/shared/offline_compiler/source/offline_compiler.cpp +++ b/shared/offline_compiler/source/offline_compiler.cpp @@ -479,10 +479,10 @@ int OfflineCompiler::initHardwareInfoForDeprecatedAcronyms(std::string deviceNam uint64_t config = hwInfoConfig ? hwInfoConfig : compilerProductHelper->getHwInfoConfig(hwInfo); setHwInfoValuesFromConfig(config, hwInfo); - hardwareInfoBaseSetup[hwInfo.platform.eProductFamily](&hwInfo, true, *compilerProductHelper); + releaseHelper = NEO::ReleaseHelper::create(hwInfo.ipVersion); + hardwareInfoBaseSetup[hwInfo.platform.eProductFamily](&hwInfo, true, releaseHelper.get()); UNRECOVERABLE_IF(compilerProductHelper == nullptr); productFamilyName = hardwarePrefix[hwInfo.platform.eProductFamily]; - releaseHelper = NEO::ReleaseHelper::create(hwInfo.ipVersion); return OCLOC_SUCCESS; } diff --git a/shared/offline_compiler/source/offline_compiler.h b/shared/offline_compiler/source/offline_compiler.h index 429cf234bd..c57f3a058d 100644 --- a/shared/offline_compiler/source/offline_compiler.h +++ b/shared/offline_compiler/source/offline_compiler.h @@ -23,7 +23,7 @@ class OclocArgHelper; namespace NEO { class CompilerCache; -class ReleaseHelper; +class CompilerProductHelper; class OclocFclFacade; class OclocIgcFacade; diff --git a/shared/offline_compiler/source/offline_linker.cpp b/shared/offline_compiler/source/offline_linker.cpp index c48220f43c..957bab6d48 100644 --- a/shared/offline_compiler/source/offline_linker.cpp +++ b/shared/offline_compiler/source/offline_linker.cpp @@ -15,6 +15,7 @@ #include "shared/source/device_binary_format/elf/ocl_elf.h" #include "shared/source/helpers/compiler_product_helper.h" #include "shared/source/helpers/string.h" +#include "shared/source/release_helper/release_helper.h" #include "cif/common/cif_main.h" #include "cif/import/library_api.h" @@ -204,9 +205,11 @@ int OfflineLinker::initHardwareInfo() { hwInfo = *hwInfoTable[productId]; auto compilerProductHelper = NEO::CompilerProductHelper::create(hwInfo.platform.eProductFamily); + hwInfo.ipVersion = compilerProductHelper->getHwIpVersion(hwInfo); + auto releaseHelper = NEO::ReleaseHelper::create(hwInfo.ipVersion); const auto hwInfoConfig = compilerProductHelper->getHwInfoConfig(hwInfo); setHwInfoValuesFromConfig(hwInfoConfig, hwInfo); - hardwareInfoSetup[hwInfo.platform.eProductFamily](&hwInfo, true, hwInfoConfig, *compilerProductHelper); + hardwareInfoSetup[hwInfo.platform.eProductFamily](&hwInfo, true, hwInfoConfig, releaseHelper.get()); return OCLOC_SUCCESS; } diff --git a/shared/source/gen11/hw_cmds_ehl.h b/shared/source/gen11/hw_cmds_ehl.h index 1a9949aa4d..5afe77b172 100644 --- a/shared/source/gen11/hw_cmds_ehl.h +++ b/shared/source/gen11/hw_cmds_ehl.h @@ -20,14 +20,14 @@ struct EHL : public Gen11Family { static const uint32_t maxSlicesSupported = 1; static const uint32_t maxSubslicesSupported = 4; static const RuntimeCapabilityTable capabilityTable; - static void (*setupHardwareInfo)(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, uint64_t hwInfoConfig, const CompilerProductHelper &compilerProductHelper); + static void (*setupHardwareInfo)(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, uint64_t hwInfoConfig, const ReleaseHelper *releaseHelper); static void setupFeatureAndWorkaroundTable(HardwareInfo *hwInfo); - static void setupHardwareInfoBase(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const CompilerProductHelper &compilerProductHelper); + static void setupHardwareInfoBase(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const ReleaseHelper *releaseHelper); }; class EhlHwConfig : public EHL { public: - static void setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const CompilerProductHelper &compilerProductHelper); + static void setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const ReleaseHelper *releaseHelper); static const HardwareInfo hwInfo; private: diff --git a/shared/source/gen11/hw_cmds_icllp.h b/shared/source/gen11/hw_cmds_icllp.h index 1f4701cc95..ca7df0e423 100644 --- a/shared/source/gen11/hw_cmds_icllp.h +++ b/shared/source/gen11/hw_cmds_icllp.h @@ -20,14 +20,14 @@ struct ICLLP : public Gen11Family { static const uint32_t maxSlicesSupported = 1; static const uint32_t maxSubslicesSupported = 8; static const RuntimeCapabilityTable capabilityTable; - static void (*setupHardwareInfo)(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, uint64_t hwInfoConfig, const CompilerProductHelper &compilerProductHelper); + static void (*setupHardwareInfo)(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, uint64_t hwInfoConfig, const ReleaseHelper *releaseHelper); static void setupFeatureAndWorkaroundTable(HardwareInfo *hwInfo); - static void setupHardwareInfoBase(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const CompilerProductHelper &compilerProductHelper); + static void setupHardwareInfoBase(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const ReleaseHelper *releaseHelper); }; class IcllpHw1x8x8 : public ICLLP { public: - static void setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const CompilerProductHelper &compilerProductHelper); + static void setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const ReleaseHelper *releaseHelper); static const HardwareInfo hwInfo; private: @@ -36,7 +36,7 @@ class IcllpHw1x8x8 : public ICLLP { class IcllpHw1x4x8 : public ICLLP { public: - static void setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const CompilerProductHelper &compilerProductHelper); + static void setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const ReleaseHelper *releaseHelper); static const HardwareInfo hwInfo; private: @@ -44,7 +44,7 @@ class IcllpHw1x4x8 : public ICLLP { }; class IcllpHw1x6x8 : public ICLLP { public: - static void setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const CompilerProductHelper &compilerProductHelper); + static void setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const ReleaseHelper *releaseHelper); static const HardwareInfo hwInfo; private: diff --git a/shared/source/gen11/hw_cmds_lkf.h b/shared/source/gen11/hw_cmds_lkf.h index de53b09c99..8fd40c220c 100644 --- a/shared/source/gen11/hw_cmds_lkf.h +++ b/shared/source/gen11/hw_cmds_lkf.h @@ -20,13 +20,13 @@ struct LKF : public Gen11Family { static const uint32_t maxSlicesSupported = 1; static const uint32_t maxSubslicesSupported = 8; static const RuntimeCapabilityTable capabilityTable; - static void (*setupHardwareInfo)(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, uint64_t hwInfoConfig, const CompilerProductHelper &compilerProductHelper); + static void (*setupHardwareInfo)(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, uint64_t hwInfoConfig, const ReleaseHelper *releaseHelper); static void setupFeatureAndWorkaroundTable(HardwareInfo *hwInfo); - static void setupHardwareInfoBase(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const CompilerProductHelper &compilerProductHelper); + static void setupHardwareInfoBase(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const ReleaseHelper *releaseHelper); }; class LkfHw1x8x8 : public LKF { public: - static void setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const CompilerProductHelper &compilerProductHelper); + static void setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const ReleaseHelper *releaseHelper); static const HardwareInfo hwInfo; private: diff --git a/shared/source/gen11/hw_info_ehl.cpp b/shared/source/gen11/hw_info_ehl.cpp index bdd33da9c9..a72a5b0fa3 100644 --- a/shared/source/gen11/hw_info_ehl.cpp +++ b/shared/source/gen11/hw_info_ehl.cpp @@ -8,7 +8,6 @@ #include "shared/source/aub_mem_dump/definitions/aub_services.h" #include "shared/source/command_stream/preemption_mode.h" #include "shared/source/gen11/hw_cmds_ehl.h" -#include "shared/source/helpers/compiler_product_helper.h" #include "shared/source/helpers/constants.h" #include "aubstream/engine_node.h" @@ -112,9 +111,9 @@ void EHL::setupFeatureAndWorkaroundTable(HardwareInfo *hwInfo) { workaroundTable->flags.wa4kAlignUVOffsetNV12LinearSurface = true; }; -void EHL::setupHardwareInfoBase(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const CompilerProductHelper &compilerProductHelper) { +void EHL::setupHardwareInfoBase(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const ReleaseHelper *releaseHelper) { GT_SYSTEM_INFO *gtSysInfo = &hwInfo->gtSystemInfo; - gtSysInfo->ThreadCount = gtSysInfo->EUCount * compilerProductHelper.getNumThreadsPerEu(); + gtSysInfo->ThreadCount = gtSysInfo->EUCount * 7u; gtSysInfo->TotalVsThreads = 0; gtSysInfo->TotalHsThreads = 0; gtSysInfo->TotalDsThreads = 0; @@ -140,8 +139,8 @@ const HardwareInfo EhlHwConfig::hwInfo = { EHL::capabilityTable}; GT_SYSTEM_INFO EhlHwConfig::gtSystemInfo = {0}; -void EhlHwConfig::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const CompilerProductHelper &compilerProductHelper) { - EHL::setupHardwareInfoBase(hwInfo, setupFeatureTableAndWorkaroundTable, compilerProductHelper); +void EhlHwConfig::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const ReleaseHelper *releaseHelper) { + EHL::setupHardwareInfoBase(hwInfo, setupFeatureTableAndWorkaroundTable, releaseHelper); GT_SYSTEM_INFO *gtSysInfo = &hwInfo->gtSystemInfo; gtSysInfo->SliceCount = 1; @@ -152,8 +151,8 @@ void EhlHwConfig::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTable const HardwareInfo EHL::hwInfo = EhlHwConfig::hwInfo; -void setupEHLHardwareInfoImpl(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, uint64_t hwInfoConfig, const CompilerProductHelper &compilerProductHelper) { - EhlHwConfig::setupHardwareInfo(hwInfo, setupFeatureTableAndWorkaroundTable, compilerProductHelper); +void setupEHLHardwareInfoImpl(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, uint64_t hwInfoConfig, const ReleaseHelper *releaseHelper) { + EhlHwConfig::setupHardwareInfo(hwInfo, setupFeatureTableAndWorkaroundTable, releaseHelper); } -void (*EHL::setupHardwareInfo)(HardwareInfo *, bool, uint64_t, const CompilerProductHelper &) = setupEHLHardwareInfoImpl; +void (*EHL::setupHardwareInfo)(HardwareInfo *, bool, uint64_t, const ReleaseHelper *) = setupEHLHardwareInfoImpl; } // namespace NEO diff --git a/shared/source/gen11/hw_info_icllp.cpp b/shared/source/gen11/hw_info_icllp.cpp index 9a9ce5e57c..5fef07a91d 100644 --- a/shared/source/gen11/hw_info_icllp.cpp +++ b/shared/source/gen11/hw_info_icllp.cpp @@ -8,7 +8,6 @@ #include "shared/source/aub_mem_dump/definitions/aub_services.h" #include "shared/source/command_stream/preemption_mode.h" #include "shared/source/gen11/hw_cmds_icllp.h" -#include "shared/source/helpers/compiler_product_helper.h" #include "shared/source/helpers/constants.h" #include "aubstream/engine_node.h" @@ -112,9 +111,9 @@ void ICLLP::setupFeatureAndWorkaroundTable(HardwareInfo *hwInfo) { workaroundTable->flags.wa4kAlignUVOffsetNV12LinearSurface = true; }; -void ICLLP::setupHardwareInfoBase(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const CompilerProductHelper &compilerProductHelper) { +void ICLLP::setupHardwareInfoBase(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const ReleaseHelper *releaseHelper) { GT_SYSTEM_INFO *gtSysInfo = &hwInfo->gtSystemInfo; - gtSysInfo->ThreadCount = gtSysInfo->EUCount * compilerProductHelper.getNumThreadsPerEu(); + gtSysInfo->ThreadCount = gtSysInfo->EUCount * 7u; gtSysInfo->TotalHsThreads = 224; gtSysInfo->TotalGsThreads = 224; gtSysInfo->TotalVsThreads = 336; @@ -140,8 +139,8 @@ const HardwareInfo IcllpHw1x8x8::hwInfo = { ICLLP::capabilityTable}; GT_SYSTEM_INFO IcllpHw1x8x8::gtSystemInfo = {0}; -void IcllpHw1x8x8::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const CompilerProductHelper &compilerProductHelper) { - ICLLP::setupHardwareInfoBase(hwInfo, setupFeatureTableAndWorkaroundTable, compilerProductHelper); +void IcllpHw1x8x8::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const ReleaseHelper *releaseHelper) { + ICLLP::setupHardwareInfoBase(hwInfo, setupFeatureTableAndWorkaroundTable, releaseHelper); GT_SYSTEM_INFO *gtSysInfo = &hwInfo->gtSystemInfo; gtSysInfo->SliceCount = 1; @@ -161,8 +160,8 @@ const HardwareInfo IcllpHw1x4x8::hwInfo = { ICLLP::capabilityTable}; GT_SYSTEM_INFO IcllpHw1x4x8::gtSystemInfo = {0}; -void IcllpHw1x4x8::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const CompilerProductHelper &compilerProductHelper) { - ICLLP::setupHardwareInfoBase(hwInfo, setupFeatureTableAndWorkaroundTable, compilerProductHelper); +void IcllpHw1x4x8::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const ReleaseHelper *releaseHelper) { + ICLLP::setupHardwareInfoBase(hwInfo, setupFeatureTableAndWorkaroundTable, releaseHelper); GT_SYSTEM_INFO *gtSysInfo = &hwInfo->gtSystemInfo; gtSysInfo->SliceCount = 1; @@ -179,8 +178,8 @@ const HardwareInfo IcllpHw1x6x8::hwInfo = { ICLLP::capabilityTable}; GT_SYSTEM_INFO IcllpHw1x6x8::gtSystemInfo = {0}; -void IcllpHw1x6x8::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const CompilerProductHelper &compilerProductHelper) { - ICLLP::setupHardwareInfoBase(hwInfo, setupFeatureTableAndWorkaroundTable, compilerProductHelper); +void IcllpHw1x6x8::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const ReleaseHelper *releaseHelper) { + ICLLP::setupHardwareInfoBase(hwInfo, setupFeatureTableAndWorkaroundTable, releaseHelper); GT_SYSTEM_INFO *gtSysInfo = &hwInfo->gtSystemInfo; gtSysInfo->SliceCount = 1; @@ -191,20 +190,20 @@ void IcllpHw1x6x8::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTabl const HardwareInfo ICLLP::hwInfo = IcllpHw1x8x8::hwInfo; -void setupICLLPHardwareInfoImpl(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, uint64_t hwInfoConfig, const CompilerProductHelper &compilerProductHelper) { +void setupICLLPHardwareInfoImpl(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, uint64_t hwInfoConfig, const ReleaseHelper *releaseHelper) { if (hwInfoConfig == 0x100080008) { - IcllpHw1x8x8::setupHardwareInfo(hwInfo, setupFeatureTableAndWorkaroundTable, compilerProductHelper); + IcllpHw1x8x8::setupHardwareInfo(hwInfo, setupFeatureTableAndWorkaroundTable, releaseHelper); } else if (hwInfoConfig == 0x100040008) { - IcllpHw1x4x8::setupHardwareInfo(hwInfo, setupFeatureTableAndWorkaroundTable, compilerProductHelper); + IcllpHw1x4x8::setupHardwareInfo(hwInfo, setupFeatureTableAndWorkaroundTable, releaseHelper); } else if (hwInfoConfig == 0x100060008) { - IcllpHw1x6x8::setupHardwareInfo(hwInfo, setupFeatureTableAndWorkaroundTable, compilerProductHelper); + IcllpHw1x6x8::setupHardwareInfo(hwInfo, setupFeatureTableAndWorkaroundTable, releaseHelper); } else if (hwInfoConfig == 0x0) { // Default config - IcllpHw1x8x8::setupHardwareInfo(hwInfo, setupFeatureTableAndWorkaroundTable, compilerProductHelper); + IcllpHw1x8x8::setupHardwareInfo(hwInfo, setupFeatureTableAndWorkaroundTable, releaseHelper); } else { UNRECOVERABLE_IF(true); } } -void (*ICLLP::setupHardwareInfo)(HardwareInfo *, bool, uint64_t, const CompilerProductHelper &) = setupICLLPHardwareInfoImpl; +void (*ICLLP::setupHardwareInfo)(HardwareInfo *, bool, uint64_t, const ReleaseHelper *) = setupICLLPHardwareInfoImpl; } // namespace NEO diff --git a/shared/source/gen11/hw_info_lkf.cpp b/shared/source/gen11/hw_info_lkf.cpp index fe85a48fb4..83440417c7 100644 --- a/shared/source/gen11/hw_info_lkf.cpp +++ b/shared/source/gen11/hw_info_lkf.cpp @@ -8,7 +8,6 @@ #include "shared/source/aub_mem_dump/definitions/aub_services.h" #include "shared/source/command_stream/preemption_mode.h" #include "shared/source/gen11/hw_cmds_lkf.h" -#include "shared/source/helpers/compiler_product_helper.h" #include "shared/source/helpers/constants.h" #include "aubstream/engine_node.h" @@ -112,9 +111,9 @@ void LKF::setupFeatureAndWorkaroundTable(HardwareInfo *hwInfo) { workaroundTable->flags.wa4kAlignUVOffsetNV12LinearSurface = true; }; -void LKF::setupHardwareInfoBase(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const CompilerProductHelper &compilerProductHelper) { +void LKF::setupHardwareInfoBase(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const ReleaseHelper *releaseHelper) { GT_SYSTEM_INFO *gtSysInfo = &hwInfo->gtSystemInfo; - gtSysInfo->ThreadCount = gtSysInfo->EUCount * compilerProductHelper.getNumThreadsPerEu(); + gtSysInfo->ThreadCount = gtSysInfo->EUCount * 7u; gtSysInfo->TotalVsThreads = 448; gtSysInfo->TotalHsThreads = 448; gtSysInfo->TotalDsThreads = 448; @@ -140,8 +139,8 @@ const HardwareInfo LkfHw1x8x8::hwInfo = { LKF::capabilityTable}; GT_SYSTEM_INFO LkfHw1x8x8::gtSystemInfo = {0}; -void LkfHw1x8x8::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const CompilerProductHelper &compilerProductHelper) { - LKF::setupHardwareInfoBase(hwInfo, setupFeatureTableAndWorkaroundTable, compilerProductHelper); +void LkfHw1x8x8::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const ReleaseHelper *releaseHelper) { + LKF::setupHardwareInfoBase(hwInfo, setupFeatureTableAndWorkaroundTable, releaseHelper); GT_SYSTEM_INFO *gtSysInfo = &hwInfo->gtSystemInfo; gtSysInfo->SliceCount = 1; gtSysInfo->L3CacheSizeInKb = 2560; @@ -151,16 +150,16 @@ void LkfHw1x8x8::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableA const HardwareInfo LKF::hwInfo = LkfHw1x8x8::hwInfo; -void setupLKFHardwareInfoImpl(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, uint64_t hwInfoConfig, const CompilerProductHelper &compilerProductHelper) { +void setupLKFHardwareInfoImpl(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, uint64_t hwInfoConfig, const ReleaseHelper *releaseHelper) { if (hwInfoConfig == 0x100080008) { - LkfHw1x8x8::setupHardwareInfo(hwInfo, setupFeatureTableAndWorkaroundTable, compilerProductHelper); + LkfHw1x8x8::setupHardwareInfo(hwInfo, setupFeatureTableAndWorkaroundTable, releaseHelper); } else if (hwInfoConfig == 0x0) { // Default config - LkfHw1x8x8::setupHardwareInfo(hwInfo, setupFeatureTableAndWorkaroundTable, compilerProductHelper); + LkfHw1x8x8::setupHardwareInfo(hwInfo, setupFeatureTableAndWorkaroundTable, releaseHelper); } else { UNRECOVERABLE_IF(true); } } -void (*LKF::setupHardwareInfo)(HardwareInfo *, bool, uint64_t, const CompilerProductHelper &) = setupLKFHardwareInfoImpl; +void (*LKF::setupHardwareInfo)(HardwareInfo *, bool, uint64_t, const ReleaseHelper *) = setupLKFHardwareInfoImpl; } // namespace NEO diff --git a/shared/source/gen12lp/hw_cmds_adln.h b/shared/source/gen12lp/hw_cmds_adln.h index 47e53a747d..7f74c71f0b 100644 --- a/shared/source/gen12lp/hw_cmds_adln.h +++ b/shared/source/gen12lp/hw_cmds_adln.h @@ -21,13 +21,13 @@ struct ADLN : public Gen12LpFamily { static const uint32_t maxSubslicesSupported = 6; static const uint32_t maxDualSubslicesSupported = 12; static const RuntimeCapabilityTable capabilityTable; - static void (*setupHardwareInfo)(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, uint64_t hwInfoConfig, const CompilerProductHelper &compilerProductHelper); + static void (*setupHardwareInfo)(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, uint64_t hwInfoConfig, const ReleaseHelper *releaseHelper); static void setupFeatureAndWorkaroundTable(HardwareInfo *hwInfo); - static void setupHardwareInfoBase(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const CompilerProductHelper &compilerProductHelper); + static void setupHardwareInfoBase(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const ReleaseHelper *releaseHelper); }; class AdlnHwConfig : public ADLN { public: - static void setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const CompilerProductHelper &compilerProductHelper); + static void setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const ReleaseHelper *releaseHelper); static const HardwareInfo hwInfo; private: diff --git a/shared/source/gen12lp/hw_cmds_adlp.h b/shared/source/gen12lp/hw_cmds_adlp.h index 899c2bf3db..91556cd13f 100644 --- a/shared/source/gen12lp/hw_cmds_adlp.h +++ b/shared/source/gen12lp/hw_cmds_adlp.h @@ -21,9 +21,9 @@ struct ADLP : public Gen12LpFamily { static const uint32_t maxSubslicesSupported = 6; static const uint32_t maxDualSubslicesSupported = 12; static const RuntimeCapabilityTable capabilityTable; - static void (*setupHardwareInfo)(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, uint64_t hwInfoConfig, const CompilerProductHelper &compilerProductHelper); + static void (*setupHardwareInfo)(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, uint64_t hwInfoConfig, const ReleaseHelper *releaseHelper); static void setupFeatureAndWorkaroundTable(HardwareInfo *hwInfo); - static void setupHardwareInfoBase(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const CompilerProductHelper &compilerProductHelper); + static void setupHardwareInfoBase(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const ReleaseHelper *releaseHelper); struct PipelineSelectStateSupport { static constexpr bool mediaSamplerDopClockGate = true; @@ -33,7 +33,7 @@ struct ADLP : public Gen12LpFamily { class AdlpHwConfig : public ADLP { public: - static void setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const CompilerProductHelper &compilerProductHelper); + static void setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const ReleaseHelper *releaseHelper); static const HardwareInfo hwInfo; private: diff --git a/shared/source/gen12lp/hw_cmds_adls.h b/shared/source/gen12lp/hw_cmds_adls.h index 2e9ae26290..1264464d30 100644 --- a/shared/source/gen12lp/hw_cmds_adls.h +++ b/shared/source/gen12lp/hw_cmds_adls.h @@ -21,13 +21,13 @@ struct ADLS : public Gen12LpFamily { static const uint32_t maxSubslicesSupported = 6; static const uint32_t maxDualSubslicesSupported = 12; static const RuntimeCapabilityTable capabilityTable; - static void (*setupHardwareInfo)(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, uint64_t hwInfoConfig, const CompilerProductHelper &compilerProductHelper); + static void (*setupHardwareInfo)(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, uint64_t hwInfoConfig, const ReleaseHelper *releaseHelper); static void setupFeatureAndWorkaroundTable(HardwareInfo *hwInfo); - static void setupHardwareInfoBase(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const CompilerProductHelper &compilerProductHelper); + static void setupHardwareInfoBase(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const ReleaseHelper *releaseHelper); }; class AdlsHwConfig : public ADLS { public: - static void setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const CompilerProductHelper &compilerProductHelper); + static void setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const ReleaseHelper *releaseHelper); static const HardwareInfo hwInfo; private: diff --git a/shared/source/gen12lp/hw_cmds_dg1.h b/shared/source/gen12lp/hw_cmds_dg1.h index b69ced2e2b..87a4438b60 100644 --- a/shared/source/gen12lp/hw_cmds_dg1.h +++ b/shared/source/gen12lp/hw_cmds_dg1.h @@ -20,13 +20,13 @@ struct DG1 : public Gen12LpFamily { static const uint32_t maxSubslicesSupported = 6; static const uint32_t maxDualSubslicesSupported = 6; static const RuntimeCapabilityTable capabilityTable; - static void (*setupHardwareInfo)(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, uint64_t hwInfoConfig, const CompilerProductHelper &compilerProductHelper); + static void (*setupHardwareInfo)(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, uint64_t hwInfoConfig, const ReleaseHelper *releaseHelper); static void setupFeatureAndWorkaroundTable(HardwareInfo *hwInfo); - static void setupHardwareInfoBase(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const CompilerProductHelper &compilerProductHelper); + static void setupHardwareInfoBase(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const ReleaseHelper *releaseHelper); }; class Dg1HwConfig : public DG1 { public: - static void setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const CompilerProductHelper &compilerProductHelper); + static void setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const ReleaseHelper *releaseHelper); static const HardwareInfo hwInfo; private: diff --git a/shared/source/gen12lp/hw_cmds_rkl.h b/shared/source/gen12lp/hw_cmds_rkl.h index 3b0b33de2f..b00aa06c15 100644 --- a/shared/source/gen12lp/hw_cmds_rkl.h +++ b/shared/source/gen12lp/hw_cmds_rkl.h @@ -18,13 +18,13 @@ struct RKL : public Gen12LpFamily { static const uint32_t maxEuPerSubslice = 16; static const uint32_t maxSlicesSupported = 1; static const RuntimeCapabilityTable capabilityTable; - static void (*setupHardwareInfo)(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, uint64_t hwInfoConfig, const CompilerProductHelper &compilerProductHelper); + static void (*setupHardwareInfo)(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, uint64_t hwInfoConfig, const ReleaseHelper *releaseHelper); static void setupFeatureAndWorkaroundTable(HardwareInfo *hwInfo); - static void setupHardwareInfoBase(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const CompilerProductHelper &compilerProductHelper); + static void setupHardwareInfoBase(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const ReleaseHelper *releaseHelper); }; class RklHwConfig : public RKL { public: - static void setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const CompilerProductHelper &compilerProductHelper); + static void setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const ReleaseHelper *releaseHelper); static const HardwareInfo hwInfo; private: diff --git a/shared/source/gen12lp/hw_cmds_tgllp.h b/shared/source/gen12lp/hw_cmds_tgllp.h index b793073d89..eabe2679fb 100644 --- a/shared/source/gen12lp/hw_cmds_tgllp.h +++ b/shared/source/gen12lp/hw_cmds_tgllp.h @@ -21,14 +21,14 @@ struct TGLLP : public Gen12LpFamily { static const uint32_t maxSubslicesSupported = 6; static const uint32_t maxDualSubslicesSupported = 6; static const RuntimeCapabilityTable capabilityTable; - static void (*setupHardwareInfo)(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, uint64_t hwInfoConfig, const CompilerProductHelper &compilerProductHelper); + static void (*setupHardwareInfo)(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, uint64_t hwInfoConfig, const ReleaseHelper *releaseHelper); static void setupFeatureAndWorkaroundTable(HardwareInfo *hwInfo); - static void setupHardwareInfoBase(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const CompilerProductHelper &compilerProductHelper); + static void setupHardwareInfoBase(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const ReleaseHelper *releaseHelper); }; class TgllpHw1x6x16 : public TGLLP { public: - static void setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const CompilerProductHelper &compilerProductHelper); + static void setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const ReleaseHelper *releaseHelper); static const HardwareInfo hwInfo; private: @@ -37,7 +37,7 @@ class TgllpHw1x6x16 : public TGLLP { class TgllpHw1x2x16 : public TGLLP { public: - static void setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const CompilerProductHelper &compilerProductHelper); + static void setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const ReleaseHelper *releaseHelper); static const HardwareInfo hwInfo; private: diff --git a/shared/source/gen12lp/hw_info_adln.cpp b/shared/source/gen12lp/hw_info_adln.cpp index 8482a2b709..5907c01ee3 100644 --- a/shared/source/gen12lp/hw_info_adln.cpp +++ b/shared/source/gen12lp/hw_info_adln.cpp @@ -10,7 +10,6 @@ #include "shared/source/aub_mem_dump/definitions/aub_services.h" #include "shared/source/command_stream/preemption_mode.h" #include "shared/source/gen12lp/hw_cmds_adln.h" -#include "shared/source/helpers/compiler_product_helper.h" #include "shared/source/helpers/constants.h" #include "aubstream/engine_node.h" @@ -114,9 +113,9 @@ void ADLN::setupFeatureAndWorkaroundTable(HardwareInfo *hwInfo) { workaroundTable->flags.waUntypedBufferCompression = true; }; -void ADLN::setupHardwareInfoBase(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const CompilerProductHelper &compilerProductHelper) { +void ADLN::setupHardwareInfoBase(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const ReleaseHelper *releaseHelper) { GT_SYSTEM_INFO *gtSysInfo = &hwInfo->gtSystemInfo; - gtSysInfo->ThreadCount = gtSysInfo->EUCount * compilerProductHelper.getNumThreadsPerEu(); + gtSysInfo->ThreadCount = gtSysInfo->EUCount * 7u; gtSysInfo->TotalPsThreadsWindowerRange = 64; gtSysInfo->CsrSizeInMb = 8; gtSysInfo->MaxEuPerSubSlice = ADLN::maxEuPerSubslice; @@ -139,8 +138,8 @@ const HardwareInfo AdlnHwConfig::hwInfo = { ADLN::capabilityTable}; GT_SYSTEM_INFO AdlnHwConfig::gtSystemInfo = {0}; -void AdlnHwConfig::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const CompilerProductHelper &compilerProductHelper) { - ADLN::setupHardwareInfoBase(hwInfo, setupFeatureTableAndWorkaroundTable, compilerProductHelper); +void AdlnHwConfig::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const ReleaseHelper *releaseHelper) { + ADLN::setupHardwareInfoBase(hwInfo, setupFeatureTableAndWorkaroundTable, releaseHelper); GT_SYSTEM_INFO *gtSysInfo = &hwInfo->gtSystemInfo; gtSysInfo->L3CacheSizeInKb = 1920; @@ -153,9 +152,9 @@ void AdlnHwConfig::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTabl const HardwareInfo ADLN::hwInfo = AdlnHwConfig::hwInfo; -void setupADLNHardwareInfoImpl(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, uint64_t hwInfoConfig, const CompilerProductHelper &compilerProductHelper) { - AdlnHwConfig::setupHardwareInfo(hwInfo, setupFeatureTableAndWorkaroundTable, compilerProductHelper); +void setupADLNHardwareInfoImpl(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, uint64_t hwInfoConfig, const ReleaseHelper *releaseHelper) { + AdlnHwConfig::setupHardwareInfo(hwInfo, setupFeatureTableAndWorkaroundTable, releaseHelper); } -void (*ADLN::setupHardwareInfo)(HardwareInfo *, bool, uint64_t, const CompilerProductHelper &) = setupADLNHardwareInfoImpl; +void (*ADLN::setupHardwareInfo)(HardwareInfo *, bool, uint64_t, const ReleaseHelper *) = setupADLNHardwareInfoImpl; } // namespace NEO diff --git a/shared/source/gen12lp/hw_info_adlp.cpp b/shared/source/gen12lp/hw_info_adlp.cpp index c23f8cec4d..657e4ed8d7 100644 --- a/shared/source/gen12lp/hw_info_adlp.cpp +++ b/shared/source/gen12lp/hw_info_adlp.cpp @@ -10,7 +10,6 @@ #include "shared/source/aub_mem_dump/definitions/aub_services.h" #include "shared/source/command_stream/preemption_mode.h" #include "shared/source/gen12lp/hw_cmds_adlp.h" -#include "shared/source/helpers/compiler_product_helper.h" #include "shared/source/helpers/constants.h" #include "aubstream/engine_node.h" @@ -114,9 +113,9 @@ void ADLP::setupFeatureAndWorkaroundTable(HardwareInfo *hwInfo) { workaroundTable->flags.waUntypedBufferCompression = true; }; -void ADLP::setupHardwareInfoBase(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const CompilerProductHelper &compilerProductHelper) { +void ADLP::setupHardwareInfoBase(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const ReleaseHelper *releaseHelper) { GT_SYSTEM_INFO *gtSysInfo = &hwInfo->gtSystemInfo; - gtSysInfo->ThreadCount = gtSysInfo->EUCount * compilerProductHelper.getNumThreadsPerEu(); + gtSysInfo->ThreadCount = gtSysInfo->EUCount * 7u; gtSysInfo->TotalPsThreadsWindowerRange = 64; gtSysInfo->CsrSizeInMb = 8; gtSysInfo->MaxEuPerSubSlice = ADLP::maxEuPerSubslice; @@ -139,8 +138,8 @@ const HardwareInfo AdlpHwConfig::hwInfo = { ADLP::capabilityTable}; GT_SYSTEM_INFO AdlpHwConfig::gtSystemInfo = {0}; -void AdlpHwConfig::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const CompilerProductHelper &compilerProductHelper) { - setupHardwareInfoBase(hwInfo, setupFeatureTableAndWorkaroundTable, compilerProductHelper); +void AdlpHwConfig::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const ReleaseHelper *releaseHelper) { + setupHardwareInfoBase(hwInfo, setupFeatureTableAndWorkaroundTable, releaseHelper); GT_SYSTEM_INFO *gtSysInfo = &hwInfo->gtSystemInfo; gtSysInfo->CsrSizeInMb = 8; gtSysInfo->IsDynamicallyPopulated = false; @@ -167,9 +166,9 @@ void AdlpHwConfig::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTabl }; const HardwareInfo ADLP::hwInfo = AdlpHwConfig::hwInfo; -void setupADLPHardwareInfoImpl(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, uint64_t hwInfoConfig, const CompilerProductHelper &compilerProductHelper) { - AdlpHwConfig::setupHardwareInfo(hwInfo, setupFeatureTableAndWorkaroundTable, compilerProductHelper); +void setupADLPHardwareInfoImpl(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, uint64_t hwInfoConfig, const ReleaseHelper *releaseHelper) { + AdlpHwConfig::setupHardwareInfo(hwInfo, setupFeatureTableAndWorkaroundTable, releaseHelper); } -void (*ADLP::setupHardwareInfo)(HardwareInfo *, bool, uint64_t, const CompilerProductHelper &) = setupADLPHardwareInfoImpl; +void (*ADLP::setupHardwareInfo)(HardwareInfo *, bool, uint64_t, const ReleaseHelper *) = setupADLPHardwareInfoImpl; } // namespace NEO diff --git a/shared/source/gen12lp/hw_info_adls.cpp b/shared/source/gen12lp/hw_info_adls.cpp index 6e8182cb56..dd88be513c 100644 --- a/shared/source/gen12lp/hw_info_adls.cpp +++ b/shared/source/gen12lp/hw_info_adls.cpp @@ -10,7 +10,6 @@ #include "shared/source/aub_mem_dump/definitions/aub_services.h" #include "shared/source/command_stream/preemption_mode.h" #include "shared/source/gen12lp/hw_cmds_adls.h" -#include "shared/source/helpers/compiler_product_helper.h" #include "shared/source/helpers/constants.h" #include "aubstream/engine_node.h" @@ -114,9 +113,9 @@ void ADLS::setupFeatureAndWorkaroundTable(HardwareInfo *hwInfo) { workaroundTable->flags.waUntypedBufferCompression = true; }; -void ADLS::setupHardwareInfoBase(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const CompilerProductHelper &compilerProductHelper) { +void ADLS::setupHardwareInfoBase(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const ReleaseHelper *releaseHelper) { GT_SYSTEM_INFO *gtSysInfo = &hwInfo->gtSystemInfo; - gtSysInfo->ThreadCount = gtSysInfo->EUCount * compilerProductHelper.getNumThreadsPerEu(); + gtSysInfo->ThreadCount = gtSysInfo->EUCount * 7u; gtSysInfo->TotalPsThreadsWindowerRange = 64; gtSysInfo->CsrSizeInMb = 8; gtSysInfo->MaxEuPerSubSlice = ADLS::maxEuPerSubslice; @@ -139,8 +138,8 @@ const HardwareInfo AdlsHwConfig::hwInfo = { ADLS::capabilityTable}; GT_SYSTEM_INFO AdlsHwConfig::gtSystemInfo = {0}; -void AdlsHwConfig::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const CompilerProductHelper &compilerProductHelper) { - setupHardwareInfoBase(hwInfo, setupFeatureTableAndWorkaroundTable, compilerProductHelper); +void AdlsHwConfig::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const ReleaseHelper *releaseHelper) { + setupHardwareInfoBase(hwInfo, setupFeatureTableAndWorkaroundTable, releaseHelper); GT_SYSTEM_INFO *gtSysInfo = &hwInfo->gtSystemInfo; gtSysInfo->DualSubSliceCount = gtSysInfo->SubSliceCount; @@ -165,9 +164,9 @@ void AdlsHwConfig::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTabl const HardwareInfo ADLS::hwInfo = AdlsHwConfig::hwInfo; -void setupADLSHardwareInfoImpl(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, uint64_t hwInfoConfig, const CompilerProductHelper &compilerProductHelper) { - AdlsHwConfig::setupHardwareInfo(hwInfo, setupFeatureTableAndWorkaroundTable, compilerProductHelper); +void setupADLSHardwareInfoImpl(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, uint64_t hwInfoConfig, const ReleaseHelper *releaseHelper) { + AdlsHwConfig::setupHardwareInfo(hwInfo, setupFeatureTableAndWorkaroundTable, releaseHelper); } -void (*ADLS::setupHardwareInfo)(HardwareInfo *, bool, uint64_t, const CompilerProductHelper &) = setupADLSHardwareInfoImpl; +void (*ADLS::setupHardwareInfo)(HardwareInfo *, bool, uint64_t, const ReleaseHelper *) = setupADLSHardwareInfoImpl; } // namespace NEO diff --git a/shared/source/gen12lp/hw_info_dg1.cpp b/shared/source/gen12lp/hw_info_dg1.cpp index e22cbb3d15..b5129b3f63 100644 --- a/shared/source/gen12lp/hw_info_dg1.cpp +++ b/shared/source/gen12lp/hw_info_dg1.cpp @@ -10,7 +10,6 @@ #include "shared/source/aub_mem_dump/definitions/aub_services.h" #include "shared/source/command_stream/preemption_mode.h" #include "shared/source/gen12lp/hw_cmds_dg1.h" -#include "shared/source/helpers/compiler_product_helper.h" #include "shared/source/helpers/constants.h" #include "aubstream/engine_node.h" @@ -115,9 +114,9 @@ void DG1::setupFeatureAndWorkaroundTable(HardwareInfo *hwInfo) { workaroundTable->flags.wa4kAlignUVOffsetNV12LinearSurface = true; }; -void DG1::setupHardwareInfoBase(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const CompilerProductHelper &compilerProductHelper) { +void DG1::setupHardwareInfoBase(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const ReleaseHelper *releaseHelper) { GT_SYSTEM_INFO *gtSysInfo = &hwInfo->gtSystemInfo; - gtSysInfo->ThreadCount = gtSysInfo->EUCount * compilerProductHelper.getNumThreadsPerEu(); + gtSysInfo->ThreadCount = gtSysInfo->EUCount * 7u; gtSysInfo->TotalVsThreads = 672; gtSysInfo->TotalHsThreads = 672; gtSysInfo->TotalDsThreads = 672; @@ -144,8 +143,8 @@ const HardwareInfo Dg1HwConfig::hwInfo = { DG1::capabilityTable}; GT_SYSTEM_INFO Dg1HwConfig::gtSystemInfo = {0}; -void Dg1HwConfig::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const CompilerProductHelper &compilerProductHelper) { - DG1::setupHardwareInfoBase(hwInfo, setupFeatureTableAndWorkaroundTable, compilerProductHelper); +void Dg1HwConfig::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const ReleaseHelper *releaseHelper) { + DG1::setupHardwareInfoBase(hwInfo, setupFeatureTableAndWorkaroundTable, releaseHelper); GT_SYSTEM_INFO *gtSysInfo = &hwInfo->gtSystemInfo; gtSysInfo->SliceCount = 1; @@ -161,16 +160,16 @@ void Dg1HwConfig::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTable const HardwareInfo DG1::hwInfo = Dg1HwConfig::hwInfo; -void setupDG1HardwareInfoImpl(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, uint64_t hwInfoConfig, const CompilerProductHelper &compilerProductHelper) { +void setupDG1HardwareInfoImpl(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, uint64_t hwInfoConfig, const ReleaseHelper *releaseHelper) { if (hwInfoConfig == 0x100060010) { - Dg1HwConfig::setupHardwareInfo(hwInfo, setupFeatureTableAndWorkaroundTable, compilerProductHelper); + Dg1HwConfig::setupHardwareInfo(hwInfo, setupFeatureTableAndWorkaroundTable, releaseHelper); } else if (hwInfoConfig == 0x0) { // Default config - Dg1HwConfig::setupHardwareInfo(hwInfo, setupFeatureTableAndWorkaroundTable, compilerProductHelper); + Dg1HwConfig::setupHardwareInfo(hwInfo, setupFeatureTableAndWorkaroundTable, releaseHelper); } else { UNRECOVERABLE_IF(true); } } -void (*DG1::setupHardwareInfo)(HardwareInfo *, bool, uint64_t, const CompilerProductHelper &) = setupDG1HardwareInfoImpl; +void (*DG1::setupHardwareInfo)(HardwareInfo *, bool, uint64_t, const ReleaseHelper *) = setupDG1HardwareInfoImpl; } // namespace NEO diff --git a/shared/source/gen12lp/hw_info_rkl.cpp b/shared/source/gen12lp/hw_info_rkl.cpp index dbbcdfd75b..d6687ecde5 100644 --- a/shared/source/gen12lp/hw_info_rkl.cpp +++ b/shared/source/gen12lp/hw_info_rkl.cpp @@ -10,7 +10,6 @@ #include "shared/source/aub_mem_dump/definitions/aub_services.h" #include "shared/source/command_stream/preemption_mode.h" #include "shared/source/gen12lp/hw_cmds_rkl.h" -#include "shared/source/helpers/compiler_product_helper.h" #include "shared/source/helpers/constants.h" #include "aubstream/engine_node.h" @@ -113,9 +112,9 @@ void RKL::setupFeatureAndWorkaroundTable(HardwareInfo *hwInfo) { workaroundTable->flags.wa4kAlignUVOffsetNV12LinearSurface = true; }; -void RKL::setupHardwareInfoBase(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const CompilerProductHelper &compilerProductHelper) { +void RKL::setupHardwareInfoBase(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const ReleaseHelper *releaseHelper) { GT_SYSTEM_INFO *gtSysInfo = &hwInfo->gtSystemInfo; - gtSysInfo->ThreadCount = gtSysInfo->EUCount * compilerProductHelper.getNumThreadsPerEu(); + gtSysInfo->ThreadCount = gtSysInfo->EUCount * 7u; gtSysInfo->TotalVsThreads = 0; gtSysInfo->TotalHsThreads = 0; gtSysInfo->TotalDsThreads = 0; @@ -142,8 +141,8 @@ const HardwareInfo RklHwConfig::hwInfo = { RKL::capabilityTable}; GT_SYSTEM_INFO RklHwConfig::gtSystemInfo = {0}; -void RklHwConfig::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const CompilerProductHelper &compilerProductHelper) { - RKL::setupHardwareInfoBase(hwInfo, setupFeatureTableAndWorkaroundTable, compilerProductHelper); +void RklHwConfig::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const ReleaseHelper *releaseHelper) { + RKL::setupHardwareInfoBase(hwInfo, setupFeatureTableAndWorkaroundTable, releaseHelper); GT_SYSTEM_INFO *gtSysInfo = &hwInfo->gtSystemInfo; gtSysInfo->DualSubSliceCount = gtSysInfo->SubSliceCount; @@ -158,9 +157,9 @@ void RklHwConfig::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTable const HardwareInfo RKL::hwInfo = RklHwConfig::hwInfo; -void setupRKLHardwareInfoImpl(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, uint64_t hwInfoConfig, const CompilerProductHelper &compilerProductHelper) { - RklHwConfig::setupHardwareInfo(hwInfo, setupFeatureTableAndWorkaroundTable, compilerProductHelper); +void setupRKLHardwareInfoImpl(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, uint64_t hwInfoConfig, const ReleaseHelper *releaseHelper) { + RklHwConfig::setupHardwareInfo(hwInfo, setupFeatureTableAndWorkaroundTable, releaseHelper); } -void (*RKL::setupHardwareInfo)(HardwareInfo *, bool, uint64_t, const CompilerProductHelper &) = setupRKLHardwareInfoImpl; +void (*RKL::setupHardwareInfo)(HardwareInfo *, bool, uint64_t, const ReleaseHelper *) = setupRKLHardwareInfoImpl; } // namespace NEO diff --git a/shared/source/gen12lp/hw_info_tgllp.cpp b/shared/source/gen12lp/hw_info_tgllp.cpp index 78b936ae31..ab8c9b18b4 100644 --- a/shared/source/gen12lp/hw_info_tgllp.cpp +++ b/shared/source/gen12lp/hw_info_tgllp.cpp @@ -10,7 +10,6 @@ #include "shared/source/aub_mem_dump/definitions/aub_services.h" #include "shared/source/command_stream/preemption_mode.h" #include "shared/source/gen12lp/hw_cmds_tgllp.h" -#include "shared/source/helpers/compiler_product_helper.h" #include "shared/source/helpers/constants.h" #include "aubstream/engine_node.h" @@ -114,9 +113,9 @@ void TGLLP::setupFeatureAndWorkaroundTable(HardwareInfo *hwInfo) { workaroundTable->flags.waUntypedBufferCompression = true; }; -void TGLLP::setupHardwareInfoBase(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const CompilerProductHelper &compilerProductHelper) { +void TGLLP::setupHardwareInfoBase(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const ReleaseHelper *releaseHelper) { GT_SYSTEM_INFO *gtSysInfo = &hwInfo->gtSystemInfo; - gtSysInfo->ThreadCount = gtSysInfo->EUCount * compilerProductHelper.getNumThreadsPerEu(); + gtSysInfo->ThreadCount = gtSysInfo->EUCount * 7u; gtSysInfo->TotalPsThreadsWindowerRange = 64; gtSysInfo->CsrSizeInMb = 8; gtSysInfo->MaxEuPerSubSlice = TGLLP::maxEuPerSubslice; @@ -139,8 +138,8 @@ const HardwareInfo TgllpHw1x6x16::hwInfo = { TGLLP::capabilityTable}; GT_SYSTEM_INFO TgllpHw1x6x16::gtSystemInfo = {0}; -void TgllpHw1x6x16::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const CompilerProductHelper &compilerProductHelper) { - TGLLP::setupHardwareInfoBase(hwInfo, setupFeatureTableAndWorkaroundTable, compilerProductHelper); +void TgllpHw1x6x16::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const ReleaseHelper *releaseHelper) { + TGLLP::setupHardwareInfoBase(hwInfo, setupFeatureTableAndWorkaroundTable, releaseHelper); GT_SYSTEM_INFO *gtSysInfo = &hwInfo->gtSystemInfo; gtSysInfo->SliceCount = 1; @@ -166,8 +165,8 @@ const HardwareInfo TgllpHw1x2x16::hwInfo = { TGLLP::capabilityTable}; GT_SYSTEM_INFO TgllpHw1x2x16::gtSystemInfo = {0}; -void TgllpHw1x2x16::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const CompilerProductHelper &compilerProductHelper) { - TGLLP::setupHardwareInfoBase(hwInfo, setupFeatureTableAndWorkaroundTable, compilerProductHelper); +void TgllpHw1x2x16::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const ReleaseHelper *releaseHelper) { + TGLLP::setupHardwareInfoBase(hwInfo, setupFeatureTableAndWorkaroundTable, releaseHelper); GT_SYSTEM_INFO *gtSysInfo = &hwInfo->gtSystemInfo; gtSysInfo->SliceCount = 1; @@ -187,18 +186,18 @@ void TgllpHw1x2x16::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTab const HardwareInfo TGLLP::hwInfo = TgllpHw1x6x16::hwInfo; -void setupTGLLPHardwareInfoImpl(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, uint64_t hwInfoConfig, const CompilerProductHelper &compilerProductHelper) { +void setupTGLLPHardwareInfoImpl(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, uint64_t hwInfoConfig, const ReleaseHelper *releaseHelper) { if (hwInfoConfig == 0x100060010) { - TgllpHw1x6x16::setupHardwareInfo(hwInfo, setupFeatureTableAndWorkaroundTable, compilerProductHelper); + TgllpHw1x6x16::setupHardwareInfo(hwInfo, setupFeatureTableAndWorkaroundTable, releaseHelper); } else if (hwInfoConfig == 0x100020010) { - TgllpHw1x2x16::setupHardwareInfo(hwInfo, setupFeatureTableAndWorkaroundTable, compilerProductHelper); + TgllpHw1x2x16::setupHardwareInfo(hwInfo, setupFeatureTableAndWorkaroundTable, releaseHelper); } else if (hwInfoConfig == 0x0) { // Default config - TgllpHw1x6x16::setupHardwareInfo(hwInfo, setupFeatureTableAndWorkaroundTable, compilerProductHelper); + TgllpHw1x6x16::setupHardwareInfo(hwInfo, setupFeatureTableAndWorkaroundTable, releaseHelper); } else { UNRECOVERABLE_IF(true); } } -void (*TGLLP::setupHardwareInfo)(HardwareInfo *, bool, uint64_t, const CompilerProductHelper &) = setupTGLLPHardwareInfoImpl; +void (*TGLLP::setupHardwareInfo)(HardwareInfo *, bool, uint64_t, const ReleaseHelper *) = setupTGLLPHardwareInfoImpl; } // namespace NEO diff --git a/shared/source/gen8/hw_cmds_bdw.h b/shared/source/gen8/hw_cmds_bdw.h index f640e99d87..c8d9380e58 100644 --- a/shared/source/gen8/hw_cmds_bdw.h +++ b/shared/source/gen8/hw_cmds_bdw.h @@ -22,13 +22,13 @@ struct BDW : public Gen8Family { static const uint32_t maxSlicesSupported = 2; static const uint32_t maxSubslicesSupported = 6; static const RuntimeCapabilityTable capabilityTable; - static void (*setupHardwareInfo)(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, uint64_t hwInfoConfig, const CompilerProductHelper &compilerProductHelper); + static void (*setupHardwareInfo)(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, uint64_t hwInfoConfig, const ReleaseHelper *releaseHelper); static void setupFeatureAndWorkaroundTable(HardwareInfo *hwInfo); - static void setupHardwareInfoBase(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const CompilerProductHelper &compilerProductHelper); + static void setupHardwareInfoBase(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const ReleaseHelper *releaseHelper); }; class BdwHw1x2x6 : public BDW { public: - static void setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const CompilerProductHelper &compilerProductHelper); + static void setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const ReleaseHelper *releaseHelper); static const HardwareInfo hwInfo; private: @@ -36,7 +36,7 @@ class BdwHw1x2x6 : public BDW { }; class BdwHw1x3x6 : public BDW { public: - static void setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const CompilerProductHelper &compilerProductHelper); + static void setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const ReleaseHelper *releaseHelper); static const HardwareInfo hwInfo; private: @@ -44,7 +44,7 @@ class BdwHw1x3x6 : public BDW { }; class BdwHw1x3x8 : public BDW { public: - static void setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const CompilerProductHelper &compilerProductHelper); + static void setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const ReleaseHelper *releaseHelper); static const HardwareInfo hwInfo; private: @@ -52,7 +52,7 @@ class BdwHw1x3x8 : public BDW { }; class BdwHw2x3x8 : public BDW { public: - static void setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const CompilerProductHelper &compilerProductHelper); + static void setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const ReleaseHelper *releaseHelper); static const HardwareInfo hwInfo; private: diff --git a/shared/source/gen8/hw_info_bdw.cpp b/shared/source/gen8/hw_info_bdw.cpp index 664e034a1b..7aab898da2 100644 --- a/shared/source/gen8/hw_info_bdw.cpp +++ b/shared/source/gen8/hw_info_bdw.cpp @@ -8,7 +8,6 @@ #include "shared/source/aub_mem_dump/definitions/aub_services.h" #include "shared/source/command_stream/preemption_mode.h" #include "shared/source/gen8/hw_cmds_bdw.h" -#include "shared/source/helpers/compiler_product_helper.h" #include "shared/source/helpers/constants.h" #include "aubstream/engine_node.h" @@ -101,9 +100,9 @@ void BDW::setupFeatureAndWorkaroundTable(HardwareInfo *hwInfo) { workaroundTable->flags.waSamplerCacheFlushBetweenRedescribedSurfaceReads = true; } -void BDW::setupHardwareInfoBase(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const CompilerProductHelper &compilerProductHelper) { +void BDW::setupHardwareInfoBase(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const ReleaseHelper *releaseHelper) { GT_SYSTEM_INFO *gtSysInfo = &hwInfo->gtSystemInfo; - gtSysInfo->ThreadCount = gtSysInfo->EUCount * compilerProductHelper.getNumThreadsPerEu(); + gtSysInfo->ThreadCount = gtSysInfo->EUCount * 7u; gtSysInfo->TotalVsThreads = 336; gtSysInfo->TotalHsThreads = 336; gtSysInfo->TotalDsThreads = 336; @@ -129,8 +128,8 @@ const HardwareInfo BdwHw1x2x6::hwInfo = { BDW::capabilityTable}; GT_SYSTEM_INFO BdwHw1x2x6::gtSystemInfo = {0}; -void BdwHw1x2x6::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const CompilerProductHelper &compilerProductHelper) { - BDW::setupHardwareInfoBase(hwInfo, setupFeatureTableAndWorkaroundTable, compilerProductHelper); +void BdwHw1x2x6::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const ReleaseHelper *releaseHelper) { + BDW::setupHardwareInfoBase(hwInfo, setupFeatureTableAndWorkaroundTable, releaseHelper); GT_SYSTEM_INFO *gtSysInfo = &hwInfo->gtSystemInfo; gtSysInfo->SliceCount = 1; @@ -146,8 +145,8 @@ const HardwareInfo BdwHw1x3x6::hwInfo = { &BdwHw1x3x6::gtSystemInfo, BDW::capabilityTable}; GT_SYSTEM_INFO BdwHw1x3x6::gtSystemInfo = {0}; -void BdwHw1x3x6::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const CompilerProductHelper &compilerProductHelper) { - BDW::setupHardwareInfoBase(hwInfo, setupFeatureTableAndWorkaroundTable, compilerProductHelper); +void BdwHw1x3x6::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const ReleaseHelper *releaseHelper) { + BDW::setupHardwareInfoBase(hwInfo, setupFeatureTableAndWorkaroundTable, releaseHelper); GT_SYSTEM_INFO *gtSysInfo = &hwInfo->gtSystemInfo; gtSysInfo->SliceCount = 1; @@ -163,8 +162,8 @@ const HardwareInfo BdwHw1x3x8::hwInfo = { &BdwHw1x3x8::gtSystemInfo, BDW::capabilityTable}; GT_SYSTEM_INFO BdwHw1x3x8::gtSystemInfo = {0}; -void BdwHw1x3x8::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const CompilerProductHelper &compilerProductHelper) { - BDW::setupHardwareInfoBase(hwInfo, setupFeatureTableAndWorkaroundTable, compilerProductHelper); +void BdwHw1x3x8::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const ReleaseHelper *releaseHelper) { + BDW::setupHardwareInfoBase(hwInfo, setupFeatureTableAndWorkaroundTable, releaseHelper); GT_SYSTEM_INFO *gtSysInfo = &hwInfo->gtSystemInfo; gtSysInfo->SliceCount = 1; @@ -180,8 +179,8 @@ const HardwareInfo BdwHw2x3x8::hwInfo = { &BdwHw2x3x8::gtSystemInfo, BDW::capabilityTable}; GT_SYSTEM_INFO BdwHw2x3x8::gtSystemInfo = {0}; -void BdwHw2x3x8::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const CompilerProductHelper &compilerProductHelper) { - BDW::setupHardwareInfoBase(hwInfo, setupFeatureTableAndWorkaroundTable, compilerProductHelper); +void BdwHw2x3x8::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const ReleaseHelper *releaseHelper) { + BDW::setupHardwareInfoBase(hwInfo, setupFeatureTableAndWorkaroundTable, releaseHelper); GT_SYSTEM_INFO *gtSysInfo = &hwInfo->gtSystemInfo; gtSysInfo->SliceCount = 2; @@ -192,22 +191,22 @@ void BdwHw2x3x8::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableA const HardwareInfo BDW::hwInfo = BdwHw1x3x8::hwInfo; -void setupBDWHardwareInfoImpl(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, uint64_t hwInfoConfig, const CompilerProductHelper &compilerProductHelper) { +void setupBDWHardwareInfoImpl(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, uint64_t hwInfoConfig, const ReleaseHelper *releaseHelper) { if (hwInfoConfig == 0x200030008) { - BdwHw2x3x8::setupHardwareInfo(hwInfo, setupFeatureTableAndWorkaroundTable, compilerProductHelper); + BdwHw2x3x8::setupHardwareInfo(hwInfo, setupFeatureTableAndWorkaroundTable, releaseHelper); } else if (hwInfoConfig == 0x100030008) { - BdwHw1x3x8::setupHardwareInfo(hwInfo, setupFeatureTableAndWorkaroundTable, compilerProductHelper); + BdwHw1x3x8::setupHardwareInfo(hwInfo, setupFeatureTableAndWorkaroundTable, releaseHelper); } else if (hwInfoConfig == 0x100030006) { - BdwHw1x3x6::setupHardwareInfo(hwInfo, setupFeatureTableAndWorkaroundTable, compilerProductHelper); + BdwHw1x3x6::setupHardwareInfo(hwInfo, setupFeatureTableAndWorkaroundTable, releaseHelper); } else if (hwInfoConfig == 0x100020006) { - BdwHw1x2x6::setupHardwareInfo(hwInfo, setupFeatureTableAndWorkaroundTable, compilerProductHelper); + BdwHw1x2x6::setupHardwareInfo(hwInfo, setupFeatureTableAndWorkaroundTable, releaseHelper); } else if (hwInfoConfig == 0x0) { // Default config - BdwHw1x3x8::setupHardwareInfo(hwInfo, setupFeatureTableAndWorkaroundTable, compilerProductHelper); + BdwHw1x3x8::setupHardwareInfo(hwInfo, setupFeatureTableAndWorkaroundTable, releaseHelper); } else { UNRECOVERABLE_IF(true); } } -void (*BDW::setupHardwareInfo)(HardwareInfo *, bool, uint64_t, const CompilerProductHelper &) = setupBDWHardwareInfoImpl; +void (*BDW::setupHardwareInfo)(HardwareInfo *, bool, uint64_t, const ReleaseHelper *) = setupBDWHardwareInfoImpl; } // namespace NEO diff --git a/shared/source/gen9/enable_compiler_product_helper_bxt.cpp b/shared/source/gen9/enable_compiler_product_helper_bxt.cpp index 5df7103ba5..8438bb8a17 100644 --- a/shared/source/gen9/enable_compiler_product_helper_bxt.cpp +++ b/shared/source/gen9/enable_compiler_product_helper_bxt.cpp @@ -24,11 +24,6 @@ uint64_t CompilerProductHelperHw::getHwInfoConfig(const HardwareIn return 0x100030006; } -template <> -uint32_t CompilerProductHelperHw::getNumThreadsPerEu() const { - return 6; -} - template <> uint32_t CompilerProductHelperHw::getDefaultHwIpVersion() const { return AOT::APL; diff --git a/shared/source/gen9/enable_compiler_product_helper_glk.cpp b/shared/source/gen9/enable_compiler_product_helper_glk.cpp index 6ddbe87fcb..daa3854e48 100644 --- a/shared/source/gen9/enable_compiler_product_helper_glk.cpp +++ b/shared/source/gen9/enable_compiler_product_helper_glk.cpp @@ -23,11 +23,6 @@ uint64_t CompilerProductHelperHw::getHwInfoConfig(const Hardwar return 0x100030006; } -template <> -uint32_t CompilerProductHelperHw::getNumThreadsPerEu() const { - return 6; -} - template <> uint32_t CompilerProductHelperHw::getDefaultHwIpVersion() const { return AOT::GLK; diff --git a/shared/source/gen9/hw_cmds_bxt.h b/shared/source/gen9/hw_cmds_bxt.h index f5e46d714c..286d77c830 100644 --- a/shared/source/gen9/hw_cmds_bxt.h +++ b/shared/source/gen9/hw_cmds_bxt.h @@ -21,14 +21,14 @@ struct BXT : public Gen9Family { static const uint32_t maxSubslicesSupported = 3; static const RuntimeCapabilityTable capabilityTable; - static void (*setupHardwareInfo)(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, uint64_t hwInfoConfig, const CompilerProductHelper &compilerProductHelper); + static void (*setupHardwareInfo)(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, uint64_t hwInfoConfig, const ReleaseHelper *releaseHelper); static void setupFeatureAndWorkaroundTable(HardwareInfo *hwInfo); - static void setupHardwareInfoBase(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const CompilerProductHelper &compilerProductHelper); + static void setupHardwareInfoBase(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const ReleaseHelper *releaseHelper); }; class BxtHw1x2x6 : public BXT { public: - static void setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const CompilerProductHelper &compilerProductHelper); + static void setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const ReleaseHelper *releaseHelper); static const HardwareInfo hwInfo; private: @@ -37,7 +37,7 @@ class BxtHw1x2x6 : public BXT { class BxtHw1x3x6 : public BXT { public: - static void setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const CompilerProductHelper &compilerProductHelper); + static void setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const ReleaseHelper *releaseHelper); static const HardwareInfo hwInfo; private: diff --git a/shared/source/gen9/hw_cmds_cfl.h b/shared/source/gen9/hw_cmds_cfl.h index 1789d9887b..e282e4f97d 100644 --- a/shared/source/gen9/hw_cmds_cfl.h +++ b/shared/source/gen9/hw_cmds_cfl.h @@ -21,14 +21,14 @@ struct CFL : public Gen9Family { static const uint32_t maxSubslicesSupported = 9; static const RuntimeCapabilityTable capabilityTable; - static void (*setupHardwareInfo)(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, uint64_t hwInfoConfig, const CompilerProductHelper &compilerProductHelper); + static void (*setupHardwareInfo)(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, uint64_t hwInfoConfig, const ReleaseHelper *releaseHelper); static void setupFeatureAndWorkaroundTable(HardwareInfo *hwInfo); - static void setupHardwareInfoBase(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const CompilerProductHelper &compilerProductHelper); + static void setupHardwareInfoBase(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const ReleaseHelper *releaseHelper); }; class CflHw1x2x6 : public CFL { public: - static void setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const CompilerProductHelper &compilerProductHelper); + static void setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const ReleaseHelper *releaseHelper); static const HardwareInfo hwInfo; private: @@ -37,7 +37,7 @@ class CflHw1x2x6 : public CFL { class CflHw1x3x6 : public CFL { public: - static void setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const CompilerProductHelper &compilerProductHelper); + static void setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const ReleaseHelper *releaseHelper); static const HardwareInfo hwInfo; private: @@ -46,7 +46,7 @@ class CflHw1x3x6 : public CFL { class CflHw1x3x8 : public CFL { public: - static void setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const CompilerProductHelper &compilerProductHelper); + static void setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const ReleaseHelper *releaseHelper); static const HardwareInfo hwInfo; private: @@ -55,7 +55,7 @@ class CflHw1x3x8 : public CFL { class CflHw2x3x8 : public CFL { public: - static void setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const CompilerProductHelper &compilerProductHelper); + static void setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const ReleaseHelper *releaseHelper); static const HardwareInfo hwInfo; private: @@ -64,7 +64,7 @@ class CflHw2x3x8 : public CFL { class CflHw3x3x8 : public CFL { public: - static void setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const CompilerProductHelper &compilerProductHelper); + static void setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const ReleaseHelper *releaseHelper); static const HardwareInfo hwInfo; private: diff --git a/shared/source/gen9/hw_cmds_glk.h b/shared/source/gen9/hw_cmds_glk.h index 4236191aee..28ea690fd5 100644 --- a/shared/source/gen9/hw_cmds_glk.h +++ b/shared/source/gen9/hw_cmds_glk.h @@ -21,14 +21,14 @@ struct GLK : public Gen9Family { static const uint32_t maxSubslicesSupported = 3; static const RuntimeCapabilityTable capabilityTable; - static void (*setupHardwareInfo)(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, uint64_t hwInfoConfig, const CompilerProductHelper &compilerProductHelper); + static void (*setupHardwareInfo)(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, uint64_t hwInfoConfig, const ReleaseHelper *releaseHelper); static void setupFeatureAndWorkaroundTable(HardwareInfo *hwInfo); - static void setupHardwareInfoBase(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const CompilerProductHelper &compilerProductHelper); + static void setupHardwareInfoBase(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const ReleaseHelper *releaseHelper); }; class GlkHw1x3x6 : public GLK { public: - static void setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const CompilerProductHelper &compilerProductHelper); + static void setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const ReleaseHelper *releaseHelper); static const HardwareInfo hwInfo; private: @@ -37,7 +37,7 @@ class GlkHw1x3x6 : public GLK { class GlkHw1x2x6 : public GLK { public: - static void setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const CompilerProductHelper &compilerProductHelper); + static void setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const ReleaseHelper *releaseHelper); static const HardwareInfo hwInfo; private: diff --git a/shared/source/gen9/hw_cmds_kbl.h b/shared/source/gen9/hw_cmds_kbl.h index e6250ed2cb..0dbd76cb65 100644 --- a/shared/source/gen9/hw_cmds_kbl.h +++ b/shared/source/gen9/hw_cmds_kbl.h @@ -21,14 +21,14 @@ struct KBL : public Gen9Family { static const uint32_t maxSubslicesSupported = 9; static const RuntimeCapabilityTable capabilityTable; - static void (*setupHardwareInfo)(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, uint64_t hwInfoConfig, const CompilerProductHelper &compilerProductHelper); + static void (*setupHardwareInfo)(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, uint64_t hwInfoConfig, const ReleaseHelper *releaseHelper); static void setupFeatureAndWorkaroundTable(HardwareInfo *hwInfo); - static void setupHardwareInfoBase(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const CompilerProductHelper &compilerProductHelper); + static void setupHardwareInfoBase(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const ReleaseHelper *releaseHelper); }; class KblHw1x2x6 : public KBL { public: - static void setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const CompilerProductHelper &compilerProductHelper); + static void setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const ReleaseHelper *releaseHelper); static const HardwareInfo hwInfo; private: @@ -37,7 +37,7 @@ class KblHw1x2x6 : public KBL { class KblHw1x3x6 : public KBL { public: - static void setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const CompilerProductHelper &compilerProductHelper); + static void setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const ReleaseHelper *releaseHelper); static const HardwareInfo hwInfo; private: @@ -46,7 +46,7 @@ class KblHw1x3x6 : public KBL { class KblHw1x3x8 : public KBL { public: - static void setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const CompilerProductHelper &compilerProductHelper); + static void setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const ReleaseHelper *releaseHelper); static const HardwareInfo hwInfo; private: @@ -55,7 +55,7 @@ class KblHw1x3x8 : public KBL { class KblHw2x3x8 : public KBL { public: - static void setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const CompilerProductHelper &compilerProductHelper); + static void setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const ReleaseHelper *releaseHelper); static const HardwareInfo hwInfo; private: @@ -64,7 +64,7 @@ class KblHw2x3x8 : public KBL { class KblHw3x3x8 : public KBL { public: - static void setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const CompilerProductHelper &compilerProductHelper); + static void setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const ReleaseHelper *releaseHelper); static const HardwareInfo hwInfo; private: diff --git a/shared/source/gen9/hw_cmds_skl.h b/shared/source/gen9/hw_cmds_skl.h index 2d773bb145..40d99f37ee 100644 --- a/shared/source/gen9/hw_cmds_skl.h +++ b/shared/source/gen9/hw_cmds_skl.h @@ -21,14 +21,14 @@ struct SKL : public Gen9Family { static const uint32_t maxSubslicesSupported = 9; static const RuntimeCapabilityTable capabilityTable; - static void (*setupHardwareInfo)(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, uint64_t hwInfoConfig, const CompilerProductHelper &compilerProductHelper); + static void (*setupHardwareInfo)(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, uint64_t hwInfoConfig, const ReleaseHelper *releaseHelper); static void setupFeatureAndWorkaroundTable(HardwareInfo *hwInfo); - static void setupHardwareInfoBase(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const CompilerProductHelper &compilerProductHelper); + static void setupHardwareInfoBase(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const ReleaseHelper *releaseHelper); }; class SklHw1x2x6 : public SKL { public: - static void setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const CompilerProductHelper &compilerProductHelper); + static void setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const ReleaseHelper *releaseHelper); static const HardwareInfo hwInfo; private: @@ -37,7 +37,7 @@ class SklHw1x2x6 : public SKL { class SklHw1x3x6 : public SKL { public: - static void setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const CompilerProductHelper &compilerProductHelper); + static void setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const ReleaseHelper *releaseHelper); static const HardwareInfo hwInfo; private: @@ -46,7 +46,7 @@ class SklHw1x3x6 : public SKL { class SklHw1x3x8 : public SKL { public: - static void setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const CompilerProductHelper &compilerProductHelper); + static void setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const ReleaseHelper *releaseHelper); static const HardwareInfo hwInfo; private: @@ -55,7 +55,7 @@ class SklHw1x3x8 : public SKL { class SklHw2x3x8 : public SKL { public: - static void setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const CompilerProductHelper &compilerProductHelper); + static void setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const ReleaseHelper *releaseHelper); static const HardwareInfo hwInfo; private: @@ -64,7 +64,7 @@ class SklHw2x3x8 : public SKL { class SklHw3x3x8 : public SKL { public: - static void setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const CompilerProductHelper &compilerProductHelper); + static void setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const ReleaseHelper *releaseHelper); static const HardwareInfo hwInfo; private: diff --git a/shared/source/gen9/hw_info_bxt.cpp b/shared/source/gen9/hw_info_bxt.cpp index b1e0437f6e..4e3d9dc447 100644 --- a/shared/source/gen9/hw_info_bxt.cpp +++ b/shared/source/gen9/hw_info_bxt.cpp @@ -8,7 +8,6 @@ #include "shared/source/aub_mem_dump/definitions/aub_services.h" #include "shared/source/command_stream/preemption_mode.h" #include "shared/source/gen9/hw_cmds_bxt.h" -#include "shared/source/helpers/compiler_product_helper.h" #include "shared/source/helpers/constants.h" #include "aubstream/engine_node.h" @@ -110,9 +109,9 @@ void BXT::setupFeatureAndWorkaroundTable(HardwareInfo *hwInfo) { workaroundTable->flags.waSamplerCacheFlushBetweenRedescribedSurfaceReads = true; } -void BXT::setupHardwareInfoBase(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const CompilerProductHelper &compilerProductHelper) { +void BXT::setupHardwareInfoBase(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const ReleaseHelper *releaseHelper) { GT_SYSTEM_INFO *gtSysInfo = &hwInfo->gtSystemInfo; - gtSysInfo->ThreadCount = gtSysInfo->EUCount * compilerProductHelper.getNumThreadsPerEu(); + gtSysInfo->ThreadCount = gtSysInfo->EUCount * 6u; gtSysInfo->TotalVsThreads = 112; gtSysInfo->TotalHsThreads = 112; gtSysInfo->TotalDsThreads = 112; @@ -137,8 +136,8 @@ const HardwareInfo BxtHw1x2x6::hwInfo = { &BxtHw1x2x6::gtSystemInfo, BXT::capabilityTable}; GT_SYSTEM_INFO BxtHw1x2x6::gtSystemInfo = {0}; -void BxtHw1x2x6::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const CompilerProductHelper &compilerProductHelper) { - BXT::setupHardwareInfoBase(hwInfo, setupFeatureTableAndWorkaroundTable, compilerProductHelper); +void BxtHw1x2x6::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const ReleaseHelper *releaseHelper) { + BXT::setupHardwareInfoBase(hwInfo, setupFeatureTableAndWorkaroundTable, releaseHelper); GT_SYSTEM_INFO *gtSysInfo = &hwInfo->gtSystemInfo; gtSysInfo->SliceCount = 1; @@ -154,8 +153,8 @@ const HardwareInfo BxtHw1x3x6::hwInfo = { &BxtHw1x3x6::gtSystemInfo, BXT::capabilityTable}; GT_SYSTEM_INFO BxtHw1x3x6::gtSystemInfo = {0}; -void BxtHw1x3x6::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const CompilerProductHelper &compilerProductHelper) { - BXT::setupHardwareInfoBase(hwInfo, setupFeatureTableAndWorkaroundTable, compilerProductHelper); +void BxtHw1x3x6::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const ReleaseHelper *releaseHelper) { + BXT::setupHardwareInfoBase(hwInfo, setupFeatureTableAndWorkaroundTable, releaseHelper); GT_SYSTEM_INFO *gtSysInfo = &hwInfo->gtSystemInfo; gtSysInfo->SliceCount = 1; @@ -166,18 +165,18 @@ void BxtHw1x3x6::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableA const HardwareInfo BXT::hwInfo = BxtHw1x3x6::hwInfo; -void setupBXTHardwareInfoImpl(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, uint64_t hwInfoConfig, const CompilerProductHelper &compilerProductHelper) { +void setupBXTHardwareInfoImpl(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, uint64_t hwInfoConfig, const ReleaseHelper *releaseHelper) { if (hwInfoConfig == 0x100020006) { - BxtHw1x2x6::setupHardwareInfo(hwInfo, setupFeatureTableAndWorkaroundTable, compilerProductHelper); + BxtHw1x2x6::setupHardwareInfo(hwInfo, setupFeatureTableAndWorkaroundTable, releaseHelper); } else if (hwInfoConfig == 0x100030006) { - BxtHw1x3x6::setupHardwareInfo(hwInfo, setupFeatureTableAndWorkaroundTable, compilerProductHelper); + BxtHw1x3x6::setupHardwareInfo(hwInfo, setupFeatureTableAndWorkaroundTable, releaseHelper); } else if (hwInfoConfig == 0x0) { // Default config - BxtHw1x3x6::setupHardwareInfo(hwInfo, setupFeatureTableAndWorkaroundTable, compilerProductHelper); + BxtHw1x3x6::setupHardwareInfo(hwInfo, setupFeatureTableAndWorkaroundTable, releaseHelper); } else { UNRECOVERABLE_IF(true); } } -void (*BXT::setupHardwareInfo)(HardwareInfo *, bool, uint64_t, const CompilerProductHelper &) = setupBXTHardwareInfoImpl; +void (*BXT::setupHardwareInfo)(HardwareInfo *, bool, uint64_t, const ReleaseHelper *) = setupBXTHardwareInfoImpl; } // namespace NEO diff --git a/shared/source/gen9/hw_info_cfl.cpp b/shared/source/gen9/hw_info_cfl.cpp index 4a05d323d0..281cc12c0f 100644 --- a/shared/source/gen9/hw_info_cfl.cpp +++ b/shared/source/gen9/hw_info_cfl.cpp @@ -9,7 +9,6 @@ #include "shared/source/command_stream/preemption_mode.h" #include "shared/source/gen9/cfl/device_ids_configs_cfl.h" #include "shared/source/gen9/hw_cmds_cfl.h" -#include "shared/source/helpers/compiler_product_helper.h" #include "shared/source/helpers/constants.h" #include "aubstream/engine_node.h" @@ -110,9 +109,9 @@ void CFL::setupFeatureAndWorkaroundTable(HardwareInfo *hwInfo) { workaroundTable->flags.waSamplerCacheFlushBetweenRedescribedSurfaceReads = true; } -void CFL::setupHardwareInfoBase(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const CompilerProductHelper &compilerProductHelper) { +void CFL::setupHardwareInfoBase(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const ReleaseHelper *releaseHelper) { GT_SYSTEM_INFO *gtSysInfo = &hwInfo->gtSystemInfo; - gtSysInfo->ThreadCount = gtSysInfo->EUCount * compilerProductHelper.getNumThreadsPerEu(); + gtSysInfo->ThreadCount = gtSysInfo->EUCount * 7u; gtSysInfo->TotalVsThreads = 336; gtSysInfo->TotalHsThreads = 336; gtSysInfo->TotalDsThreads = 336; @@ -137,8 +136,8 @@ const HardwareInfo CflHw1x2x6::hwInfo = { &CflHw1x2x6::gtSystemInfo, CFL::capabilityTable}; GT_SYSTEM_INFO CflHw1x2x6::gtSystemInfo = {0}; -void CflHw1x2x6::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const CompilerProductHelper &compilerProductHelper) { - CFL::setupHardwareInfoBase(hwInfo, setupFeatureTableAndWorkaroundTable, compilerProductHelper); +void CflHw1x2x6::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const ReleaseHelper *releaseHelper) { + CFL::setupHardwareInfoBase(hwInfo, setupFeatureTableAndWorkaroundTable, releaseHelper); GT_SYSTEM_INFO *gtSysInfo = &hwInfo->gtSystemInfo; gtSysInfo->SliceCount = 1; @@ -155,8 +154,8 @@ const HardwareInfo CflHw1x3x6::hwInfo = { CFL::capabilityTable}; GT_SYSTEM_INFO CflHw1x3x6::gtSystemInfo = {0}; -void CflHw1x3x6::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const CompilerProductHelper &compilerProductHelper) { - CFL::setupHardwareInfoBase(hwInfo, setupFeatureTableAndWorkaroundTable, compilerProductHelper); +void CflHw1x3x6::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const ReleaseHelper *releaseHelper) { + CFL::setupHardwareInfoBase(hwInfo, setupFeatureTableAndWorkaroundTable, releaseHelper); GT_SYSTEM_INFO *gtSysInfo = &hwInfo->gtSystemInfo; gtSysInfo->SliceCount = 1; @@ -173,8 +172,8 @@ const HardwareInfo CflHw1x3x8::hwInfo = { CFL::capabilityTable}; GT_SYSTEM_INFO CflHw1x3x8::gtSystemInfo = {0}; -void CflHw1x3x8::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const CompilerProductHelper &compilerProductHelper) { - CFL::setupHardwareInfoBase(hwInfo, setupFeatureTableAndWorkaroundTable, compilerProductHelper); +void CflHw1x3x8::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const ReleaseHelper *releaseHelper) { + CFL::setupHardwareInfoBase(hwInfo, setupFeatureTableAndWorkaroundTable, releaseHelper); GT_SYSTEM_INFO *gtSysInfo = &hwInfo->gtSystemInfo; gtSysInfo->SliceCount = 1; @@ -190,8 +189,8 @@ const HardwareInfo CflHw2x3x8::hwInfo = { &CflHw2x3x8::gtSystemInfo, CFL::capabilityTable}; GT_SYSTEM_INFO CflHw2x3x8::gtSystemInfo = {0}; -void CflHw2x3x8::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const CompilerProductHelper &compilerProductHelper) { - CFL::setupHardwareInfoBase(hwInfo, setupFeatureTableAndWorkaroundTable, compilerProductHelper); +void CflHw2x3x8::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const ReleaseHelper *releaseHelper) { + CFL::setupHardwareInfoBase(hwInfo, setupFeatureTableAndWorkaroundTable, releaseHelper); GT_SYSTEM_INFO *gtSysInfo = &hwInfo->gtSystemInfo; gtSysInfo->SliceCount = 2; @@ -207,8 +206,8 @@ const HardwareInfo CflHw3x3x8::hwInfo = { &CflHw3x3x8::gtSystemInfo, CFL::capabilityTable}; GT_SYSTEM_INFO CflHw3x3x8::gtSystemInfo = {0}; -void CflHw3x3x8::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const CompilerProductHelper &compilerProductHelper) { - CFL::setupHardwareInfoBase(hwInfo, setupFeatureTableAndWorkaroundTable, compilerProductHelper); +void CflHw3x3x8::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const ReleaseHelper *releaseHelper) { + CFL::setupHardwareInfoBase(hwInfo, setupFeatureTableAndWorkaroundTable, releaseHelper); GT_SYSTEM_INFO *gtSysInfo = &hwInfo->gtSystemInfo; gtSysInfo->SliceCount = 3; @@ -219,24 +218,24 @@ void CflHw3x3x8::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableA const HardwareInfo CFL::hwInfo = CflHw1x3x6::hwInfo; -void setupCFLHardwareInfoImpl(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, uint64_t hwInfoConfig, const CompilerProductHelper &compilerProductHelper) { +void setupCFLHardwareInfoImpl(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, uint64_t hwInfoConfig, const ReleaseHelper *releaseHelper) { if (hwInfoConfig == 0x100030008) { - CflHw1x3x8::setupHardwareInfo(hwInfo, setupFeatureTableAndWorkaroundTable, compilerProductHelper); + CflHw1x3x8::setupHardwareInfo(hwInfo, setupFeatureTableAndWorkaroundTable, releaseHelper); } else if (hwInfoConfig == 0x200030008) { - CflHw2x3x8::setupHardwareInfo(hwInfo, setupFeatureTableAndWorkaroundTable, compilerProductHelper); + CflHw2x3x8::setupHardwareInfo(hwInfo, setupFeatureTableAndWorkaroundTable, releaseHelper); } else if (hwInfoConfig == 0x300030008) { - CflHw3x3x8::setupHardwareInfo(hwInfo, setupFeatureTableAndWorkaroundTable, compilerProductHelper); + CflHw3x3x8::setupHardwareInfo(hwInfo, setupFeatureTableAndWorkaroundTable, releaseHelper); } else if (hwInfoConfig == 0x100020006) { - CflHw1x2x6::setupHardwareInfo(hwInfo, setupFeatureTableAndWorkaroundTable, compilerProductHelper); + CflHw1x2x6::setupHardwareInfo(hwInfo, setupFeatureTableAndWorkaroundTable, releaseHelper); } else if (hwInfoConfig == 0x100030006) { - CflHw1x3x6::setupHardwareInfo(hwInfo, setupFeatureTableAndWorkaroundTable, compilerProductHelper); + CflHw1x3x6::setupHardwareInfo(hwInfo, setupFeatureTableAndWorkaroundTable, releaseHelper); } else if (hwInfoConfig == 0x0) { // Default config - CflHw1x3x6::setupHardwareInfo(hwInfo, setupFeatureTableAndWorkaroundTable, compilerProductHelper); + CflHw1x3x6::setupHardwareInfo(hwInfo, setupFeatureTableAndWorkaroundTable, releaseHelper); } else { UNRECOVERABLE_IF(true); } } -void (*CFL::setupHardwareInfo)(HardwareInfo *, bool, uint64_t, const CompilerProductHelper &) = setupCFLHardwareInfoImpl; +void (*CFL::setupHardwareInfo)(HardwareInfo *, bool, uint64_t, const ReleaseHelper *) = setupCFLHardwareInfoImpl; } // namespace NEO diff --git a/shared/source/gen9/hw_info_glk.cpp b/shared/source/gen9/hw_info_glk.cpp index d007adfd58..d390cc8250 100644 --- a/shared/source/gen9/hw_info_glk.cpp +++ b/shared/source/gen9/hw_info_glk.cpp @@ -8,7 +8,6 @@ #include "shared/source/aub_mem_dump/definitions/aub_services.h" #include "shared/source/command_stream/preemption_mode.h" #include "shared/source/gen9/hw_cmds_glk.h" -#include "shared/source/helpers/compiler_product_helper.h" #include "shared/source/helpers/constants.h" #include "aubstream/engine_node.h" @@ -111,9 +110,9 @@ void GLK::setupFeatureAndWorkaroundTable(HardwareInfo *hwInfo) { workaroundTable->flags.waSamplerCacheFlushBetweenRedescribedSurfaceReads = true; } -void GLK::setupHardwareInfoBase(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const CompilerProductHelper &compilerProductHelper) { +void GLK::setupHardwareInfoBase(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const ReleaseHelper *releaseHelper) { GT_SYSTEM_INFO *gtSysInfo = &hwInfo->gtSystemInfo; - gtSysInfo->ThreadCount = gtSysInfo->EUCount * compilerProductHelper.getNumThreadsPerEu(); + gtSysInfo->ThreadCount = gtSysInfo->EUCount * 6u; gtSysInfo->TotalVsThreads = 112; gtSysInfo->TotalHsThreads = 112; gtSysInfo->TotalDsThreads = 112; @@ -139,8 +138,8 @@ const HardwareInfo GlkHw1x3x6::hwInfo = { GLK::capabilityTable}; GT_SYSTEM_INFO GlkHw1x3x6::gtSystemInfo = {0}; -void GlkHw1x3x6::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const CompilerProductHelper &compilerProductHelper) { - GLK::setupHardwareInfoBase(hwInfo, setupFeatureTableAndWorkaroundTable, compilerProductHelper); +void GlkHw1x3x6::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const ReleaseHelper *releaseHelper) { + GLK::setupHardwareInfoBase(hwInfo, setupFeatureTableAndWorkaroundTable, releaseHelper); GT_SYSTEM_INFO *gtSysInfo = &hwInfo->gtSystemInfo; gtSysInfo->SliceCount = 1; @@ -157,8 +156,8 @@ const HardwareInfo GlkHw1x2x6::hwInfo = { GLK::capabilityTable}; GT_SYSTEM_INFO GlkHw1x2x6::gtSystemInfo = {0}; -void GlkHw1x2x6::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const CompilerProductHelper &compilerProductHelper) { - GLK::setupHardwareInfoBase(hwInfo, setupFeatureTableAndWorkaroundTable, compilerProductHelper); +void GlkHw1x2x6::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const ReleaseHelper *releaseHelper) { + GLK::setupHardwareInfoBase(hwInfo, setupFeatureTableAndWorkaroundTable, releaseHelper); GT_SYSTEM_INFO *gtSysInfo = &hwInfo->gtSystemInfo; gtSysInfo->SliceCount = 1; @@ -169,18 +168,18 @@ void GlkHw1x2x6::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableA const HardwareInfo GLK::hwInfo = GlkHw1x3x6::hwInfo; -void setupGLKHardwareInfoImpl(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, uint64_t hwInfoConfig, const CompilerProductHelper &compilerProductHelper) { +void setupGLKHardwareInfoImpl(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, uint64_t hwInfoConfig, const ReleaseHelper *releaseHelper) { if (hwInfoConfig == 0x100020006) { - GlkHw1x2x6::setupHardwareInfo(hwInfo, setupFeatureTableAndWorkaroundTable, compilerProductHelper); + GlkHw1x2x6::setupHardwareInfo(hwInfo, setupFeatureTableAndWorkaroundTable, releaseHelper); } else if (hwInfoConfig == 0x100030006) { - GlkHw1x3x6::setupHardwareInfo(hwInfo, setupFeatureTableAndWorkaroundTable, compilerProductHelper); + GlkHw1x3x6::setupHardwareInfo(hwInfo, setupFeatureTableAndWorkaroundTable, releaseHelper); } else if (hwInfoConfig == 0x0) { // Default config - GlkHw1x3x6::setupHardwareInfo(hwInfo, setupFeatureTableAndWorkaroundTable, compilerProductHelper); + GlkHw1x3x6::setupHardwareInfo(hwInfo, setupFeatureTableAndWorkaroundTable, releaseHelper); } else { UNRECOVERABLE_IF(true); } } -void (*GLK::setupHardwareInfo)(HardwareInfo *, bool, uint64_t, const CompilerProductHelper &) = setupGLKHardwareInfoImpl; +void (*GLK::setupHardwareInfo)(HardwareInfo *, bool, uint64_t, const ReleaseHelper *) = setupGLKHardwareInfoImpl; } // namespace NEO diff --git a/shared/source/gen9/hw_info_kbl.cpp b/shared/source/gen9/hw_info_kbl.cpp index a65d619e40..8db75381f4 100644 --- a/shared/source/gen9/hw_info_kbl.cpp +++ b/shared/source/gen9/hw_info_kbl.cpp @@ -9,7 +9,6 @@ #include "shared/source/command_stream/preemption_mode.h" #include "shared/source/gen9/hw_cmds_kbl.h" #include "shared/source/gen9/kbl/device_ids_configs_kbl.h" -#include "shared/source/helpers/compiler_product_helper.h" #include "shared/source/helpers/constants.h" #include "aubstream/engine_node.h" @@ -116,9 +115,9 @@ void KBL::setupFeatureAndWorkaroundTable(HardwareInfo *hwInfo) { } } -void KBL::setupHardwareInfoBase(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const CompilerProductHelper &compilerProductHelper) { +void KBL::setupHardwareInfoBase(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const ReleaseHelper *releaseHelper) { GT_SYSTEM_INFO *gtSysInfo = &hwInfo->gtSystemInfo; - gtSysInfo->ThreadCount = gtSysInfo->EUCount * compilerProductHelper.getNumThreadsPerEu(); + gtSysInfo->ThreadCount = gtSysInfo->EUCount * 7u; gtSysInfo->TotalVsThreads = 336; gtSysInfo->TotalHsThreads = 336; gtSysInfo->TotalDsThreads = 336; @@ -144,8 +143,8 @@ const HardwareInfo KblHw1x2x6::hwInfo = { KBL::capabilityTable}; GT_SYSTEM_INFO KblHw1x2x6::gtSystemInfo = {0}; -void KblHw1x2x6::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const CompilerProductHelper &compilerProductHelper) { - KBL::setupHardwareInfoBase(hwInfo, setupFeatureTableAndWorkaroundTable, compilerProductHelper); +void KblHw1x2x6::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const ReleaseHelper *releaseHelper) { + KBL::setupHardwareInfoBase(hwInfo, setupFeatureTableAndWorkaroundTable, releaseHelper); GT_SYSTEM_INFO *gtSysInfo = &hwInfo->gtSystemInfo; gtSysInfo->SliceCount = 1; @@ -162,8 +161,8 @@ const HardwareInfo KblHw1x3x6::hwInfo = { KBL::capabilityTable}; GT_SYSTEM_INFO KblHw1x3x6::gtSystemInfo = {0}; -void KblHw1x3x6::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const CompilerProductHelper &compilerProductHelper) { - KBL::setupHardwareInfoBase(hwInfo, setupFeatureTableAndWorkaroundTable, compilerProductHelper); +void KblHw1x3x6::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const ReleaseHelper *releaseHelper) { + KBL::setupHardwareInfoBase(hwInfo, setupFeatureTableAndWorkaroundTable, releaseHelper); GT_SYSTEM_INFO *gtSysInfo = &hwInfo->gtSystemInfo; gtSysInfo->SliceCount = 1; @@ -180,8 +179,8 @@ const HardwareInfo KblHw1x3x8::hwInfo = { KBL::capabilityTable}; GT_SYSTEM_INFO KblHw1x3x8::gtSystemInfo = {0}; -void KblHw1x3x8::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const CompilerProductHelper &compilerProductHelper) { - KBL::setupHardwareInfoBase(hwInfo, setupFeatureTableAndWorkaroundTable, compilerProductHelper); +void KblHw1x3x8::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const ReleaseHelper *releaseHelper) { + KBL::setupHardwareInfoBase(hwInfo, setupFeatureTableAndWorkaroundTable, releaseHelper); GT_SYSTEM_INFO *gtSysInfo = &hwInfo->gtSystemInfo; gtSysInfo->SliceCount = 1; @@ -198,8 +197,8 @@ const HardwareInfo KblHw2x3x8::hwInfo = { KBL::capabilityTable}; GT_SYSTEM_INFO KblHw2x3x8::gtSystemInfo = {0}; -void KblHw2x3x8::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const CompilerProductHelper &compilerProductHelper) { - KBL::setupHardwareInfoBase(hwInfo, setupFeatureTableAndWorkaroundTable, compilerProductHelper); +void KblHw2x3x8::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const ReleaseHelper *releaseHelper) { + KBL::setupHardwareInfoBase(hwInfo, setupFeatureTableAndWorkaroundTable, releaseHelper); GT_SYSTEM_INFO *gtSysInfo = &hwInfo->gtSystemInfo; gtSysInfo->SliceCount = 2; @@ -216,8 +215,8 @@ const HardwareInfo KblHw3x3x8::hwInfo = { KBL::capabilityTable}; GT_SYSTEM_INFO KblHw3x3x8::gtSystemInfo = {0}; -void KblHw3x3x8::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const CompilerProductHelper &compilerProductHelper) { - KBL::setupHardwareInfoBase(hwInfo, setupFeatureTableAndWorkaroundTable, compilerProductHelper); +void KblHw3x3x8::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const ReleaseHelper *releaseHelper) { + KBL::setupHardwareInfoBase(hwInfo, setupFeatureTableAndWorkaroundTable, releaseHelper); GT_SYSTEM_INFO *gtSysInfo = &hwInfo->gtSystemInfo; gtSysInfo->SliceCount = 3; @@ -228,24 +227,24 @@ void KblHw3x3x8::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableA const HardwareInfo KBL::hwInfo = KblHw1x3x6::hwInfo; -void setupKBLHardwareInfoImpl(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, uint64_t hwInfoConfig, const CompilerProductHelper &compilerProductHelper) { +void setupKBLHardwareInfoImpl(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, uint64_t hwInfoConfig, const ReleaseHelper *releaseHelper) { if (hwInfoConfig == 0x100030008) { - KblHw1x3x8::setupHardwareInfo(hwInfo, setupFeatureTableAndWorkaroundTable, compilerProductHelper); + KblHw1x3x8::setupHardwareInfo(hwInfo, setupFeatureTableAndWorkaroundTable, releaseHelper); } else if (hwInfoConfig == 0x200030008) { - KblHw2x3x8::setupHardwareInfo(hwInfo, setupFeatureTableAndWorkaroundTable, compilerProductHelper); + KblHw2x3x8::setupHardwareInfo(hwInfo, setupFeatureTableAndWorkaroundTable, releaseHelper); } else if (hwInfoConfig == 0x300030008) { - KblHw3x3x8::setupHardwareInfo(hwInfo, setupFeatureTableAndWorkaroundTable, compilerProductHelper); + KblHw3x3x8::setupHardwareInfo(hwInfo, setupFeatureTableAndWorkaroundTable, releaseHelper); } else if (hwInfoConfig == 0x100020006) { - KblHw1x2x6::setupHardwareInfo(hwInfo, setupFeatureTableAndWorkaroundTable, compilerProductHelper); + KblHw1x2x6::setupHardwareInfo(hwInfo, setupFeatureTableAndWorkaroundTable, releaseHelper); } else if (hwInfoConfig == 0x100030006) { - KblHw1x3x6::setupHardwareInfo(hwInfo, setupFeatureTableAndWorkaroundTable, compilerProductHelper); + KblHw1x3x6::setupHardwareInfo(hwInfo, setupFeatureTableAndWorkaroundTable, releaseHelper); } else if (hwInfoConfig == 0x0) { // Default config - KblHw1x3x6::setupHardwareInfo(hwInfo, setupFeatureTableAndWorkaroundTable, compilerProductHelper); + KblHw1x3x6::setupHardwareInfo(hwInfo, setupFeatureTableAndWorkaroundTable, releaseHelper); } else { UNRECOVERABLE_IF(true); } } -void (*KBL::setupHardwareInfo)(HardwareInfo *, bool, uint64_t, const CompilerProductHelper &) = setupKBLHardwareInfoImpl; +void (*KBL::setupHardwareInfo)(HardwareInfo *, bool, uint64_t, const ReleaseHelper *) = setupKBLHardwareInfoImpl; } // namespace NEO diff --git a/shared/source/gen9/hw_info_skl.cpp b/shared/source/gen9/hw_info_skl.cpp index 36409d9bd7..afeff7ac45 100644 --- a/shared/source/gen9/hw_info_skl.cpp +++ b/shared/source/gen9/hw_info_skl.cpp @@ -8,7 +8,6 @@ #include "shared/source/aub_mem_dump/definitions/aub_services.h" #include "shared/source/command_stream/preemption_mode.h" #include "shared/source/gen9/hw_cmds_skl.h" -#include "shared/source/helpers/compiler_product_helper.h" #include "shared/source/helpers/constants.h" #include "aubstream/engine_node.h" @@ -122,9 +121,9 @@ void SKL::setupFeatureAndWorkaroundTable(HardwareInfo *hwInfo) { } } -void SKL::setupHardwareInfoBase(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const CompilerProductHelper &compilerProductHelper) { +void SKL::setupHardwareInfoBase(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const ReleaseHelper *releaseHelper) { GT_SYSTEM_INFO *gtSysInfo = &hwInfo->gtSystemInfo; - gtSysInfo->ThreadCount = gtSysInfo->EUCount * compilerProductHelper.getNumThreadsPerEu(); + gtSysInfo->ThreadCount = gtSysInfo->EUCount * 7u; gtSysInfo->TotalVsThreads = 336; gtSysInfo->TotalHsThreads = 336; gtSysInfo->TotalDsThreads = 336; @@ -150,8 +149,8 @@ const HardwareInfo SklHw1x2x6::hwInfo = { SKL::capabilityTable}; GT_SYSTEM_INFO SklHw1x2x6::gtSystemInfo = {0}; -void SklHw1x2x6::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const CompilerProductHelper &compilerProductHelper) { - setupHardwareInfoBase(hwInfo, setupFeatureTableAndWorkaroundTable, compilerProductHelper); +void SklHw1x2x6::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const ReleaseHelper *releaseHelper) { + setupHardwareInfoBase(hwInfo, setupFeatureTableAndWorkaroundTable, releaseHelper); GT_SYSTEM_INFO *gtSysInfo = &hwInfo->gtSystemInfo; gtSysInfo->SliceCount = 1; @@ -168,8 +167,8 @@ const HardwareInfo SklHw1x3x6::hwInfo = { SKL::capabilityTable}; GT_SYSTEM_INFO SklHw1x3x6::gtSystemInfo = {0}; -void SklHw1x3x6::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const CompilerProductHelper &compilerProductHelper) { - setupHardwareInfoBase(hwInfo, setupFeatureTableAndWorkaroundTable, compilerProductHelper); +void SklHw1x3x6::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const ReleaseHelper *releaseHelper) { + setupHardwareInfoBase(hwInfo, setupFeatureTableAndWorkaroundTable, releaseHelper); GT_SYSTEM_INFO *gtSysInfo = &hwInfo->gtSystemInfo; gtSysInfo->SliceCount = 1; @@ -186,8 +185,8 @@ const HardwareInfo SklHw1x3x8::hwInfo = { SKL::capabilityTable}; GT_SYSTEM_INFO SklHw1x3x8::gtSystemInfo = {0}; -void SklHw1x3x8::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const CompilerProductHelper &compilerProductHelper) { - setupHardwareInfoBase(hwInfo, setupFeatureTableAndWorkaroundTable, compilerProductHelper); +void SklHw1x3x8::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const ReleaseHelper *releaseHelper) { + setupHardwareInfoBase(hwInfo, setupFeatureTableAndWorkaroundTable, releaseHelper); GT_SYSTEM_INFO *gtSysInfo = &hwInfo->gtSystemInfo; gtSysInfo->SliceCount = 1; @@ -204,8 +203,8 @@ const HardwareInfo SklHw2x3x8::hwInfo = { SKL::capabilityTable}; GT_SYSTEM_INFO SklHw2x3x8::gtSystemInfo = {0}; -void SklHw2x3x8::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const CompilerProductHelper &compilerProductHelper) { - setupHardwareInfoBase(hwInfo, setupFeatureTableAndWorkaroundTable, compilerProductHelper); +void SklHw2x3x8::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const ReleaseHelper *releaseHelper) { + setupHardwareInfoBase(hwInfo, setupFeatureTableAndWorkaroundTable, releaseHelper); GT_SYSTEM_INFO *gtSysInfo = &hwInfo->gtSystemInfo; gtSysInfo->SliceCount = 2; @@ -222,8 +221,8 @@ const HardwareInfo SklHw3x3x8::hwInfo = { SKL::capabilityTable}; GT_SYSTEM_INFO SklHw3x3x8::gtSystemInfo = {0}; -void SklHw3x3x8::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const CompilerProductHelper &compilerProductHelper) { - setupHardwareInfoBase(hwInfo, setupFeatureTableAndWorkaroundTable, compilerProductHelper); +void SklHw3x3x8::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const ReleaseHelper *releaseHelper) { + setupHardwareInfoBase(hwInfo, setupFeatureTableAndWorkaroundTable, releaseHelper); GT_SYSTEM_INFO *gtSysInfo = &hwInfo->gtSystemInfo; gtSysInfo->SliceCount = 3; @@ -234,24 +233,24 @@ void SklHw3x3x8::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableA const HardwareInfo SKL::hwInfo = SklHw1x3x8::hwInfo; -void setupSKLHardwareInfoImpl(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, uint64_t hwInfoConfig, const CompilerProductHelper &compilerProductHelper) { +void setupSKLHardwareInfoImpl(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, uint64_t hwInfoConfig, const ReleaseHelper *releaseHelper) { if (hwInfoConfig == 0x100030008) { - SklHw1x3x8::setupHardwareInfo(hwInfo, setupFeatureTableAndWorkaroundTable, compilerProductHelper); + SklHw1x3x8::setupHardwareInfo(hwInfo, setupFeatureTableAndWorkaroundTable, releaseHelper); } else if (hwInfoConfig == 0x200030008) { - SklHw2x3x8::setupHardwareInfo(hwInfo, setupFeatureTableAndWorkaroundTable, compilerProductHelper); + SklHw2x3x8::setupHardwareInfo(hwInfo, setupFeatureTableAndWorkaroundTable, releaseHelper); } else if (hwInfoConfig == 0x300030008) { - SklHw3x3x8::setupHardwareInfo(hwInfo, setupFeatureTableAndWorkaroundTable, compilerProductHelper); + SklHw3x3x8::setupHardwareInfo(hwInfo, setupFeatureTableAndWorkaroundTable, releaseHelper); } else if (hwInfoConfig == 0x100020006) { - SklHw1x2x6::setupHardwareInfo(hwInfo, setupFeatureTableAndWorkaroundTable, compilerProductHelper); + SklHw1x2x6::setupHardwareInfo(hwInfo, setupFeatureTableAndWorkaroundTable, releaseHelper); } else if (hwInfoConfig == 0x100030006) { - SklHw1x3x6::setupHardwareInfo(hwInfo, setupFeatureTableAndWorkaroundTable, compilerProductHelper); + SklHw1x3x6::setupHardwareInfo(hwInfo, setupFeatureTableAndWorkaroundTable, releaseHelper); } else if (hwInfoConfig == 0x0) { // Default config - SklHw1x3x8::setupHardwareInfo(hwInfo, setupFeatureTableAndWorkaroundTable, compilerProductHelper); + SklHw1x3x8::setupHardwareInfo(hwInfo, setupFeatureTableAndWorkaroundTable, releaseHelper); } else { UNRECOVERABLE_IF(true); } } -void (*SKL::setupHardwareInfo)(HardwareInfo *, bool, uint64_t, const CompilerProductHelper &) = setupSKLHardwareInfoImpl; +void (*SKL::setupHardwareInfo)(HardwareInfo *, bool, uint64_t, const ReleaseHelper *) = setupSKLHardwareInfoImpl; } // namespace NEO diff --git a/shared/source/helpers/compiler_product_helper.h b/shared/source/helpers/compiler_product_helper.h index a9879f4b7d..cb44f17243 100644 --- a/shared/source/helpers/compiler_product_helper.h +++ b/shared/source/helpers/compiler_product_helper.h @@ -53,7 +53,6 @@ class CompilerProductHelper { virtual const char *getCachingPolicyOptions(bool isDebuggerActive) const = 0; virtual uint64_t getHwInfoConfig(const HardwareInfo &hwInfo) const = 0; virtual uint32_t getDefaultHwIpVersion() const = 0; - virtual uint32_t getNumThreadsPerEu() const = 0; virtual uint32_t matchRevisionIdWithProductConfig(HardwareIpVersion ipVersion, uint32_t revisionID) const = 0; virtual std::string getDeviceExtensions(const HardwareInfo &hwInfo, const ReleaseHelper *releaseHelper) const = 0; virtual void adjustHwInfoForIgc(HardwareInfo &hwInfo) const = 0; @@ -94,7 +93,6 @@ class CompilerProductHelperHw : public CompilerProductHelper { const char *getCachingPolicyOptions(bool isDebuggerActive) const override; uint64_t getHwInfoConfig(const HardwareInfo &hwInfo) const override; uint32_t getDefaultHwIpVersion() const override; - uint32_t getNumThreadsPerEu() const override; uint32_t matchRevisionIdWithProductConfig(HardwareIpVersion ipVersion, uint32_t revisionID) const override; std::string getDeviceExtensions(const HardwareInfo &hwInfo, const ReleaseHelper *releaseHelper) const override; void adjustHwInfoForIgc(HardwareInfo &hwInfo) const override; diff --git a/shared/source/helpers/compiler_product_helper_before_xe_hp.inl b/shared/source/helpers/compiler_product_helper_before_xe_hp.inl index 876c470a5c..fa121b4a51 100644 --- a/shared/source/helpers/compiler_product_helper_before_xe_hp.inl +++ b/shared/source/helpers/compiler_product_helper_before_xe_hp.inl @@ -8,10 +8,6 @@ #include "shared/source/helpers/compiler_product_helper.h" namespace NEO { -template -uint32_t CompilerProductHelperHw::getNumThreadsPerEu() const { - return 7u; -} template bool CompilerProductHelperHw::isDotAccumulateSupported() const { diff --git a/shared/source/helpers/compiler_product_helper_xe_hp_and_later.inl b/shared/source/helpers/compiler_product_helper_xe_hp_and_later.inl index 7625058ccd..f2fe0e622c 100644 --- a/shared/source/helpers/compiler_product_helper_xe_hp_and_later.inl +++ b/shared/source/helpers/compiler_product_helper_xe_hp_and_later.inl @@ -9,11 +9,6 @@ #include "shared/source/release_helper/release_helper.h" namespace NEO { -template -uint32_t CompilerProductHelperHw::getNumThreadsPerEu() const { - return 8u; -} - template bool CompilerProductHelperHw::isDotAccumulateSupported() const { return true; diff --git a/shared/source/helpers/hw_info.cpp b/shared/source/helpers/hw_info.cpp index 0051c6806e..83f5168772 100644 --- a/shared/source/helpers/hw_info.cpp +++ b/shared/source/helpers/hw_info.cpp @@ -30,11 +30,11 @@ bool familyEnabled[IGFX_MAX_CORE] = { }; const HardwareInfo *hardwareInfoTable[IGFX_MAX_PRODUCT] = {}; -void (*hardwareInfoSetup[IGFX_MAX_PRODUCT])(HardwareInfo *, bool, uint64_t, const CompilerProductHelper &) = { +void (*hardwareInfoSetup[IGFX_MAX_PRODUCT])(HardwareInfo *, bool, uint64_t, const ReleaseHelper *) = { 0x0, }; -void (*hardwareInfoBaseSetup[IGFX_MAX_PRODUCT])(HardwareInfo *, bool, const CompilerProductHelper &) = { +void (*hardwareInfoBaseSetup[IGFX_MAX_PRODUCT])(HardwareInfo *, bool, const ReleaseHelper *) = { 0x0, }; diff --git a/shared/source/helpers/hw_info.h b/shared/source/helpers/hw_info.h index fefae92359..a2f81ca1cc 100644 --- a/shared/source/helpers/hw_info.h +++ b/shared/source/helpers/hw_info.h @@ -17,7 +17,7 @@ namespace NEO { enum PreemptionMode : uint32_t; -class CompilerProductHelper; +class ReleaseHelper; struct RuntimeCapabilityTable { DirectSubmissionProperyEngines directSubmissionEngines; @@ -155,8 +155,8 @@ struct HardwareInfo { extern bool familyEnabled[IGFX_MAX_CORE]; extern const char *hardwarePrefix[IGFX_MAX_PRODUCT]; extern const HardwareInfo *hardwareInfoTable[IGFX_MAX_PRODUCT]; -extern void (*hardwareInfoSetup[IGFX_MAX_PRODUCT])(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, uint64_t hwInfoConfig, const CompilerProductHelper &compilerProductHelper); -extern void (*hardwareInfoBaseSetup[IGFX_MAX_PRODUCT])(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const CompilerProductHelper &); +extern void (*hardwareInfoSetup[IGFX_MAX_PRODUCT])(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, uint64_t hwInfoConfig, const ReleaseHelper *releaseHelper); +extern void (*hardwareInfoBaseSetup[IGFX_MAX_PRODUCT])(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const ReleaseHelper *releaseHelper); template struct EnableGfxFamilyHw { diff --git a/shared/source/os_interface/device_factory.cpp b/shared/source/os_interface/device_factory.cpp index a2d06927fe..ae0aae7c70 100644 --- a/shared/source/os_interface/device_factory.cpp +++ b/shared/source/os_interface/device_factory.cpp @@ -81,22 +81,21 @@ bool DeviceFactory::prepareDeviceEnvironmentsForProductFamilyOverride(ExecutionE return false; } - setHwInfoValuesFromConfig(hwInfoConfig, *hardwareInfo); - hardwareInfoSetup[hwInfoConst->platform.eProductFamily](hardwareInfo, true, hwInfoConfig, compilerProductHelper); - - auto &productHelper = rootDeviceEnvironment.getProductHelper(); - productHelper.configureHardwareCustom(hardwareInfo, nullptr); - if (productConfigFound) { compilerProductHelper.setProductConfigForHwInfo(*hardwareInfo, aotInfo.aotConfig); if (DebugManager.flags.ForceDeviceId.get() == "unk") { hardwareInfo->platform.usDeviceID = aotInfo.deviceIds->front(); } } - hardwareInfo->ipVersion.value = compilerProductHelper.getHwIpVersion(*hardwareInfo); - rootDeviceEnvironment.initReleaseHelper(); + + setHwInfoValuesFromConfig(hwInfoConfig, *hardwareInfo); + hardwareInfoSetup[hwInfoConst->platform.eProductFamily](hardwareInfo, true, hwInfoConfig, rootDeviceEnvironment.getReleaseHelper()); + + auto &productHelper = rootDeviceEnvironment.getProductHelper(); + productHelper.configureHardwareCustom(hardwareInfo, nullptr); + rootDeviceEnvironment.setRcsExposure(); if (DebugManager.flags.OverrideGpuAddressSpace.get() != -1) { diff --git a/shared/source/os_interface/linux/drm_neo.cpp b/shared/source/os_interface/linux/drm_neo.cpp index b98e2b87d6..cd739e3c91 100644 --- a/shared/source/os_interface/linux/drm_neo.cpp +++ b/shared/source/os_interface/linux/drm_neo.cpp @@ -482,8 +482,8 @@ int Drm::setupHardwareInfo(const DeviceDescriptor *device, bool setupFeatureTabl } status = querySystemInfo(); - auto &compilerProductHelper = rootDeviceEnvironment.getHelper(); - device->setupHardwareInfo(hwInfo, setupFeatureTableAndWorkaroundTable, compilerProductHelper); + auto releaseHelper = rootDeviceEnvironment.getReleaseHelper(); + device->setupHardwareInfo(hwInfo, setupFeatureTableAndWorkaroundTable, releaseHelper); rootDeviceEnvironment.setRcsExposure(); if (status) { diff --git a/shared/source/os_interface/linux/drm_neo.h b/shared/source/os_interface/linux/drm_neo.h index 6e98b6f789..a2b7c1ec49 100644 --- a/shared/source/os_interface/linux/drm_neo.h +++ b/shared/source/os_interface/linux/drm_neo.h @@ -44,7 +44,7 @@ enum class CacheRegion : uint16_t; enum class SubmissionStatus : uint32_t; class BufferObject; -class CompilerProductHelper; +class ReleaseHelper; class DeviceFactory; class MemoryInfo; class OsContext; @@ -59,7 +59,7 @@ struct SystemInfo; struct DeviceDescriptor { unsigned short deviceId; const HardwareInfo *pHwInfo; - void (*setupHardwareInfo)(HardwareInfo *, bool, const CompilerProductHelper &); + void (*setupHardwareInfo)(HardwareInfo *, bool, const ReleaseHelper *); const char *devName; }; diff --git a/shared/source/os_interface/linux/product_helper_drm.cpp b/shared/source/os_interface/linux/product_helper_drm.cpp index 7c7a315c34..1c4c073d08 100644 --- a/shared/source/os_interface/linux/product_helper_drm.cpp +++ b/shared/source/os_interface/linux/product_helper_drm.cpp @@ -15,6 +15,7 @@ #include "shared/source/os_interface/linux/drm_neo.h" #include "shared/source/os_interface/os_interface.h" #include "shared/source/os_interface/product_helper.h" +#include "shared/source/release_helper/release_helper.h" #include "shared/source/utilities/cpu_info.h" #include @@ -101,13 +102,15 @@ int ProductHelper::configureHwInfoDrm(const HardwareInfo *inHwInfo, HardwareInfo topologyData.maxSubSliceCount = topologyData.sliceCount > 0 ? topologyData.subSliceCount / topologyData.sliceCount : 0; } - auto &compilerProductHelper = rootDeviceEnvironment.getHelper(); + auto releaseHelper = rootDeviceEnvironment.getReleaseHelper(); + + auto numThreadsPerEu = releaseHelper ? releaseHelper->getNumThreadsPerEu() : 7u; gtSystemInfo->SliceCount = static_cast(topologyData.sliceCount); gtSystemInfo->SubSliceCount = static_cast(topologyData.subSliceCount); gtSystemInfo->DualSubSliceCount = static_cast(topologyData.subSliceCount); gtSystemInfo->EUCount = static_cast(topologyData.euCount); - gtSystemInfo->ThreadCount = compilerProductHelper.getNumThreadsPerEu() * gtSystemInfo->EUCount; + gtSystemInfo->ThreadCount = numThreadsPerEu * gtSystemInfo->EUCount; gtSystemInfo->MaxEuPerSubSlice = gtSystemInfo->MaxEuPerSubSlice != 0 ? gtSystemInfo->MaxEuPerSubSlice : topologyData.maxEuPerSubSlice; gtSystemInfo->MaxSubSlicesSupported = std::max(static_cast(topologyData.maxSubSliceCount * topologyData.maxSliceCount), gtSystemInfo->MaxSubSlicesSupported); @@ -153,6 +156,8 @@ int ProductHelper::configureHwInfoDrm(const HardwareInfo *inHwInfo, HardwareInfo drm->checkNonPersistentContextsSupport(); drm->checkPreemptionSupport(); bool preemption = drm->isPreemptionSupported(); + + auto &compilerProductHelper = rootDeviceEnvironment.getHelper(); PreemptionHelper::adjustDefaultPreemptionMode(outHwInfo->capabilityTable, compilerProductHelper.isMidThreadPreemptionSupported(*outHwInfo) && preemption, static_cast(outHwInfo->featureTable.flags.ftrGpGpuThreadGroupLevelPreempt) && preemption, diff --git a/shared/source/release_helper/release_helper.h b/shared/source/release_helper/release_helper.h index 4fc1330458..74d77953e9 100644 --- a/shared/source/release_helper/release_helper.h +++ b/shared/source/release_helper/release_helper.h @@ -47,6 +47,7 @@ class ReleaseHelper { virtual std::optional getPreferredAllocationMethod(AllocationType allocationType) const = 0; virtual std::vector getSupportedNumGrfs() const = 0; virtual bool isBindlessAddressingDisabled() const = 0; + virtual uint32_t getNumThreadsPerEu() const = 0; protected: ReleaseHelper(HardwareIpVersion hardwareIpVersion) : hardwareIpVersion(hardwareIpVersion) {} @@ -78,6 +79,7 @@ class ReleaseHelperHw : public ReleaseHelper { std::optional getPreferredAllocationMethod(AllocationType allocationType) const override; std::vector getSupportedNumGrfs() const override; bool isBindlessAddressingDisabled() const override; + uint32_t getNumThreadsPerEu() const override; protected: ReleaseHelperHw(HardwareIpVersion hardwareIpVersion) : ReleaseHelper(hardwareIpVersion) {} diff --git a/shared/source/release_helper/release_helper_base.inl b/shared/source/release_helper/release_helper_base.inl index bde9e1ce4f..6722d637a0 100644 --- a/shared/source/release_helper/release_helper_base.inl +++ b/shared/source/release_helper/release_helper_base.inl @@ -97,4 +97,9 @@ template bool ReleaseHelperHw::isBindlessAddressingDisabled() const { return true; } + +template +uint32_t ReleaseHelperHw::getNumThreadsPerEu() const { + return 8u; +} } // namespace NEO diff --git a/shared/source/xe_hpc_core/hw_cmds_pvc.h b/shared/source/xe_hpc_core/hw_cmds_pvc.h index 20da21951d..0224b6bd82 100644 --- a/shared/source/xe_hpc_core/hw_cmds_pvc.h +++ b/shared/source/xe_hpc_core/hw_cmds_pvc.h @@ -43,9 +43,9 @@ struct PVC : public XeHpcCoreFamily { static constexpr bool devicePreemptionMode = false; }; - static void (*setupHardwareInfo)(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, uint64_t hwInfoConfig, const CompilerProductHelper &compilerProductHelper); + static void (*setupHardwareInfo)(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, uint64_t hwInfoConfig, const ReleaseHelper *releaseHelper); static void setupFeatureAndWorkaroundTable(HardwareInfo *hwInfo); - static void setupHardwareInfoBase(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const CompilerProductHelper &compilerProductHelper); + static void setupHardwareInfoBase(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const ReleaseHelper *releaseHelper); static void setupHardwareInfoMultiTileBase(HardwareInfo *hwInfo, bool setupMultiTile); static void adjustHardwareInfo(HardwareInfo *hwInfo); @@ -70,7 +70,7 @@ struct PVC : public XeHpcCoreFamily { class PvcHwConfig : public PVC { public: - static void setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const CompilerProductHelper &compilerProductHelper); + static void setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const ReleaseHelper *releaseHelper); static const HardwareInfo hwInfo; private: diff --git a/shared/source/xe_hpc_core/hw_info_pvc.cpp b/shared/source/xe_hpc_core/hw_info_pvc.cpp index 0afac320ed..cfc3bf2b8d 100644 --- a/shared/source/xe_hpc_core/hw_info_pvc.cpp +++ b/shared/source/xe_hpc_core/hw_info_pvc.cpp @@ -8,8 +8,8 @@ #include "shared/source/aub_mem_dump/definitions/aub_services.h" #include "shared/source/command_stream/preemption_mode.h" #include "shared/source/debug_settings/debug_settings_manager.h" -#include "shared/source/helpers/compiler_product_helper.h" #include "shared/source/helpers/constants.h" +#include "shared/source/release_helper/release_helper.h" #include "shared/source/unified_memory/usm_memory_support.h" #include "shared/source/xe_hpc_core/hw_cmds_pvc.h" #include "shared/source/xe_hpc_core/pvc/device_ids_configs_pvc.h" @@ -133,9 +133,9 @@ void PVC::adjustHardwareInfo(HardwareInfo *hwInfo) { hwInfo->capabilityTable.sharedSystemMemCapabilities = (UNIFIED_SHARED_MEMORY_ACCESS | UNIFIED_SHARED_MEMORY_CONCURRENT_ACCESS | UNIFIED_SHARED_MEMORY_CONCURRENT_ATOMIC_ACCESS); } -void PVC::setupHardwareInfoBase(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const CompilerProductHelper &compilerProductHelper) { +void PVC::setupHardwareInfoBase(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const ReleaseHelper *releaseHelper) { GT_SYSTEM_INFO *gtSysInfo = &hwInfo->gtSystemInfo; - gtSysInfo->ThreadCount = gtSysInfo->EUCount * compilerProductHelper.getNumThreadsPerEu(); + gtSysInfo->ThreadCount = gtSysInfo->EUCount * releaseHelper->getNumThreadsPerEu(); gtSysInfo->MaxFillRate = 128; gtSysInfo->TotalVsThreads = 336; gtSysInfo->TotalHsThreads = 336; @@ -178,8 +178,8 @@ const HardwareInfo PvcHwConfig::hwInfo = { PVC::capabilityTable}; GT_SYSTEM_INFO PvcHwConfig::gtSystemInfo = {0}; -void PvcHwConfig::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const CompilerProductHelper &compilerProductHelper) { - PVC::setupHardwareInfoBase(hwInfo, setupFeatureTableAndWorkaroundTable, compilerProductHelper); +void PvcHwConfig::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const ReleaseHelper *releaseHelper) { + PVC::setupHardwareInfoBase(hwInfo, setupFeatureTableAndWorkaroundTable, releaseHelper); GT_SYSTEM_INFO *gtSysInfo = &hwInfo->gtSystemInfo; gtSysInfo->CsrSizeInMb = 8; gtSysInfo->IsL3HashModeEnabled = false; @@ -217,9 +217,9 @@ void PvcHwConfig::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTable const HardwareInfo PVC::hwInfo = PvcHwConfig::hwInfo; -void setupPVCHardwareInfoImpl(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, uint64_t hwInfoConfig, const CompilerProductHelper &compilerProductHelper) { - PvcHwConfig::setupHardwareInfo(hwInfo, setupFeatureTableAndWorkaroundTable, compilerProductHelper); +void setupPVCHardwareInfoImpl(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, uint64_t hwInfoConfig, const ReleaseHelper *releaseHelper) { + PvcHwConfig::setupHardwareInfo(hwInfo, setupFeatureTableAndWorkaroundTable, releaseHelper); } -void (*PVC::setupHardwareInfo)(HardwareInfo *, bool, uint64_t, const CompilerProductHelper &) = setupPVCHardwareInfoImpl; +void (*PVC::setupHardwareInfo)(HardwareInfo *, bool, uint64_t, const ReleaseHelper *) = setupPVCHardwareInfoImpl; } // namespace NEO diff --git a/shared/source/xe_hpg_core/hw_cmds_arl.h b/shared/source/xe_hpg_core/hw_cmds_arl.h index a6fa8717ca..365d09906d 100644 --- a/shared/source/xe_hpg_core/hw_cmds_arl.h +++ b/shared/source/xe_hpg_core/hw_cmds_arl.h @@ -17,14 +17,14 @@ struct ARL : public XeHpgCoreFamily { static FeatureTable featureTable; static WorkaroundTable workaroundTable; static const RuntimeCapabilityTable capabilityTable; - static void (*setupHardwareInfo)(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, uint64_t hwInfoConfig, const CompilerProductHelper &compilerProductHelper); + static void (*setupHardwareInfo)(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, uint64_t hwInfoConfig, const ReleaseHelper *releaseHelper); static void setupFeatureAndWorkaroundTable(HardwareInfo *hwInfo); - static void setupHardwareInfoBase(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const CompilerProductHelper &compilerProductHelper); + static void setupHardwareInfoBase(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const ReleaseHelper *releaseHelper); }; class ArlHwConfig : public ARL { public: - static void setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const CompilerProductHelper &compilerProductHelper); + static void setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const ReleaseHelper *releaseHelper); static const HardwareInfo hwInfo; private: diff --git a/shared/source/xe_hpg_core/hw_cmds_dg2.h b/shared/source/xe_hpg_core/hw_cmds_dg2.h index 737807fffa..d43173b78a 100644 --- a/shared/source/xe_hpg_core/hw_cmds_dg2.h +++ b/shared/source/xe_hpg_core/hw_cmds_dg2.h @@ -31,10 +31,10 @@ struct DG2 : public XeHpgCoreFamily { static const uint32_t maxSubslicesSupported = 32; static const uint32_t maxDualSubslicesSupported = 32; static const RuntimeCapabilityTable capabilityTable; - static void (*setupHardwareInfo)(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, uint64_t hwInfoConfig, const CompilerProductHelper &compilerProductHelper); + static void (*setupHardwareInfo)(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, uint64_t hwInfoConfig, const ReleaseHelper *releaseHelper); static void setupFeatureAndWorkaroundTable(HardwareInfo *hwInfo); static void adjustHardwareInfo(HardwareInfo *hwInfo); - static void setupHardwareInfoBase(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const CompilerProductHelper &compilerProductHelper); + static void setupHardwareInfoBase(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const ReleaseHelper *releaseHelper); static bool isG10(const HardwareInfo &hwInfo) { auto it = std::find(dg2G10DeviceIds.begin(), dg2G10DeviceIds.end(), hwInfo.platform.usDeviceID); @@ -54,7 +54,7 @@ struct DG2 : public XeHpgCoreFamily { class Dg2HwConfig : public DG2 { public: - static void setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const CompilerProductHelper &compilerProductHelper); + static void setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const ReleaseHelper *releaseHelper); static const HardwareInfo hwInfo; private: diff --git a/shared/source/xe_hpg_core/hw_cmds_mtl.h b/shared/source/xe_hpg_core/hw_cmds_mtl.h index 0e213f1649..572e9b4769 100644 --- a/shared/source/xe_hpg_core/hw_cmds_mtl.h +++ b/shared/source/xe_hpg_core/hw_cmds_mtl.h @@ -22,14 +22,14 @@ struct MTL : public XeHpgCoreFamily { static const uint32_t maxSubslicesSupported = 32; static const uint32_t maxDualSubslicesSupported = 32; static const RuntimeCapabilityTable capabilityTable; - static void (*setupHardwareInfo)(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, uint64_t hwInfoConfig, const CompilerProductHelper &compilerProductHelper); + static void (*setupHardwareInfo)(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, uint64_t hwInfoConfig, const ReleaseHelper *releaseHelper); static void setupFeatureAndWorkaroundTable(HardwareInfo *hwInfo); - static void setupHardwareInfoBase(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const CompilerProductHelper &compilerProductHelper); + static void setupHardwareInfoBase(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const ReleaseHelper *releaseHelper); }; class MtlHwConfig : public MTL { public: - static void setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const CompilerProductHelper &compilerProductHelper); + static void setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const ReleaseHelper *releaseHelper); static const HardwareInfo hwInfo; private: diff --git a/shared/source/xe_hpg_core/hw_info_arl.cpp b/shared/source/xe_hpg_core/hw_info_arl.cpp index bc0f4888d2..3f94f5555a 100644 --- a/shared/source/xe_hpg_core/hw_info_arl.cpp +++ b/shared/source/xe_hpg_core/hw_info_arl.cpp @@ -7,8 +7,8 @@ #include "shared/source/aub_mem_dump/definitions/aub_services.h" #include "shared/source/command_stream/preemption_mode.h" -#include "shared/source/helpers/compiler_product_helper.h" #include "shared/source/helpers/constants.h" +#include "shared/source/release_helper/release_helper.h" #include "shared/source/xe_hpg_core/hw_cmds_arl.h" #include "aubstream/engine_node.h" @@ -114,9 +114,9 @@ void ARL::setupFeatureAndWorkaroundTable(HardwareInfo *hwInfo) { workaroundTable->flags.waUntypedBufferCompression = true; }; -void ARL::setupHardwareInfoBase(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const CompilerProductHelper &compilerProductHelper) { +void ARL::setupHardwareInfoBase(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const ReleaseHelper *releaseHelper) { GT_SYSTEM_INFO *gtSysInfo = &hwInfo->gtSystemInfo; - gtSysInfo->ThreadCount = gtSysInfo->EUCount * compilerProductHelper.getNumThreadsPerEu(); + gtSysInfo->ThreadCount = gtSysInfo->EUCount * releaseHelper->getNumThreadsPerEu(); gtSysInfo->TotalPsThreadsWindowerRange = 64; gtSysInfo->CsrSizeInMb = 8; gtSysInfo->IsL3HashModeEnabled = false; @@ -143,8 +143,8 @@ const HardwareInfo ArlHwConfig::hwInfo = { ARL::capabilityTable}; GT_SYSTEM_INFO ArlHwConfig::gtSystemInfo = {0}; -void ArlHwConfig::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const CompilerProductHelper &compilerProductHelper) { - ARL::setupHardwareInfoBase(hwInfo, setupFeatureTableAndWorkaroundTable, compilerProductHelper); +void ArlHwConfig::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const ReleaseHelper *releaseHelper) { + ARL::setupHardwareInfoBase(hwInfo, setupFeatureTableAndWorkaroundTable, releaseHelper); GT_SYSTEM_INFO *gtSysInfo = &hwInfo->gtSystemInfo; gtSysInfo->CsrSizeInMb = 8; gtSysInfo->IsL3HashModeEnabled = false; @@ -177,9 +177,9 @@ void ArlHwConfig::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTable const HardwareInfo ARL::hwInfo = ArlHwConfig::hwInfo; -void setupARLHardwareInfoImpl(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, uint64_t hwInfoConfig, const CompilerProductHelper &compilerProductHelper) { - ArlHwConfig::setupHardwareInfo(hwInfo, setupFeatureTableAndWorkaroundTable, compilerProductHelper); +void setupARLHardwareInfoImpl(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, uint64_t hwInfoConfig, const ReleaseHelper *releaseHelper) { + ArlHwConfig::setupHardwareInfo(hwInfo, setupFeatureTableAndWorkaroundTable, releaseHelper); } -void (*ARL::setupHardwareInfo)(HardwareInfo *, bool, uint64_t, const CompilerProductHelper &) = setupARLHardwareInfoImpl; +void (*ARL::setupHardwareInfo)(HardwareInfo *, bool, uint64_t, const ReleaseHelper *) = setupARLHardwareInfoImpl; } // namespace NEO diff --git a/shared/source/xe_hpg_core/hw_info_dg2.cpp b/shared/source/xe_hpg_core/hw_info_dg2.cpp index 5feddb1723..536e8f2537 100644 --- a/shared/source/xe_hpg_core/hw_info_dg2.cpp +++ b/shared/source/xe_hpg_core/hw_info_dg2.cpp @@ -7,9 +7,9 @@ #include "shared/source/aub_mem_dump/definitions/aub_services.h" #include "shared/source/command_stream/preemption_mode.h" -#include "shared/source/helpers/compiler_product_helper.h" #include "shared/source/helpers/constants.h" #include "shared/source/helpers/hw_info.h" +#include "shared/source/release_helper/release_helper.h" #include "shared/source/xe_hpg_core/hw_cmds_dg2.h" #include "aubstream/engine_node.h" @@ -123,9 +123,9 @@ void DG2::setupFeatureAndWorkaroundTable(HardwareInfo *hwInfo) { workaroundTable->flags.wa4kAlignUVOffsetNV12LinearSurface = true; }; -void DG2::setupHardwareInfoBase(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const CompilerProductHelper &compilerProductHelper) { +void DG2::setupHardwareInfoBase(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const ReleaseHelper *releaseHelper) { GT_SYSTEM_INFO *gtSysInfo = &hwInfo->gtSystemInfo; - gtSysInfo->ThreadCount = gtSysInfo->EUCount * compilerProductHelper.getNumThreadsPerEu(); + gtSysInfo->ThreadCount = gtSysInfo->EUCount * releaseHelper->getNumThreadsPerEu(); gtSysInfo->TotalVsThreads = 336; gtSysInfo->TotalHsThreads = 336; gtSysInfo->TotalDsThreads = 336; @@ -153,7 +153,7 @@ const HardwareInfo Dg2HwConfig::hwInfo = { DG2::capabilityTable}; GT_SYSTEM_INFO Dg2HwConfig::gtSystemInfo = {0}; -void Dg2HwConfig::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const CompilerProductHelper &compilerProductHelper) { +void Dg2HwConfig::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const ReleaseHelper *releaseHelper) { GT_SYSTEM_INFO *gtSysInfo = &hwInfo->gtSystemInfo; gtSysInfo->CsrSizeInMb = 8; gtSysInfo->IsL3HashModeEnabled = false; @@ -189,11 +189,11 @@ void Dg2HwConfig::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTable const HardwareInfo DG2::hwInfo = Dg2HwConfig::hwInfo; -void setupDG2HardwareInfoImpl(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, uint64_t hwInfoConfig, const CompilerProductHelper &compilerProductHelper) { - DG2::setupHardwareInfoBase(hwInfo, setupFeatureTableAndWorkaroundTable, compilerProductHelper); - Dg2HwConfig::setupHardwareInfo(hwInfo, setupFeatureTableAndWorkaroundTable, compilerProductHelper); +void setupDG2HardwareInfoImpl(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, uint64_t hwInfoConfig, const ReleaseHelper *releaseHelper) { + DG2::setupHardwareInfoBase(hwInfo, setupFeatureTableAndWorkaroundTable, releaseHelper); + Dg2HwConfig::setupHardwareInfo(hwInfo, setupFeatureTableAndWorkaroundTable, releaseHelper); } -void (*DG2::setupHardwareInfo)(HardwareInfo *, bool, uint64_t, const CompilerProductHelper &) = setupDG2HardwareInfoImpl; +void (*DG2::setupHardwareInfo)(HardwareInfo *, bool, uint64_t, const ReleaseHelper *) = setupDG2HardwareInfoImpl; #include "hw_info_setup_dg2.inl" } // namespace NEO diff --git a/shared/source/xe_hpg_core/hw_info_mtl.cpp b/shared/source/xe_hpg_core/hw_info_mtl.cpp index 3511aa497a..d99f793b7d 100644 --- a/shared/source/xe_hpg_core/hw_info_mtl.cpp +++ b/shared/source/xe_hpg_core/hw_info_mtl.cpp @@ -8,8 +8,8 @@ #include "shared/source/aub_mem_dump/definitions/aub_services.h" #include "shared/source/command_stream/preemption_mode.h" #include "shared/source/debug_settings/debug_settings_manager.h" -#include "shared/source/helpers/compiler_product_helper.h" #include "shared/source/helpers/constants.h" +#include "shared/source/release_helper/release_helper.h" #include "shared/source/xe_hpg_core/hw_cmds_mtl.h" #include "aubstream/engine_node.h" @@ -115,9 +115,9 @@ void MTL::setupFeatureAndWorkaroundTable(HardwareInfo *hwInfo) { workaroundTable->flags.waUntypedBufferCompression = true; }; -void MTL::setupHardwareInfoBase(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const CompilerProductHelper &compilerProductHelper) { +void MTL::setupHardwareInfoBase(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const ReleaseHelper *releaseHelper) { GT_SYSTEM_INFO *gtSysInfo = &hwInfo->gtSystemInfo; - gtSysInfo->ThreadCount = gtSysInfo->EUCount * compilerProductHelper.getNumThreadsPerEu(); + gtSysInfo->ThreadCount = gtSysInfo->EUCount * releaseHelper->getNumThreadsPerEu(); gtSysInfo->TotalVsThreads = 336; gtSysInfo->TotalHsThreads = 336; gtSysInfo->TotalDsThreads = 336; @@ -148,8 +148,8 @@ const HardwareInfo MtlHwConfig::hwInfo = { MTL::capabilityTable}; GT_SYSTEM_INFO MtlHwConfig::gtSystemInfo = {0}; -void MtlHwConfig::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const CompilerProductHelper &compilerProductHelper) { - MTL::setupHardwareInfoBase(hwInfo, setupFeatureTableAndWorkaroundTable, compilerProductHelper); +void MtlHwConfig::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const ReleaseHelper *releaseHelper) { + MTL::setupHardwareInfoBase(hwInfo, setupFeatureTableAndWorkaroundTable, releaseHelper); GT_SYSTEM_INFO *gtSysInfo = &hwInfo->gtSystemInfo; gtSysInfo->CsrSizeInMb = 8; gtSysInfo->IsL3HashModeEnabled = false; @@ -182,9 +182,9 @@ void MtlHwConfig::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTable const HardwareInfo MTL::hwInfo = MtlHwConfig::hwInfo; -void setupMTLHardwareInfoImpl(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, uint64_t hwInfoConfig, const CompilerProductHelper &compilerProductHelper) { - MtlHwConfig::setupHardwareInfo(hwInfo, setupFeatureTableAndWorkaroundTable, compilerProductHelper); +void setupMTLHardwareInfoImpl(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, uint64_t hwInfoConfig, const ReleaseHelper *releaseHelper) { + MtlHwConfig::setupHardwareInfo(hwInfo, setupFeatureTableAndWorkaroundTable, releaseHelper); } -void (*MTL::setupHardwareInfo)(HardwareInfo *, bool, uint64_t, const CompilerProductHelper &) = setupMTLHardwareInfoImpl; +void (*MTL::setupHardwareInfo)(HardwareInfo *, bool, uint64_t, const ReleaseHelper *) = setupMTLHardwareInfoImpl; } // namespace NEO diff --git a/shared/test/common/mocks/mock_release_helper.h b/shared/test/common/mocks/mock_release_helper.h index 2baf6c7e2b..6452840dfb 100644 --- a/shared/test/common/mocks/mock_release_helper.h +++ b/shared/test/common/mocks/mock_release_helper.h @@ -31,5 +31,6 @@ class MockReleaseHelper : public ReleaseHelper { ADDMETHOD_CONST_NOBASE(getPreferredAllocationMethod, std::optional, std::nullopt, (AllocationType allocationType)); ADDMETHOD_CONST_NOBASE(getSupportedNumGrfs, std::vector, {128}, ()); ADDMETHOD_CONST_NOBASE(isBindlessAddressingDisabled, bool, true, ()); + ADDMETHOD_CONST_NOBASE(getNumThreadsPerEu, uint32_t, 8u, ()); }; } // namespace NEO diff --git a/shared/test/common/tests_configuration.cpp b/shared/test/common/tests_configuration.cpp index d70aa7ceaf..57b55aac22 100644 --- a/shared/test/common/tests_configuration.cpp +++ b/shared/test/common/tests_configuration.cpp @@ -10,20 +10,23 @@ #include "shared/source/helpers/compiler_product_helper.h" #include "shared/source/helpers/hw_info.h" #include "shared/source/os_interface/product_helper.h" +#include "shared/source/release_helper/release_helper.h" namespace NEO { void adjustHwInfoForTests(HardwareInfo &hwInfoForTests, uint32_t euPerSubSlice, uint32_t sliceCount, uint32_t subSlicePerSliceCount, int dieRecovery) { auto compilerProductHelper = CompilerProductHelper::create(hwInfoForTests.platform.eProductFamily); + hwInfoForTests.ipVersion.value = compilerProductHelper->getHwIpVersion(hwInfoForTests); + auto releaseHelper = ReleaseHelper::create(hwInfoForTests.ipVersion); auto hwInfoConfig = compilerProductHelper->getHwInfoConfig(hwInfoForTests); setHwInfoValuesFromConfig(hwInfoConfig, hwInfoForTests); - uint32_t threadsPerEu = compilerProductHelper->getNumThreadsPerEu(); + uint32_t threadsPerEu = releaseHelper ? releaseHelper->getNumThreadsPerEu() : 7u; // set Gt and FeatureTable to initial state bool setupFeatureTableAndWorkaroundTable = testMode == TestMode::AubTests ? true : false; - hardwareInfoSetup[hwInfoForTests.platform.eProductFamily](&hwInfoForTests, setupFeatureTableAndWorkaroundTable, hwInfoConfig, *compilerProductHelper); + hardwareInfoSetup[hwInfoForTests.platform.eProductFamily](&hwInfoForTests, setupFeatureTableAndWorkaroundTable, hwInfoConfig, releaseHelper.get()); GT_SYSTEM_INFO >SystemInfo = hwInfoForTests.gtSystemInfo; // and adjust dynamic values if not specified @@ -45,7 +48,5 @@ void adjustHwInfoForTests(HardwareInfo &hwInfoForTests, uint32_t euPerSubSlice, gtSystemInfo.MaxEuPerSubSlice = std::max(gtSystemInfo.MaxEuPerSubSlice, euPerSubSlice); gtSystemInfo.MaxSlicesSupported = std::max(gtSystemInfo.MaxSlicesSupported, gtSystemInfo.SliceCount); gtSystemInfo.MaxSubSlicesSupported = std::max(gtSystemInfo.MaxSubSlicesSupported, gtSystemInfo.SubSliceCount); - - hwInfoForTests.ipVersion.value = compilerProductHelper->getHwIpVersion(hwInfoForTests); } } // namespace NEO diff --git a/shared/test/unit_test/command_stream/aub_command_stream_receiver_tests_xehp_and_later.cpp b/shared/test/unit_test/command_stream/aub_command_stream_receiver_tests_xehp_and_later.cpp index 739b136300..af6fc67998 100644 --- a/shared/test/unit_test/command_stream/aub_command_stream_receiver_tests_xehp_and_later.cpp +++ b/shared/test/unit_test/command_stream/aub_command_stream_receiver_tests_xehp_and_later.cpp @@ -7,12 +7,12 @@ #include "shared/source/aub_mem_dump/page_table_entry_bits.h" #include "shared/source/command_stream/aub_command_stream_receiver_hw.h" -#include "shared/source/helpers/compiler_product_helper.h" #include "shared/source/helpers/engine_node_helper.h" #include "shared/source/memory_manager/memory_banks.h" #include "shared/source/memory_manager/memory_pool.h" #include "shared/source/os_interface/device_factory.h" #include "shared/source/os_interface/os_context.h" +#include "shared/source/release_helper/release_helper.h" #include "shared/test/common/fixtures/device_fixture.h" #include "shared/test/common/helpers/debug_manager_state_restore.h" #include "shared/test/common/helpers/engine_descriptor_helper.h" @@ -35,8 +35,8 @@ struct XeHPAndLaterAubCommandStreamReceiverTests : DeviceFixture, ::testing::Tes template void setUpImpl() { hardwareInfo = *defaultHwInfo; - auto compilerProductHelper = CompilerProductHelper::create(hardwareInfo.platform.eProductFamily); - hardwareInfoSetup[hardwareInfo.platform.eProductFamily](&hardwareInfo, true, 0, *compilerProductHelper); + auto releaseHelper = ReleaseHelper::create(hardwareInfo.ipVersion); + hardwareInfoSetup[hardwareInfo.platform.eProductFamily](&hardwareInfo, true, 0, releaseHelper.get()); hardwareInfo.gtSystemInfo.MultiTileArchInfo.IsValid = true; DeviceFixture::setUpImpl(&hardwareInfo); } diff --git a/shared/test/unit_test/command_stream/command_stream_receiver_simulated_common_hw_tests_xehp_and_later.cpp b/shared/test/unit_test/command_stream/command_stream_receiver_simulated_common_hw_tests_xehp_and_later.cpp index bab146e6ad..7592e4c83f 100644 --- a/shared/test/unit_test/command_stream/command_stream_receiver_simulated_common_hw_tests_xehp_and_later.cpp +++ b/shared/test/unit_test/command_stream/command_stream_receiver_simulated_common_hw_tests_xehp_and_later.cpp @@ -7,8 +7,8 @@ #include "shared/source/aub/aub_helper.h" #include "shared/source/command_stream/command_stream_receiver_simulated_common_hw.h" -#include "shared/source/helpers/compiler_product_helper.h" #include "shared/source/helpers/hardware_context_controller.h" +#include "shared/source/release_helper/release_helper.h" #include "shared/test/common/fixtures/device_fixture.h" #include "shared/test/common/helpers/debug_manager_state_restore.h" #include "shared/test/common/mocks/mock_device.h" @@ -195,8 +195,8 @@ class XeHPAndLaterTileRangeRegisterTest : public DeviceFixture, public ::testing template void setUpImpl() { hardwareInfo = *defaultHwInfo; - auto compilerProductHelper = CompilerProductHelper::create(hardwareInfo.platform.eProductFamily); - hardwareInfoSetup[hardwareInfo.platform.eProductFamily](&hardwareInfo, true, 0, *compilerProductHelper); + auto releaseHelper = ReleaseHelper::create(hardwareInfo.ipVersion); + hardwareInfoSetup[hardwareInfo.platform.eProductFamily](&hardwareInfo, true, 0, releaseHelper.get()); hardwareInfo.gtSystemInfo.MultiTileArchInfo.IsValid = true; DeviceFixture::setUpImpl(&hardwareInfo); } diff --git a/shared/test/unit_test/command_stream/get_devices_tests.cpp b/shared/test/unit_test/command_stream/get_devices_tests.cpp index e52e465cde..9f81cede97 100644 --- a/shared/test/unit_test/command_stream/get_devices_tests.cpp +++ b/shared/test/unit_test/command_stream/get_devices_tests.cpp @@ -175,7 +175,7 @@ HWTEST_F(PrepareDeviceEnvironmentsTest, givenPrepareDeviceEnvironmentsForDepreca for (auto i = 0u; i < expectedDevices; i++) { hwInfo = exeEnv.rootDeviceEnvironments[i]->getHardwareInfo(); auto &productHelper = exeEnv.rootDeviceEnvironments[i]->getProductHelper(); - auto &compilerProductHelper = exeEnv.rootDeviceEnvironments[i]->getHelper(); + auto releaseHelper = exeEnv.rootDeviceEnvironments[i]->getReleaseHelper(); switch (csrType) { case CSR_HW: case CSR_HW_WITH_AUB: @@ -203,7 +203,7 @@ HWTEST_F(PrepareDeviceEnvironmentsTest, givenPrepareDeviceEnvironmentsForDepreca hwInfoFromTable.featureTable = {}; hwInfoFromTable.workaroundTable = {}; hwInfoFromTable.gtSystemInfo = {}; - hardwareInfoSetup[hwInfoFromTable.platform.eProductFamily](&hwInfoFromTable, true, 0x0, compilerProductHelper); + hardwareInfoSetup[hwInfoFromTable.platform.eProductFamily](&hwInfoFromTable, true, 0x0, releaseHelper); productHelper.configureHardwareCustom(&hwInfoFromTable, nullptr); EXPECT_EQ(0, memcmp(&hwInfoFromTable.platform, &hwInfo->platform, sizeof(PLATFORM))); @@ -252,6 +252,7 @@ HWTEST_F(PrepareDeviceEnvironmentsTest, givenPrepareDeviceEnvironmentsWhenCsrIsS hwInfo = exeEnv.rootDeviceEnvironments[i]->getHardwareInfo(); auto &productHelper = exeEnv.rootDeviceEnvironments[i]->getProductHelper(); auto &compilerProductHelper = exeEnv.rootDeviceEnvironments[i]->getHelper(); + auto releaseHelper = exeEnv.rootDeviceEnvironments[i]->getReleaseHelper(); switch (csrType) { case CSR_HW: @@ -269,7 +270,7 @@ HWTEST_F(PrepareDeviceEnvironmentsTest, givenPrepareDeviceEnvironmentsWhenCsrIsS expectedHwInfo.featureTable = {}; expectedHwInfo.workaroundTable = {}; expectedHwInfo.gtSystemInfo = {}; - hardwareInfoSetup[expectedHwInfo.platform.eProductFamily](&expectedHwInfo, true, 0x0, compilerProductHelper); + hardwareInfoSetup[expectedHwInfo.platform.eProductFamily](&expectedHwInfo, true, 0x0, releaseHelper); productHelper.configureHardwareCustom(&expectedHwInfo, nullptr); compilerProductHelper.setProductConfigForHwInfo(expectedHwInfo, deviceAot.aotConfig); @@ -339,7 +340,7 @@ HWTEST_F(PrepareDeviceEnvironmentsTest, givenPrepareDeviceEnvironmentsAndUnknown for (auto i = 0u; i < expectedDevices; i++) { hwInfo = exeEnv.rootDeviceEnvironments[i]->getHardwareInfo(); auto &productHelper = exeEnv.rootDeviceEnvironments[i]->getProductHelper(); - auto &compilerProductHelper = exeEnv.rootDeviceEnvironments[i]->getHelper(); + auto releaseHelper = exeEnv.rootDeviceEnvironments[i]->getReleaseHelper(); switch (csrType) { case CSR_HW: @@ -364,7 +365,7 @@ HWTEST_F(PrepareDeviceEnvironmentsTest, givenPrepareDeviceEnvironmentsAndUnknown baseHwInfo.featureTable = {}; baseHwInfo.workaroundTable = {}; baseHwInfo.gtSystemInfo = {}; - hardwareInfoSetup[baseHwInfo.platform.eProductFamily](&baseHwInfo, true, 0x0, compilerProductHelper); + hardwareInfoSetup[baseHwInfo.platform.eProductFamily](&baseHwInfo, true, 0x0, releaseHelper); productHelper.configureHardwareCustom(&baseHwInfo, nullptr); EXPECT_EQ(0, memcmp(&baseHwInfo.platform, &hwInfo->platform, sizeof(PLATFORM))); diff --git a/shared/test/unit_test/command_stream/tbx_command_stream_receiver_tests_xehp_and_later.cpp b/shared/test/unit_test/command_stream/tbx_command_stream_receiver_tests_xehp_and_later.cpp index e1c0cfc1fb..d5d813a8ac 100644 --- a/shared/test/unit_test/command_stream/tbx_command_stream_receiver_tests_xehp_and_later.cpp +++ b/shared/test/unit_test/command_stream/tbx_command_stream_receiver_tests_xehp_and_later.cpp @@ -6,10 +6,10 @@ */ #include "shared/source/command_stream/tbx_command_stream_receiver_hw.h" -#include "shared/source/helpers/compiler_product_helper.h" #include "shared/source/memory_manager/memory_banks.h" #include "shared/source/memory_manager/memory_pool.h" #include "shared/source/memory_manager/physical_address_allocator.h" +#include "shared/source/release_helper/release_helper.h" #include "shared/test/common/fixtures/device_fixture.h" #include "shared/test/common/helpers/debug_manager_state_restore.h" #include "shared/test/common/helpers/gfx_core_helper_tests.h" @@ -23,8 +23,8 @@ struct XeHPAndLaterTbxCommandStreamReceiverTests : DeviceFixture, ::testing::Tes template void setUpImpl() { hardwareInfo = *defaultHwInfo; - auto compilerProductHelper = CompilerProductHelper::create(hardwareInfo.platform.eProductFamily); - hardwareInfoSetup[hardwareInfo.platform.eProductFamily](&hardwareInfo, true, 0, *compilerProductHelper); + auto releaseHelper = ReleaseHelper::create(hardwareInfo.ipVersion); + hardwareInfoSetup[hardwareInfo.platform.eProductFamily](&hardwareInfo, true, 0, releaseHelper.get()); hardwareInfo.gtSystemInfo.MultiTileArchInfo.IsValid = true; DeviceFixture::setUpImpl(&hardwareInfo); } diff --git a/shared/test/unit_test/device/neo_device_tests.cpp b/shared/test/unit_test/device/neo_device_tests.cpp index 287f0d0da3..1cca3b0fe8 100644 --- a/shared/test/unit_test/device/neo_device_tests.cpp +++ b/shared/test/unit_test/device/neo_device_tests.cpp @@ -7,7 +7,6 @@ #include "shared/source/device/device.h" #include "shared/source/gmm_helper/gmm.h" -#include "shared/source/helpers/compiler_product_helper.h" #include "shared/source/helpers/driver_model_type.h" #include "shared/source/helpers/gfx_core_helper.h" #include "shared/source/memory_manager/gfx_partition.h" @@ -15,6 +14,7 @@ #include "shared/source/os_interface/driver_info.h" #include "shared/source/os_interface/os_interface.h" #include "shared/source/os_interface/product_helper_hw.h" +#include "shared/source/release_helper/release_helper.h" #include "shared/test/common/fixtures/device_fixture.h" #include "shared/test/common/helpers/debug_manager_state_restore.h" #include "shared/test/common/helpers/default_hw_info.h" @@ -899,8 +899,8 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, DeviceTests, givenDebuggableOsContextWhenDeviceCrea ultHwConfig.useFirstSubmissionInitDevice = true; auto hwInfo = *defaultHwInfo; - auto compilerProductHelper = CompilerProductHelper::create(hwInfo.platform.eProductFamily); - hardwareInfoSetup[hwInfo.platform.eProductFamily](&hwInfo, true, 0, *compilerProductHelper); + auto releaseHelper = ReleaseHelper::create(hwInfo.ipVersion); + hardwareInfoSetup[hwInfo.platform.eProductFamily](&hwInfo, true, 0, releaseHelper.get()); MockExecutionEnvironment executionEnvironment(&hwInfo); executionEnvironment.memoryManager.reset(new MockMemoryManagerWithDebuggableOsContext(executionEnvironment)); @@ -918,8 +918,8 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, DeviceTests, whenDeviceCreatesEnginesThenDeviceIsIn ultHwConfig.useFirstSubmissionInitDevice = true; auto hwInfo = *defaultHwInfo; - auto compilerProductHelper = CompilerProductHelper::create(hwInfo.platform.eProductFamily); - hardwareInfoSetup[hwInfo.platform.eProductFamily](&hwInfo, true, 0, *compilerProductHelper); + auto releaseHelper = ReleaseHelper::create(hwInfo.ipVersion); + hardwareInfoSetup[hwInfo.platform.eProductFamily](&hwInfo, true, 0, releaseHelper.get()); MockExecutionEnvironment executionEnvironment(&hwInfo); executionEnvironment.incRefInternal(); diff --git a/shared/test/unit_test/gen11/ehl/test_product_helper_ehl.cpp b/shared/test/unit_test/gen11/ehl/test_product_helper_ehl.cpp index e4d6b18839..f2fa97e4da 100644 --- a/shared/test/unit_test/gen11/ehl/test_product_helper_ehl.cpp +++ b/shared/test/unit_test/gen11/ehl/test_product_helper_ehl.cpp @@ -22,8 +22,7 @@ using namespace NEO; using EhlProductHelper = ProductHelperTest; EHLTEST_F(EhlProductHelper, givenProductHelperStringThenAfterSetupResultingVmeIsDisabled) { - auto &compilerProductHelper = executionEnvironment->rootDeviceEnvironments[0]->getHelper(); - hardwareInfoSetup[productFamily](&pInHwInfo, false, 0x100040008, compilerProductHelper); + hardwareInfoSetup[productFamily](&pInHwInfo, false, 0x100040008, nullptr); EXPECT_FALSE(pInHwInfo.capabilityTable.ftrSupportsVmeAvcTextureSampler); EXPECT_FALSE(pInHwInfo.capabilityTable.ftrSupportsVmeAvcPreemption); EXPECT_FALSE(pInHwInfo.capabilityTable.supportsVme); @@ -33,7 +32,6 @@ EHLTEST_F(EhlProductHelper, givenBoolWhenCallEhlHardwareInfoSetupThenFeatureTabl bool boolValue[]{ true, false}; - auto &compilerProductHelper = executionEnvironment->rootDeviceEnvironments[0]->getHelper(); GT_SYSTEM_INFO >SystemInfo = pInHwInfo.gtSystemInfo; FeatureTable &featureTable = pInHwInfo.featureTable; WorkaroundTable &workaroundTable = pInHwInfo.workaroundTable; @@ -43,7 +41,7 @@ EHLTEST_F(EhlProductHelper, givenBoolWhenCallEhlHardwareInfoSetupThenFeatureTabl gtSystemInfo = {0}; featureTable = {}; workaroundTable = {}; - hardwareInfoSetup[productFamily](&pInHwInfo, setParamBool, 0x100040008, compilerProductHelper); + hardwareInfoSetup[productFamily](&pInHwInfo, setParamBool, 0x100040008, nullptr); EXPECT_EQ(setParamBool, featureTable.flags.ftrL3IACoherency); EXPECT_EQ(setParamBool, featureTable.flags.ftrPPGTT); diff --git a/shared/test/unit_test/gen11/icllp/test_product_helper_icllp.cpp b/shared/test/unit_test/gen11/icllp/test_product_helper_icllp.cpp index db06d2f428..d3901223c7 100644 --- a/shared/test/unit_test/gen11/icllp/test_product_helper_icllp.cpp +++ b/shared/test/unit_test/gen11/icllp/test_product_helper_icllp.cpp @@ -24,12 +24,11 @@ using IcllpProductHelper = ProductHelperTest; ICLLPTEST_F(IcllpProductHelper, givenInvalidSystemInfoWhenSettingHardwareInfoThenExpectThrow) { - auto &compilerProductHelper = executionEnvironment->rootDeviceEnvironments[0]->getHelper(); GT_SYSTEM_INFO >SystemInfo = pInHwInfo.gtSystemInfo; uint64_t config = 0xdeadbeef; gtSystemInfo = {0}; - EXPECT_ANY_THROW(hardwareInfoSetup[productFamily](&pInHwInfo, false, config, compilerProductHelper)); + EXPECT_ANY_THROW(hardwareInfoSetup[productFamily](&pInHwInfo, false, config, nullptr)); EXPECT_EQ(0u, gtSystemInfo.SliceCount); EXPECT_EQ(0u, gtSystemInfo.SubSliceCount); EXPECT_EQ(0u, gtSystemInfo.DualSubSliceCount); @@ -63,7 +62,6 @@ ICLLPTEST_F(IcllpProductHelper, givenBoolWhenCallIcllpHardwareInfoSetupThenFeatu bool boolValue[]{ true, false}; - auto &compilerProductHelper = executionEnvironment->rootDeviceEnvironments[0]->getHelper(); GT_SYSTEM_INFO >SystemInfo = pInHwInfo.gtSystemInfo; FeatureTable &featureTable = pInHwInfo.featureTable; WorkaroundTable &workaroundTable = pInHwInfo.workaroundTable; @@ -74,7 +72,7 @@ ICLLPTEST_F(IcllpProductHelper, givenBoolWhenCallIcllpHardwareInfoSetupThenFeatu gtSystemInfo = {0}; featureTable = {}; workaroundTable = {}; - hardwareInfoSetup[productFamily](&pInHwInfo, setParamBool, config, compilerProductHelper); + hardwareInfoSetup[productFamily](&pInHwInfo, setParamBool, config, nullptr); EXPECT_EQ(setParamBool, featureTable.flags.ftrL3IACoherency); EXPECT_EQ(setParamBool, featureTable.flags.ftrPPGTT); diff --git a/shared/test/unit_test/gen11/lkf/test_product_helper_lkf.cpp b/shared/test/unit_test/gen11/lkf/test_product_helper_lkf.cpp index 7fe63481d2..aceccd3d85 100644 --- a/shared/test/unit_test/gen11/lkf/test_product_helper_lkf.cpp +++ b/shared/test/unit_test/gen11/lkf/test_product_helper_lkf.cpp @@ -23,12 +23,11 @@ using LkfProductHelper = ProductHelperTest; LKFTEST_F(LkfProductHelper, givenInvalidSystemInfoWhenSettingHardwareInfoThenExpectThrow) { - auto &compilerProductHelper = executionEnvironment->rootDeviceEnvironments[0]->getHelper(); GT_SYSTEM_INFO >SystemInfo = pInHwInfo.gtSystemInfo; uint64_t config = 0xdeadbeef; gtSystemInfo = {0}; - EXPECT_ANY_THROW(hardwareInfoSetup[productFamily](&pInHwInfo, false, config, compilerProductHelper)); + EXPECT_ANY_THROW(hardwareInfoSetup[productFamily](&pInHwInfo, false, config, nullptr)); EXPECT_EQ(0u, gtSystemInfo.SliceCount); EXPECT_EQ(0u, gtSystemInfo.SubSliceCount); EXPECT_EQ(0u, gtSystemInfo.DualSubSliceCount); @@ -37,9 +36,8 @@ LKFTEST_F(LkfProductHelper, givenInvalidSystemInfoWhenSettingHardwareInfoThenExp LKFTEST_F(LkfProductHelper, givenProductHelperStringThenAfterSetupResultingVmeIsDisabled) { - auto &compilerProductHelper = executionEnvironment->rootDeviceEnvironments[0]->getHelper(); uint64_t config = 0x100080008; - hardwareInfoSetup[productFamily](&pInHwInfo, false, config, compilerProductHelper); + hardwareInfoSetup[productFamily](&pInHwInfo, false, config, nullptr); EXPECT_FALSE(pInHwInfo.capabilityTable.ftrSupportsVmeAvcTextureSampler); EXPECT_FALSE(pInHwInfo.capabilityTable.ftrSupportsVmeAvcPreemption); EXPECT_FALSE(pInHwInfo.capabilityTable.supportsVme); @@ -49,7 +47,6 @@ LKFTEST_F(LkfProductHelper, givenBoolWhenCallLkfHardwareInfoSetupThenFeatureTabl bool boolValue[]{ true, false}; - auto &compilerProductHelper = executionEnvironment->rootDeviceEnvironments[0]->getHelper(); GT_SYSTEM_INFO >SystemInfo = pInHwInfo.gtSystemInfo; FeatureTable &featureTable = pInHwInfo.featureTable; WorkaroundTable &workaroundTable = pInHwInfo.workaroundTable; @@ -61,7 +58,7 @@ LKFTEST_F(LkfProductHelper, givenBoolWhenCallLkfHardwareInfoSetupThenFeatureTabl gtSystemInfo = {0}; featureTable = {}; workaroundTable = {}; - hardwareInfoSetup[productFamily](&pInHwInfo, setParamBool, config, compilerProductHelper); + hardwareInfoSetup[productFamily](&pInHwInfo, setParamBool, config, nullptr); EXPECT_EQ(setParamBool, featureTable.flags.ftrL3IACoherency); EXPECT_EQ(setParamBool, featureTable.flags.ftrPPGTT); diff --git a/shared/test/unit_test/gen12lp/adln/test_product_helper_adln.cpp b/shared/test/unit_test/gen12lp/adln/test_product_helper_adln.cpp index dd9bf5975e..f58d2a5446 100644 --- a/shared/test/unit_test/gen12lp/adln/test_product_helper_adln.cpp +++ b/shared/test/unit_test/gen12lp/adln/test_product_helper_adln.cpp @@ -26,7 +26,6 @@ ADLNTEST_F(AdlnHwInfo, givenBoolWhenCallAdlnHardwareInfoSetupThenFeatureTableAnd static bool boolValue[]{ true, false}; HardwareInfo hwInfo = *defaultHwInfo; - auto compilerProductHelper = CompilerProductHelper::create(hwInfo.platform.eProductFamily); GT_SYSTEM_INFO >SystemInfo = hwInfo.gtSystemInfo; FeatureTable &featureTable = hwInfo.featureTable; WorkaroundTable &workaroundTable = hwInfo.workaroundTable; @@ -37,7 +36,7 @@ ADLNTEST_F(AdlnHwInfo, givenBoolWhenCallAdlnHardwareInfoSetupThenFeatureTableAnd gtSystemInfo = {0}; featureTable = {}; workaroundTable = {}; - hardwareInfoSetup[productFamily](&hwInfo, setParamBool, config, *compilerProductHelper); + hardwareInfoSetup[productFamily](&hwInfo, setParamBool, config, nullptr); EXPECT_EQ(setParamBool, featureTable.flags.ftrL3IACoherency); EXPECT_EQ(setParamBool, featureTable.flags.ftrPPGTT); diff --git a/shared/test/unit_test/gen12lp/adlp/linux/product_helper_tests_adlp.cpp b/shared/test/unit_test/gen12lp/adlp/linux/product_helper_tests_adlp.cpp index 7825861ff9..914defd4f7 100644 --- a/shared/test/unit_test/gen12lp/adlp/linux/product_helper_tests_adlp.cpp +++ b/shared/test/unit_test/gen12lp/adlp/linux/product_helper_tests_adlp.cpp @@ -54,9 +54,8 @@ ADLPTEST_F(AdlpProductHelperLinux, GivenInvalidDeviceIdWhenConfiguringHwInfoThen ADLPTEST_F(AdlpProductHelperLinux, givenAdlpConfigWhenSetupHardwareInfoBaseThenGtSystemInfoIsCorrect) { HardwareInfo hwInfo = *defaultHwInfo; - auto compilerProductHelper = CompilerProductHelper::create(hwInfo.platform.eProductFamily); GT_SYSTEM_INFO >SystemInfo = hwInfo.gtSystemInfo; - ADLP::setupHardwareInfoBase(&hwInfo, false, *compilerProductHelper); + ADLP::setupHardwareInfoBase(&hwInfo, false, nullptr); EXPECT_EQ(64u, gtSystemInfo.TotalPsThreadsWindowerRange); EXPECT_EQ(8u, gtSystemInfo.CsrSizeInMb); @@ -71,10 +70,9 @@ TYPED_TEST_CASE(AdlpHwInfoLinux, adlpConfigTestTypes); TYPED_TEST(AdlpHwInfoLinux, givenSliceCountZeroWhenSetupHardwareInfoThenNotZeroValuesSetInGtSystemInfo) { HardwareInfo hwInfo = *defaultHwInfo; - auto compilerProductHelper = CompilerProductHelper::create(hwInfo.platform.eProductFamily); hwInfo.gtSystemInfo = {0}; - TypeParam::setupHardwareInfo(&hwInfo, false, *compilerProductHelper); + TypeParam::setupHardwareInfo(&hwInfo, false, nullptr); EXPECT_NE(0u, hwInfo.gtSystemInfo.SliceCount); EXPECT_NE(0u, hwInfo.gtSystemInfo.SubSliceCount); diff --git a/shared/test/unit_test/gen12lp/adlp/test_product_helper_adlp.cpp b/shared/test/unit_test/gen12lp/adlp/test_product_helper_adlp.cpp index 6e569c83b3..16ac77b438 100644 --- a/shared/test/unit_test/gen12lp/adlp/test_product_helper_adlp.cpp +++ b/shared/test/unit_test/gen12lp/adlp/test_product_helper_adlp.cpp @@ -26,7 +26,6 @@ ADLPTEST_F(AdlpHwInfo, givenBoolWhenCallAdlpHardwareInfoSetupThenFeatureTableAnd static bool boolValue[]{ true, false}; HardwareInfo hwInfo = *defaultHwInfo; - auto compilerProductHelper = CompilerProductHelper::create(hwInfo.platform.eProductFamily); GT_SYSTEM_INFO >SystemInfo = hwInfo.gtSystemInfo; FeatureTable &featureTable = hwInfo.featureTable; WorkaroundTable &workaroundTable = hwInfo.workaroundTable; @@ -37,7 +36,7 @@ ADLPTEST_F(AdlpHwInfo, givenBoolWhenCallAdlpHardwareInfoSetupThenFeatureTableAnd gtSystemInfo = {0}; featureTable = {}; workaroundTable = {}; - hardwareInfoSetup[productFamily](&hwInfo, setParamBool, config, *compilerProductHelper); + hardwareInfoSetup[productFamily](&hwInfo, setParamBool, config, nullptr); EXPECT_EQ(setParamBool, featureTable.flags.ftrL3IACoherency); EXPECT_EQ(setParamBool, featureTable.flags.ftrPPGTT); diff --git a/shared/test/unit_test/gen12lp/adls/test_product_helper_adls.cpp b/shared/test/unit_test/gen12lp/adls/test_product_helper_adls.cpp index 03b1f70bb5..7e40ca6e3e 100644 --- a/shared/test/unit_test/gen12lp/adls/test_product_helper_adls.cpp +++ b/shared/test/unit_test/gen12lp/adls/test_product_helper_adls.cpp @@ -29,7 +29,6 @@ ADLSTEST_F(AdlsHwInfo, givenBoolWhenCallAdlsHardwareInfoSetupThenFeatureTableAnd GT_SYSTEM_INFO >SystemInfo = hwInfo.gtSystemInfo; FeatureTable &featureTable = hwInfo.featureTable; WorkaroundTable &workaroundTable = hwInfo.workaroundTable; - auto compilerProductHelper = CompilerProductHelper::create(hwInfo.platform.eProductFamily); uint64_t config = 0x100020016; for (auto setParamBool : boolValue) { @@ -37,7 +36,7 @@ ADLSTEST_F(AdlsHwInfo, givenBoolWhenCallAdlsHardwareInfoSetupThenFeatureTableAnd gtSystemInfo = {0}; featureTable = {}; workaroundTable = {}; - hardwareInfoSetup[productFamily](&hwInfo, setParamBool, config, *compilerProductHelper); + hardwareInfoSetup[productFamily](&hwInfo, setParamBool, config, nullptr); EXPECT_EQ(setParamBool, featureTable.flags.ftrL3IACoherency); EXPECT_EQ(setParamBool, featureTable.flags.ftrPPGTT); diff --git a/shared/test/unit_test/gen12lp/dg1/hw_info_tests_dg1.cpp b/shared/test/unit_test/gen12lp/dg1/hw_info_tests_dg1.cpp index ff27f57bc2..d2168056ee 100644 --- a/shared/test/unit_test/gen12lp/dg1/hw_info_tests_dg1.cpp +++ b/shared/test/unit_test/gen12lp/dg1/hw_info_tests_dg1.cpp @@ -5,7 +5,6 @@ * */ -#include "shared/source/helpers/compiler_product_helper.h" #include "shared/source/helpers/hw_info.h" #include "shared/test/common/helpers/debug_manager_state_restore.h" #include "shared/test/common/helpers/default_hw_info.h" @@ -21,12 +20,11 @@ TYPED_TEST_CASE(Dg1HwInfoTests, dg1TestTypes); TYPED_TEST(Dg1HwInfoTests, WhenSetupHardwareInfoWithSetupFeatureTableFlagTrueOrFalseIsCalledThenFeatureTableHasCorrectValueOfLocalMemoryFeature) { HardwareInfo hwInfo = *defaultHwInfo; - auto compilerProductHelper = CompilerProductHelper::create(hwInfo.platform.eProductFamily); FeatureTable &featureTable = hwInfo.featureTable; EXPECT_FALSE(featureTable.flags.ftrLocalMemory); - TypeParam::setupHardwareInfo(&hwInfo, false, *compilerProductHelper); + TypeParam::setupHardwareInfo(&hwInfo, false, nullptr); EXPECT_FALSE(featureTable.flags.ftrLocalMemory); - TypeParam::setupHardwareInfo(&hwInfo, true, *compilerProductHelper); + TypeParam::setupHardwareInfo(&hwInfo, true, nullptr); EXPECT_TRUE(featureTable.flags.ftrLocalMemory); } diff --git a/shared/test/unit_test/gen12lp/dg1/test_product_helper_dg1.cpp b/shared/test/unit_test/gen12lp/dg1/test_product_helper_dg1.cpp index 132ff36e63..ccc024e583 100644 --- a/shared/test/unit_test/gen12lp/dg1/test_product_helper_dg1.cpp +++ b/shared/test/unit_test/gen12lp/dg1/test_product_helper_dg1.cpp @@ -24,12 +24,11 @@ using Dg1HwInfo = ::testing::Test; DG1TEST_F(Dg1HwInfo, givenInvalidSystemInfoWhenSettingHardwareInfoThenExpectThrow) { HardwareInfo hwInfo = *defaultHwInfo; - auto compilerProductHelper = CompilerProductHelper::create(hwInfo.platform.eProductFamily); GT_SYSTEM_INFO >SystemInfo = hwInfo.gtSystemInfo; uint64_t config = 0xdeadbeef; gtSystemInfo = {0}; - EXPECT_ANY_THROW(hardwareInfoSetup[productFamily](&hwInfo, false, config, *compilerProductHelper)); + EXPECT_ANY_THROW(hardwareInfoSetup[productFamily](&hwInfo, false, config, nullptr)); EXPECT_EQ(0u, gtSystemInfo.SliceCount); EXPECT_EQ(0u, gtSystemInfo.SubSliceCount); EXPECT_EQ(0u, gtSystemInfo.DualSubSliceCount); @@ -40,7 +39,6 @@ DG1TEST_F(Dg1HwInfo, givenBoolWhenCallDg1HardwareInfoSetupThenFeatureTableAndWor bool boolValue[]{ true, false}; HardwareInfo hwInfo = *defaultHwInfo; - auto compilerProductHelper = CompilerProductHelper::create(hwInfo.platform.eProductFamily); GT_SYSTEM_INFO >SystemInfo = hwInfo.gtSystemInfo; FeatureTable &featureTable = hwInfo.featureTable; WorkaroundTable &workaroundTable = hwInfo.workaroundTable; @@ -51,7 +49,7 @@ DG1TEST_F(Dg1HwInfo, givenBoolWhenCallDg1HardwareInfoSetupThenFeatureTableAndWor gtSystemInfo = {0}; featureTable = {}; workaroundTable = {}; - hardwareInfoSetup[productFamily](&hwInfo, setParamBool, config, *compilerProductHelper); + hardwareInfoSetup[productFamily](&hwInfo, setParamBool, config, nullptr); EXPECT_EQ(setParamBool, featureTable.flags.ftrL3IACoherency); EXPECT_EQ(setParamBool, featureTable.flags.ftrPPGTT); diff --git a/shared/test/unit_test/gen12lp/rkl/test_product_helper_rkl.cpp b/shared/test/unit_test/gen12lp/rkl/test_product_helper_rkl.cpp index 776aa62c5b..962ae6c8d6 100644 --- a/shared/test/unit_test/gen12lp/rkl/test_product_helper_rkl.cpp +++ b/shared/test/unit_test/gen12lp/rkl/test_product_helper_rkl.cpp @@ -28,7 +28,6 @@ RKLTEST_F(RklHwInfo, givenBoolWhenCallRklHardwareInfoSetupThenFeatureTableAndWor bool boolValue[]{ true, false}; HardwareInfo hwInfo = *defaultHwInfo; - auto compilerProductHelper = CompilerProductHelper::create(hwInfo.platform.eProductFamily); GT_SYSTEM_INFO >SystemInfo = hwInfo.gtSystemInfo; FeatureTable &featureTable = hwInfo.featureTable; WorkaroundTable &workaroundTable = hwInfo.workaroundTable; @@ -39,7 +38,7 @@ RKLTEST_F(RklHwInfo, givenBoolWhenCallRklHardwareInfoSetupThenFeatureTableAndWor gtSystemInfo = {0}; featureTable = {}; workaroundTable = {}; - hardwareInfoSetup[productFamily](&hwInfo, setParamBool, config, *compilerProductHelper); + hardwareInfoSetup[productFamily](&hwInfo, setParamBool, config, nullptr); EXPECT_EQ(setParamBool, featureTable.flags.ftrL3IACoherency); EXPECT_EQ(setParamBool, featureTable.flags.ftrPPGTT); diff --git a/shared/test/unit_test/gen12lp/tgllp/product_helper_tests_tgllp.cpp b/shared/test/unit_test/gen12lp/tgllp/product_helper_tests_tgllp.cpp index 3ab423ad18..0eb5fe0978 100644 --- a/shared/test/unit_test/gen12lp/tgllp/product_helper_tests_tgllp.cpp +++ b/shared/test/unit_test/gen12lp/tgllp/product_helper_tests_tgllp.cpp @@ -28,12 +28,11 @@ using TgllpHwInfo = ::testing::Test; TGLLPTEST_F(TgllpHwInfo, givenHwInfoErrorneousConfigStringThenThrow) { HardwareInfo hwInfo = *defaultHwInfo; - auto compilerProductHelper = CompilerProductHelper::create(hwInfo.platform.eProductFamily); GT_SYSTEM_INFO >SystemInfo = hwInfo.gtSystemInfo; uint64_t config = 0xdeadbeef; gtSystemInfo = {0}; - EXPECT_ANY_THROW(hardwareInfoSetup[productFamily](&hwInfo, false, config, *compilerProductHelper)); + EXPECT_ANY_THROW(hardwareInfoSetup[productFamily](&hwInfo, false, config, nullptr)); EXPECT_EQ(0u, gtSystemInfo.SliceCount); EXPECT_EQ(0u, gtSystemInfo.SubSliceCount); EXPECT_EQ(0u, gtSystemInfo.DualSubSliceCount); @@ -42,20 +41,19 @@ TGLLPTEST_F(TgllpHwInfo, givenHwInfoErrorneousConfigStringThenThrow) { TGLLPTEST_F(TgllpHwInfo, whenUsingCorrectConfigValueThenCorrectHwInfoIsReturned) { HardwareInfo hwInfo = *defaultHwInfo; - auto compilerProductHelper = CompilerProductHelper::create(hwInfo.platform.eProductFamily); GT_SYSTEM_INFO >SystemInfo = hwInfo.gtSystemInfo; uint64_t config = 0x100060010; gtSystemInfo = {0}; - hardwareInfoSetup[productFamily](&hwInfo, false, config, *compilerProductHelper); + hardwareInfoSetup[productFamily](&hwInfo, false, config, nullptr); EXPECT_EQ(1u, gtSystemInfo.SliceCount); EXPECT_EQ(6u, gtSystemInfo.DualSubSliceCount); config = 0x100020010; gtSystemInfo = {0}; - hardwareInfoSetup[productFamily](&hwInfo, false, config, *compilerProductHelper); + hardwareInfoSetup[productFamily](&hwInfo, false, config, nullptr); EXPECT_EQ(1u, gtSystemInfo.SliceCount); EXPECT_EQ(2u, gtSystemInfo.DualSubSliceCount); } @@ -64,7 +62,6 @@ TGLLPTEST_F(TgllpHwInfo, givenBoolWhenCallTgllpHardwareInfoSetupThenFeatureTable static bool boolValue[]{ true, false}; HardwareInfo hwInfo = *defaultHwInfo; - auto compilerProductHelper = CompilerProductHelper::create(hwInfo.platform.eProductFamily); GT_SYSTEM_INFO >SystemInfo = hwInfo.gtSystemInfo; FeatureTable &featureTable = hwInfo.featureTable; WorkaroundTable &workaroundTable = hwInfo.workaroundTable; @@ -79,7 +76,7 @@ TGLLPTEST_F(TgllpHwInfo, givenBoolWhenCallTgllpHardwareInfoSetupThenFeatureTable gtSystemInfo = {0}; featureTable = {}; workaroundTable = {}; - hardwareInfoSetup[productFamily](&hwInfo, setParamBool, config, *compilerProductHelper); + hardwareInfoSetup[productFamily](&hwInfo, setParamBool, config, nullptr); EXPECT_EQ(setParamBool, featureTable.flags.ftrL3IACoherency); EXPECT_EQ(setParamBool, featureTable.flags.ftrPPGTT); @@ -120,10 +117,9 @@ TGLLPTEST_F(TgllpHwInfo, givenSetCommandStreamReceiverInAubModeForTgllpProductFa TGLLPTEST_F(TgllpHwInfo, givenProductHelperStringThenAfterSetupResultingVmeIsDisabled) { HardwareInfo hwInfo = *defaultHwInfo; - auto compilerProductHelper = CompilerProductHelper::create(hwInfo.platform.eProductFamily); uint64_t config = 0x100060010; - hardwareInfoSetup[productFamily](&hwInfo, false, config, *compilerProductHelper); + hardwareInfoSetup[productFamily](&hwInfo, false, config, nullptr); EXPECT_FALSE(hwInfo.capabilityTable.ftrSupportsVmeAvcTextureSampler); EXPECT_FALSE(hwInfo.capabilityTable.ftrSupportsVmeAvcPreemption); EXPECT_FALSE(hwInfo.capabilityTable.supportsVme); diff --git a/shared/test/unit_test/gen8/bdw/test_product_helper_bdw.cpp b/shared/test/unit_test/gen8/bdw/test_product_helper_bdw.cpp index d5a2e68ac1..37a50c0e45 100644 --- a/shared/test/unit_test/gen8/bdw/test_product_helper_bdw.cpp +++ b/shared/test/unit_test/gen8/bdw/test_product_helper_bdw.cpp @@ -23,12 +23,11 @@ using namespace NEO; using BdwProductHelper = ProductHelperTest; BDWTEST_F(BdwProductHelper, givenInvalidSystemInfoWhenSettingHardwareInfoThenExpectThrow) { - auto &compilerProductHelper = executionEnvironment->rootDeviceEnvironments[0]->getHelper(); GT_SYSTEM_INFO >SystemInfo = pInHwInfo.gtSystemInfo; uint64_t config = 0xdeadbeef; gtSystemInfo = {0}; - EXPECT_ANY_THROW(hardwareInfoSetup[productFamily](&pInHwInfo, false, config, compilerProductHelper)); + EXPECT_ANY_THROW(hardwareInfoSetup[productFamily](&pInHwInfo, false, config, nullptr)); EXPECT_EQ(0u, gtSystemInfo.SliceCount); EXPECT_EQ(0u, gtSystemInfo.SubSliceCount); EXPECT_EQ(0u, gtSystemInfo.DualSubSliceCount); @@ -44,7 +43,6 @@ BDWTEST_F(BdwProductHelper, givenBoolWhenCallBdwHardwareInfoSetupThenFeatureTabl bool boolValue[]{ true, false}; - auto &compilerProductHelper = executionEnvironment->rootDeviceEnvironments[0]->getHelper(); GT_SYSTEM_INFO >SystemInfo = pInHwInfo.gtSystemInfo; FeatureTable &featureTable = pInHwInfo.featureTable; WorkaroundTable &workaroundTable = pInHwInfo.workaroundTable; @@ -55,7 +53,7 @@ BDWTEST_F(BdwProductHelper, givenBoolWhenCallBdwHardwareInfoSetupThenFeatureTabl gtSystemInfo = {0}; featureTable = {}; workaroundTable = {}; - hardwareInfoSetup[productFamily](&pInHwInfo, setParamBool, config, compilerProductHelper); + hardwareInfoSetup[productFamily](&pInHwInfo, setParamBool, config, nullptr); EXPECT_EQ(setParamBool, featureTable.flags.ftrL3IACoherency); EXPECT_EQ(setParamBool, featureTable.flags.ftrPPGTT); @@ -74,9 +72,8 @@ BDWTEST_F(BdwProductHelper, givenBoolWhenCallBdwHardwareInfoSetupThenFeatureTabl BDWTEST_F(BdwProductHelper, givenProductHelperStringThenAfterSetupResultingVmeIsDisabled) { - auto &compilerProductHelper = executionEnvironment->rootDeviceEnvironments[0]->getHelper(); uint64_t config = 0x0; - hardwareInfoSetup[productFamily](&pInHwInfo, false, config, compilerProductHelper); + hardwareInfoSetup[productFamily](&pInHwInfo, false, config, nullptr); EXPECT_FALSE(pInHwInfo.capabilityTable.ftrSupportsVmeAvcTextureSampler); EXPECT_FALSE(pInHwInfo.capabilityTable.ftrSupportsVmeAvcPreemption); EXPECT_FALSE(pInHwInfo.capabilityTable.supportsVme); diff --git a/shared/test/unit_test/gen9/bxt/test_product_helper_bxt.cpp b/shared/test/unit_test/gen9/bxt/test_product_helper_bxt.cpp index 27dd6dc37a..ce2988b2d3 100644 --- a/shared/test/unit_test/gen9/bxt/test_product_helper_bxt.cpp +++ b/shared/test/unit_test/gen9/bxt/test_product_helper_bxt.cpp @@ -24,12 +24,11 @@ using BxtProductHelper = ProductHelperTest; BXTTEST_F(BxtProductHelper, givenInvalidSystemInfoWhenSettingHardwareInfoThenExpectThrow) { - auto &compilerProductHelper = executionEnvironment->rootDeviceEnvironments[0]->getHelper(); GT_SYSTEM_INFO >SystemInfo = pInHwInfo.gtSystemInfo; uint64_t config = 0xdeadbeef; gtSystemInfo = {0}; - EXPECT_ANY_THROW(hardwareInfoSetup[productFamily](&pInHwInfo, false, config, compilerProductHelper)); + EXPECT_ANY_THROW(hardwareInfoSetup[productFamily](&pInHwInfo, false, config, nullptr)); EXPECT_EQ(0u, gtSystemInfo.SliceCount); EXPECT_EQ(0u, gtSystemInfo.SubSliceCount); EXPECT_EQ(0u, gtSystemInfo.DualSubSliceCount); @@ -46,7 +45,6 @@ BXTTEST_F(BxtProductHelper, givenBoolWhenCallBxtHardwareInfoSetupThenFeatureTabl 0x100030006}; bool boolValue[]{ true, false}; - auto &compilerProductHelper = executionEnvironment->rootDeviceEnvironments[0]->getHelper(); HardwareInfo hwInfo = *defaultHwInfo; GT_SYSTEM_INFO >SystemInfo = hwInfo.gtSystemInfo; FeatureTable &featureTable = hwInfo.featureTable; @@ -60,7 +58,7 @@ BXTTEST_F(BxtProductHelper, givenBoolWhenCallBxtHardwareInfoSetupThenFeatureTabl featureTable = {}; workaroundTable = {}; platform.usRevId = 9; - hardwareInfoSetup[productFamily](&hwInfo, setParamBool, config, compilerProductHelper); + hardwareInfoSetup[productFamily](&hwInfo, setParamBool, config, nullptr); EXPECT_EQ(setParamBool, featureTable.flags.ftrGpGpuMidBatchPreempt); EXPECT_EQ(setParamBool, featureTable.flags.ftrGpGpuThreadGroupLevelPreempt); diff --git a/shared/test/unit_test/gen9/cfl/test_product_helper_cfl.cpp b/shared/test/unit_test/gen9/cfl/test_product_helper_cfl.cpp index 208f64a8ec..c8ee652e7b 100644 --- a/shared/test/unit_test/gen9/cfl/test_product_helper_cfl.cpp +++ b/shared/test/unit_test/gen9/cfl/test_product_helper_cfl.cpp @@ -25,12 +25,11 @@ using CflProductHelper = ProductHelperTest; CFLTEST_F(CflProductHelper, GivenIncorrectDataWhenConfiguringHwInfoThenErrorIsReturned) { - auto &compilerProductHelper = executionEnvironment->rootDeviceEnvironments[0]->getHelper(); GT_SYSTEM_INFO >SystemInfo = pInHwInfo.gtSystemInfo; uint64_t config = 0xdeadbeef; gtSystemInfo = {0}; - EXPECT_ANY_THROW(hardwareInfoSetup[productFamily](&pInHwInfo, false, config, compilerProductHelper)); + EXPECT_ANY_THROW(hardwareInfoSetup[productFamily](&pInHwInfo, false, config, nullptr)); EXPECT_EQ(0u, gtSystemInfo.SliceCount); EXPECT_EQ(0u, gtSystemInfo.SubSliceCount); EXPECT_EQ(0u, gtSystemInfo.DualSubSliceCount); @@ -50,7 +49,6 @@ CFLTEST_F(CflProductHelper, givenBoolWhenCallCflHardwareInfoSetupThenFeatureTabl 0x100030006}; bool boolValue[]{ true, false}; - auto &compilerProductHelper = executionEnvironment->rootDeviceEnvironments[0]->getHelper(); HardwareInfo hwInfo = *defaultHwInfo; GT_SYSTEM_INFO >SystemInfo = hwInfo.gtSystemInfo; FeatureTable &featureTable = hwInfo.featureTable; @@ -62,7 +60,7 @@ CFLTEST_F(CflProductHelper, givenBoolWhenCallCflHardwareInfoSetupThenFeatureTabl gtSystemInfo = {0}; featureTable = {}; workaroundTable = {}; - hardwareInfoSetup[productFamily](&hwInfo, setParamBool, config, compilerProductHelper); + hardwareInfoSetup[productFamily](&hwInfo, setParamBool, config, nullptr); EXPECT_EQ(setParamBool, featureTable.flags.ftrGpGpuMidBatchPreempt); EXPECT_EQ(setParamBool, featureTable.flags.ftrGpGpuThreadGroupLevelPreempt); diff --git a/shared/test/unit_test/gen9/glk/test_product_helper_glk.cpp b/shared/test/unit_test/gen9/glk/test_product_helper_glk.cpp index 1bdc9ab8db..7276e4df8b 100644 --- a/shared/test/unit_test/gen9/glk/test_product_helper_glk.cpp +++ b/shared/test/unit_test/gen9/glk/test_product_helper_glk.cpp @@ -24,13 +24,12 @@ using GlkProductHelper = ProductHelperTest; GLKTEST_F(GlkProductHelper, GivenIncorrectDataWhenConfiguringHwInfoThenErrorIsReturned) { - auto &compilerProductHelper = executionEnvironment->rootDeviceEnvironments[0]->getHelper(); GT_SYSTEM_INFO >SystemInfo = pInHwInfo.gtSystemInfo; gtSystemInfo = {0}; uint64_t config = 0xdeadbeef; gtSystemInfo = {0}; - EXPECT_ANY_THROW(hardwareInfoSetup[productFamily](&pInHwInfo, false, config, compilerProductHelper)); + EXPECT_ANY_THROW(hardwareInfoSetup[productFamily](&pInHwInfo, false, config, nullptr)); EXPECT_EQ(0u, gtSystemInfo.SliceCount); EXPECT_EQ(0u, gtSystemInfo.SubSliceCount); EXPECT_EQ(0u, gtSystemInfo.DualSubSliceCount); @@ -48,7 +47,6 @@ GLKTEST_F(GlkProductHelper, givenBoolWhenCallGlkHardwareInfoSetupThenFeatureTabl bool boolValue[]{ true, false}; HardwareInfo hwInfo = *defaultHwInfo; - auto &compilerProductHelper = executionEnvironment->rootDeviceEnvironments[0]->getHelper(); GT_SYSTEM_INFO >SystemInfo = hwInfo.gtSystemInfo; FeatureTable &featureTable = hwInfo.featureTable; WorkaroundTable &workaroundTable = hwInfo.workaroundTable; @@ -59,7 +57,7 @@ GLKTEST_F(GlkProductHelper, givenBoolWhenCallGlkHardwareInfoSetupThenFeatureTabl gtSystemInfo = {0}; featureTable = {}; workaroundTable = {}; - hardwareInfoSetup[productFamily](&hwInfo, setParamBool, config, compilerProductHelper); + hardwareInfoSetup[productFamily](&hwInfo, setParamBool, config, nullptr); EXPECT_EQ(setParamBool, featureTable.flags.ftrGpGpuMidBatchPreempt); EXPECT_EQ(setParamBool, featureTable.flags.ftrGpGpuThreadGroupLevelPreempt); diff --git a/shared/test/unit_test/gen9/kbl/test_product_helper_kbl.cpp b/shared/test/unit_test/gen9/kbl/test_product_helper_kbl.cpp index 90934ea67f..04d4d3d0c4 100644 --- a/shared/test/unit_test/gen9/kbl/test_product_helper_kbl.cpp +++ b/shared/test/unit_test/gen9/kbl/test_product_helper_kbl.cpp @@ -23,12 +23,11 @@ using KblProductHelper = ProductHelperTest; KBLTEST_F(KblProductHelper, GivenIncorrectDataWhenConfiguringHwInfoThenErrorIsReturned) { - auto &compilerProductHelper = executionEnvironment->rootDeviceEnvironments[0]->getHelper(); GT_SYSTEM_INFO >SystemInfo = pInHwInfo.gtSystemInfo; uint64_t config = 0xdeadbeef; gtSystemInfo = {0}; - EXPECT_ANY_THROW(hardwareInfoSetup[productFamily](&pInHwInfo, false, config, compilerProductHelper)); + EXPECT_ANY_THROW(hardwareInfoSetup[productFamily](&pInHwInfo, false, config, nullptr)); EXPECT_EQ(0u, gtSystemInfo.SliceCount); EXPECT_EQ(0u, gtSystemInfo.SubSliceCount); EXPECT_EQ(0u, gtSystemInfo.DualSubSliceCount); @@ -48,7 +47,6 @@ KBLTEST_F(KblProductHelper, givenBoolWhenCallKblHardwareInfoSetupThenFeatureTabl 0x100030006}; bool boolValue[]{ true, false}; - auto &compilerProductHelper = executionEnvironment->rootDeviceEnvironments[0]->getHelper(); HardwareInfo hwInfo = *defaultHwInfo; GT_SYSTEM_INFO >SystemInfo = hwInfo.gtSystemInfo; FeatureTable &featureTable = hwInfo.featureTable; @@ -62,7 +60,7 @@ KBLTEST_F(KblProductHelper, givenBoolWhenCallKblHardwareInfoSetupThenFeatureTabl featureTable = {}; workaroundTable = {}; platform.usRevId = 9; - hardwareInfoSetup[productFamily](&hwInfo, setParamBool, config, compilerProductHelper); + hardwareInfoSetup[productFamily](&hwInfo, setParamBool, config, nullptr); EXPECT_EQ(setParamBool, featureTable.flags.ftrGpGpuMidBatchPreempt); EXPECT_EQ(setParamBool, featureTable.flags.ftrGpGpuThreadGroupLevelPreempt); @@ -88,7 +86,7 @@ KBLTEST_F(KblProductHelper, givenBoolWhenCallKblHardwareInfoSetupThenFeatureTabl platform.usRevId = 1; workaroundTable = {}; - hardwareInfoSetup[productFamily](&hwInfo, true, config, compilerProductHelper); + hardwareInfoSetup[productFamily](&hwInfo, true, config, nullptr); EXPECT_EQ(true, workaroundTable.flags.waDisableLSQCROPERFforOCL); EXPECT_EQ(true, workaroundTable.flags.waEncryptedEdramOnlyPartials); diff --git a/shared/test/unit_test/gen9/skl/linux/product_helper_tests_skl.cpp b/shared/test/unit_test/gen9/skl/linux/product_helper_tests_skl.cpp index d08ba6f84b..af2bcdbc1e 100644 --- a/shared/test/unit_test/gen9/skl/linux/product_helper_tests_skl.cpp +++ b/shared/test/unit_test/gen9/skl/linux/product_helper_tests_skl.cpp @@ -5,7 +5,6 @@ * */ -#include "shared/source/helpers/compiler_product_helper.h" #include "shared/test/common/helpers/gtest_helpers.h" #include "shared/test/common/test_macros/header/per_product_test_definitions.h" #include "shared/test/unit_test/os_interface/linux/product_helper_linux_tests.h" @@ -194,11 +193,10 @@ TYPED_TEST(SklHwInfoTests, WhenGtIsSetupThenGtSystemInfoIsCorrect) { TYPED_TEST(SklHwInfoTests, givenGTSystemInfoTypeWhenConfigureHardwareCustomThenSliceCountDontChange) { HardwareInfo hwInfo = *defaultHwInfo; - auto compilerProductHelper = CompilerProductHelper::create(hwInfo.platform.eProductFamily); auto osInterface = std::unique_ptr(new OSInterface()); GT_SYSTEM_INFO >SystemInfo = hwInfo.gtSystemInfo; - TypeParam::setupHardwareInfo(&hwInfo, false, *compilerProductHelper); + TypeParam::setupHardwareInfo(&hwInfo, false, nullptr); auto sliceCount = gtSystemInfo.SliceCount; auto productHelper = ProductHelper::create(PRODUCT_FAMILY::IGFX_SKYLAKE); diff --git a/shared/test/unit_test/gen9/skl/test_product_helper_skl.cpp b/shared/test/unit_test/gen9/skl/test_product_helper_skl.cpp index de26ca8c79..710697485e 100644 --- a/shared/test/unit_test/gen9/skl/test_product_helper_skl.cpp +++ b/shared/test/unit_test/gen9/skl/test_product_helper_skl.cpp @@ -23,12 +23,11 @@ using SklProductHelper = ProductHelperTest; SKLTEST_F(SklProductHelper, GivenIncorrectDataWhenConfiguringHwInfoThenErrorIsReturned) { - auto &compilerProductHelper = executionEnvironment->rootDeviceEnvironments[0]->getHelper(); GT_SYSTEM_INFO >SystemInfo = pInHwInfo.gtSystemInfo; gtSystemInfo = {0}; uint64_t config = 0xdeadbeef; - EXPECT_ANY_THROW(hardwareInfoSetup[productFamily](&pInHwInfo, false, config, compilerProductHelper)); + EXPECT_ANY_THROW(hardwareInfoSetup[productFamily](&pInHwInfo, false, config, nullptr)); EXPECT_EQ(0u, gtSystemInfo.SliceCount); EXPECT_EQ(0u, gtSystemInfo.SubSliceCount); EXPECT_EQ(0u, gtSystemInfo.DualSubSliceCount); @@ -50,7 +49,6 @@ SKLTEST_F(SklProductHelper, givenBoolWhenCallSklHardwareInfoSetupThenFeatureTabl true, false}; HardwareInfo hwInfo = *defaultHwInfo; - auto &compilerProductHelper = executionEnvironment->rootDeviceEnvironments[0]->getHelper(); GT_SYSTEM_INFO >SystemInfo = hwInfo.gtSystemInfo; FeatureTable &featureTable = hwInfo.featureTable; WorkaroundTable &workaroundTable = hwInfo.workaroundTable; @@ -63,7 +61,7 @@ SKLTEST_F(SklProductHelper, givenBoolWhenCallSklHardwareInfoSetupThenFeatureTabl featureTable = {}; workaroundTable = {}; pPlatform.usRevId = 9; - hardwareInfoSetup[productFamily](&hwInfo, setParamBool, config, compilerProductHelper); + hardwareInfoSetup[productFamily](&hwInfo, setParamBool, config, nullptr); EXPECT_EQ(setParamBool, featureTable.flags.ftrGpGpuMidBatchPreempt); EXPECT_EQ(setParamBool, featureTable.flags.ftrGpGpuThreadGroupLevelPreempt); @@ -96,7 +94,7 @@ SKLTEST_F(SklProductHelper, givenBoolWhenCallSklHardwareInfoSetupThenFeatureTabl workaroundTable = {}; featureTable = {}; - hardwareInfoSetup[productFamily](&hwInfo, true, config, compilerProductHelper); + hardwareInfoSetup[productFamily](&hwInfo, true, config, nullptr); EXPECT_EQ(true, workaroundTable.flags.waCompressedResourceRequiresConstVA21); EXPECT_EQ(true, workaroundTable.flags.waDisablePerCtxtPreemptionGranularityControl); diff --git a/shared/test/unit_test/os_interface/linux/drm_system_info_tests.cpp b/shared/test/unit_test/os_interface/linux/drm_system_info_tests.cpp index 4a94f85180..1a6dd34820 100644 --- a/shared/test/unit_test/os_interface/linux/drm_system_info_tests.cpp +++ b/shared/test/unit_test/os_interface/linux/drm_system_info_tests.cpp @@ -73,7 +73,7 @@ TEST(DrmSystemInfoTest, givenSetupHardwareInfoWhenQuerySystemInfoFalseThenSystem drm.ioctlHelper = std::make_unique(drm); HardwareInfo hwInfo = *defaultHwInfo; - auto setupHardwareInfo = [](HardwareInfo *, bool, const CompilerProductHelper &) {}; + auto setupHardwareInfo = [](HardwareInfo *, bool, const ReleaseHelper *) {}; DeviceDescriptor device = {0, &hwInfo, setupHardwareInfo}; ::testing::internal::CaptureStdout(); @@ -112,7 +112,7 @@ TEST(DrmSystemInfoTest, whenSetupHardwareInfoThenReleaseHelperContainsCorrectIpV DrmMockToQuerySystemInfo drm(*executionEnvironment->rootDeviceEnvironments[0]); drm.ioctlHelper = std::make_unique(drm); HardwareInfo hwInfo = *defaultHwInfo; - auto setupHardwareInfo = [](HardwareInfo *, bool, const CompilerProductHelper &) {}; + auto setupHardwareInfo = [](HardwareInfo *, bool, const ReleaseHelper *) {}; DeviceDescriptor device = {0, &hwInfo, setupHardwareInfo}; int ret = drm.setupHardwareInfo(&device, false); @@ -186,7 +186,7 @@ TEST(DrmSystemInfoTest, givenSetupHardwareInfoWhenQuerySystemInfoFailsThenSystem drm.ioctlHelper = std::make_unique(drm); HardwareInfo hwInfo = *defaultHwInfo; - auto setupHardwareInfo = [](HardwareInfo *, bool, const CompilerProductHelper &) {}; + auto setupHardwareInfo = [](HardwareInfo *, bool, const ReleaseHelper *) {}; DeviceDescriptor device = {0, &hwInfo, setupHardwareInfo}; ::testing::internal::CaptureStdout(); @@ -218,7 +218,7 @@ TEST(DrmSystemInfoTest, givenSetupHardwareInfoWhenQuerySystemInfoSucceedsThenSys HardwareInfo hwInfo = *defaultHwInfo; - auto setupHardwareInfo = [](HardwareInfo *, bool, const CompilerProductHelper &) {}; + auto setupHardwareInfo = [](HardwareInfo *, bool, const ReleaseHelper *) {}; DeviceDescriptor device = {0, &hwInfo, setupHardwareInfo}; int ret = drm.setupHardwareInfo(&device, false); @@ -258,7 +258,7 @@ TEST(DrmSystemInfoTest, givenSetupHardwareInfoWhenQuerySystemInfoSucceedsThenSys auto expectedMaxSubslicesSupported = dummyDeviceBlobData[5]; auto expectedMaxEusPerSubsliceSupported = dummyDeviceBlobData[8]; - auto setupHardwareInfo = [](HardwareInfo *, bool, const CompilerProductHelper &) {}; + auto setupHardwareInfo = [](HardwareInfo *, bool, const ReleaseHelper *) {}; DeviceDescriptor device = {0, &hwInfo, setupHardwareInfo}; int ret = drm.setupHardwareInfo(&device, false); @@ -285,7 +285,7 @@ TEST(DrmSystemInfoTest, givenZeroBankCountWhenCreatingSystemInfoThenUseDualSubsl HardwareInfo hwInfo = *defaultHwInfo; hwInfo.gtSystemInfo.L3BankCount = 0; - auto setupHardwareInfo = [](HardwareInfo *, bool, const CompilerProductHelper &) {}; + auto setupHardwareInfo = [](HardwareInfo *, bool, const ReleaseHelper *) {}; DeviceDescriptor device = {0, &hwInfo, setupHardwareInfo}; int ret = drm.setupHardwareInfo(&device, false); @@ -310,7 +310,7 @@ TEST(DrmSystemInfoTest, givenNonZeroBankCountWhenCreatingSystemInfoThenUseDualSu HardwareInfo hwInfo = *defaultHwInfo; hwInfo.gtSystemInfo.L3BankCount = 5; - auto setupHardwareInfo = [](HardwareInfo *, bool, const CompilerProductHelper &) {}; + auto setupHardwareInfo = [](HardwareInfo *, bool, const ReleaseHelper *) {}; DeviceDescriptor device = {0, &hwInfo, setupHardwareInfo}; int ret = drm.setupHardwareInfo(&device, false); diff --git a/shared/test/unit_test/os_interface/linux/drm_tests.cpp b/shared/test/unit_test/os_interface/linux/drm_tests.cpp index 9188278d9d..d57ea74ea9 100644 --- a/shared/test/unit_test/os_interface/linux/drm_tests.cpp +++ b/shared/test/unit_test/os_interface/linux/drm_tests.cpp @@ -994,7 +994,7 @@ TEST(DrmQueryTest, GivenDrmWhenSetupHardwareInfoCalledThenCorrectMaxValuesInGtSy drm.storedSSVal = 6; hwInfo->gtSystemInfo.SliceCount = 2; - auto setupHardwareInfo = [](HardwareInfo *, bool, const CompilerProductHelper &) {}; + auto setupHardwareInfo = [](HardwareInfo *, bool, const ReleaseHelper *) {}; DeviceDescriptor device = {0, hwInfo, setupHardwareInfo}; drm.ioctlHelper.reset(); diff --git a/shared/test/unit_test/release_helper/release_helper_12_55_tests.cpp b/shared/test/unit_test/release_helper/release_helper_12_55_tests.cpp index 4527072014..cbb320badb 100644 --- a/shared/test/unit_test/release_helper/release_helper_12_55_tests.cpp +++ b/shared/test/unit_test/release_helper/release_helper_12_55_tests.cpp @@ -36,6 +36,7 @@ TEST_F(ReleaseHelper1255Tests, whenGettingCapabilitiesThenCorrectPropertiesAreRe EXPECT_FALSE(releaseHelper->isAuxSurfaceModeOverrideRequired()); EXPECT_TRUE(releaseHelper->isRcsExposureDisabled()); EXPECT_TRUE(releaseHelper->isBindlessAddressingDisabled()); + EXPECT_EQ(8u, releaseHelper->getNumThreadsPerEu()); } } diff --git a/shared/test/unit_test/release_helper/release_helper_12_56_tests.cpp b/shared/test/unit_test/release_helper/release_helper_12_56_tests.cpp index 57927c3f4b..c557aa94b2 100644 --- a/shared/test/unit_test/release_helper/release_helper_12_56_tests.cpp +++ b/shared/test/unit_test/release_helper/release_helper_12_56_tests.cpp @@ -36,6 +36,7 @@ TEST_F(ReleaseHelper1256Tests, whenGettingCapabilitiesThenCorrectPropertiesAreRe EXPECT_FALSE(releaseHelper->isAuxSurfaceModeOverrideRequired()); EXPECT_TRUE(releaseHelper->isRcsExposureDisabled()); EXPECT_TRUE(releaseHelper->isBindlessAddressingDisabled()); + EXPECT_EQ(8u, releaseHelper->getNumThreadsPerEu()); } } diff --git a/shared/test/unit_test/release_helper/release_helper_12_57_tests.cpp b/shared/test/unit_test/release_helper/release_helper_12_57_tests.cpp index 185477406a..8047fb1e79 100644 --- a/shared/test/unit_test/release_helper/release_helper_12_57_tests.cpp +++ b/shared/test/unit_test/release_helper/release_helper_12_57_tests.cpp @@ -36,6 +36,7 @@ TEST_F(ReleaseHelper1257Tests, whenGettingCapabilitiesThenCorrectPropertiesAreRe EXPECT_FALSE(releaseHelper->isAuxSurfaceModeOverrideRequired()); EXPECT_TRUE(releaseHelper->isRcsExposureDisabled()); EXPECT_TRUE(releaseHelper->isBindlessAddressingDisabled()); + EXPECT_EQ(8u, releaseHelper->getNumThreadsPerEu()); } } diff --git a/shared/test/unit_test/release_helper/release_helper_12_60_tests.cpp b/shared/test/unit_test/release_helper/release_helper_12_60_tests.cpp index c774edc495..4cdee94ea5 100644 --- a/shared/test/unit_test/release_helper/release_helper_12_60_tests.cpp +++ b/shared/test/unit_test/release_helper/release_helper_12_60_tests.cpp @@ -34,5 +34,6 @@ TEST_F(ReleaseHelper1260Tests, whenGettingCapabilitiesThenCorrectPropertiesAreRe EXPECT_TRUE(releaseHelper->isCachingOnCpuAvailable()); EXPECT_TRUE(releaseHelper->isRcsExposureDisabled()); EXPECT_TRUE(releaseHelper->isBindlessAddressingDisabled()); + EXPECT_EQ(8u, releaseHelper->getNumThreadsPerEu()); } } diff --git a/shared/test/unit_test/release_helper/release_helper_12_70_tests.cpp b/shared/test/unit_test/release_helper/release_helper_12_70_tests.cpp index ac902e1be4..98607a750f 100644 --- a/shared/test/unit_test/release_helper/release_helper_12_70_tests.cpp +++ b/shared/test/unit_test/release_helper/release_helper_12_70_tests.cpp @@ -37,6 +37,7 @@ TEST_F(ReleaseHelper1270Tests, whenGettingCapabilitiesThenCorrectPropertiesAreRe EXPECT_TRUE(releaseHelper->isAuxSurfaceModeOverrideRequired()); EXPECT_FALSE(releaseHelper->isRcsExposureDisabled()); EXPECT_TRUE(releaseHelper->isBindlessAddressingDisabled()); + EXPECT_EQ(8u, releaseHelper->getNumThreadsPerEu()); } } diff --git a/shared/test/unit_test/release_helper/release_helper_12_71_tests.cpp b/shared/test/unit_test/release_helper/release_helper_12_71_tests.cpp index 7123839301..825eaa2bd3 100644 --- a/shared/test/unit_test/release_helper/release_helper_12_71_tests.cpp +++ b/shared/test/unit_test/release_helper/release_helper_12_71_tests.cpp @@ -37,6 +37,7 @@ TEST_F(ReleaseHelper1271Tests, whenGettingCapabilitiesThenCorrectPropertiesAreRe EXPECT_TRUE(releaseHelper->isAuxSurfaceModeOverrideRequired()); EXPECT_FALSE(releaseHelper->isRcsExposureDisabled()); EXPECT_TRUE(releaseHelper->isBindlessAddressingDisabled()); + EXPECT_EQ(8u, releaseHelper->getNumThreadsPerEu()); } } diff --git a/shared/test/unit_test/xe_hpc_core/pvc/hw_info_tests_pvc.cpp b/shared/test/unit_test/xe_hpc_core/pvc/hw_info_tests_pvc.cpp index 49bf303627..2873f4c233 100644 --- a/shared/test/unit_test/xe_hpc_core/pvc/hw_info_tests_pvc.cpp +++ b/shared/test/unit_test/xe_hpc_core/pvc/hw_info_tests_pvc.cpp @@ -8,6 +8,7 @@ #include "shared/source/helpers/compiler_product_helper.h" #include "shared/source/helpers/constants.h" #include "shared/source/helpers/hw_info.h" +#include "shared/source/release_helper/release_helper.h" #include "shared/source/unified_memory/usm_memory_support.h" #include "shared/source/xe_hpc_core/hw_cmds_pvc.h" #include "shared/source/xe_hpc_core/pvc/device_ids_configs_pvc.h" @@ -62,8 +63,9 @@ PVCTEST_F(PvcConfigHwInfoTests, givenPvcDeviceIdsAndRevisionsWhenCheckingConfigs PVCTEST_F(PvcConfigHwInfoTests, givenPvcConfigWhenSetupHardwareInfoBaseThenGtSystemInfoIsCorrect) { HardwareInfo hwInfo = *defaultHwInfo; auto compilerProductHelper = CompilerProductHelper::create(hwInfo.platform.eProductFamily); + auto releaseHelper = ReleaseHelper::create(hwInfo.ipVersion); GT_SYSTEM_INFO >SystemInfo = hwInfo.gtSystemInfo; - PVC::setupHardwareInfoBase(&hwInfo, false, *compilerProductHelper); + PVC::setupHardwareInfoBase(&hwInfo, false, releaseHelper.get()); EXPECT_EQ(128u, gtSystemInfo.MaxFillRate); EXPECT_EQ(336u, gtSystemInfo.TotalVsThreads); @@ -96,8 +98,9 @@ PVCTEST_F(PvcConfigHwInfoTests, givenPvcConfigWhenSetupMultiTileInfoBaseThenGtSy PVCTEST_F(PvcConfigHwInfoTests, givenPvcHwConfigWhenSetupHardwareInfoThenSharedSystemMemCapabilitiesIsCorrect) { HardwareInfo hwInfo = *defaultHwInfo; auto compilerProductHelper = CompilerProductHelper::create(hwInfo.platform.eProductFamily); + auto releaseHelper = ReleaseHelper::create(hwInfo.ipVersion); auto &capabilityTable = hwInfo.capabilityTable; - PvcHwConfig::setupHardwareInfo(&hwInfo, false, *compilerProductHelper); + PvcHwConfig::setupHardwareInfo(&hwInfo, false, releaseHelper.get()); uint64_t expectedSharedSystemMemCapabilities = (UNIFIED_SHARED_MEMORY_ACCESS | UNIFIED_SHARED_MEMORY_CONCURRENT_ACCESS | UNIFIED_SHARED_MEMORY_CONCURRENT_ATOMIC_ACCESS); EXPECT_EQ(expectedSharedSystemMemCapabilities, capabilityTable.sharedSystemMemCapabilities); } 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 50a2c6f650..00243d3e71 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 @@ -154,9 +154,8 @@ DG2TEST_F(ProductHelperTestDg2, whenGettingAubstreamProductFamilyThenProperEnumV DG2TEST_F(ProductHelperTestDg2, givenDg2ConfigWhenSetupHardwareInfoBaseThenGtSystemInfoIsCorrect) { HardwareInfo hwInfo = *defaultHwInfo; - auto compilerProductHelper = CompilerProductHelper::create(hwInfo.platform.eProductFamily); GT_SYSTEM_INFO >SystemInfo = hwInfo.gtSystemInfo; - Dg2HwConfig::setupHardwareInfoBase(&hwInfo, false, *compilerProductHelper); + Dg2HwConfig::setupHardwareInfoBase(&hwInfo, false, releaseHelper); EXPECT_EQ(336u, gtSystemInfo.TotalVsThreads); EXPECT_EQ(336u, gtSystemInfo.TotalHsThreads); @@ -170,10 +169,9 @@ DG2TEST_F(ProductHelperTestDg2, givenDg2ConfigWhenSetupHardwareInfoBaseThenGtSys DG2TEST_F(ProductHelperTestDg2, givenDg2ConfigWhenSetupHardwareInfoThenGtSystemInfoIsCorrect) { HardwareInfo hwInfo = *defaultHwInfo; - auto compilerProductHelper = CompilerProductHelper::create(hwInfo.platform.eProductFamily); GT_SYSTEM_INFO >SystemInfo = hwInfo.gtSystemInfo; - Dg2HwConfig::setupHardwareInfo(&hwInfo, false, *compilerProductHelper); + Dg2HwConfig::setupHardwareInfo(&hwInfo, false, releaseHelper); EXPECT_EQ(8u, gtSystemInfo.CsrSizeInMb); EXPECT_FALSE(gtSystemInfo.IsL3HashModeEnabled); } diff --git a/shared/test/unit_test/xe_hpg_core/os_agnostic_product_helper_xe_lpg_tests.cpp b/shared/test/unit_test/xe_hpg_core/os_agnostic_product_helper_xe_lpg_tests.cpp index 035462204c..3a39690645 100644 --- a/shared/test/unit_test/xe_hpg_core/os_agnostic_product_helper_xe_lpg_tests.cpp +++ b/shared/test/unit_test/xe_hpg_core/os_agnostic_product_helper_xe_lpg_tests.cpp @@ -39,8 +39,9 @@ using XeLpgHwInfoTests = ::testing::Test; HWTEST2_F(XeLpgHwInfoTests, whenSetupHardwareInfoBaseThenGtSystemInfoIsCorrect, IsXeLpg) { HardwareInfo hwInfo = *defaultHwInfo; auto compilerProductHelper = CompilerProductHelper::create(hwInfo.platform.eProductFamily); + auto releaseHelper = ReleaseHelper::create(hwInfo.ipVersion); GT_SYSTEM_INFO >SystemInfo = hwInfo.gtSystemInfo; - hardwareInfoSetup[hwInfo.platform.eProductFamily](&hwInfo, compilerProductHelper->getHwInfoConfig(hwInfo), false, *compilerProductHelper); + hardwareInfoSetup[hwInfo.platform.eProductFamily](&hwInfo, compilerProductHelper->getHwInfoConfig(hwInfo), false, releaseHelper.get()); EXPECT_EQ(336u, gtSystemInfo.TotalVsThreads); EXPECT_EQ(336u, gtSystemInfo.TotalHsThreads); @@ -80,9 +81,10 @@ HWTEST2_F(XeLpgHwInfoTests, whenCheckDirectSubmissionEnginesThenProperValuesAreS HWTEST2_F(XeLpgHwInfoTests, WhenSetupHardwareInfoThenCorrectValuesOfCCSAndMultiTileInfoAreSet, IsXeLpg) { HardwareInfo hwInfo = *defaultHwInfo; auto compilerProductHelper = CompilerProductHelper::create(hwInfo.platform.eProductFamily); + auto releaseHelper = ReleaseHelper::create(hwInfo.ipVersion); GT_SYSTEM_INFO >SystemInfo = hwInfo.gtSystemInfo; - hardwareInfoSetup[hwInfo.platform.eProductFamily](&hwInfo, compilerProductHelper->getHwInfoConfig(hwInfo), false, *compilerProductHelper); + hardwareInfoSetup[hwInfo.platform.eProductFamily](&hwInfo, compilerProductHelper->getHwInfoConfig(hwInfo), false, releaseHelper.get()); EXPECT_FALSE(gtSystemInfo.MultiTileArchInfo.IsValid); @@ -94,6 +96,7 @@ HWTEST2_F(XeLpgHwInfoTests, WhenSetupHardwareInfoThenCorrectValuesOfCCSAndMultiT HWTEST2_F(XeLpgHwInfoTests, givenBoolWhenCallHardwareInfoSetupThenFeatureTableAndWorkaroundTableAreSetCorrect, IsXeLpg) { HardwareInfo hwInfo = *defaultHwInfo; auto compilerProductHelper = CompilerProductHelper::create(hwInfo.platform.eProductFamily); + auto releaseHelper = ReleaseHelper::create(hwInfo.ipVersion); GT_SYSTEM_INFO >SystemInfo = hwInfo.gtSystemInfo; FeatureTable &featureTable = hwInfo.featureTable; WorkaroundTable &workaroundTable = hwInfo.workaroundTable; @@ -103,7 +106,7 @@ HWTEST2_F(XeLpgHwInfoTests, givenBoolWhenCallHardwareInfoSetupThenFeatureTableAn gtSystemInfo = {0}; featureTable = {}; workaroundTable = {}; - hardwareInfoSetup[productFamily](&hwInfo, setParamBool, compilerProductHelper->getHwInfoConfig(hwInfo), *compilerProductHelper); + hardwareInfoSetup[productFamily](&hwInfo, setParamBool, compilerProductHelper->getHwInfoConfig(hwInfo), releaseHelper.get()); EXPECT_EQ(setParamBool, featureTable.flags.ftrL3IACoherency); EXPECT_EQ(setParamBool, featureTable.flags.ftrPPGTT); @@ -135,13 +138,13 @@ HWTEST2_F(XeLpgHwInfoTests, givenBoolWhenCallHardwareInfoSetupThenFeatureTableAn HWTEST2_F(XeLpgHwInfoTests, whenUsingCorrectConfigValueThenCorrectHwInfoIsReturned, IsXeLpg) { HardwareInfo hwInfo = *defaultHwInfo; - auto compilerProductHelper = CompilerProductHelper::create(hwInfo.platform.eProductFamily); + auto releaseHelper = ReleaseHelper::create(hwInfo.ipVersion); GT_SYSTEM_INFO >SystemInfo = hwInfo.gtSystemInfo; uint64_t config = 0x200040010; gtSystemInfo = {0}; setHwInfoValuesFromConfig(config, hwInfo); - hardwareInfoSetup[productFamily](&hwInfo, false, config, *compilerProductHelper); + hardwareInfoSetup[productFamily](&hwInfo, false, config, releaseHelper.get()); EXPECT_EQ(2u, gtSystemInfo.SliceCount); EXPECT_EQ(8u, gtSystemInfo.DualSubSliceCount); } @@ -149,10 +152,11 @@ HWTEST2_F(XeLpgHwInfoTests, whenUsingCorrectConfigValueThenCorrectHwInfoIsReturn HWTEST2_F(XeLpgHwInfoTests, GivenEmptyHwInfoForUnitTestsWhenSetupHardwareInfoIsCalledThenNonZeroValuesAreSet, IsXeLpg) { HardwareInfo hwInfoToSet = *defaultHwInfo; auto compilerProductHelper = CompilerProductHelper::create(hwInfoToSet.platform.eProductFamily); + auto releaseHelper = ReleaseHelper::create(hwInfoToSet.ipVersion); GT_SYSTEM_INFO >SystemInfo = hwInfoToSet.gtSystemInfo; gtSystemInfo = {}; - hardwareInfoSetup[productFamily](&hwInfoToSet, false, compilerProductHelper->getHwInfoConfig(hwInfoToSet), *compilerProductHelper); + hardwareInfoSetup[productFamily](&hwInfoToSet, false, compilerProductHelper->getHwInfoConfig(hwInfoToSet), releaseHelper.get()); EXPECT_GT_VAL(gtSystemInfo.SliceCount, 0u); EXPECT_GT_VAL(gtSystemInfo.SubSliceCount, 0u);