From bd32b21f7cb6c7476858b3935c5146ea89916e21 Mon Sep 17 00:00:00 2001 From: Mateusz Jablonski Date: Tue, 28 Feb 2023 13:26:21 +0000 Subject: [PATCH] refactor: add method to get hw config from CompilerProductHelper Related-To: NEO-7622 Signed-off-by: Mateusz Jablonski --- level_zero/core/test/unit_tests/main.cpp | 24 +---------- .../sync_buffer_handler_tests.cpp | 3 +- opencl/test/unit_test/main.cpp | 24 +---------- shared/offline_compiler/source/CMakeLists.txt | 1 + .../source/ocloc_arg_helper.cpp | 4 +- .../source/offline_compiler.cpp | 4 +- .../source/offline_linker.cpp | 5 ++- .../enable_compiler_product_helper_ehl.cpp | 4 ++ .../enable_compiler_product_helper_icllp.cpp | 4 ++ .../enable_compiler_product_helper_lkf.cpp | 4 ++ shared/source/gen11/hw_cmds_ehl.h | 1 - shared/source/gen11/hw_cmds_icllp.h | 1 - shared/source/gen11/hw_cmds_lkf.h | 1 - shared/source/gen11/hw_info_ehl.cpp | 1 - shared/source/gen11/hw_info_icllp.cpp | 1 - shared/source/gen11/hw_info_lkf.cpp | 1 - .../gen12lp/compiler_product_helper_rkl.inl | 4 ++ .../compiler_product_helper_adln.inl | 13 ++++++ .../compiler_product_helper_adlp.inl | 13 ++++++ .../definitions/hw_info_setup_adln.inl | 3 +- .../definitions/hw_info_setup_adlp.inl | 3 +- .../enable_compiler_product_helper_adln.cpp | 1 + .../enable_compiler_product_helper_adlp.cpp | 1 + .../enable_compiler_product_helper_adls.cpp | 4 ++ .../enable_compiler_product_helper_dg1.cpp | 4 ++ .../enable_compiler_product_helper_tgllp.cpp | 4 ++ shared/source/gen12lp/hw_cmds_adln.h | 1 - shared/source/gen12lp/hw_cmds_adlp.h | 1 - shared/source/gen12lp/hw_cmds_adls.h | 1 - shared/source/gen12lp/hw_cmds_dg1.h | 1 - shared/source/gen12lp/hw_cmds_rkl.h | 1 - shared/source/gen12lp/hw_cmds_tgllp.h | 1 - shared/source/gen12lp/hw_info_adls.cpp | 1 - shared/source/gen12lp/hw_info_dg1.cpp | 1 - shared/source/gen12lp/hw_info_rkl.cpp | 1 - shared/source/gen12lp/hw_info_tgllp.cpp | 1 - .../gen8/compiler_product_helper_bdw.inl | 5 +++ shared/source/gen8/hw_cmds_bdw.h | 1 - shared/source/gen8/hw_info_bdw.cpp | 1 - .../enable_compiler_product_helper_bxt.cpp | 5 +++ .../enable_compiler_product_helper_cfl.cpp | 4 ++ .../enable_compiler_product_helper_glk.cpp | 5 +++ .../enable_compiler_product_helper_kbl.cpp | 5 +++ .../enable_compiler_product_helper_skl.cpp | 5 +++ shared/source/gen9/hw_cmds_bxt.h | 1 - shared/source/gen9/hw_cmds_cfl.h | 1 - shared/source/gen9/hw_cmds_glk.h | 1 - shared/source/gen9/hw_cmds_kbl.h | 1 - shared/source/gen9/hw_cmds_skl.h | 1 - shared/source/gen9/hw_info_bxt.cpp | 1 - shared/source/gen9/hw_info_cfl.cpp | 1 - shared/source/gen9/hw_info_glk.cpp | 1 - shared/source/gen9/hw_info_kbl.cpp | 1 - shared/source/gen9/hw_info_skl.cpp | 1 - .../source/helpers/compiler_product_helper.h | 2 + shared/source/helpers/enable_product.inl | 1 - shared/source/helpers/hw_info.cpp | 5 --- shared/source/helpers/hw_info.h | 1 - shared/source/os_interface/device_factory.cpp | 21 ++++----- shared/source/xe_hp_core/hw_cmds_xe_hp_sdv.h | 1 - .../compiler_product_helper_pvc.inl | 13 ++++++ .../definitions/hw_info_setup_pvc.inl | 5 +-- .../enable_compiler_product_helper_pvc.cpp | 1 + shared/source/xe_hpc_core/hw_cmds_pvc.h | 1 - .../compiler_product_helper_dg2.inl | 13 ++++++ .../compiler_product_helper_mtl.inl | 13 ++++++ .../definitions/hw_info_setup_dg2.inl | 5 +-- .../definitions/hw_info_setup_mtl.inl | 1 - .../enable_compiler_product_helper_dg2.cpp | 2 +- .../enable_compiler_product_helper_mtl.cpp | 1 + shared/source/xe_hpg_core/hw_cmds_dg2.h | 1 - shared/source/xe_hpg_core/hw_cmds_mtl.h | 1 - shared/test/common/CMakeLists.txt | 8 +++- shared/test/common/tests_configuration.cpp | 43 +++++++++++++++++++ shared/test/common/tests_configuration.h | 7 ++- shared/test/unit_test/main.cpp | 25 +---------- 76 files changed, 213 insertions(+), 142 deletions(-) create mode 100644 shared/source/gen12lp/definitions/compiler_product_helper_adln.inl create mode 100644 shared/source/gen12lp/definitions/compiler_product_helper_adlp.inl create mode 100644 shared/source/xe_hpc_core/definitions/compiler_product_helper_pvc.inl create mode 100644 shared/source/xe_hpg_core/definitions/compiler_product_helper_dg2.inl create mode 100644 shared/source/xe_hpg_core/definitions/compiler_product_helper_mtl.inl create mode 100644 shared/test/common/tests_configuration.cpp diff --git a/level_zero/core/test/unit_tests/main.cpp b/level_zero/core/test/unit_tests/main.cpp index e9afbd7266..107984cbc1 100644 --- a/level_zero/core/test/unit_tests/main.cpp +++ b/level_zero/core/test/unit_tests/main.cpp @@ -164,7 +164,6 @@ bool checkAubTestsExecutionPathValidity() { int main(int argc, char **argv) { bool useDefaultListener = false; bool enableAlarm = true; - bool setupFeatureTableAndWorkaroundTable = testMode == TestMode::AubTests ? true : false; bool showTestStats = false; bool dumpTestStats = false; std::string dumpTestStatsFileName = ""; @@ -278,29 +277,8 @@ int main(int argc, char **argv) { } else { revId = platform.usRevId; } - uint64_t hwInfoConfig = defaultHardwareInfoConfigTable[productFamily]; - setHwInfoValuesFromConfig(hwInfoConfig, hwInfoForTests); - auto productHelper = ProductHelper::create(hwInfoForTests.platform.eProductFamily); - uint32_t threadsPerEu = productHelper->threadsPerEu; - - // set Gt and FeatureTable to initial state - hardwareInfoSetup[productFamily](&hwInfoForTests, setupFeatureTableAndWorkaroundTable, hwInfoConfig); - GT_SYSTEM_INFO >SystemInfo = hwInfoForTests.gtSystemInfo; - - // and adjust dynamic values if not specified - sliceCount = sliceCount > 0 ? sliceCount : gtSystemInfo.SliceCount; - subSlicePerSliceCount = subSlicePerSliceCount > 0 ? subSlicePerSliceCount : (gtSystemInfo.SubSliceCount / sliceCount); - euPerSubSlice = euPerSubSlice > 0 ? euPerSubSlice : gtSystemInfo.MaxEuPerSubSlice; - // clang-format off - gtSystemInfo.SliceCount = sliceCount; - gtSystemInfo.SubSliceCount = gtSystemInfo.SliceCount * subSlicePerSliceCount; - gtSystemInfo.EUCount = gtSystemInfo.SubSliceCount * euPerSubSlice - dieRecovery; - gtSystemInfo.ThreadCount = gtSystemInfo.EUCount * threadsPerEu; - gtSystemInfo.MaxEuPerSubSlice = std::max(gtSystemInfo.MaxEuPerSubSlice, euPerSubSlice); - gtSystemInfo.MaxSlicesSupported = std::max(gtSystemInfo.MaxSlicesSupported, gtSystemInfo.SliceCount); - gtSystemInfo.MaxSubSlicesSupported = std::max(gtSystemInfo.MaxSubSlicesSupported, gtSystemInfo.SubSliceCount); - // clang-format on + adjustHwInfoForTests(hwInfoForTests, euPerSubSlice, sliceCount, subSlicePerSliceCount, dieRecovery); // Platforms with uninitialized factory are not supported if (L0::commandListFactory[productFamily] == nullptr) { 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 b65789f848..62f59178c8 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 @@ -33,8 +33,7 @@ class SyncBufferEnqueueHandlerTest : public EnqueueHandlerTest { void SetUp() override { hardwareInfo = *defaultHwInfo; hardwareInfo.capabilityTable.blitterOperationsSupported = true; - uint64_t productHelper = defaultHardwareInfoConfigTable[productFamily]; - hardwareInfoSetup[productFamily](&hardwareInfo, true, productHelper); + hardwareInfoSetup[productFamily](&hardwareInfo, true, 0); setUpImpl(&hardwareInfo); } diff --git a/opencl/test/unit_test/main.cpp b/opencl/test/unit_test/main.cpp index 6f92b6875b..4085385708 100644 --- a/opencl/test/unit_test/main.cpp +++ b/opencl/test/unit_test/main.cpp @@ -140,7 +140,6 @@ int main(int argc, char **argv) { bool enableAbrt = true; bool enableAlarm = true; bool enableSegv = true; - bool setupFeatureTableAndWorkaroundTable = testMode == TestMode::AubTests ? true : false; bool showTestStats = false; bool dumpTestStats = false; std::string dumpTestStatsFileName = ""; @@ -276,29 +275,8 @@ int main(int argc, char **argv) { } else { revId = platform.usRevId; } - uint64_t hwInfoConfig = defaultHardwareInfoConfigTable[productFamily]; - setHwInfoValuesFromConfig(hwInfoConfig, hwInfoForTests); - auto productHelper = ProductHelper::create(hwInfoForTests.platform.eProductFamily); - uint32_t threadsPerEu = productHelper->threadsPerEu; - - // set Gt and FeatureTable to initial state - hardwareInfoSetup[productFamily](&hwInfoForTests, setupFeatureTableAndWorkaroundTable, hwInfoConfig); - GT_SYSTEM_INFO >SystemInfo = hwInfoForTests.gtSystemInfo; - - // and adjust dynamic values if not specified - sliceCount = sliceCount > 0 ? sliceCount : gtSystemInfo.SliceCount; - subSlicePerSliceCount = subSlicePerSliceCount > 0 ? subSlicePerSliceCount : (gtSystemInfo.SubSliceCount / sliceCount); - euPerSubSlice = euPerSubSlice > 0 ? euPerSubSlice : gtSystemInfo.MaxEuPerSubSlice; - // clang-format off - gtSystemInfo.SliceCount = sliceCount; - gtSystemInfo.SubSliceCount = gtSystemInfo.SliceCount * subSlicePerSliceCount; - gtSystemInfo.EUCount = gtSystemInfo.SubSliceCount * euPerSubSlice - dieRecovery; - gtSystemInfo.ThreadCount = gtSystemInfo.EUCount * threadsPerEu; - gtSystemInfo.MaxEuPerSubSlice = std::max(gtSystemInfo.MaxEuPerSubSlice, euPerSubSlice); - gtSystemInfo.MaxSlicesSupported = std::max(gtSystemInfo.MaxSlicesSupported, gtSystemInfo.SliceCount); - gtSystemInfo.MaxSubSlicesSupported = std::max(gtSystemInfo.MaxSubSlicesSupported, gtSystemInfo.SubSliceCount); - // clang-format on + adjustHwInfoForTests(hwInfoForTests, euPerSubSlice, sliceCount, subSlicePerSliceCount, dieRecovery); binaryNameSuffix.append(hardwarePrefix[hwInfoForTests.platform.eProductFamily]); diff --git a/shared/offline_compiler/source/CMakeLists.txt b/shared/offline_compiler/source/CMakeLists.txt index 7aaedabe70..c3241b8b02 100644 --- a/shared/offline_compiler/source/CMakeLists.txt +++ b/shared/offline_compiler/source/CMakeLists.txt @@ -153,6 +153,7 @@ macro(macro_for_each_platform) foreach(BRANCH_DIR ${BRANCH_DIR_LIST}) foreach(BRANCH ${BRANCH_DIR_LIST}) foreach(SRC_FILE ${NEO_SOURCE_DIR}/shared/source${BRANCH}${CORE_TYPE_LOWER}/definitions${BRANCH_DIR_SUFFIX}hw_info_setup_${PLATFORM_IT_LOWER}.inl + ${NEO_SOURCE_DIR}/shared/source${BRANCH}${CORE_TYPE_LOWER}/definitions${BRANCH_DIR_SUFFIX}compiler_product_helper_${PLATFORM_IT_LOWER}.inl ${NEO_SOURCE_DIR}/shared/source${BRANCH}${CORE_TYPE_LOWER}${BRANCH_DIR}${PLATFORM_IT_LOWER}/definitions${BRANCH_DIR_SUFFIX}device_ids_configs_${PLATFORM_IT_LOWER}.cpp ${NEO_SOURCE_DIR}/shared/source${BRANCH}${CORE_TYPE_LOWER}${BRANCH_DIR}hw_info_${PLATFORM_IT_LOWER}.cpp ${NEO_SOURCE_DIR}/shared/source${BRANCH}${CORE_TYPE_LOWER}${BRANCH_DIR}compiler_product_helper_${PLATFORM_IT_LOWER}.inl diff --git a/shared/offline_compiler/source/ocloc_arg_helper.cpp b/shared/offline_compiler/source/ocloc_arg_helper.cpp index d47959ada6..ede7951af5 100644 --- a/shared/offline_compiler/source/ocloc_arg_helper.cpp +++ b/shared/offline_compiler/source/ocloc_arg_helper.cpp @@ -173,7 +173,7 @@ bool OclocArgHelper::getHwInfoForProductConfig(uint32_t productConfig, NEO::Hard if (revisionID != -1) { hwInfo.platform.usRevId = revisionID; } - uint64_t config = hwInfoConfig ? hwInfoConfig : NEO::defaultHardwareInfoConfigTable[hwInfo.platform.eProductFamily]; + uint64_t config = hwInfoConfig ? hwInfoConfig : compilerProductHelper->getHwInfoConfig(hwInfo); setHwInfoValuesFromConfig(config, hwInfo); NEO::hardwareInfoBaseSetup[hwInfo.platform.eProductFamily](&hwInfo, true); @@ -201,4 +201,4 @@ void OclocArgHelper::saveOutput(const std::string &filename, const std::ostream std::ofstream file(filename); file << ss.str(); } -} \ No newline at end of file +} diff --git a/shared/offline_compiler/source/offline_compiler.cpp b/shared/offline_compiler/source/offline_compiler.cpp index 634a050a03..df3e09013b 100644 --- a/shared/offline_compiler/source/offline_compiler.cpp +++ b/shared/offline_compiler/source/offline_compiler.cpp @@ -436,10 +436,10 @@ int OfflineCompiler::initHardwareInfoForDeprecatedAcronyms(std::string deviceNam if (revisionId != -1) { hwInfo.platform.usRevId = revisionId; } - uint64_t config = hwInfoConfig ? hwInfoConfig : defaultHardwareInfoConfigTable[hwInfo.platform.eProductFamily]; + compilerProductHelper = NEO::CompilerProductHelper::create(hwInfo.platform.eProductFamily); + uint64_t config = hwInfoConfig ? hwInfoConfig : compilerProductHelper->getHwInfoConfig(hwInfo); setHwInfoValuesFromConfig(config, hwInfo); hardwareInfoBaseSetup[hwInfo.platform.eProductFamily](&hwInfo, true); - compilerProductHelper = NEO::CompilerProductHelper::create(hwInfo.platform.eProductFamily); UNRECOVERABLE_IF(compilerProductHelper == nullptr); productFamilyName = hardwarePrefix[hwInfo.platform.eProductFamily]; return SUCCESS; diff --git a/shared/offline_compiler/source/offline_linker.cpp b/shared/offline_compiler/source/offline_linker.cpp index 8b205e7327..389f175010 100644 --- a/shared/offline_compiler/source/offline_linker.cpp +++ b/shared/offline_compiler/source/offline_linker.cpp @@ -203,7 +203,8 @@ int OfflineLinker::initHardwareInfo() { if (hwInfoTable[productId]) { hwInfo = *hwInfoTable[productId]; - const auto hwInfoConfig = defaultHardwareInfoConfigTable[hwInfo.platform.eProductFamily]; + auto compilerProductHelper = NEO::CompilerProductHelper::create(hwInfo.platform.eProductFamily); + const auto hwInfoConfig = compilerProductHelper->getHwInfoConfig(hwInfo); setHwInfoValuesFromConfig(hwInfoConfig, hwInfo); hardwareInfoSetup[hwInfo.platform.eProductFamily](&hwInfo, true, hwInfoConfig); @@ -345,4 +346,4 @@ void OfflineLinker::tryToStoreBuildLog(const char *buildLogRaw, size_t size) { } } -} // namespace NEO \ No newline at end of file +} // namespace NEO diff --git a/shared/source/gen11/enable_compiler_product_helper_ehl.cpp b/shared/source/gen11/enable_compiler_product_helper_ehl.cpp index 3deec8aaaa..b8a493f165 100644 --- a/shared/source/gen11/enable_compiler_product_helper_ehl.cpp +++ b/shared/source/gen11/enable_compiler_product_helper_ehl.cpp @@ -14,6 +14,10 @@ #include "hw_info_ehl.h" namespace NEO { +template <> +uint64_t CompilerProductHelperHw::getHwInfoConfig(const HardwareInfo &hwInfo) const { + return 0x100040008; +} static EnableCompilerProductHelper enableCompilerProductHelperEHL; diff --git a/shared/source/gen11/enable_compiler_product_helper_icllp.cpp b/shared/source/gen11/enable_compiler_product_helper_icllp.cpp index 739267a755..ea9416e52c 100644 --- a/shared/source/gen11/enable_compiler_product_helper_icllp.cpp +++ b/shared/source/gen11/enable_compiler_product_helper_icllp.cpp @@ -14,6 +14,10 @@ #include "hw_info_icllp.h" namespace NEO { +template <> +uint64_t CompilerProductHelperHw::getHwInfoConfig(const HardwareInfo &hwInfo) const { + return 0x100080008; +} static EnableCompilerProductHelper enableCompilerProductHelperICLLP; diff --git a/shared/source/gen11/enable_compiler_product_helper_lkf.cpp b/shared/source/gen11/enable_compiler_product_helper_lkf.cpp index dd3a67a997..fee7a39f20 100644 --- a/shared/source/gen11/enable_compiler_product_helper_lkf.cpp +++ b/shared/source/gen11/enable_compiler_product_helper_lkf.cpp @@ -14,6 +14,10 @@ #include "hw_info_lkf.h" namespace NEO { +template <> +uint64_t CompilerProductHelperHw::getHwInfoConfig(const HardwareInfo &hwInfo) const { + return 0x100080008; +} static EnableCompilerProductHelper enableCompilerProductHelperLKF; diff --git a/shared/source/gen11/hw_cmds_ehl.h b/shared/source/gen11/hw_cmds_ehl.h index 7d0c8d8e17..91f11ac55d 100644 --- a/shared/source/gen11/hw_cmds_ehl.h +++ b/shared/source/gen11/hw_cmds_ehl.h @@ -14,7 +14,6 @@ namespace NEO { struct EHL : public Gen11Family { static const PLATFORM platform; static const HardwareInfo hwInfo; - static const uint64_t defaultHardwareInfoConfig; static FeatureTable featureTable; static WorkaroundTable workaroundTable; static const uint32_t threadsPerEu = 7; diff --git a/shared/source/gen11/hw_cmds_icllp.h b/shared/source/gen11/hw_cmds_icllp.h index 39f65c8f7f..3fb4fed6bb 100644 --- a/shared/source/gen11/hw_cmds_icllp.h +++ b/shared/source/gen11/hw_cmds_icllp.h @@ -14,7 +14,6 @@ namespace NEO { struct ICLLP : public Gen11Family { static const PLATFORM platform; static const HardwareInfo hwInfo; - static const uint64_t defaultHardwareInfoConfig; static FeatureTable featureTable; static WorkaroundTable workaroundTable; static const uint32_t threadsPerEu = 7; diff --git a/shared/source/gen11/hw_cmds_lkf.h b/shared/source/gen11/hw_cmds_lkf.h index 73f0115a87..e675b57734 100644 --- a/shared/source/gen11/hw_cmds_lkf.h +++ b/shared/source/gen11/hw_cmds_lkf.h @@ -14,7 +14,6 @@ namespace NEO { struct LKF : public Gen11Family { static const PLATFORM platform; static const HardwareInfo hwInfo; - static const uint64_t defaultHardwareInfoConfig; static FeatureTable featureTable; static WorkaroundTable workaroundTable; static const uint32_t threadsPerEu = 7; diff --git a/shared/source/gen11/hw_info_ehl.cpp b/shared/source/gen11/hw_info_ehl.cpp index 3c595e0a54..49ea9c77f2 100644 --- a/shared/source/gen11/hw_info_ehl.cpp +++ b/shared/source/gen11/hw_info_ehl.cpp @@ -151,7 +151,6 @@ void EhlHwConfig::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTable }; const HardwareInfo EHL::hwInfo = EhlHwConfig::hwInfo; -const uint64_t EHL::defaultHardwareInfoConfig = 0x100040008; void setupEHLHardwareInfoImpl(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, uint64_t hwInfoConfig) { EhlHwConfig::setupHardwareInfo(hwInfo, setupFeatureTableAndWorkaroundTable); diff --git a/shared/source/gen11/hw_info_icllp.cpp b/shared/source/gen11/hw_info_icllp.cpp index 442cecf71f..763e8a38a8 100644 --- a/shared/source/gen11/hw_info_icllp.cpp +++ b/shared/source/gen11/hw_info_icllp.cpp @@ -192,7 +192,6 @@ void IcllpHw1x6x8::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTabl }; const HardwareInfo ICLLP::hwInfo = IcllpHw1x8x8::hwInfo; -const uint64_t ICLLP::defaultHardwareInfoConfig = 0x100080008; void setupICLLPHardwareInfoImpl(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, uint64_t hwInfoConfig) { if (hwInfoConfig == 0x100080008) { diff --git a/shared/source/gen11/hw_info_lkf.cpp b/shared/source/gen11/hw_info_lkf.cpp index 8a60da4b4d..6c97c1949d 100644 --- a/shared/source/gen11/hw_info_lkf.cpp +++ b/shared/source/gen11/hw_info_lkf.cpp @@ -151,7 +151,6 @@ void LkfHw1x8x8::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableA }; const HardwareInfo LKF::hwInfo = LkfHw1x8x8::hwInfo; -const uint64_t LKF::defaultHardwareInfoConfig = 0x100080008; void setupLKFHardwareInfoImpl(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, uint64_t hwInfoConfig) { if (hwInfoConfig == 0x100080008) { diff --git a/shared/source/gen12lp/compiler_product_helper_rkl.inl b/shared/source/gen12lp/compiler_product_helper_rkl.inl index 120cc2eacb..80123bd339 100644 --- a/shared/source/gen12lp/compiler_product_helper_rkl.inl +++ b/shared/source/gen12lp/compiler_product_helper_rkl.inl @@ -5,6 +5,10 @@ * */ +template <> +uint64_t CompilerProductHelperHw::getHwInfoConfig(const HardwareInfo &hwInfo) const { + return 0x100020010; +} template <> bool CompilerProductHelperHw::isForceEmuInt32DivRemSPRequired() const { return true; diff --git a/shared/source/gen12lp/definitions/compiler_product_helper_adln.inl b/shared/source/gen12lp/definitions/compiler_product_helper_adln.inl new file mode 100644 index 0000000000..ff273725e7 --- /dev/null +++ b/shared/source/gen12lp/definitions/compiler_product_helper_adln.inl @@ -0,0 +1,13 @@ +/* + * Copyright (C) 2023 Intel Corporation + * + * SPDX-License-Identifier: MIT + * + */ + +namespace NEO { +template <> +uint64_t CompilerProductHelperHw::getHwInfoConfig(const HardwareInfo &hwInfo) const { + return 0x0; +} +} // namespace NEO diff --git a/shared/source/gen12lp/definitions/compiler_product_helper_adlp.inl b/shared/source/gen12lp/definitions/compiler_product_helper_adlp.inl new file mode 100644 index 0000000000..4ca57d2fde --- /dev/null +++ b/shared/source/gen12lp/definitions/compiler_product_helper_adlp.inl @@ -0,0 +1,13 @@ +/* + * Copyright (C) 2023 Intel Corporation + * + * SPDX-License-Identifier: MIT + * + */ + +namespace NEO { +template <> +uint64_t CompilerProductHelperHw::getHwInfoConfig(const HardwareInfo &hwInfo) const { + return 0x0; +} +} // namespace NEO diff --git a/shared/source/gen12lp/definitions/hw_info_setup_adln.inl b/shared/source/gen12lp/definitions/hw_info_setup_adln.inl index 304c022a73..bea3d19bae 100644 --- a/shared/source/gen12lp/definitions/hw_info_setup_adln.inl +++ b/shared/source/gen12lp/definitions/hw_info_setup_adln.inl @@ -1,11 +1,10 @@ /* - * Copyright (C) 2022 Intel Corporation + * Copyright (C) 2022-2023 Intel Corporation * * SPDX-License-Identifier: MIT * */ -const uint64_t ADLN::defaultHardwareInfoConfig = 0x0; const HardwareInfo ADLN::hwInfo = AdlnHwConfig::hwInfo; void setupADLNHardwareInfoImpl(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, uint64_t hwInfoConfig) { diff --git a/shared/source/gen12lp/definitions/hw_info_setup_adlp.inl b/shared/source/gen12lp/definitions/hw_info_setup_adlp.inl index fea2d8571f..f987790c14 100644 --- a/shared/source/gen12lp/definitions/hw_info_setup_adlp.inl +++ b/shared/source/gen12lp/definitions/hw_info_setup_adlp.inl @@ -1,11 +1,10 @@ /* - * Copyright (C) 2021-2022 Intel Corporation + * Copyright (C) 2021-2023 Intel Corporation * * SPDX-License-Identifier: MIT * */ -const uint64_t ADLP::defaultHardwareInfoConfig = 0x0; const HardwareInfo ADLP::hwInfo = AdlpHwConfig::hwInfo; void setupADLPHardwareInfoImpl(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, uint64_t hwInfoConfig) { diff --git a/shared/source/gen12lp/enable_compiler_product_helper_adln.cpp b/shared/source/gen12lp/enable_compiler_product_helper_adln.cpp index bf8655eb20..6ba1bae54b 100644 --- a/shared/source/gen12lp/enable_compiler_product_helper_adln.cpp +++ b/shared/source/gen12lp/enable_compiler_product_helper_adln.cpp @@ -11,6 +11,7 @@ #include "shared/source/helpers/compiler_product_helper_bdw_and_later.inl" #include "shared/source/helpers/compiler_product_helper_before_xe_hpc.inl" +#include "compiler_product_helper_adln.inl" #include "hw_info_adln.h" namespace NEO { diff --git a/shared/source/gen12lp/enable_compiler_product_helper_adlp.cpp b/shared/source/gen12lp/enable_compiler_product_helper_adlp.cpp index e4a972c04d..d9d6954df5 100644 --- a/shared/source/gen12lp/enable_compiler_product_helper_adlp.cpp +++ b/shared/source/gen12lp/enable_compiler_product_helper_adlp.cpp @@ -11,6 +11,7 @@ #include "shared/source/helpers/compiler_product_helper_bdw_and_later.inl" #include "shared/source/helpers/compiler_product_helper_before_xe_hpc.inl" +#include "compiler_product_helper_adlp.inl" #include "hw_info_adlp.h" namespace NEO { diff --git a/shared/source/gen12lp/enable_compiler_product_helper_adls.cpp b/shared/source/gen12lp/enable_compiler_product_helper_adls.cpp index 9c7a7665aa..757709d189 100644 --- a/shared/source/gen12lp/enable_compiler_product_helper_adls.cpp +++ b/shared/source/gen12lp/enable_compiler_product_helper_adls.cpp @@ -13,6 +13,10 @@ #include "hw_info_adls.h" namespace NEO { +template <> +uint64_t CompilerProductHelperHw::getHwInfoConfig(const HardwareInfo &hwInfo) const { + return 0x100020010; +} static EnableCompilerProductHelper enableCompilerProductHelperADLS; diff --git a/shared/source/gen12lp/enable_compiler_product_helper_dg1.cpp b/shared/source/gen12lp/enable_compiler_product_helper_dg1.cpp index 37842169a5..df7f996c10 100644 --- a/shared/source/gen12lp/enable_compiler_product_helper_dg1.cpp +++ b/shared/source/gen12lp/enable_compiler_product_helper_dg1.cpp @@ -13,6 +13,10 @@ #include "hw_info_dg1.h" namespace NEO { +template <> +uint64_t CompilerProductHelperHw::getHwInfoConfig(const HardwareInfo &hwInfo) const { + return 0x100060010; +} static EnableCompilerProductHelper enableCompilerProductHelperDG1; diff --git a/shared/source/gen12lp/enable_compiler_product_helper_tgllp.cpp b/shared/source/gen12lp/enable_compiler_product_helper_tgllp.cpp index f010794cd1..560ae89fbb 100644 --- a/shared/source/gen12lp/enable_compiler_product_helper_tgllp.cpp +++ b/shared/source/gen12lp/enable_compiler_product_helper_tgllp.cpp @@ -14,6 +14,10 @@ #include "hw_info_tgllp.h" namespace NEO { +template <> +uint64_t CompilerProductHelperHw::getHwInfoConfig(const HardwareInfo &hwInfo) const { + return 0x100060010; +} static EnableCompilerProductHelper enableCompilerProductHelperTGLLP; diff --git a/shared/source/gen12lp/hw_cmds_adln.h b/shared/source/gen12lp/hw_cmds_adln.h index 62fb74f8d6..0a2526a232 100644 --- a/shared/source/gen12lp/hw_cmds_adln.h +++ b/shared/source/gen12lp/hw_cmds_adln.h @@ -14,7 +14,6 @@ namespace NEO { struct ADLN : public Gen12LpFamily { static const PLATFORM platform; static const HardwareInfo hwInfo; - static const uint64_t defaultHardwareInfoConfig; static FeatureTable featureTable; static WorkaroundTable workaroundTable; static const uint32_t threadsPerEu = 7; diff --git a/shared/source/gen12lp/hw_cmds_adlp.h b/shared/source/gen12lp/hw_cmds_adlp.h index e3fac131eb..1da6c505d1 100644 --- a/shared/source/gen12lp/hw_cmds_adlp.h +++ b/shared/source/gen12lp/hw_cmds_adlp.h @@ -14,7 +14,6 @@ namespace NEO { struct ADLP : public Gen12LpFamily { static const PLATFORM platform; static const HardwareInfo hwInfo; - static const uint64_t defaultHardwareInfoConfig; static FeatureTable featureTable; static WorkaroundTable workaroundTable; static const uint32_t threadsPerEu = 7; diff --git a/shared/source/gen12lp/hw_cmds_adls.h b/shared/source/gen12lp/hw_cmds_adls.h index 1ecbcb45c7..d1415c7b8e 100644 --- a/shared/source/gen12lp/hw_cmds_adls.h +++ b/shared/source/gen12lp/hw_cmds_adls.h @@ -14,7 +14,6 @@ namespace NEO { struct ADLS : public Gen12LpFamily { static const PLATFORM platform; static const HardwareInfo hwInfo; - static const uint64_t defaultHardwareInfoConfig; static FeatureTable featureTable; static WorkaroundTable workaroundTable; static const uint32_t threadsPerEu = 7; diff --git a/shared/source/gen12lp/hw_cmds_dg1.h b/shared/source/gen12lp/hw_cmds_dg1.h index 840a1cb73e..5dfdd74f35 100644 --- a/shared/source/gen12lp/hw_cmds_dg1.h +++ b/shared/source/gen12lp/hw_cmds_dg1.h @@ -13,7 +13,6 @@ namespace NEO { struct DG1 : public Gen12LpFamily { static const PLATFORM platform; static const HardwareInfo hwInfo; - static const uint64_t defaultHardwareInfoConfig; static FeatureTable featureTable; static WorkaroundTable workaroundTable; static const uint32_t threadsPerEu = 7; diff --git a/shared/source/gen12lp/hw_cmds_rkl.h b/shared/source/gen12lp/hw_cmds_rkl.h index 3bb49627b5..9da9cbb7f1 100644 --- a/shared/source/gen12lp/hw_cmds_rkl.h +++ b/shared/source/gen12lp/hw_cmds_rkl.h @@ -13,7 +13,6 @@ namespace NEO { struct RKL : public Gen12LpFamily { static const PLATFORM platform; static const HardwareInfo hwInfo; - static const uint64_t defaultHardwareInfoConfig; static FeatureTable featureTable; static WorkaroundTable workaroundTable; static const uint32_t threadsPerEu = 7; diff --git a/shared/source/gen12lp/hw_cmds_tgllp.h b/shared/source/gen12lp/hw_cmds_tgllp.h index 0ce91709ba..4c49a6b705 100644 --- a/shared/source/gen12lp/hw_cmds_tgllp.h +++ b/shared/source/gen12lp/hw_cmds_tgllp.h @@ -14,7 +14,6 @@ namespace NEO { struct TGLLP : public Gen12LpFamily { static const PLATFORM platform; static const HardwareInfo hwInfo; - static const uint64_t defaultHardwareInfoConfig; static FeatureTable featureTable; static WorkaroundTable workaroundTable; static const uint32_t threadsPerEu = 7; diff --git a/shared/source/gen12lp/hw_info_adls.cpp b/shared/source/gen12lp/hw_info_adls.cpp index bc5e1d2552..b644a2473f 100644 --- a/shared/source/gen12lp/hw_info_adls.cpp +++ b/shared/source/gen12lp/hw_info_adls.cpp @@ -160,7 +160,6 @@ void AdlsHwConfig::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTabl }; const HardwareInfo ADLS::hwInfo = AdlsHwConfig::hwInfo; -const uint64_t ADLS::defaultHardwareInfoConfig = 0x100020010; void setupADLSHardwareInfoImpl(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, uint64_t hwInfoConfig) { AdlsHwConfig::setupHardwareInfo(hwInfo, setupFeatureTableAndWorkaroundTable); diff --git a/shared/source/gen12lp/hw_info_dg1.cpp b/shared/source/gen12lp/hw_info_dg1.cpp index 593c5022d5..e37adafdb0 100644 --- a/shared/source/gen12lp/hw_info_dg1.cpp +++ b/shared/source/gen12lp/hw_info_dg1.cpp @@ -160,7 +160,6 @@ void Dg1HwConfig::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTable }; const HardwareInfo DG1::hwInfo = Dg1HwConfig::hwInfo; -const uint64_t DG1::defaultHardwareInfoConfig = 0x100060010; void setupDG1HardwareInfoImpl(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, uint64_t hwInfoConfig) { if (hwInfoConfig == 0x100060010) { diff --git a/shared/source/gen12lp/hw_info_rkl.cpp b/shared/source/gen12lp/hw_info_rkl.cpp index 5e9e6b18f9..236b454362 100644 --- a/shared/source/gen12lp/hw_info_rkl.cpp +++ b/shared/source/gen12lp/hw_info_rkl.cpp @@ -157,7 +157,6 @@ void RklHwConfig::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTable }; const HardwareInfo RKL::hwInfo = RklHwConfig::hwInfo; -const uint64_t RKL::defaultHardwareInfoConfig = 0x100020010; void setupRKLHardwareInfoImpl(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, uint64_t hwInfoConfig) { RklHwConfig::setupHardwareInfo(hwInfo, setupFeatureTableAndWorkaroundTable); diff --git a/shared/source/gen12lp/hw_info_tgllp.cpp b/shared/source/gen12lp/hw_info_tgllp.cpp index e1337bcd8c..58f2143fdb 100644 --- a/shared/source/gen12lp/hw_info_tgllp.cpp +++ b/shared/source/gen12lp/hw_info_tgllp.cpp @@ -187,7 +187,6 @@ void TgllpHw1x2x16::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTab }; const HardwareInfo TGLLP::hwInfo = TgllpHw1x6x16::hwInfo; -const uint64_t TGLLP::defaultHardwareInfoConfig = 0x100060010; void setupTGLLPHardwareInfoImpl(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, uint64_t hwInfoConfig) { if (hwInfoConfig == 0x100060010) { diff --git a/shared/source/gen8/compiler_product_helper_bdw.inl b/shared/source/gen8/compiler_product_helper_bdw.inl index c54572711a..2ccf2b8f93 100644 --- a/shared/source/gen8/compiler_product_helper_bdw.inl +++ b/shared/source/gen8/compiler_product_helper_bdw.inl @@ -9,3 +9,8 @@ template <> bool CompilerProductHelperHw::isStatelessToStatefulBufferOffsetSupported() const { return false; } + +template <> +uint64_t CompilerProductHelperHw::getHwInfoConfig(const HardwareInfo &hwInfo) const { + return 0x100030008; +} diff --git a/shared/source/gen8/hw_cmds_bdw.h b/shared/source/gen8/hw_cmds_bdw.h index 1818f44c78..53ff35f66a 100644 --- a/shared/source/gen8/hw_cmds_bdw.h +++ b/shared/source/gen8/hw_cmds_bdw.h @@ -16,7 +16,6 @@ namespace NEO { struct BDW : public Gen8Family { static const PLATFORM platform; static const HardwareInfo hwInfo; - static const uint64_t defaultHardwareInfoConfig; static FeatureTable featureTable; static WorkaroundTable workaroundTable; static const uint32_t threadsPerEu = 7; diff --git a/shared/source/gen8/hw_info_bdw.cpp b/shared/source/gen8/hw_info_bdw.cpp index d2d657a79e..32a9b6ce68 100644 --- a/shared/source/gen8/hw_info_bdw.cpp +++ b/shared/source/gen8/hw_info_bdw.cpp @@ -194,7 +194,6 @@ void BdwHw2x3x8::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableA }; const HardwareInfo BDW::hwInfo = BdwHw1x3x8::hwInfo; -const uint64_t BDW::defaultHardwareInfoConfig = 0x100030008; void setupBDWHardwareInfoImpl(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, uint64_t hwInfoConfig) { if (hwInfoConfig == 0x200030008) { diff --git a/shared/source/gen9/enable_compiler_product_helper_bxt.cpp b/shared/source/gen9/enable_compiler_product_helper_bxt.cpp index ab2106d0b2..1b96178129 100644 --- a/shared/source/gen9/enable_compiler_product_helper_bxt.cpp +++ b/shared/source/gen9/enable_compiler_product_helper_bxt.cpp @@ -15,6 +15,11 @@ namespace NEO { +template <> +uint64_t CompilerProductHelperHw::getHwInfoConfig(const HardwareInfo &hwInfo) const { + return 0x100030006; +} + static EnableCompilerProductHelper enableCompilerProductHelperBXT; } // namespace NEO diff --git a/shared/source/gen9/enable_compiler_product_helper_cfl.cpp b/shared/source/gen9/enable_compiler_product_helper_cfl.cpp index 9c839c8569..cb62d42b90 100644 --- a/shared/source/gen9/enable_compiler_product_helper_cfl.cpp +++ b/shared/source/gen9/enable_compiler_product_helper_cfl.cpp @@ -14,6 +14,10 @@ #include "hw_info_cfl.h" namespace NEO { +template <> +uint64_t CompilerProductHelperHw::getHwInfoConfig(const HardwareInfo &hwInfo) const { + return 0x100030006; +} static EnableCompilerProductHelper enableCompilerProductHelperCFL; diff --git a/shared/source/gen9/enable_compiler_product_helper_glk.cpp b/shared/source/gen9/enable_compiler_product_helper_glk.cpp index 5b4b05aae3..c66d61e044 100644 --- a/shared/source/gen9/enable_compiler_product_helper_glk.cpp +++ b/shared/source/gen9/enable_compiler_product_helper_glk.cpp @@ -14,6 +14,11 @@ #include "hw_info_glk.h" namespace NEO { +template <> +uint64_t CompilerProductHelperHw::getHwInfoConfig(const HardwareInfo &hwInfo) const { + return 0x100030006; +} + static EnableCompilerProductHelper enableCompilerProductHelperGLK; } // namespace NEO diff --git a/shared/source/gen9/enable_compiler_product_helper_kbl.cpp b/shared/source/gen9/enable_compiler_product_helper_kbl.cpp index 6320bc0eec..477852b288 100644 --- a/shared/source/gen9/enable_compiler_product_helper_kbl.cpp +++ b/shared/source/gen9/enable_compiler_product_helper_kbl.cpp @@ -14,6 +14,11 @@ #include "hw_info_kbl.h" namespace NEO { +template <> +uint64_t CompilerProductHelperHw::getHwInfoConfig(const HardwareInfo &hwInfo) const { + return 0x100030006; +} + static EnableCompilerProductHelper enableCompilerProductHelperKBL; } // namespace NEO diff --git a/shared/source/gen9/enable_compiler_product_helper_skl.cpp b/shared/source/gen9/enable_compiler_product_helper_skl.cpp index a086674b81..1ef500e4d8 100644 --- a/shared/source/gen9/enable_compiler_product_helper_skl.cpp +++ b/shared/source/gen9/enable_compiler_product_helper_skl.cpp @@ -15,6 +15,11 @@ namespace NEO { +template <> +uint64_t CompilerProductHelperHw::getHwInfoConfig(const HardwareInfo &hwInfo) const { + return 0x100030008; +} + static EnableCompilerProductHelper enableCompilerProductHelperSKL; } // namespace NEO diff --git a/shared/source/gen9/hw_cmds_bxt.h b/shared/source/gen9/hw_cmds_bxt.h index af56cc51ec..406b50444c 100644 --- a/shared/source/gen9/hw_cmds_bxt.h +++ b/shared/source/gen9/hw_cmds_bxt.h @@ -14,7 +14,6 @@ namespace NEO { struct BXT : public Gen9Family { static const PLATFORM platform; static const HardwareInfo hwInfo; - static const uint64_t defaultHardwareInfoConfig; static FeatureTable featureTable; static WorkaroundTable workaroundTable; static const uint32_t threadsPerEu = 6; diff --git a/shared/source/gen9/hw_cmds_cfl.h b/shared/source/gen9/hw_cmds_cfl.h index 85bd8ffcb7..3b3f084d3d 100644 --- a/shared/source/gen9/hw_cmds_cfl.h +++ b/shared/source/gen9/hw_cmds_cfl.h @@ -14,7 +14,6 @@ namespace NEO { struct CFL : public Gen9Family { static const PLATFORM platform; static const HardwareInfo hwInfo; - static const uint64_t defaultHardwareInfoConfig; static FeatureTable featureTable; static WorkaroundTable workaroundTable; static const uint32_t threadsPerEu = 7; diff --git a/shared/source/gen9/hw_cmds_glk.h b/shared/source/gen9/hw_cmds_glk.h index 4c6436dcc8..0ece9c2d24 100644 --- a/shared/source/gen9/hw_cmds_glk.h +++ b/shared/source/gen9/hw_cmds_glk.h @@ -14,7 +14,6 @@ namespace NEO { struct GLK : public Gen9Family { static const PLATFORM platform; static const HardwareInfo hwInfo; - static const uint64_t defaultHardwareInfoConfig; static FeatureTable featureTable; static WorkaroundTable workaroundTable; static const uint32_t threadsPerEu = 6; diff --git a/shared/source/gen9/hw_cmds_kbl.h b/shared/source/gen9/hw_cmds_kbl.h index 6b6f3397f8..7e00d85606 100644 --- a/shared/source/gen9/hw_cmds_kbl.h +++ b/shared/source/gen9/hw_cmds_kbl.h @@ -14,7 +14,6 @@ namespace NEO { struct KBL : public Gen9Family { static const PLATFORM platform; static const HardwareInfo hwInfo; - static const uint64_t defaultHardwareInfoConfig; static FeatureTable featureTable; static WorkaroundTable workaroundTable; static const uint32_t threadsPerEu = 7; diff --git a/shared/source/gen9/hw_cmds_skl.h b/shared/source/gen9/hw_cmds_skl.h index 496b785e0c..afa0665974 100644 --- a/shared/source/gen9/hw_cmds_skl.h +++ b/shared/source/gen9/hw_cmds_skl.h @@ -14,7 +14,6 @@ namespace NEO { struct SKL : public Gen9Family { static const PLATFORM platform; static const HardwareInfo hwInfo; - static const uint64_t defaultHardwareInfoConfig; static FeatureTable featureTable; static WorkaroundTable workaroundTable; static const uint32_t threadsPerEu = 7; diff --git a/shared/source/gen9/hw_info_bxt.cpp b/shared/source/gen9/hw_info_bxt.cpp index 607f4083b0..b36822d653 100644 --- a/shared/source/gen9/hw_info_bxt.cpp +++ b/shared/source/gen9/hw_info_bxt.cpp @@ -166,7 +166,6 @@ void BxtHw1x3x6::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableA }; const HardwareInfo BXT::hwInfo = BxtHw1x3x6::hwInfo; -const uint64_t BXT::defaultHardwareInfoConfig = 0x100030006; void setupBXTHardwareInfoImpl(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, uint64_t hwInfoConfig) { if (hwInfoConfig == 0x100020006) { diff --git a/shared/source/gen9/hw_info_cfl.cpp b/shared/source/gen9/hw_info_cfl.cpp index 3e5741fc38..ed3cd2e6ad 100644 --- a/shared/source/gen9/hw_info_cfl.cpp +++ b/shared/source/gen9/hw_info_cfl.cpp @@ -221,7 +221,6 @@ void CflHw3x3x8::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableA }; const HardwareInfo CFL::hwInfo = CflHw1x3x6::hwInfo; -const uint64_t CFL::defaultHardwareInfoConfig = 0x100030006; void setupCFLHardwareInfoImpl(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, uint64_t hwInfoConfig) { if (hwInfoConfig == 0x100030008) { diff --git a/shared/source/gen9/hw_info_glk.cpp b/shared/source/gen9/hw_info_glk.cpp index 98e9c9b38a..272d372531 100644 --- a/shared/source/gen9/hw_info_glk.cpp +++ b/shared/source/gen9/hw_info_glk.cpp @@ -169,7 +169,6 @@ void GlkHw1x2x6::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableA }; const HardwareInfo GLK::hwInfo = GlkHw1x3x6::hwInfo; -const uint64_t GLK::defaultHardwareInfoConfig = 0x100030006; void setupGLKHardwareInfoImpl(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, uint64_t hwInfoConfig) { if (hwInfoConfig == 0x100020006) { diff --git a/shared/source/gen9/hw_info_kbl.cpp b/shared/source/gen9/hw_info_kbl.cpp index 63090db0ff..aaf6f11b98 100644 --- a/shared/source/gen9/hw_info_kbl.cpp +++ b/shared/source/gen9/hw_info_kbl.cpp @@ -226,7 +226,6 @@ void KblHw3x3x8::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableA }; const HardwareInfo KBL::hwInfo = KblHw1x3x6::hwInfo; -const uint64_t KBL::defaultHardwareInfoConfig = 0x100030006; void setupKBLHardwareInfoImpl(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, uint64_t hwInfoConfig) { if (hwInfoConfig == 0x100030008) { diff --git a/shared/source/gen9/hw_info_skl.cpp b/shared/source/gen9/hw_info_skl.cpp index e853f04b80..01d73e71d1 100644 --- a/shared/source/gen9/hw_info_skl.cpp +++ b/shared/source/gen9/hw_info_skl.cpp @@ -232,7 +232,6 @@ void SklHw3x3x8::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableA }; const HardwareInfo SKL::hwInfo = SklHw1x3x8::hwInfo; -const uint64_t SKL::defaultHardwareInfoConfig = 0x000100030008; void setupSKLHardwareInfoImpl(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, uint64_t hwInfoConfig) { if (hwInfoConfig == 0x100030008) { diff --git a/shared/source/helpers/compiler_product_helper.h b/shared/source/helpers/compiler_product_helper.h index 14728477ac..61cd4288e2 100644 --- a/shared/source/helpers/compiler_product_helper.h +++ b/shared/source/helpers/compiler_product_helper.h @@ -40,6 +40,7 @@ class CompilerProductHelper { virtual bool failBuildProgramWithStatefulAccessPreference() const = 0; virtual void setProductConfigForHwInfo(HardwareInfo &hwInfo, HardwareIpVersion config) const = 0; virtual const char *getCachingPolicyOptions(bool isDebuggerActive) const = 0; + virtual uint64_t getHwInfoConfig(const HardwareInfo &hwInfo) const = 0; virtual ~CompilerProductHelper() = default; @@ -62,6 +63,7 @@ class CompilerProductHelperHw : public CompilerProductHelper { bool failBuildProgramWithStatefulAccessPreference() const override; void setProductConfigForHwInfo(HardwareInfo &hwInfo, HardwareIpVersion config) const override; const char *getCachingPolicyOptions(bool isDebuggerActive) const override; + uint64_t getHwInfoConfig(const HardwareInfo &hwInfo) const override; ~CompilerProductHelperHw() override = default; diff --git a/shared/source/helpers/enable_product.inl b/shared/source/helpers/enable_product.inl index b917e02b9a..14682a6dce 100644 --- a/shared/source/helpers/enable_product.inl +++ b/shared/source/helpers/enable_product.inl @@ -18,7 +18,6 @@ struct EnableGfxProductHw { EnableGfxFamilyHw(gfxFamily)> enableFamily; hardwarePrefix[gfxProduct] = HwMapper::abbreviation; - defaultHardwareInfoConfigTable[gfxProduct] = GfxProduct::defaultHardwareInfoConfig; hardwareInfoTable[gfxProduct] = &GfxProduct::hwInfo; hardwareInfoSetup[gfxProduct] = GfxProduct::setupHardwareInfo; hardwareInfoBaseSetup[gfxProduct] = GfxProduct::setupHardwareInfoBase; diff --git a/shared/source/helpers/hw_info.cpp b/shared/source/helpers/hw_info.cpp index a189b8c35a..3a4eea1591 100644 --- a/shared/source/helpers/hw_info.cpp +++ b/shared/source/helpers/hw_info.cpp @@ -24,11 +24,6 @@ const char *hardwarePrefix[IGFX_MAX_PRODUCT] = { nullptr, }; -// Global table of default hardware info configs -uint64_t defaultHardwareInfoConfigTable[IGFX_MAX_PRODUCT] = { - 0x0, -}; - // Global table of family names bool familyEnabled[IGFX_MAX_CORE] = { false, diff --git a/shared/source/helpers/hw_info.h b/shared/source/helpers/hw_info.h index 0a70c854a5..123106276f 100644 --- a/shared/source/helpers/hw_info.h +++ b/shared/source/helpers/hw_info.h @@ -151,7 +151,6 @@ struct HardwareInfo { // Global table of hardware prefixes extern bool familyEnabled[IGFX_MAX_CORE]; extern const char *hardwarePrefix[IGFX_MAX_PRODUCT]; -extern uint64_t defaultHardwareInfoConfigTable[IGFX_MAX_PRODUCT]; extern const HardwareInfo *hardwareInfoTable[IGFX_MAX_PRODUCT]; extern void (*hardwareInfoSetup[IGFX_MAX_PRODUCT])(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, uint64_t hwInfoConfig); extern void (*hardwareInfoBaseSetup[IGFX_MAX_PRODUCT])(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable); diff --git a/shared/source/os_interface/device_factory.cpp b/shared/source/os_interface/device_factory.cpp index 436f596377..706fac9cd4 100644 --- a/shared/source/os_interface/device_factory.cpp +++ b/shared/source/os_interface/device_factory.cpp @@ -57,11 +57,21 @@ bool DeviceFactory::prepareDeviceEnvironmentsForProductFamilyOverride(ExecutionE *hardwareInfo = *hwInfoConst; rootDeviceEnvironment.initHelpers(); + if (DebugManager.flags.OverrideRevision.get() != -1) { + hardwareInfo->platform.usRevId = static_cast(DebugManager.flags.OverrideRevision.get()); + } + + if (DebugManager.flags.ForceDeviceId.get() != "unk") { + hardwareInfo->platform.usDeviceID = static_cast(std::stoi(DebugManager.flags.ForceDeviceId.get(), nullptr, 16)); + } + + const auto &compilerProductHelper = rootDeviceEnvironment.getHelper(); if (hwInfoConfigStr == "default") { - hwInfoConfig = defaultHardwareInfoConfigTable[hwInfoConst->platform.eProductFamily]; + hwInfoConfig = compilerProductHelper.getHwInfoConfig(*hwInfoConst); } else if (!parseHwInfoConfigString(hwInfoConfigStr, hwInfoConfig)) { return false; } + setHwInfoValuesFromConfig(hwInfoConfig, *hardwareInfo); hardwareInfoSetup[hwInfoConst->platform.eProductFamily](hardwareInfo, true, hwInfoConfig); @@ -70,7 +80,6 @@ bool DeviceFactory::prepareDeviceEnvironmentsForProductFamilyOverride(ExecutionE productHelper.configureHardwareCustom(hardwareInfo, nullptr); if (productConfigFound) { - const auto &compilerProductHelper = rootDeviceEnvironment.getHelper(); compilerProductHelper.setProductConfigForHwInfo(*hardwareInfo, aotInfo.aotConfig); hardwareInfo->platform.usDeviceID = aotInfo.deviceIds->front(); } @@ -79,14 +88,6 @@ bool DeviceFactory::prepareDeviceEnvironmentsForProductFamilyOverride(ExecutionE hardwareInfo->capabilityTable.gpuAddressSpace = maxNBitValue(static_cast(DebugManager.flags.OverrideGpuAddressSpace.get())); } - if (DebugManager.flags.OverrideRevision.get() != -1) { - hardwareInfo->platform.usRevId = static_cast(DebugManager.flags.OverrideRevision.get()); - } - - if (DebugManager.flags.ForceDeviceId.get() != "unk") { - hardwareInfo->platform.usDeviceID = static_cast(std::stoi(DebugManager.flags.ForceDeviceId.get(), nullptr, 16)); - } - [[maybe_unused]] bool result = rootDeviceEnvironment.initAilConfiguration(); DEBUG_BREAK_IF(!result); diff --git a/shared/source/xe_hp_core/hw_cmds_xe_hp_sdv.h b/shared/source/xe_hp_core/hw_cmds_xe_hp_sdv.h index 86db76fdc7..aefd76dc6a 100644 --- a/shared/source/xe_hp_core/hw_cmds_xe_hp_sdv.h +++ b/shared/source/xe_hp_core/hw_cmds_xe_hp_sdv.h @@ -13,7 +13,6 @@ namespace NEO { struct XE_HP_SDV : public XeHpFamily { static const PLATFORM platform; static const HardwareInfo hwInfo; - static const uint64_t defaultHardwareInfoConfig; static FeatureTable featureTable; static WorkaroundTable workaroundTable; static const uint32_t threadsPerEu = 8; diff --git a/shared/source/xe_hpc_core/definitions/compiler_product_helper_pvc.inl b/shared/source/xe_hpc_core/definitions/compiler_product_helper_pvc.inl new file mode 100644 index 0000000000..8469b96bb3 --- /dev/null +++ b/shared/source/xe_hpc_core/definitions/compiler_product_helper_pvc.inl @@ -0,0 +1,13 @@ +/* + * Copyright (C) 2023 Intel Corporation + * + * SPDX-License-Identifier: MIT + * + */ + +namespace NEO { +template <> +uint64_t CompilerProductHelperHw::getHwInfoConfig(const HardwareInfo &hwInfo) const { + return 0x0; +} +} // namespace NEO diff --git a/shared/source/xe_hpc_core/definitions/hw_info_setup_pvc.inl b/shared/source/xe_hpc_core/definitions/hw_info_setup_pvc.inl index 23568898b2..72cbf68ce8 100644 --- a/shared/source/xe_hpc_core/definitions/hw_info_setup_pvc.inl +++ b/shared/source/xe_hpc_core/definitions/hw_info_setup_pvc.inl @@ -1,16 +1,15 @@ /* - * Copyright (C) 2021-2022 Intel Corporation + * Copyright (C) 2021-2023 Intel Corporation * * SPDX-License-Identifier: MIT * */ const HardwareInfo PVC::hwInfo = PvcHwConfig::hwInfo; -const uint64_t PVC::defaultHardwareInfoConfig = 0; void setupPVCHardwareInfoImpl(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, uint64_t hwInfoConfig) { PVC::setupHardwareInfoBase(hwInfo, setupFeatureTableAndWorkaroundTable); PvcHwConfig::setupHardwareInfo(hwInfo, setupFeatureTableAndWorkaroundTable); } -void (*PVC::setupHardwareInfo)(HardwareInfo *, bool, const uint64_t) = setupPVCHardwareInfoImpl; \ No newline at end of file +void (*PVC::setupHardwareInfo)(HardwareInfo *, bool, const uint64_t) = setupPVCHardwareInfoImpl; diff --git a/shared/source/xe_hpc_core/enable_compiler_product_helper_pvc.cpp b/shared/source/xe_hpc_core/enable_compiler_product_helper_pvc.cpp index 551b6843b2..ad4b717fcb 100644 --- a/shared/source/xe_hpc_core/enable_compiler_product_helper_pvc.cpp +++ b/shared/source/xe_hpc_core/enable_compiler_product_helper_pvc.cpp @@ -11,6 +11,7 @@ #include "shared/source/helpers/compiler_product_helper_bdw_and_later.inl" #include "shared/source/helpers/compiler_product_helper_xe_hpc_and_later.inl" +#include "compiler_product_helper_pvc.inl" #include "hw_info_pvc.h" 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 d9a701d13c..52686f0ad7 100644 --- a/shared/source/xe_hpc_core/hw_cmds_pvc.h +++ b/shared/source/xe_hpc_core/hw_cmds_pvc.h @@ -15,7 +15,6 @@ namespace NEO { struct PVC : public XeHpcCoreFamily { static const PLATFORM platform; static const HardwareInfo hwInfo; - static const uint64_t defaultHardwareInfoConfig; static FeatureTable featureTable; static WorkaroundTable workaroundTable; // Initial non-zero values for unit tests diff --git a/shared/source/xe_hpg_core/definitions/compiler_product_helper_dg2.inl b/shared/source/xe_hpg_core/definitions/compiler_product_helper_dg2.inl new file mode 100644 index 0000000000..c743f42b32 --- /dev/null +++ b/shared/source/xe_hpg_core/definitions/compiler_product_helper_dg2.inl @@ -0,0 +1,13 @@ +/* + * Copyright (C) 2023 Intel Corporation + * + * SPDX-License-Identifier: MIT + * + */ + +namespace NEO { +template <> +uint64_t CompilerProductHelperHw::getHwInfoConfig(const HardwareInfo &hwInfo) const { + return 0x0; +} +} // namespace NEO diff --git a/shared/source/xe_hpg_core/definitions/compiler_product_helper_mtl.inl b/shared/source/xe_hpg_core/definitions/compiler_product_helper_mtl.inl new file mode 100644 index 0000000000..2ce064d3e4 --- /dev/null +++ b/shared/source/xe_hpg_core/definitions/compiler_product_helper_mtl.inl @@ -0,0 +1,13 @@ +/* + * Copyright (C) 2023 Intel Corporation + * + * SPDX-License-Identifier: MIT + * + */ + +namespace NEO { +template <> +uint64_t CompilerProductHelperHw::getHwInfoConfig(const HardwareInfo &hwInfo) const { + return 0x0; +} +} // namespace NEO diff --git a/shared/source/xe_hpg_core/definitions/hw_info_setup_dg2.inl b/shared/source/xe_hpg_core/definitions/hw_info_setup_dg2.inl index 6227f7456d..ad77ef0ed2 100644 --- a/shared/source/xe_hpg_core/definitions/hw_info_setup_dg2.inl +++ b/shared/source/xe_hpg_core/definitions/hw_info_setup_dg2.inl @@ -1,12 +1,11 @@ /* - * Copyright (C) 2021-2022 Intel Corporation + * Copyright (C) 2021-2023 Intel Corporation * * SPDX-License-Identifier: MIT * */ const HardwareInfo DG2::hwInfo = Dg2HwConfig::hwInfo; -const uint64_t DG2::defaultHardwareInfoConfig = 0; void DG2::adjustHardwareInfo(HardwareInfo *hwInfo) {} @@ -15,4 +14,4 @@ void setupDG2HardwareInfoImpl(HardwareInfo *hwInfo, bool setupFeatureTableAndWor Dg2HwConfig::setupHardwareInfo(hwInfo, setupFeatureTableAndWorkaroundTable); } -void (*DG2::setupHardwareInfo)(HardwareInfo *, bool, const uint64_t) = setupDG2HardwareInfoImpl; \ No newline at end of file +void (*DG2::setupHardwareInfo)(HardwareInfo *, bool, const uint64_t) = setupDG2HardwareInfoImpl; diff --git a/shared/source/xe_hpg_core/definitions/hw_info_setup_mtl.inl b/shared/source/xe_hpg_core/definitions/hw_info_setup_mtl.inl index 865ade0b7b..9b2ddeadf4 100644 --- a/shared/source/xe_hpg_core/definitions/hw_info_setup_mtl.inl +++ b/shared/source/xe_hpg_core/definitions/hw_info_setup_mtl.inl @@ -7,7 +7,6 @@ namespace NEO { const HardwareInfo MTL::hwInfo = MtlHwConfig::hwInfo; -const uint64_t MTL::defaultHardwareInfoConfig = 0; void setupMTLHardwareInfoImpl(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, uint64_t hwInfoConfig) { MTL::setupHardwareInfoBase(hwInfo, setupFeatureTableAndWorkaroundTable); diff --git a/shared/source/xe_hpg_core/enable_compiler_product_helper_dg2.cpp b/shared/source/xe_hpg_core/enable_compiler_product_helper_dg2.cpp index a4b68b16eb..74b3fd71cf 100644 --- a/shared/source/xe_hpg_core/enable_compiler_product_helper_dg2.cpp +++ b/shared/source/xe_hpg_core/enable_compiler_product_helper_dg2.cpp @@ -11,8 +11,8 @@ #include "shared/source/helpers/compiler_product_helper_bdw_and_later.inl" #include "shared/source/helpers/compiler_product_helper_before_xe_hpc.inl" +#include "compiler_product_helper_dg2.inl" #include "hw_info_dg2.h" - namespace NEO { static EnableCompilerProductHelper enableCompilerProductHelperDG2; diff --git a/shared/source/xe_hpg_core/enable_compiler_product_helper_mtl.cpp b/shared/source/xe_hpg_core/enable_compiler_product_helper_mtl.cpp index ff30a7d296..e2e3b95224 100644 --- a/shared/source/xe_hpg_core/enable_compiler_product_helper_mtl.cpp +++ b/shared/source/xe_hpg_core/enable_compiler_product_helper_mtl.cpp @@ -11,6 +11,7 @@ #include "shared/source/helpers/compiler_product_helper_bdw_and_later.inl" #include "shared/source/helpers/compiler_product_helper_before_xe_hpc.inl" +#include "compiler_product_helper_mtl.inl" #include "hw_info_mtl.h" namespace NEO { diff --git a/shared/source/xe_hpg_core/hw_cmds_dg2.h b/shared/source/xe_hpg_core/hw_cmds_dg2.h index 7f36711d2c..f2e74da274 100644 --- a/shared/source/xe_hpg_core/hw_cmds_dg2.h +++ b/shared/source/xe_hpg_core/hw_cmds_dg2.h @@ -23,7 +23,6 @@ constexpr uint16_t REV_ID_C0 = 8; struct DG2 : public XeHpgCoreFamily { static const PLATFORM platform; static const HardwareInfo hwInfo; - static const uint64_t defaultHardwareInfoConfig; static FeatureTable featureTable; static WorkaroundTable workaroundTable; // Initial non-zero values for unit tests diff --git a/shared/source/xe_hpg_core/hw_cmds_mtl.h b/shared/source/xe_hpg_core/hw_cmds_mtl.h index d855442d3d..bdd0f07849 100644 --- a/shared/source/xe_hpg_core/hw_cmds_mtl.h +++ b/shared/source/xe_hpg_core/hw_cmds_mtl.h @@ -14,7 +14,6 @@ namespace NEO { struct MTL : public XeHpgCoreFamily { static const PLATFORM platform; static const HardwareInfo hwInfo; - static const uint64_t defaultHardwareInfoConfig; static FeatureTable featureTable; static WorkaroundTable workaroundTable; // Initial non-zero values for unit tests diff --git a/shared/test/common/CMakeLists.txt b/shared/test/common/CMakeLists.txt index de4c39faf9..17912e3c3d 100644 --- a/shared/test/common/CMakeLists.txt +++ b/shared/test/common/CMakeLists.txt @@ -1,9 +1,13 @@ # -# Copyright (C) 2021-2022 Intel Corporation +# Copyright (C) 2021-2023 Intel Corporation # # SPDX-License-Identifier: MIT # -add_library(neo_libult_common OBJECT EXCLUDE_FROM_ALL ${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt) +add_library(neo_libult_common OBJECT EXCLUDE_FROM_ALL + ${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt + ${CMAKE_CURRENT_SOURCE_DIR}/tests_configuration.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/tests_configuration.h +) add_subdirectories() diff --git a/shared/test/common/tests_configuration.cpp b/shared/test/common/tests_configuration.cpp new file mode 100644 index 0000000000..ad3cfa4579 --- /dev/null +++ b/shared/test/common/tests_configuration.cpp @@ -0,0 +1,43 @@ +/* + * Copyright (C) 2023 Intel Corporation + * + * SPDX-License-Identifier: MIT + * + */ + +#include "shared/test/common/tests_configuration.h" + +#include "shared/source/helpers/compiler_product_helper.h" +#include "shared/source/helpers/hw_info.h" +#include "shared/source/os_interface/hw_info_config.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); + + auto hwInfoConfig = compilerProductHelper->getHwInfoConfig(hwInfoForTests); + setHwInfoValuesFromConfig(hwInfoConfig, hwInfoForTests); + + auto productHelper = ProductHelper::create(hwInfoForTests.platform.eProductFamily); + uint32_t threadsPerEu = productHelper->threadsPerEu; + + // set Gt and FeatureTable to initial state + bool setupFeatureTableAndWorkaroundTable = testMode == TestMode::AubTests ? true : false; + hardwareInfoSetup[hwInfoForTests.platform.eProductFamily](&hwInfoForTests, setupFeatureTableAndWorkaroundTable, hwInfoConfig); + GT_SYSTEM_INFO >SystemInfo = hwInfoForTests.gtSystemInfo; + + // and adjust dynamic values if not specified + sliceCount = sliceCount > 0 ? sliceCount : gtSystemInfo.SliceCount; + subSlicePerSliceCount = subSlicePerSliceCount > 0 ? subSlicePerSliceCount : (gtSystemInfo.SubSliceCount / sliceCount); + euPerSubSlice = euPerSubSlice > 0 ? euPerSubSlice : gtSystemInfo.MaxEuPerSubSlice; + + gtSystemInfo.SliceCount = sliceCount; + gtSystemInfo.SubSliceCount = gtSystemInfo.SliceCount * subSlicePerSliceCount; + gtSystemInfo.EUCount = gtSystemInfo.SubSliceCount * euPerSubSlice - dieRecovery; + gtSystemInfo.ThreadCount = gtSystemInfo.EUCount * threadsPerEu; + gtSystemInfo.MaxEuPerSubSlice = std::max(gtSystemInfo.MaxEuPerSubSlice, euPerSubSlice); + gtSystemInfo.MaxSlicesSupported = std::max(gtSystemInfo.MaxSlicesSupported, gtSystemInfo.SliceCount); + gtSystemInfo.MaxSubSlicesSupported = std::max(gtSystemInfo.MaxSubSlicesSupported, gtSystemInfo.SubSliceCount); +} +} // namespace NEO diff --git a/shared/test/common/tests_configuration.h b/shared/test/common/tests_configuration.h index dec6530d76..f34f79f15b 100644 --- a/shared/test/common/tests_configuration.h +++ b/shared/test/common/tests_configuration.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018-2022 Intel Corporation + * Copyright (C) 2018-2023 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -7,7 +7,10 @@ #pragma once +#include + namespace NEO { +struct HardwareInfo; enum class TestMode { NotSpecified, UnitTests, AubTests, @@ -15,4 +18,6 @@ enum class TestMode { NotSpecified, TbxTests }; extern TestMode testMode; + +void adjustHwInfoForTests(HardwareInfo &hwInfoForTests, uint32_t euPerSubSlice, uint32_t sliceCount, uint32_t subSlicePerSliceCount, int dieRecovery); } // namespace NEO diff --git a/shared/test/unit_test/main.cpp b/shared/test/unit_test/main.cpp index e6af1d9f2a..58df0388d0 100644 --- a/shared/test/unit_test/main.cpp +++ b/shared/test/unit_test/main.cpp @@ -147,7 +147,6 @@ int main(int argc, char **argv) { bool enableAbrt = true; bool enableAlarm = true; bool enableSegv = true; - bool setupFeatureTableAndWorkaroundTable = testMode == TestMode::AubTests ? true : false; bool showTestStats = false; bool dumpTestStats = false; std::string dumpTestStatsFileName = ""; @@ -284,29 +283,7 @@ int main(int argc, char **argv) { revId = platform.usRevId; } - uint64_t hwInfoConfig = defaultHardwareInfoConfigTable[productFamily]; - setHwInfoValuesFromConfig(hwInfoConfig, hwInfoForTests); - - auto productHelper = ProductHelper::create(hwInfoForTests.platform.eProductFamily); - uint32_t threadsPerEu = productHelper->threadsPerEu; - - // set Gt and FeatureTable to initial state - hardwareInfoSetup[productFamily](&hwInfoForTests, setupFeatureTableAndWorkaroundTable, hwInfoConfig); - GT_SYSTEM_INFO >SystemInfo = hwInfoForTests.gtSystemInfo; - - // and adjust dynamic values if not specified - sliceCount = sliceCount > 0 ? sliceCount : gtSystemInfo.SliceCount; - subSlicePerSliceCount = subSlicePerSliceCount > 0 ? subSlicePerSliceCount : (gtSystemInfo.SubSliceCount / sliceCount); - euPerSubSlice = euPerSubSlice > 0 ? euPerSubSlice : gtSystemInfo.MaxEuPerSubSlice; - // clang-format off - gtSystemInfo.SliceCount = sliceCount; - gtSystemInfo.SubSliceCount = gtSystemInfo.SliceCount * subSlicePerSliceCount; - gtSystemInfo.EUCount = gtSystemInfo.SubSliceCount * euPerSubSlice - dieRecovery; - gtSystemInfo.ThreadCount = gtSystemInfo.EUCount * threadsPerEu; - gtSystemInfo.MaxEuPerSubSlice = std::max(gtSystemInfo.MaxEuPerSubSlice, euPerSubSlice); - gtSystemInfo.MaxSlicesSupported = std::max(gtSystemInfo.MaxSlicesSupported, gtSystemInfo.SliceCount); - gtSystemInfo.MaxSubSlicesSupported = std::max(gtSystemInfo.MaxSubSlicesSupported, gtSystemInfo.SubSliceCount); - // clang-format on + adjustHwInfoForTests(hwInfoForTests, euPerSubSlice, sliceCount, subSlicePerSliceCount, dieRecovery); binaryNameSuffix.append(hardwarePrefix[hwInfoForTests.platform.eProductFamily]);