diff --git a/opencl/source/command_queue/command_queue.cpp b/opencl/source/command_queue/command_queue.cpp index 4fa2736cd3..b7138176a3 100644 --- a/opencl/source/command_queue/command_queue.cpp +++ b/opencl/source/command_queue/command_queue.cpp @@ -137,7 +137,7 @@ void CommandQueue::initializeGpgpu() const { !this->isSpecialCommandQueue && !this->queueFamilySelected && !(getCmdQueueProperties(propertiesVector.data(), CL_QUEUE_PRIORITY_KHR) & static_cast(CL_QUEUE_PRIORITY_LOW_KHR)) && - hwHelper.isAssignEngineRoundRobinSupported() && + hwHelper.isAssignEngineRoundRobinSupported(hwInfo) && this->isAssignEngineRoundRobinEnabled(); if (assignEngineRoundRobin) { diff --git a/opencl/test/unit_test/device/sub_device_tests.cpp b/opencl/test/unit_test/device/sub_device_tests.cpp index c8101bb123..19c5915094 100644 --- a/opencl/test/unit_test/device/sub_device_tests.cpp +++ b/opencl/test/unit_test/device/sub_device_tests.cpp @@ -994,7 +994,7 @@ HWTEST_F(EngineInstancedDeviceTests, whenCreateMultipleCommandQueuesThenEnginesA auto &hwInfo = rootDevice->getHardwareInfo(); const auto &hwHelper = NEO::HwHelper::get(hwInfo.platform.eRenderCoreFamily); - if (!hwHelper.isAssignEngineRoundRobinSupported()) { + if (!hwHelper.isAssignEngineRoundRobinSupported(hwInfo)) { GTEST_SKIP(); } @@ -1040,7 +1040,7 @@ HWTEST_F(EngineInstancedDeviceTests, givenCmdQRoundRobindEngineAssignBitfieldwWe auto &hwInfo = rootDevice->getHardwareInfo(); const auto &hwHelper = NEO::HwHelper::get(hwInfo.platform.eRenderCoreFamily); - if (!hwHelper.isAssignEngineRoundRobinSupported()) { + if (!hwHelper.isAssignEngineRoundRobinSupported(hwInfo)) { GTEST_SKIP(); } @@ -1089,7 +1089,7 @@ HWTEST_F(EngineInstancedDeviceTests, givenCmdQRoundRobindEngineAssignNTo1wWenCre auto &hwInfo = rootDevice->getHardwareInfo(); const auto &hwHelper = NEO::HwHelper::get(hwInfo.platform.eRenderCoreFamily); - if (!hwHelper.isAssignEngineRoundRobinSupported()) { + if (!hwHelper.isAssignEngineRoundRobinSupported(hwInfo)) { GTEST_SKIP(); } @@ -1136,7 +1136,7 @@ HWTEST_F(EngineInstancedDeviceTests, givenCmdQRoundRobindEngineAssignNTo1AndCmdQ auto &hwInfo = rootDevice->getHardwareInfo(); const auto &hwHelper = NEO::HwHelper::get(hwInfo.platform.eRenderCoreFamily); - if (!hwHelper.isAssignEngineRoundRobinSupported()) { + if (!hwHelper.isAssignEngineRoundRobinSupported(hwInfo)) { GTEST_SKIP(); } @@ -1184,7 +1184,7 @@ HWTEST_F(EngineInstancedDeviceTests, givenEnableCmdQRoundRobindEngineAssignDisab auto &hwInfo = rootDevice->getHardwareInfo(); const auto &hwHelper = NEO::HwHelper::get(hwInfo.platform.eRenderCoreFamily); - if (!hwHelper.isAssignEngineRoundRobinSupported()) { + if (!hwHelper.isAssignEngineRoundRobinSupported(hwInfo)) { GTEST_SKIP(); } diff --git a/opencl/test/unit_test/xe_hp_core/hw_helper_tests_xe_hp_core.cpp b/opencl/test/unit_test/xe_hp_core/hw_helper_tests_xe_hp_core.cpp index 9186a4cac7..3bf1dbe95f 100644 --- a/opencl/test/unit_test/xe_hp_core/hw_helper_tests_xe_hp_core.cpp +++ b/opencl/test/unit_test/xe_hp_core/hw_helper_tests_xe_hp_core.cpp @@ -191,7 +191,7 @@ XE_HP_CORE_TEST_F(HwHelperTestXE_HP_CORE, givenDisablePipeControlFlagIsEnabledWh XE_HP_CORE_TEST_F(HwHelperTestXE_HP_CORE, givenXeHPAndLaterPlatformWhenCheckAssignEngineRoundRobinSupportedThenReturnFalse) { auto &hwHelper = HwHelperHw::get(); - EXPECT_FALSE(hwHelper.isAssignEngineRoundRobinSupported()); + EXPECT_FALSE(hwHelper.isAssignEngineRoundRobinSupported(*defaultHwInfo)); } using HwInfoConfigTestXE_HP_CORE = ::testing::Test; diff --git a/shared/source/helpers/hw_helper.h b/shared/source/helpers/hw_helper.h index 54e737a59d..ef4e5b5db8 100644 --- a/shared/source/helpers/hw_helper.h +++ b/shared/source/helpers/hw_helper.h @@ -109,7 +109,7 @@ class HwHelper { virtual bool useOnlyGlobalTimestamps() const = 0; virtual bool useSystemMemoryPlacementForISA(const HardwareInfo &hwInfo) const = 0; virtual bool packedFormatsSupported() const = 0; - virtual bool isAssignEngineRoundRobinSupported() const = 0; + virtual bool isAssignEngineRoundRobinSupported(const HardwareInfo &hwInfo) const = 0; virtual bool isRcsAvailable(const HardwareInfo &hwInfo) const = 0; virtual bool isCooperativeDispatchSupported(const EngineGroupType engineGroupType, const HardwareInfo &hwInfo) const = 0; virtual uint32_t adjustMaxWorkGroupCount(uint32_t maxWorkGroupCount, const EngineGroupType engineGroupType, @@ -374,7 +374,7 @@ class HwHelperHw : public HwHelper { bool unTypedDataPortCacheFlushRequired() const override; - bool isAssignEngineRoundRobinSupported() const override; + bool isAssignEngineRoundRobinSupported(const HardwareInfo &hwInfo) const override; bool isEngineTypeRemappingToHwSpecificRequired() const override; diff --git a/shared/source/helpers/hw_helper_bdw_and_later.inl b/shared/source/helpers/hw_helper_bdw_and_later.inl index 5a92356706..7e873a07de 100644 --- a/shared/source/helpers/hw_helper_bdw_and_later.inl +++ b/shared/source/helpers/hw_helper_bdw_and_later.inl @@ -56,7 +56,7 @@ bool HwHelperHw::isUpdateTaskCountFromWaitSupported() const { } template -bool HwHelperHw::isAssignEngineRoundRobinSupported() const { +bool HwHelperHw::isAssignEngineRoundRobinSupported(const HardwareInfo &hwInfo) const { return false; } diff --git a/shared/source/helpers/hw_helper_xehp_and_later.inl b/shared/source/helpers/hw_helper_xehp_and_later.inl index 58deacdc5f..785d0ee472 100644 --- a/shared/source/helpers/hw_helper_xehp_and_later.inl +++ b/shared/source/helpers/hw_helper_xehp_and_later.inl @@ -152,7 +152,7 @@ uint32_t HwHelperHw::getPlanarYuvMaxHeight() const { } template -bool HwHelperHw::isAssignEngineRoundRobinSupported() const { +bool HwHelperHw::isAssignEngineRoundRobinSupported(const HardwareInfo &hwInfo) const { return false; } diff --git a/shared/source/os_interface/hw_info_config.h b/shared/source/os_interface/hw_info_config.h index c394bad0b2..93ac7bdfff 100644 --- a/shared/source/os_interface/hw_info_config.h +++ b/shared/source/os_interface/hw_info_config.h @@ -119,6 +119,7 @@ class HwInfoConfig { virtual bool isImplicitScalingSupported(const HardwareInfo &hwInfo) const = 0; virtual bool isCpuCopyNecessary(const void *ptr, MemoryManager *memoryManager) const = 0; virtual bool isAdjustWalkOrderAvailable(const HardwareInfo &hwInfo) const = 0; + virtual bool isAssignEngineRoundRobinSupported() const = 0; MOCKABLE_VIRTUAL ~HwInfoConfig() = default; @@ -216,6 +217,7 @@ class HwInfoConfigHw : public HwInfoConfig { bool isImplicitScalingSupported(const HardwareInfo &hwInfo) const override; bool isCpuCopyNecessary(const void *ptr, MemoryManager *memoryManager) const override; bool isAdjustWalkOrderAvailable(const HardwareInfo &hwInfo) const override; + bool isAssignEngineRoundRobinSupported() const override; protected: HwInfoConfigHw() = default; diff --git a/shared/source/os_interface/hw_info_config.inl b/shared/source/os_interface/hw_info_config.inl index b52b4581ca..f87843489b 100644 --- a/shared/source/os_interface/hw_info_config.inl +++ b/shared/source/os_interface/hw_info_config.inl @@ -222,6 +222,11 @@ bool HwInfoConfigHw::isPrefetchDisablingRequired(const HardwareInfo return false; } +template +bool HwInfoConfigHw::isAssignEngineRoundRobinSupported() const { + return false; +} + template std::pair HwInfoConfigHw::isPipeControlPriorToNonPipelinedStateCommandsWARequired(const HardwareInfo &hwInfo, bool isRcs) const { return {false, false}; diff --git a/shared/source/xe_hpc_core/hw_helper_xe_hpc_core.cpp b/shared/source/xe_hpc_core/hw_helper_xe_hpc_core.cpp index 11acebaf66..c9beb29237 100644 --- a/shared/source/xe_hpc_core/hw_helper_xe_hpc_core.cpp +++ b/shared/source/xe_hpc_core/hw_helper_xe_hpc_core.cpp @@ -371,8 +371,8 @@ int32_t HwHelperHw::getDefaultThreadArbitrationPolicy() const { } template <> -bool HwHelperHw::isAssignEngineRoundRobinSupported() const { - return true; +bool HwHelperHw::isAssignEngineRoundRobinSupported(const HardwareInfo &hwInfo) const { + return HwInfoConfig::get(hwInfo.platform.eProductFamily)->isAssignEngineRoundRobinSupported(); } template <> diff --git a/shared/source/xe_hpc_core/pvc/os_agnostic_hw_info_config_pvc.inl b/shared/source/xe_hpc_core/pvc/os_agnostic_hw_info_config_pvc.inl index 2706388136..f2b5549bc5 100644 --- a/shared/source/xe_hpc_core/pvc/os_agnostic_hw_info_config_pvc.inl +++ b/shared/source/xe_hpc_core/pvc/os_agnostic_hw_info_config_pvc.inl @@ -179,3 +179,8 @@ template <> bool HwInfoConfigHw::isImplicitScalingSupported(const HardwareInfo &hwInfo) const { return getSteppingFromHwRevId(hwInfo) >= REVISION_B; } + +template <> +bool HwInfoConfigHw::isAssignEngineRoundRobinSupported() const { + return false; +} diff --git a/shared/test/unit_test/xe_hpc_core/hw_helper_xe_hpc_core_tests.cpp b/shared/test/unit_test/xe_hpc_core/hw_helper_xe_hpc_core_tests.cpp index d5418f97ab..8721c37be4 100644 --- a/shared/test/unit_test/xe_hpc_core/hw_helper_xe_hpc_core_tests.cpp +++ b/shared/test/unit_test/xe_hpc_core/hw_helper_xe_hpc_core_tests.cpp @@ -66,6 +66,7 @@ XE_HPC_CORETEST_F(HwHelperXeHpcCoreTest, givenHwHelperWhenCheckTimestampWaitSupp } XE_HPC_CORETEST_F(HwHelperXeHpcCoreTest, givenXeHPCPlatformWhenCheckAssignEngineRoundRobinSupportedThenReturnTrue) { + auto hwInfo = *defaultHwInfo; auto &hwHelper = HwHelperHw::get(); - EXPECT_TRUE(hwHelper.isAssignEngineRoundRobinSupported()); + EXPECT_EQ(hwHelper.isAssignEngineRoundRobinSupported(hwInfo), HwInfoConfig::get(hwInfo.platform.eProductFamily)->isAssignEngineRoundRobinSupported()); } diff --git a/shared/test/unit_test/xe_hpg_core/hw_helper_tests_xe_hpg_core.cpp b/shared/test/unit_test/xe_hpg_core/hw_helper_tests_xe_hpg_core.cpp index 580099562b..9b75ebf78b 100644 --- a/shared/test/unit_test/xe_hpg_core/hw_helper_tests_xe_hpg_core.cpp +++ b/shared/test/unit_test/xe_hpg_core/hw_helper_tests_xe_hpg_core.cpp @@ -124,7 +124,7 @@ XE_HPG_CORETEST_F(HwHelperTestXeHpgCore, WhenCheckingSipWAThenFalseIsReturned) { XE_HPG_CORETEST_F(HwHelperTestXeHpgCore, givenXeHPAndLaterPlatformWhenCheckAssignEngineRoundRobinSupportedThenReturnFalse) { auto &hwHelper = HwHelperHw::get(); - EXPECT_FALSE(hwHelper.isAssignEngineRoundRobinSupported()); + EXPECT_FALSE(hwHelper.isAssignEngineRoundRobinSupported(*defaultHwInfo)); } XE_HPG_CORETEST_F(HwHelperTestXeHpgCore, givenHwHelperWhenCheckTimestampWaitSupportThenReturnFalse) {