diff --git a/level_zero/core/source/cmdlist/cmdlist_hw.inl b/level_zero/core/source/cmdlist/cmdlist_hw.inl index d665c8c15e..e879484c9b 100644 --- a/level_zero/core/source/cmdlist/cmdlist_hw.inl +++ b/level_zero/core/source/cmdlist/cmdlist_hw.inl @@ -2291,7 +2291,8 @@ void CommandListCoreFamily::updateStreamProperties(Kernel &kernel finalStreamState.frontEndState.setProperties(isCooperative, kernelAttributes.flags.requiresDisabledEUFusion, disableOverdispatch, -1, hwInfo); bool isPatchingVfeStateAllowed = NEO::DebugManager.flags.AllowPatchingVfeStateInCommandLists.get(); - if (finalStreamState.frontEndState.isDirty() && isPatchingVfeStateAllowed && !getLogicalStateHelper()) { + auto logicalStateHelperBlock = !getLogicalStateHelper(); + if (finalStreamState.frontEndState.isDirty() && isPatchingVfeStateAllowed && logicalStateHelperBlock) { auto pVfeStateAddress = NEO::PreambleHelper::getSpaceForVfeState(commandContainer.getCommandStream(), hwInfo, engineGroupType); auto pVfeState = new VFE_STATE_TYPE; NEO::PreambleHelper::programVfeState(pVfeState, hwInfo, 0, 0, device->getMaxNumHwThreads(), finalStreamState, nullptr); @@ -2300,7 +2301,7 @@ void CommandListCoreFamily::updateStreamProperties(Kernel &kernel finalStreamState.stateComputeMode.setProperties(false, kernelAttributes.numGrfRequired, kernelAttributes.threadArbitrationPolicy, device->getDevicePreemptionMode(), hwInfo); - if (finalStreamState.stateComputeMode.isDirty() && !getLogicalStateHelper()) { + if (finalStreamState.stateComputeMode.isDirty() && logicalStateHelperBlock) { bool isRcs = (this->engineGroupType == NEO::EngineGroupType::RenderCompute); NEO::EncodeComputeMode::programComputeModeCommandWithSynchronization( *commandContainer.getCommandStream(), finalStreamState.stateComputeMode, {}, false, hwInfo, isRcs, nullptr); diff --git a/level_zero/core/source/cmdqueue/cmdqueue_hw.inl b/level_zero/core/source/cmdqueue/cmdqueue_hw.inl index 5d96fc2fa0..a44732512a 100644 --- a/level_zero/core/source/cmdqueue/cmdqueue_hw.inl +++ b/level_zero/core/source/cmdqueue/cmdqueue_hw.inl @@ -597,7 +597,7 @@ void CommandQueueHw::setFrontEndStateProperties(CommandListExecut streamProperties.frontEndState.setProperties(ctx.anyCommandListWithCooperativeKernels, ctx.anyCommandListRequiresDisabledEUFusion, disableOverdispatch, isEngineInstanced, hwInfo); } else { - streamProperties.frontEndState.singleSliceDispatchCcsMode.set(isEngineInstanced); + streamProperties.frontEndState.setPropertySingleSliceDispatchCcsMode(isEngineInstanced, hwInfo); } ctx.frontEndStateDirty |= (streamProperties.frontEndState.isDirty() && !this->csr->getLogicalStateHelper()); ctx.frontEndStateDirty |= csr->getMediaVFEStateDirty(); diff --git a/level_zero/core/test/unit_tests/sources/cmdlist/test_cmdlist_6.cpp b/level_zero/core/test/unit_tests/sources/cmdlist/test_cmdlist_6.cpp index 5c5b520794..960654d987 100644 --- a/level_zero/core/test/unit_tests/sources/cmdlist/test_cmdlist_6.cpp +++ b/level_zero/core/test/unit_tests/sources/cmdlist/test_cmdlist_6.cpp @@ -72,13 +72,20 @@ HWTEST2_F(CommandListExecuteImmediate, whenExecutingCommandListImmediateWithFlus NEO::StateComputeModePropertiesSupport scmPropertiesSupport = {}; hwInfoConfig.fillScmPropertiesSupportStructure(scmPropertiesSupport); + NEO::FrontEndPropertiesSupport frontEndPropertiesSupport = {}; + hwInfoConfig.fillFrontEndPropertiesSupportStructure(frontEndPropertiesSupport); int expectedDisableOverdispatch = hwInfoConfig.isDisableOverdispatchAvailable(*defaultHwInfo); int32_t expectedIsCoherencyRequired = scmPropertiesSupport.coherencyRequired ? hwHelper.forceNonGpuCoherencyWA(true) : -1; int expectedLargeGrfMode = scmPropertiesSupport.largeGrfMode ? 1 : -1; int expectedThreadArbitrationPolicy = scmPropertiesSupport.threadArbitrationPolicy ? NEO::ThreadArbitrationPolicy::RoundRobin : -1; - EXPECT_EQ(1, currentCsrStreamProperties.frontEndState.computeDispatchAllWalkerEnable.value); - EXPECT_EQ(1, currentCsrStreamProperties.frontEndState.disableEUFusion.value); + + int expectedComputeDispatchAllWalkerEnable = frontEndPropertiesSupport.computeDispatchAllWalker ? 1 : -1; + int expectedDisableEuFusion = frontEndPropertiesSupport.disableEuFusion ? 1 : -1; + expectedDisableOverdispatch = frontEndPropertiesSupport.disableOverdispatch ? expectedDisableOverdispatch : -1; + + EXPECT_EQ(expectedComputeDispatchAllWalkerEnable, currentCsrStreamProperties.frontEndState.computeDispatchAllWalkerEnable.value); + EXPECT_EQ(expectedDisableEuFusion, currentCsrStreamProperties.frontEndState.disableEUFusion.value); EXPECT_EQ(expectedDisableOverdispatch, currentCsrStreamProperties.frontEndState.disableOverdispatch.value); EXPECT_EQ(expectedIsCoherencyRequired, currentCsrStreamProperties.stateComputeMode.isCoherencyRequired.value); EXPECT_EQ(expectedLargeGrfMode, currentCsrStreamProperties.stateComputeMode.largeGrfMode.value); @@ -95,9 +102,14 @@ HWTEST2_F(CommandListExecuteImmediate, whenExecutingCommandListImmediateWithFlus expectedLargeGrfMode = scmPropertiesSupport.largeGrfMode ? 0 : -1; expectedIsCoherencyRequired = scmPropertiesSupport.coherencyRequired ? 0 : -1; expectedThreadArbitrationPolicy = scmPropertiesSupport.threadArbitrationPolicy ? NEO::ThreadArbitrationPolicy::AgeBased : -1; - EXPECT_EQ(0, currentCsrStreamProperties.frontEndState.computeDispatchAllWalkerEnable.value); - EXPECT_EQ(0, currentCsrStreamProperties.frontEndState.disableEUFusion.value); - EXPECT_EQ(0, currentCsrStreamProperties.frontEndState.disableOverdispatch.value); + + expectedComputeDispatchAllWalkerEnable = frontEndPropertiesSupport.computeDispatchAllWalker ? 0 : -1; + expectedDisableOverdispatch = frontEndPropertiesSupport.disableOverdispatch ? 0 : -1; + expectedDisableEuFusion = frontEndPropertiesSupport.disableEuFusion ? 0 : -1; + + EXPECT_EQ(expectedComputeDispatchAllWalkerEnable, currentCsrStreamProperties.frontEndState.computeDispatchAllWalkerEnable.value); + EXPECT_EQ(expectedDisableEuFusion, currentCsrStreamProperties.frontEndState.disableEUFusion.value); + EXPECT_EQ(expectedDisableOverdispatch, currentCsrStreamProperties.frontEndState.disableOverdispatch.value); EXPECT_EQ(expectedIsCoherencyRequired, currentCsrStreamProperties.stateComputeMode.isCoherencyRequired.value); EXPECT_EQ(expectedLargeGrfMode, currentCsrStreamProperties.stateComputeMode.largeGrfMode.value); EXPECT_EQ(expectedThreadArbitrationPolicy, currentCsrStreamProperties.stateComputeMode.threadArbitrationPolicy.value); diff --git a/level_zero/core/test/unit_tests/sources/cmdlist/test_cmdlist_append_launch_kernel_3.cpp b/level_zero/core/test/unit_tests/sources/cmdlist/test_cmdlist_append_launch_kernel_3.cpp index e00bce395e..e952703a76 100644 --- a/level_zero/core/test/unit_tests/sources/cmdlist/test_cmdlist_append_launch_kernel_3.cpp +++ b/level_zero/core/test/unit_tests/sources/cmdlist/test_cmdlist_append_launch_kernel_3.cpp @@ -360,7 +360,8 @@ HWTEST2_F(CommandListAppendLaunchKernel, whenUpdateStreamPropertiesIsCalledThenR EXPECT_EQ(-1, pCommandList->finalStreamState.frontEndState.disableOverdispatch.value); const auto &hwInfoConfig = *NEO::HwInfoConfig::get(defaultHwInfo->platform.eProductFamily); - int32_t expectedDisableOverdispatch = hwInfoConfig.isDisableOverdispatchAvailable(*defaultHwInfo); + int32_t expectedDisableOverdispatch = hwInfoConfig.isDisableOverdispatchAvailable(*defaultHwInfo) ? 1 : 0; + expectedDisableOverdispatch = hwInfoConfig.getFrontEndPropertyDisableOverDispatchSupport() ? expectedDisableOverdispatch : -1; pCommandList->updateStreamProperties(kernel, false, false); EXPECT_EQ(expectedDisableOverdispatch, pCommandList->requiredStreamState.frontEndState.disableOverdispatch.value); diff --git a/level_zero/core/test/unit_tests/sources/cmdlist/test_cmdlist_xehp_and_later.cpp b/level_zero/core/test/unit_tests/sources/cmdlist/test_cmdlist_xehp_and_later.cpp index ecc4c83784..a2b1afce49 100644 --- a/level_zero/core/test/unit_tests/sources/cmdlist/test_cmdlist_xehp_and_later.cpp +++ b/level_zero/core/test/unit_tests/sources/cmdlist/test_cmdlist_xehp_and_later.cpp @@ -210,40 +210,52 @@ HWTEST2_F(CommandListAppendLaunchKernel, givenVariousKernelsWhenUpdateStreamProp EXPECT_EQ(-1, pCommandList->finalStreamState.frontEndState.computeDispatchAllWalkerEnable.value); EXPECT_EQ(0u, pCommandList->commandsToPatch.size()); + auto &hwInfoConfig = *NEO::HwInfoConfig::get(defaultHwInfo->platform.eProductFamily); + int32_t expectedDispatchAllWalkerEnable = hwInfoConfig.getFrontEndPropertyComputeDispatchAllWalkerSupport() ? 0 : -1; + pCommandList->updateStreamProperties(defaultKernel, false, false); - EXPECT_EQ(0, pCommandList->requiredStreamState.frontEndState.computeDispatchAllWalkerEnable.value); - EXPECT_EQ(0, pCommandList->finalStreamState.frontEndState.computeDispatchAllWalkerEnable.value); + + EXPECT_EQ(expectedDispatchAllWalkerEnable, pCommandList->requiredStreamState.frontEndState.computeDispatchAllWalkerEnable.value); + EXPECT_EQ(expectedDispatchAllWalkerEnable, pCommandList->finalStreamState.frontEndState.computeDispatchAllWalkerEnable.value); EXPECT_EQ(0u, pCommandList->commandsToPatch.size()); pCommandList->reset(); pCommandList->updateStreamProperties(cooperativeKernel, false, true); pCommandList->updateStreamProperties(cooperativeKernel, false, true); - EXPECT_EQ(1, pCommandList->requiredStreamState.frontEndState.computeDispatchAllWalkerEnable.value); - EXPECT_EQ(1, pCommandList->finalStreamState.frontEndState.computeDispatchAllWalkerEnable.value); + expectedDispatchAllWalkerEnable = expectedDispatchAllWalkerEnable != -1 ? 1 : expectedDispatchAllWalkerEnable; + EXPECT_EQ(expectedDispatchAllWalkerEnable, pCommandList->requiredStreamState.frontEndState.computeDispatchAllWalkerEnable.value); + EXPECT_EQ(expectedDispatchAllWalkerEnable, pCommandList->finalStreamState.frontEndState.computeDispatchAllWalkerEnable.value); EXPECT_EQ(0u, pCommandList->commandsToPatch.size()); pCommandList->reset(); pCommandList->updateStreamProperties(defaultKernel, false, false); pCommandList->updateStreamProperties(cooperativeKernel, false, true); - EXPECT_EQ(0, pCommandList->requiredStreamState.frontEndState.computeDispatchAllWalkerEnable.value); - EXPECT_EQ(1, pCommandList->finalStreamState.frontEndState.computeDispatchAllWalkerEnable.value); - EXPECT_EQ(1u, pCommandList->commandsToPatch.size()); + expectedDispatchAllWalkerEnable = expectedDispatchAllWalkerEnable != -1 ? 0 : expectedDispatchAllWalkerEnable; + EXPECT_EQ(expectedDispatchAllWalkerEnable, pCommandList->requiredStreamState.frontEndState.computeDispatchAllWalkerEnable.value); + expectedDispatchAllWalkerEnable = expectedDispatchAllWalkerEnable != -1 ? 1 : expectedDispatchAllWalkerEnable; + EXPECT_EQ(expectedDispatchAllWalkerEnable, pCommandList->finalStreamState.frontEndState.computeDispatchAllWalkerEnable.value); + size_t expectedCommandsToPatch = expectedDispatchAllWalkerEnable != -1 ? 1 : 0; + EXPECT_EQ(expectedCommandsToPatch, pCommandList->commandsToPatch.size()); pCommandList->reset(); pCommandList->updateStreamProperties(cooperativeKernel, false, true); pCommandList->updateStreamProperties(defaultKernel, false, false); pCommandList->updateStreamProperties(cooperativeKernel, false, true); - EXPECT_EQ(1, pCommandList->requiredStreamState.frontEndState.computeDispatchAllWalkerEnable.value); - EXPECT_EQ(1, pCommandList->finalStreamState.frontEndState.computeDispatchAllWalkerEnable.value); - EXPECT_EQ(2u, pCommandList->commandsToPatch.size()); + EXPECT_EQ(expectedDispatchAllWalkerEnable, pCommandList->requiredStreamState.frontEndState.computeDispatchAllWalkerEnable.value); + EXPECT_EQ(expectedDispatchAllWalkerEnable, pCommandList->finalStreamState.frontEndState.computeDispatchAllWalkerEnable.value); + expectedCommandsToPatch = expectedCommandsToPatch != 0 ? 2 : 0; + EXPECT_EQ(expectedCommandsToPatch, pCommandList->commandsToPatch.size()); pCommandList->reset(); pCommandList->updateStreamProperties(defaultKernel, false, false); pCommandList->updateStreamProperties(defaultKernel, false, false); pCommandList->updateStreamProperties(cooperativeKernel, false, true); - EXPECT_EQ(0, pCommandList->requiredStreamState.frontEndState.computeDispatchAllWalkerEnable.value); - EXPECT_EQ(1, pCommandList->finalStreamState.frontEndState.computeDispatchAllWalkerEnable.value); - EXPECT_EQ(1u, pCommandList->commandsToPatch.size()); + expectedDispatchAllWalkerEnable = expectedDispatchAllWalkerEnable != -1 ? 0 : expectedDispatchAllWalkerEnable; + EXPECT_EQ(expectedDispatchAllWalkerEnable, pCommandList->requiredStreamState.frontEndState.computeDispatchAllWalkerEnable.value); + expectedDispatchAllWalkerEnable = expectedDispatchAllWalkerEnable != -1 ? 1 : expectedDispatchAllWalkerEnable; + EXPECT_EQ(expectedDispatchAllWalkerEnable, pCommandList->finalStreamState.frontEndState.computeDispatchAllWalkerEnable.value); + expectedCommandsToPatch = expectedCommandsToPatch != 0 ? 1 : 0; + EXPECT_EQ(expectedCommandsToPatch, pCommandList->commandsToPatch.size()); pCommandList->reset(); EXPECT_EQ(-1, pCommandList->requiredStreamState.frontEndState.computeDispatchAllWalkerEnable.value); @@ -275,7 +287,11 @@ HWTEST2_F(CommandListAppendLaunchKernel, givenVariousKernelsAndPatchingDisallowe DebugManager.flags.AllowPatchingVfeStateInCommandLists.set(1); pCommandList->updateStreamProperties(defaultKernel, false, false); pCommandList->updateStreamProperties(cooperativeKernel, false, true); - EXPECT_EQ(1u, pCommandList->commandsToPatch.size()); + + const auto &hwInfoConfig = *NEO::HwInfoConfig::get(defaultHwInfo->platform.eProductFamily); + size_t expectedCmdsToPatch = hwInfoConfig.getFrontEndPropertyComputeDispatchAllWalkerSupport() ? 1 : 0; + + EXPECT_EQ(expectedCmdsToPatch, pCommandList->commandsToPatch.size()); pCommandList->reset(); } diff --git a/level_zero/core/test/unit_tests/sources/cmdqueue/test_cmdqueue_enqueue_cmdlist.cpp b/level_zero/core/test/unit_tests/sources/cmdqueue/test_cmdqueue_enqueue_cmdlist.cpp index bb2a5512e8..c2ae105a14 100644 --- a/level_zero/core/test/unit_tests/sources/cmdqueue/test_cmdqueue_enqueue_cmdlist.cpp +++ b/level_zero/core/test/unit_tests/sources/cmdqueue/test_cmdqueue_enqueue_cmdlist.cpp @@ -143,7 +143,9 @@ HWTEST_F(CommandQueueExecuteCommandLists, givenCommandListThatRequiresDisabledEU auto result = commandQueue->executeCommandLists(numCommandLists, commandLists, nullptr, true); ASSERT_EQ(ZE_RESULT_SUCCESS, result); - EXPECT_EQ(1, commandQueue->getCsr()->getStreamProperties().frontEndState.disableEUFusion.value); + bool disableEuFusion = NEO::HwInfoConfig::get(device->getHwInfo().platform.eProductFamily)->getFrontEndPropertyDisableEuFusionSupport(); + int32_t expectedDisableEuFusion = disableEuFusion ? 1 : -1; + EXPECT_EQ(expectedDisableEuFusion, commandQueue->getCsr()->getStreamProperties().frontEndState.disableEUFusion.value); commandQueue->destroy(); } diff --git a/shared/source/command_stream/definitions/stream_properties.inl b/shared/source/command_stream/definitions/stream_properties.inl index 6f75b61828..23e03badcd 100644 --- a/shared/source/command_stream/definitions/stream_properties.inl +++ b/shared/source/command_stream/definitions/stream_properties.inl @@ -44,10 +44,10 @@ struct StateComputeModeProperties { }; struct FrontEndPropertiesSupport { - bool dispatchAllWalker = false; - bool euFusion = false; - bool overdispatch = false; - bool singleSliceDispatchCcs = false; + bool computeDispatchAllWalker = false; + bool disableEuFusion = false; + bool disableOverdispatch = false; + bool singleSliceDispatchCcsMode = false; }; struct FrontEndProperties { @@ -56,13 +56,16 @@ struct FrontEndProperties { StreamProperty disableOverdispatch{}; StreamProperty singleSliceDispatchCcsMode{}; - void setProperties(bool isCooperativeKernel, bool disableEUFusion, bool disableOverdispatch, int32_t engineInstancedDevice, - const HardwareInfo &hwInfo); + void setProperties(bool isCooperativeKernel, bool disableEUFusion, bool disableOverdispatch, int32_t engineInstancedDevice, const HardwareInfo &hwInfo); void setProperties(const FrontEndProperties &properties); + void setPropertySingleSliceDispatchCcsMode(int32_t engineInstancedDevice, const HardwareInfo &hwInfo); bool isDirty() const; protected: void clearIsDirty(); + + FrontEndPropertiesSupport frontEndPropertiesSupport = {}; + bool propertiesSupportLoaded = false; }; } // namespace NEO diff --git a/shared/source/command_stream/stream_properties.cpp b/shared/source/command_stream/stream_properties.cpp index 01831267a1..a9c397d07b 100644 --- a/shared/source/command_stream/stream_properties.cpp +++ b/shared/source/command_stream/stream_properties.cpp @@ -102,14 +102,42 @@ void StateComputeModeProperties::clearIsDirty() { clearIsDirtyExtra(); } -void FrontEndProperties::setProperties(bool isCooperativeKernel, bool disableEUFusion, bool disableOverdispatch, - int32_t engineInstancedDevice, const HardwareInfo &hwInfo) { +void FrontEndProperties::setProperties(bool isCooperativeKernel, bool disableEUFusion, bool disableOverdispatch, int32_t engineInstancedDevice, const HardwareInfo &hwInfo) { + if (this->propertiesSupportLoaded == false) { + auto &hwInfoConfig = *HwInfoConfig::get(hwInfo.platform.eProductFamily); + hwInfoConfig.fillFrontEndPropertiesSupportStructure(this->frontEndPropertiesSupport); + this->propertiesSupportLoaded = true; + } + clearIsDirty(); - this->computeDispatchAllWalkerEnable.set(isCooperativeKernel); - this->disableEUFusion.set(disableEUFusion); - this->disableOverdispatch.set(disableOverdispatch); - this->singleSliceDispatchCcsMode.set(engineInstancedDevice); + if (this->frontEndPropertiesSupport.computeDispatchAllWalker) { + this->computeDispatchAllWalkerEnable.set(isCooperativeKernel); + } + + if (this->frontEndPropertiesSupport.disableEuFusion) { + this->disableEUFusion.set(disableEUFusion); + } + + if (frontEndPropertiesSupport.disableOverdispatch) { + this->disableOverdispatch.set(disableOverdispatch); + } + + if (this->frontEndPropertiesSupport.singleSliceDispatchCcsMode) { + this->singleSliceDispatchCcsMode.set(engineInstancedDevice); + } +} + +void FrontEndProperties::setPropertySingleSliceDispatchCcsMode(int32_t engineInstancedDevice, const HardwareInfo &hwInfo) { + if (this->propertiesSupportLoaded == false) { + auto &hwInfoConfig = *HwInfoConfig::get(hwInfo.platform.eProductFamily); + hwInfoConfig.fillFrontEndPropertiesSupportStructure(this->frontEndPropertiesSupport); + this->propertiesSupportLoaded = true; + } + this->singleSliceDispatchCcsMode.isDirty = false; + if (this->frontEndPropertiesSupport.singleSliceDispatchCcsMode) { + this->singleSliceDispatchCcsMode.set(engineInstancedDevice); + } } void FrontEndProperties::setProperties(const FrontEndProperties &properties) { diff --git a/shared/source/gen11/hw_cmds_base.h b/shared/source/gen11/hw_cmds_base.h index b66e2c85a1..d79dc58ddd 100644 --- a/shared/source/gen11/hw_cmds_base.h +++ b/shared/source/gen11/hw_cmds_base.h @@ -28,6 +28,10 @@ struct Gen11 { struct FrontEndStateSupport { static constexpr bool scratchSize = true; static constexpr bool privateScratchSize = false; + static constexpr bool computeDispatchAllWalker = false; + static constexpr bool disableEuFusion = false; + static constexpr bool disableOverdispatch = false; + static constexpr bool singleSliceDispatchCcsMode = false; }; struct StateComputeModeStateSupport { diff --git a/shared/source/gen12lp/hw_cmds_base.h b/shared/source/gen12lp/hw_cmds_base.h index fd6a39b1cd..d444ee2290 100644 --- a/shared/source/gen12lp/hw_cmds_base.h +++ b/shared/source/gen12lp/hw_cmds_base.h @@ -31,6 +31,10 @@ struct Gen12Lp { struct FrontEndStateSupport { static constexpr bool scratchSize = true; static constexpr bool privateScratchSize = false; + static constexpr bool computeDispatchAllWalker = false; + static constexpr bool disableEuFusion = true; + static constexpr bool disableOverdispatch = false; + static constexpr bool singleSliceDispatchCcsMode = false; }; struct StateComputeModeStateSupport { diff --git a/shared/source/gen8/hw_cmds_base.h b/shared/source/gen8/hw_cmds_base.h index 9d0707f7cd..322b5f4870 100644 --- a/shared/source/gen8/hw_cmds_base.h +++ b/shared/source/gen8/hw_cmds_base.h @@ -30,6 +30,10 @@ struct Gen8 { struct FrontEndStateSupport { static constexpr bool scratchSize = true; static constexpr bool privateScratchSize = false; + static constexpr bool computeDispatchAllWalker = false; + static constexpr bool disableEuFusion = false; + static constexpr bool disableOverdispatch = false; + static constexpr bool singleSliceDispatchCcsMode = false; }; struct StateComputeModeStateSupport { diff --git a/shared/source/gen9/hw_cmds_base.h b/shared/source/gen9/hw_cmds_base.h index 10a259dd17..f483165fbf 100644 --- a/shared/source/gen9/hw_cmds_base.h +++ b/shared/source/gen9/hw_cmds_base.h @@ -29,6 +29,10 @@ struct Gen9 { struct FrontEndStateSupport { static constexpr bool scratchSize = true; static constexpr bool privateScratchSize = false; + static constexpr bool computeDispatchAllWalker = false; + static constexpr bool disableEuFusion = false; + static constexpr bool disableOverdispatch = false; + static constexpr bool singleSliceDispatchCcsMode = false; }; struct StateComputeModeStateSupport { diff --git a/shared/source/os_interface/hw_info_config.h b/shared/source/os_interface/hw_info_config.h index 0e60c3a1fb..f034e45f56 100644 --- a/shared/source/os_interface/hw_info_config.h +++ b/shared/source/os_interface/hw_info_config.h @@ -20,6 +20,7 @@ enum PRODUCT_CONFIG : uint32_t; namespace NEO { struct HardwareInfo; +struct FrontEndPropertiesSupport; struct StateComputeModeProperties; struct StateComputeModePropertiesSupport; struct PipelineSelectArgs; @@ -140,6 +141,10 @@ class HwInfoConfig { virtual bool getFrontEndPropertyScratchSizeSupport() const = 0; virtual bool getFrontEndPropertyPrivateScratchSizeSupport() const = 0; + virtual bool getFrontEndPropertyComputeDispatchAllWalkerSupport() const = 0; + virtual bool getFrontEndPropertyDisableEuFusionSupport() const = 0; + virtual bool getFrontEndPropertyDisableOverDispatchSupport() const = 0; + virtual bool getFrontEndPropertySingleSliceDispatchCcsModeSupport() const = 0; virtual bool getScmPropertyThreadArbitrationPolicySupport() const = 0; virtual bool getScmPropertyCoherencyRequiredSupport() const = 0; @@ -156,6 +161,7 @@ class HwInfoConfig { virtual bool getPreemptionDbgPropertyCsrSurfaceSupport() const = 0; virtual void fillScmPropertiesSupportStructure(StateComputeModePropertiesSupport &propertiesSupport) = 0; + virtual void fillFrontEndPropertiesSupportStructure(FrontEndPropertiesSupport &propertiesSupport) = 0; MOCKABLE_VIRTUAL ~HwInfoConfig() = default; @@ -266,6 +272,10 @@ class HwInfoConfigHw : public HwInfoConfig { bool getFrontEndPropertyScratchSizeSupport() const override; bool getFrontEndPropertyPrivateScratchSizeSupport() const override; + bool getFrontEndPropertyComputeDispatchAllWalkerSupport() const override; + bool getFrontEndPropertyDisableEuFusionSupport() const override; + bool getFrontEndPropertyDisableOverDispatchSupport() const override; + bool getFrontEndPropertySingleSliceDispatchCcsModeSupport() const override; bool getScmPropertyThreadArbitrationPolicySupport() const override; bool getScmPropertyCoherencyRequiredSupport() const override; @@ -282,6 +292,7 @@ class HwInfoConfigHw : public HwInfoConfig { bool getPreemptionDbgPropertyCsrSurfaceSupport() const override; void fillScmPropertiesSupportStructure(StateComputeModePropertiesSupport &propertiesSupport) override; + void fillFrontEndPropertiesSupportStructure(FrontEndPropertiesSupport &propertiesSupport) 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 55854fda63..e08bde0771 100644 --- a/shared/source/os_interface/hw_info_config.inl +++ b/shared/source/os_interface/hw_info_config.inl @@ -592,4 +592,36 @@ bool HwInfoConfigHw::getFrontEndPropertyPrivateScratchSizeSupport() return GfxProduct::FrontEndStateSupport::privateScratchSize; } +template +bool HwInfoConfigHw::getFrontEndPropertyComputeDispatchAllWalkerSupport() const { + using GfxProduct = typename HwMapper::GfxProduct; + return GfxProduct::FrontEndStateSupport::computeDispatchAllWalker; +} + +template +bool HwInfoConfigHw::getFrontEndPropertyDisableEuFusionSupport() const { + using GfxProduct = typename HwMapper::GfxProduct; + return GfxProduct::FrontEndStateSupport::disableEuFusion; +} + +template +bool HwInfoConfigHw::getFrontEndPropertyDisableOverDispatchSupport() const { + using GfxProduct = typename HwMapper::GfxProduct; + return GfxProduct::FrontEndStateSupport::disableOverdispatch; +} + +template +bool HwInfoConfigHw::getFrontEndPropertySingleSliceDispatchCcsModeSupport() const { + using GfxProduct = typename HwMapper::GfxProduct; + return GfxProduct::FrontEndStateSupport::singleSliceDispatchCcsMode; +} + +template +void HwInfoConfigHw::fillFrontEndPropertiesSupportStructure(FrontEndPropertiesSupport &propertiesSupport) { + propertiesSupport.computeDispatchAllWalker = getFrontEndPropertyComputeDispatchAllWalkerSupport(); + propertiesSupport.disableEuFusion = getFrontEndPropertyDisableEuFusionSupport(); + propertiesSupport.disableOverdispatch = getFrontEndPropertyDisableOverDispatchSupport(); + propertiesSupport.singleSliceDispatchCcsMode = getFrontEndPropertySingleSliceDispatchCcsModeSupport(); +} + } // namespace NEO diff --git a/shared/source/xe_hp_core/hw_cmds_base.h b/shared/source/xe_hp_core/hw_cmds_base.h index 44274379f9..2250badb19 100644 --- a/shared/source/xe_hp_core/hw_cmds_base.h +++ b/shared/source/xe_hp_core/hw_cmds_base.h @@ -37,6 +37,10 @@ struct XeHpCore { struct FrontEndStateSupport { static constexpr bool scratchSize = true; static constexpr bool privateScratchSize = true; + static constexpr bool computeDispatchAllWalker = false; + static constexpr bool disableEuFusion = false; + static constexpr bool disableOverdispatch = true; + static constexpr bool singleSliceDispatchCcsMode = true; }; struct StateComputeModeStateSupport { diff --git a/shared/source/xe_hpc_core/hw_cmds_pvc.h b/shared/source/xe_hpc_core/hw_cmds_pvc.h index 9cfbc1455c..2a21e370ff 100644 --- a/shared/source/xe_hpc_core/hw_cmds_pvc.h +++ b/shared/source/xe_hpc_core/hw_cmds_pvc.h @@ -31,6 +31,10 @@ struct PVC : public XeHpcCoreFamily { struct FrontEndStateSupport { static constexpr bool scratchSize = true; static constexpr bool privateScratchSize = true; + static constexpr bool computeDispatchAllWalker = true; + static constexpr bool disableEuFusion = false; + static constexpr bool disableOverdispatch = true; + static constexpr bool singleSliceDispatchCcsMode = true; }; struct StateComputeModeStateSupport { diff --git a/shared/source/xe_hpg_core/hw_cmds_xe_hpg_core_base.h b/shared/source/xe_hpg_core/hw_cmds_xe_hpg_core_base.h index 0119ecbcd0..c35c781205 100644 --- a/shared/source/xe_hpg_core/hw_cmds_xe_hpg_core_base.h +++ b/shared/source/xe_hpg_core/hw_cmds_xe_hpg_core_base.h @@ -37,6 +37,10 @@ struct XeHpgCore { struct FrontEndStateSupport { static constexpr bool scratchSize = true; static constexpr bool privateScratchSize = true; + static constexpr bool computeDispatchAllWalker = false; + static constexpr bool disableEuFusion = true; + static constexpr bool disableOverdispatch = true; + static constexpr bool singleSliceDispatchCcsMode = true; }; struct StateComputeModeStateSupport { diff --git a/shared/test/common/mocks/mock_hw_info_config.cpp b/shared/test/common/mocks/mock_hw_info_config.cpp index 9a3c820000..d76c6e938a 100644 --- a/shared/test/common/mocks/mock_hw_info_config.cpp +++ b/shared/test/common/mocks/mock_hw_info_config.cpp @@ -421,6 +421,11 @@ struct UnknownProduct { struct FrontEndStateSupport { static constexpr bool scratchSize = false; static constexpr bool privateScratchSize = false; + static constexpr bool computeDispatchAllWalker = false; + + static constexpr bool disableEuFusion = false; + static constexpr bool disableOverdispatch = false; + static constexpr bool singleSliceDispatchCcsMode = false; }; struct StateComputeModeStateSupport { diff --git a/shared/test/unit_test/command_stream/stream_properties_tests_common.cpp b/shared/test/unit_test/command_stream/stream_properties_tests_common.cpp index 9b41370327..a996f655f7 100644 --- a/shared/test/unit_test/command_stream/stream_properties_tests_common.cpp +++ b/shared/test/unit_test/command_stream/stream_properties_tests_common.cpp @@ -17,6 +17,11 @@ using namespace NEO; +struct MockFrontEndProperties : public FrontEndProperties { + using FrontEndProperties::frontEndPropertiesSupport; + using FrontEndProperties::propertiesSupportLoaded; +}; + TEST(StreamPropertiesTests, whenPropertyValueIsChangedThenProperStateIsSet) { NEO::StreamProperty streamProperty; @@ -46,15 +51,36 @@ TEST(StreamPropertiesTests, whenPropertyValueIsChangedThenProperStateIsSet) { TEST(StreamPropertiesTests, whenSettingCooperativeKernelPropertiesThenCorrectValueIsSet) { StreamProperties properties; + + FrontEndPropertiesSupport frontEndPropertiesSupport = {}; + auto hwInfoConfig = HwInfoConfig::get(defaultHwInfo->platform.eProductFamily); + hwInfoConfig->fillFrontEndPropertiesSupportStructure(frontEndPropertiesSupport); + for (auto isEngineInstanced : ::testing::Bool()) { for (auto isCooperativeKernel : ::testing::Bool()) { for (auto disableOverdispatch : ::testing::Bool()) { for (auto disableEUFusion : ::testing::Bool()) { properties.frontEndState.setProperties(isCooperativeKernel, disableEUFusion, disableOverdispatch, isEngineInstanced, *defaultHwInfo); - EXPECT_EQ(isCooperativeKernel, properties.frontEndState.computeDispatchAllWalkerEnable.value); - EXPECT_EQ(disableEUFusion, properties.frontEndState.disableEUFusion.value); - EXPECT_EQ(disableOverdispatch, properties.frontEndState.disableOverdispatch.value); - EXPECT_EQ(isEngineInstanced, properties.frontEndState.singleSliceDispatchCcsMode.value); + if (frontEndPropertiesSupport.computeDispatchAllWalker) { + EXPECT_EQ(isCooperativeKernel, properties.frontEndState.computeDispatchAllWalkerEnable.value); + } else { + EXPECT_EQ(-1, properties.frontEndState.computeDispatchAllWalkerEnable.value); + } + if (frontEndPropertiesSupport.disableEuFusion) { + EXPECT_EQ(disableEUFusion, properties.frontEndState.disableEUFusion.value); + } else { + EXPECT_EQ(-1, properties.frontEndState.disableEUFusion.value); + } + if (frontEndPropertiesSupport.disableOverdispatch) { + EXPECT_EQ(disableOverdispatch, properties.frontEndState.disableOverdispatch.value); + } else { + EXPECT_EQ(-1, properties.frontEndState.disableOverdispatch.value); + } + if (frontEndPropertiesSupport.singleSliceDispatchCcsMode) { + EXPECT_EQ(isEngineInstanced, properties.frontEndState.singleSliceDispatchCcsMode.value); + } else { + EXPECT_EQ(-1, properties.frontEndState.singleSliceDispatchCcsMode.value); + } } } } @@ -215,3 +241,31 @@ TEST(StreamPropertiesTests, givenOtherStateComputeModePropertiesStructWhenSetPro TEST(StreamPropertiesTests, givenOtherFrontEndPropertiesStructWhenSetPropertiesIsCalledThenCorrectValuesAreSet) { verifySettingPropertiesFromOtherStruct(); } + +TEST(StreamPropertiesTests, givenSingleDispatchCcsFrontEndPropertyWhenSettingPropertyAndCheckIfSupportedThenExpectCorrectState) { + FrontEndPropertiesSupport fePropertiesSupport{}; + auto &hwInfoConfig = *HwInfoConfig::get(defaultHwInfo->platform.eProductFamily); + hwInfoConfig.fillFrontEndPropertiesSupportStructure(fePropertiesSupport); + + MockFrontEndProperties feProperties{}; + EXPECT_FALSE(feProperties.propertiesSupportLoaded); + + int32_t engineInstancedDevice = 1; + + feProperties.setPropertySingleSliceDispatchCcsMode(engineInstancedDevice, *defaultHwInfo); + EXPECT_TRUE(feProperties.propertiesSupportLoaded); + if (fePropertiesSupport.singleSliceDispatchCcsMode) { + EXPECT_TRUE(feProperties.singleSliceDispatchCcsMode.isDirty); + EXPECT_EQ(engineInstancedDevice, feProperties.singleSliceDispatchCcsMode.value); + } else { + EXPECT_FALSE(feProperties.singleSliceDispatchCcsMode.isDirty); + EXPECT_EQ(-1, feProperties.singleSliceDispatchCcsMode.value); + } + + feProperties.frontEndPropertiesSupport.singleSliceDispatchCcsMode = true; + engineInstancedDevice = 2; + + feProperties.setPropertySingleSliceDispatchCcsMode(engineInstancedDevice, *defaultHwInfo); + EXPECT_TRUE(feProperties.singleSliceDispatchCcsMode.isDirty); + EXPECT_EQ(engineInstancedDevice, feProperties.singleSliceDispatchCcsMode.value); +} diff --git a/shared/test/unit_test/gen11/ehl/test_hw_info_config_ehl.cpp b/shared/test/unit_test/gen11/ehl/test_hw_info_config_ehl.cpp index 1edb8a0de1..93460a417f 100644 --- a/shared/test/unit_test/gen11/ehl/test_hw_info_config_ehl.cpp +++ b/shared/test/unit_test/gen11/ehl/test_hw_info_config_ehl.cpp @@ -101,4 +101,9 @@ EHLTEST_F(EhlHwInfo, givenHwInfoConfigWhenGetCommandsStreamPropertiesSupportThen EXPECT_TRUE(hwInfoConfig.getPreemptionDbgPropertyPreemptionModeSupport()); EXPECT_TRUE(hwInfoConfig.getPreemptionDbgPropertyStateSipSupport()); EXPECT_TRUE(hwInfoConfig.getPreemptionDbgPropertyCsrSurfaceSupport()); + + EXPECT_FALSE(hwInfoConfig.getFrontEndPropertyComputeDispatchAllWalkerSupport()); + EXPECT_FALSE(hwInfoConfig.getFrontEndPropertyDisableEuFusionSupport()); + EXPECT_FALSE(hwInfoConfig.getFrontEndPropertyDisableOverDispatchSupport()); + EXPECT_FALSE(hwInfoConfig.getFrontEndPropertySingleSliceDispatchCcsModeSupport()); } diff --git a/shared/test/unit_test/gen11/icllp/test_hw_info_config_icllp.cpp b/shared/test/unit_test/gen11/icllp/test_hw_info_config_icllp.cpp index 41bd7edc2f..4745b26233 100644 --- a/shared/test/unit_test/gen11/icllp/test_hw_info_config_icllp.cpp +++ b/shared/test/unit_test/gen11/icllp/test_hw_info_config_icllp.cpp @@ -128,4 +128,9 @@ ICLLPTEST_F(IcllpHwInfo, givenHwInfoConfigWhenGetCommandsStreamPropertiesSupport EXPECT_TRUE(hwInfoConfig.getPreemptionDbgPropertyPreemptionModeSupport()); EXPECT_TRUE(hwInfoConfig.getPreemptionDbgPropertyStateSipSupport()); EXPECT_TRUE(hwInfoConfig.getPreemptionDbgPropertyCsrSurfaceSupport()); + + EXPECT_FALSE(hwInfoConfig.getFrontEndPropertyComputeDispatchAllWalkerSupport()); + EXPECT_FALSE(hwInfoConfig.getFrontEndPropertyDisableEuFusionSupport()); + EXPECT_FALSE(hwInfoConfig.getFrontEndPropertyDisableOverDispatchSupport()); + EXPECT_FALSE(hwInfoConfig.getFrontEndPropertySingleSliceDispatchCcsModeSupport()); } diff --git a/shared/test/unit_test/gen11/lkf/test_hw_info_config_lkf.cpp b/shared/test/unit_test/gen11/lkf/test_hw_info_config_lkf.cpp index 4e177d695f..3a5c058fda 100644 --- a/shared/test/unit_test/gen11/lkf/test_hw_info_config_lkf.cpp +++ b/shared/test/unit_test/gen11/lkf/test_hw_info_config_lkf.cpp @@ -120,4 +120,9 @@ LKFTEST_F(LkfHwInfo, givenHwInfoConfigWhenGetCommandsStreamPropertiesSupportThen EXPECT_TRUE(hwInfoConfig.getPreemptionDbgPropertyPreemptionModeSupport()); EXPECT_TRUE(hwInfoConfig.getPreemptionDbgPropertyStateSipSupport()); EXPECT_TRUE(hwInfoConfig.getPreemptionDbgPropertyCsrSurfaceSupport()); + + EXPECT_FALSE(hwInfoConfig.getFrontEndPropertyComputeDispatchAllWalkerSupport()); + EXPECT_FALSE(hwInfoConfig.getFrontEndPropertyDisableEuFusionSupport()); + EXPECT_FALSE(hwInfoConfig.getFrontEndPropertyDisableOverDispatchSupport()); + EXPECT_FALSE(hwInfoConfig.getFrontEndPropertySingleSliceDispatchCcsModeSupport()); } diff --git a/shared/test/unit_test/gen12lp/adln/test_hw_info_config_adln.cpp b/shared/test/unit_test/gen12lp/adln/test_hw_info_config_adln.cpp index 3e2b766c68..9d0690e1a7 100644 --- a/shared/test/unit_test/gen12lp/adln/test_hw_info_config_adln.cpp +++ b/shared/test/unit_test/gen12lp/adln/test_hw_info_config_adln.cpp @@ -103,4 +103,9 @@ ADLNTEST_F(AdlnHwInfo, givenHwInfoConfigWhenGetCommandsStreamPropertiesSupportTh EXPECT_TRUE(hwInfoConfig.getPreemptionDbgPropertyPreemptionModeSupport()); EXPECT_TRUE(hwInfoConfig.getPreemptionDbgPropertyStateSipSupport()); EXPECT_TRUE(hwInfoConfig.getPreemptionDbgPropertyCsrSurfaceSupport()); + + EXPECT_FALSE(hwInfoConfig.getFrontEndPropertyComputeDispatchAllWalkerSupport()); + EXPECT_TRUE(hwInfoConfig.getFrontEndPropertyDisableEuFusionSupport()); + EXPECT_FALSE(hwInfoConfig.getFrontEndPropertyDisableOverDispatchSupport()); + EXPECT_FALSE(hwInfoConfig.getFrontEndPropertySingleSliceDispatchCcsModeSupport()); } diff --git a/shared/test/unit_test/gen12lp/adlp/test_hw_info_config_adlp.cpp b/shared/test/unit_test/gen12lp/adlp/test_hw_info_config_adlp.cpp index 8d19ad289f..387ce40dbd 100644 --- a/shared/test/unit_test/gen12lp/adlp/test_hw_info_config_adlp.cpp +++ b/shared/test/unit_test/gen12lp/adlp/test_hw_info_config_adlp.cpp @@ -103,4 +103,9 @@ ADLPTEST_F(AdlpHwInfo, givenHwInfoConfigWhenGetCommandsStreamPropertiesSupportTh EXPECT_TRUE(hwInfoConfig.getPreemptionDbgPropertyPreemptionModeSupport()); EXPECT_TRUE(hwInfoConfig.getPreemptionDbgPropertyStateSipSupport()); EXPECT_TRUE(hwInfoConfig.getPreemptionDbgPropertyCsrSurfaceSupport()); + + EXPECT_FALSE(hwInfoConfig.getFrontEndPropertyComputeDispatchAllWalkerSupport()); + EXPECT_TRUE(hwInfoConfig.getFrontEndPropertyDisableEuFusionSupport()); + EXPECT_FALSE(hwInfoConfig.getFrontEndPropertyDisableOverDispatchSupport()); + EXPECT_FALSE(hwInfoConfig.getFrontEndPropertySingleSliceDispatchCcsModeSupport()); } diff --git a/shared/test/unit_test/gen12lp/adls/test_hw_info_config_adls.cpp b/shared/test/unit_test/gen12lp/adls/test_hw_info_config_adls.cpp index b6bb19bad9..1c8886a7d2 100644 --- a/shared/test/unit_test/gen12lp/adls/test_hw_info_config_adls.cpp +++ b/shared/test/unit_test/gen12lp/adls/test_hw_info_config_adls.cpp @@ -103,4 +103,9 @@ ADLSTEST_F(AdlsHwInfo, givenHwInfoConfigWhenGetCommandsStreamPropertiesSupportTh EXPECT_TRUE(hwInfoConfig.getPreemptionDbgPropertyPreemptionModeSupport()); EXPECT_TRUE(hwInfoConfig.getPreemptionDbgPropertyStateSipSupport()); EXPECT_TRUE(hwInfoConfig.getPreemptionDbgPropertyCsrSurfaceSupport()); + + EXPECT_FALSE(hwInfoConfig.getFrontEndPropertyComputeDispatchAllWalkerSupport()); + EXPECT_TRUE(hwInfoConfig.getFrontEndPropertyDisableEuFusionSupport()); + EXPECT_FALSE(hwInfoConfig.getFrontEndPropertyDisableOverDispatchSupport()); + EXPECT_FALSE(hwInfoConfig.getFrontEndPropertySingleSliceDispatchCcsModeSupport()); } diff --git a/shared/test/unit_test/gen12lp/dg1/test_hw_info_config_dg1.cpp b/shared/test/unit_test/gen12lp/dg1/test_hw_info_config_dg1.cpp index 0c21557c35..98dc3b9f06 100644 --- a/shared/test/unit_test/gen12lp/dg1/test_hw_info_config_dg1.cpp +++ b/shared/test/unit_test/gen12lp/dg1/test_hw_info_config_dg1.cpp @@ -169,4 +169,9 @@ DG1TEST_F(Dg1HwInfo, givenHwInfoConfigWhenGetCommandsStreamPropertiesSupportThen EXPECT_TRUE(hwInfoConfig.getPreemptionDbgPropertyPreemptionModeSupport()); EXPECT_TRUE(hwInfoConfig.getPreemptionDbgPropertyStateSipSupport()); EXPECT_TRUE(hwInfoConfig.getPreemptionDbgPropertyCsrSurfaceSupport()); + + EXPECT_FALSE(hwInfoConfig.getFrontEndPropertyComputeDispatchAllWalkerSupport()); + EXPECT_TRUE(hwInfoConfig.getFrontEndPropertyDisableEuFusionSupport()); + EXPECT_FALSE(hwInfoConfig.getFrontEndPropertyDisableOverDispatchSupport()); + EXPECT_FALSE(hwInfoConfig.getFrontEndPropertySingleSliceDispatchCcsModeSupport()); } diff --git a/shared/test/unit_test/gen12lp/rkl/test_hw_info_config_rkl.cpp b/shared/test/unit_test/gen12lp/rkl/test_hw_info_config_rkl.cpp index 5d27da3aa0..ddfb57dead 100644 --- a/shared/test/unit_test/gen12lp/rkl/test_hw_info_config_rkl.cpp +++ b/shared/test/unit_test/gen12lp/rkl/test_hw_info_config_rkl.cpp @@ -113,4 +113,9 @@ RKLTEST_F(RklHwInfo, givenHwInfoConfigWhenGetCommandsStreamPropertiesSupportThen EXPECT_TRUE(hwInfoConfig.getPreemptionDbgPropertyPreemptionModeSupport()); EXPECT_TRUE(hwInfoConfig.getPreemptionDbgPropertyStateSipSupport()); EXPECT_TRUE(hwInfoConfig.getPreemptionDbgPropertyCsrSurfaceSupport()); + + EXPECT_FALSE(hwInfoConfig.getFrontEndPropertyComputeDispatchAllWalkerSupport()); + EXPECT_TRUE(hwInfoConfig.getFrontEndPropertyDisableEuFusionSupport()); + EXPECT_FALSE(hwInfoConfig.getFrontEndPropertyDisableOverDispatchSupport()); + EXPECT_FALSE(hwInfoConfig.getFrontEndPropertySingleSliceDispatchCcsModeSupport()); } diff --git a/shared/test/unit_test/gen12lp/tgllp/hw_info_config_tests_tgllp.cpp b/shared/test/unit_test/gen12lp/tgllp/hw_info_config_tests_tgllp.cpp index 5c3bbff504..20a8635ba1 100644 --- a/shared/test/unit_test/gen12lp/tgllp/hw_info_config_tests_tgllp.cpp +++ b/shared/test/unit_test/gen12lp/tgllp/hw_info_config_tests_tgllp.cpp @@ -41,4 +41,9 @@ TGLLPTEST_F(HwInfoConfigTestTgllp, givenHwInfoConfigWhenGetCommandsStreamPropert EXPECT_TRUE(hwInfoConfig.getPreemptionDbgPropertyPreemptionModeSupport()); EXPECT_TRUE(hwInfoConfig.getPreemptionDbgPropertyStateSipSupport()); EXPECT_TRUE(hwInfoConfig.getPreemptionDbgPropertyCsrSurfaceSupport()); + + EXPECT_FALSE(hwInfoConfig.getFrontEndPropertyComputeDispatchAllWalkerSupport()); + EXPECT_TRUE(hwInfoConfig.getFrontEndPropertyDisableEuFusionSupport()); + EXPECT_FALSE(hwInfoConfig.getFrontEndPropertyDisableOverDispatchSupport()); + EXPECT_FALSE(hwInfoConfig.getFrontEndPropertySingleSliceDispatchCcsModeSupport()); } diff --git a/shared/test/unit_test/gen8/bdw/test_hw_info_config_bdw.cpp b/shared/test/unit_test/gen8/bdw/test_hw_info_config_bdw.cpp index 6082aefdbd..2e65a5a5a5 100644 --- a/shared/test/unit_test/gen8/bdw/test_hw_info_config_bdw.cpp +++ b/shared/test/unit_test/gen8/bdw/test_hw_info_config_bdw.cpp @@ -121,4 +121,9 @@ BDWTEST_F(BdwHwInfo, givenHwInfoConfigWhenGetCommandsStreamPropertiesSupportThen EXPECT_TRUE(hwInfoConfig.getPreemptionDbgPropertyPreemptionModeSupport()); EXPECT_TRUE(hwInfoConfig.getPreemptionDbgPropertyStateSipSupport()); EXPECT_FALSE(hwInfoConfig.getPreemptionDbgPropertyCsrSurfaceSupport()); + + EXPECT_FALSE(hwInfoConfig.getFrontEndPropertyComputeDispatchAllWalkerSupport()); + EXPECT_FALSE(hwInfoConfig.getFrontEndPropertyDisableEuFusionSupport()); + EXPECT_FALSE(hwInfoConfig.getFrontEndPropertyDisableOverDispatchSupport()); + EXPECT_FALSE(hwInfoConfig.getFrontEndPropertySingleSliceDispatchCcsModeSupport()); } diff --git a/shared/test/unit_test/gen9/bxt/test_hw_info_config_bxt.cpp b/shared/test/unit_test/gen9/bxt/test_hw_info_config_bxt.cpp index c64af4fe59..57c1e791a2 100644 --- a/shared/test/unit_test/gen9/bxt/test_hw_info_config_bxt.cpp +++ b/shared/test/unit_test/gen9/bxt/test_hw_info_config_bxt.cpp @@ -127,4 +127,9 @@ BXTTEST_F(BxtHwInfo, givenHwInfoConfigWhenGetCommandsStreamPropertiesSupportThen EXPECT_TRUE(hwInfoConfig.getPreemptionDbgPropertyPreemptionModeSupport()); EXPECT_TRUE(hwInfoConfig.getPreemptionDbgPropertyStateSipSupport()); EXPECT_TRUE(hwInfoConfig.getPreemptionDbgPropertyCsrSurfaceSupport()); + + EXPECT_FALSE(hwInfoConfig.getFrontEndPropertyComputeDispatchAllWalkerSupport()); + EXPECT_FALSE(hwInfoConfig.getFrontEndPropertyDisableEuFusionSupport()); + EXPECT_FALSE(hwInfoConfig.getFrontEndPropertyDisableOverDispatchSupport()); + EXPECT_FALSE(hwInfoConfig.getFrontEndPropertySingleSliceDispatchCcsModeSupport()); } diff --git a/shared/test/unit_test/gen9/cfl/test_hw_info_config_cfl.cpp b/shared/test/unit_test/gen9/cfl/test_hw_info_config_cfl.cpp index a86146330c..e010e7cc3d 100644 --- a/shared/test/unit_test/gen9/cfl/test_hw_info_config_cfl.cpp +++ b/shared/test/unit_test/gen9/cfl/test_hw_info_config_cfl.cpp @@ -134,4 +134,9 @@ CFLTEST_F(CflHwInfo, givenHwInfoConfigWhenGetCommandsStreamPropertiesSupportThen EXPECT_TRUE(hwInfoConfig.getPreemptionDbgPropertyPreemptionModeSupport()); EXPECT_TRUE(hwInfoConfig.getPreemptionDbgPropertyStateSipSupport()); EXPECT_TRUE(hwInfoConfig.getPreemptionDbgPropertyCsrSurfaceSupport()); + + EXPECT_FALSE(hwInfoConfig.getFrontEndPropertyComputeDispatchAllWalkerSupport()); + EXPECT_FALSE(hwInfoConfig.getFrontEndPropertyDisableEuFusionSupport()); + EXPECT_FALSE(hwInfoConfig.getFrontEndPropertyDisableOverDispatchSupport()); + EXPECT_FALSE(hwInfoConfig.getFrontEndPropertySingleSliceDispatchCcsModeSupport()); } diff --git a/shared/test/unit_test/gen9/glk/test_hw_info_config_glk.cpp b/shared/test/unit_test/gen9/glk/test_hw_info_config_glk.cpp index 5e06f0ad24..9511cce481 100644 --- a/shared/test/unit_test/gen9/glk/test_hw_info_config_glk.cpp +++ b/shared/test/unit_test/gen9/glk/test_hw_info_config_glk.cpp @@ -117,4 +117,9 @@ GLKTEST_F(GlkHwInfo, givenHwInfoConfigWhenGetCommandsStreamPropertiesSupportThen EXPECT_TRUE(hwInfoConfig.getPreemptionDbgPropertyPreemptionModeSupport()); EXPECT_TRUE(hwInfoConfig.getPreemptionDbgPropertyStateSipSupport()); EXPECT_TRUE(hwInfoConfig.getPreemptionDbgPropertyCsrSurfaceSupport()); + + EXPECT_FALSE(hwInfoConfig.getFrontEndPropertyComputeDispatchAllWalkerSupport()); + EXPECT_FALSE(hwInfoConfig.getFrontEndPropertyDisableEuFusionSupport()); + EXPECT_FALSE(hwInfoConfig.getFrontEndPropertyDisableOverDispatchSupport()); + EXPECT_FALSE(hwInfoConfig.getFrontEndPropertySingleSliceDispatchCcsModeSupport()); } diff --git a/shared/test/unit_test/gen9/kbl/test_hw_info_config_kbl.cpp b/shared/test/unit_test/gen9/kbl/test_hw_info_config_kbl.cpp index a8df6c2782..2e718bca6f 100644 --- a/shared/test/unit_test/gen9/kbl/test_hw_info_config_kbl.cpp +++ b/shared/test/unit_test/gen9/kbl/test_hw_info_config_kbl.cpp @@ -141,4 +141,9 @@ KBLTEST_F(KblHwInfo, givenHwInfoConfigWhenGetCommandsStreamPropertiesSupportThen EXPECT_TRUE(hwInfoConfig.getPreemptionDbgPropertyPreemptionModeSupport()); EXPECT_TRUE(hwInfoConfig.getPreemptionDbgPropertyStateSipSupport()); EXPECT_TRUE(hwInfoConfig.getPreemptionDbgPropertyCsrSurfaceSupport()); + + EXPECT_FALSE(hwInfoConfig.getFrontEndPropertyComputeDispatchAllWalkerSupport()); + EXPECT_FALSE(hwInfoConfig.getFrontEndPropertyDisableEuFusionSupport()); + EXPECT_FALSE(hwInfoConfig.getFrontEndPropertyDisableOverDispatchSupport()); + EXPECT_FALSE(hwInfoConfig.getFrontEndPropertySingleSliceDispatchCcsModeSupport()); } diff --git a/shared/test/unit_test/gen9/skl/test_hw_info_config_skl.cpp b/shared/test/unit_test/gen9/skl/test_hw_info_config_skl.cpp index 9f9d2df50f..8f331877f7 100644 --- a/shared/test/unit_test/gen9/skl/test_hw_info_config_skl.cpp +++ b/shared/test/unit_test/gen9/skl/test_hw_info_config_skl.cpp @@ -141,4 +141,9 @@ SKLTEST_F(SklHwInfo, givenHwInfoConfigWhenGetCommandsStreamPropertiesSupportThen EXPECT_TRUE(hwInfoConfig.getPreemptionDbgPropertyPreemptionModeSupport()); EXPECT_TRUE(hwInfoConfig.getPreemptionDbgPropertyStateSipSupport()); EXPECT_TRUE(hwInfoConfig.getPreemptionDbgPropertyCsrSurfaceSupport()); + + EXPECT_FALSE(hwInfoConfig.getFrontEndPropertyComputeDispatchAllWalkerSupport()); + EXPECT_FALSE(hwInfoConfig.getFrontEndPropertyDisableEuFusionSupport()); + EXPECT_FALSE(hwInfoConfig.getFrontEndPropertyDisableOverDispatchSupport()); + EXPECT_FALSE(hwInfoConfig.getFrontEndPropertySingleSliceDispatchCcsModeSupport()); } diff --git a/shared/test/unit_test/os_interface/hw_info_config_tests.cpp b/shared/test/unit_test/os_interface/hw_info_config_tests.cpp index 87cfdfb623..4e8d99ab42 100644 --- a/shared/test/unit_test/os_interface/hw_info_config_tests.cpp +++ b/shared/test/unit_test/os_interface/hw_info_config_tests.cpp @@ -520,3 +520,15 @@ HWTEST_F(HwInfoConfigTest, WhenFillingScmPropertiesSupportThenExpectUseCorrectGe EXPECT_EQ(hwInfoConfig->isGrfNumReportedWithScm(), scmPropertiesSupport.largeGrfMode); EXPECT_EQ(hwInfoConfig->getScmPropertyDevicePreemptionModeSupport(), scmPropertiesSupport.devicePreemptionMode); } + +HWTEST_F(HwInfoConfigTest, WhenFillingFrontEndPropertiesSupportThenExpectUseCorrectGetters) { + FrontEndPropertiesSupport frontEndPropertiesSupport = {}; + + auto hwInfoConfig = HwInfoConfig::get(pInHwInfo.platform.eProductFamily); + + hwInfoConfig->fillFrontEndPropertiesSupportStructure(frontEndPropertiesSupport); + EXPECT_EQ(hwInfoConfig->getFrontEndPropertyComputeDispatchAllWalkerSupport(), frontEndPropertiesSupport.computeDispatchAllWalker); + EXPECT_EQ(hwInfoConfig->getFrontEndPropertyDisableEuFusionSupport(), frontEndPropertiesSupport.disableEuFusion); + EXPECT_EQ(hwInfoConfig->getFrontEndPropertyDisableOverDispatchSupport(), frontEndPropertiesSupport.disableOverdispatch); + EXPECT_EQ(hwInfoConfig->getFrontEndPropertySingleSliceDispatchCcsModeSupport(), frontEndPropertiesSupport.singleSliceDispatchCcsMode); +} diff --git a/shared/test/unit_test/xe_hp_core/xe_hp_sdv/hw_info_config_tests_xe_hp_sdv.cpp b/shared/test/unit_test/xe_hp_core/xe_hp_sdv/hw_info_config_tests_xe_hp_sdv.cpp index fe23ca873b..d8698904ea 100644 --- a/shared/test/unit_test/xe_hp_core/xe_hp_sdv/hw_info_config_tests_xe_hp_sdv.cpp +++ b/shared/test/unit_test/xe_hp_core/xe_hp_sdv/hw_info_config_tests_xe_hp_sdv.cpp @@ -41,4 +41,9 @@ XEHPTEST_F(HwInfoConfigTestXeHpSdv, givenHwInfoConfigWhenGetCommandsStreamProper EXPECT_TRUE(hwInfoConfig.getPreemptionDbgPropertyPreemptionModeSupport()); EXPECT_TRUE(hwInfoConfig.getPreemptionDbgPropertyStateSipSupport()); EXPECT_FALSE(hwInfoConfig.getPreemptionDbgPropertyCsrSurfaceSupport()); + + EXPECT_FALSE(hwInfoConfig.getFrontEndPropertyComputeDispatchAllWalkerSupport()); + EXPECT_FALSE(hwInfoConfig.getFrontEndPropertyDisableEuFusionSupport()); + EXPECT_TRUE(hwInfoConfig.getFrontEndPropertyDisableOverDispatchSupport()); + EXPECT_TRUE(hwInfoConfig.getFrontEndPropertySingleSliceDispatchCcsModeSupport()); } diff --git a/shared/test/unit_test/xe_hpc_core/pvc/test_hw_info_config_pvc.cpp b/shared/test/unit_test/xe_hpc_core/pvc/test_hw_info_config_pvc.cpp index 826900812c..8e57200011 100644 --- a/shared/test/unit_test/xe_hpc_core/pvc/test_hw_info_config_pvc.cpp +++ b/shared/test/unit_test/xe_hpc_core/pvc/test_hw_info_config_pvc.cpp @@ -100,4 +100,9 @@ PVCTEST_F(PVCHwInfoConfig, givenHwInfoConfigWhenGetCommandsStreamPropertiesSuppo EXPECT_TRUE(hwInfoConfig.getPreemptionDbgPropertyPreemptionModeSupport()); EXPECT_TRUE(hwInfoConfig.getPreemptionDbgPropertyStateSipSupport()); EXPECT_FALSE(hwInfoConfig.getPreemptionDbgPropertyCsrSurfaceSupport()); + + EXPECT_TRUE(hwInfoConfig.getFrontEndPropertyComputeDispatchAllWalkerSupport()); + EXPECT_FALSE(hwInfoConfig.getFrontEndPropertyDisableEuFusionSupport()); + EXPECT_TRUE(hwInfoConfig.getFrontEndPropertyDisableOverDispatchSupport()); + EXPECT_TRUE(hwInfoConfig.getFrontEndPropertySingleSliceDispatchCcsModeSupport()); } diff --git a/shared/test/unit_test/xe_hpc_core/pvc/test_preamble_pvc.cpp b/shared/test/unit_test/xe_hpc_core/pvc/test_preamble_pvc.cpp index 9513fc202c..a9d4476258 100644 --- a/shared/test/unit_test/xe_hpc_core/pvc/test_preamble_pvc.cpp +++ b/shared/test/unit_test/xe_hpc_core/pvc/test_preamble_pvc.cpp @@ -22,7 +22,6 @@ PVCTEST_F(PreambleCfeState, givenXeHpcAndKernelExecutionTypeAndRevisionWhenCalli const auto &hwInfoConfig = *NEO::HwInfoConfig::get(hwInfo->platform.eProductFamily); auto pVfeCmd = PreambleHelper::getSpaceForVfeState(&linearStream, *hwInfo, EngineGroupType::RenderCompute); - StreamProperties streamProperties{}; std::array, 4> revisions = { {{REVISION_A0, false}, {REVISION_A0, true}, @@ -30,6 +29,7 @@ PVCTEST_F(PreambleCfeState, givenXeHpcAndKernelExecutionTypeAndRevisionWhenCalli {REVISION_B, true}}}; for (const auto &[revision, kernelExecutionType] : revisions) { + StreamProperties streamProperties{}; hwInfo->platform.usRevId = hwInfoConfig.getHwRevIdFromStepping(revision, *hwInfo); streamProperties.frontEndState.setProperties(kernelExecutionType, false, false, false, *hwInfo); @@ -39,8 +39,7 @@ PVCTEST_F(PreambleCfeState, givenXeHpcAndKernelExecutionTypeAndRevisionWhenCalli ASSERT_NE(cmdList.end(), cfeStateIt); auto cfeState = reinterpret_cast(*cfeStateIt); - auto expectedValue = (HwInfoConfig::get(hwInfo->platform.eProductFamily)->getSteppingFromHwRevId(*hwInfo) >= REVISION_B) && - kernelExecutionType; + auto expectedValue = (revision >= REVISION_B) && kernelExecutionType; EXPECT_EQ(expectedValue, cfeState->getComputeDispatchAllWalkerEnable()); EXPECT_FALSE(cfeState->getSingleSliceDispatchCcsMode()); EXPECT_FALSE(cfeState->getComputeOverdispatchDisable()); diff --git a/shared/test/unit_test/xe_hpg_core/dg2/test_hw_info_config_dg2.cpp b/shared/test/unit_test/xe_hpg_core/dg2/test_hw_info_config_dg2.cpp index 3273ce0243..a49ca7562e 100644 --- a/shared/test/unit_test/xe_hpg_core/dg2/test_hw_info_config_dg2.cpp +++ b/shared/test/unit_test/xe_hpg_core/dg2/test_hw_info_config_dg2.cpp @@ -91,4 +91,9 @@ DG2TEST_F(TestDg2HwInfoConfig, givenHwInfoConfigWhenGetCommandsStreamPropertiesS EXPECT_TRUE(hwInfoConfig.getPreemptionDbgPropertyPreemptionModeSupport()); EXPECT_TRUE(hwInfoConfig.getPreemptionDbgPropertyStateSipSupport()); EXPECT_FALSE(hwInfoConfig.getPreemptionDbgPropertyCsrSurfaceSupport()); + + EXPECT_FALSE(hwInfoConfig.getFrontEndPropertyComputeDispatchAllWalkerSupport()); + EXPECT_TRUE(hwInfoConfig.getFrontEndPropertyDisableEuFusionSupport()); + EXPECT_TRUE(hwInfoConfig.getFrontEndPropertyDisableOverDispatchSupport()); + EXPECT_TRUE(hwInfoConfig.getFrontEndPropertySingleSliceDispatchCcsModeSupport()); }