From 02cf62902b022918e4fbaf91bcee008bbdafa46d Mon Sep 17 00:00:00 2001 From: Zbigniew Zdanowicz Date: Mon, 22 Aug 2022 23:38:32 +0000 Subject: [PATCH] Add hardware support for each pipeline property This change is a baseline for tight control over when dispatch pipeline state commands and which pipeline state properties can be changed for a given hardware platform Related-To: NEO-5019 Signed-off-by: Zbigniew Zdanowicz --- shared/source/gen11/hw_cmds_base.h | 29 +++++++ shared/source/gen12lp/hw_cmds_base.h | 29 +++++++ shared/source/gen8/hw_cmds_base.h | 29 +++++++ shared/source/gen9/hw_cmds_base.h | 29 +++++++ shared/source/os_interface/hw_info_config.h | 34 ++++++++ shared/source/os_interface/hw_info_config.inl | 81 +++++++++++++++++++ shared/source/xe_hp_core/hw_cmds_base.h | 29 +++++++ shared/source/xe_hpc_core/hw_cmds_pvc.h | 30 +++++++ .../xe_hpg_core/hw_cmds_xe_hpg_core_base.h | 29 +++++++ .../test/common/mocks/mock_hw_info_config.cpp | 39 +++++++++ .../gen11/ehl/test_hw_info_config_ehl.cpp | 22 +++++ .../gen11/icllp/test_hw_info_config_icllp.cpp | 22 +++++ .../gen11/lkf/test_hw_info_config_lkf.cpp | 22 +++++ .../gen12lp/adln/test_hw_info_config_adln.cpp | 22 +++++ .../gen12lp/adlp/test_hw_info_config_adlp.cpp | 22 +++++ .../gen12lp/adls/test_hw_info_config_adls.cpp | 22 +++++ .../gen12lp/dg1/test_hw_info_config_dg1.cpp | 22 +++++ .../gen12lp/rkl/test_hw_info_config_rkl.cpp | 22 +++++ .../tgllp/hw_info_config_tests_tgllp.cpp | 22 +++++ .../gen8/bdw/test_hw_info_config_bdw.cpp | 22 +++++ .../gen9/bxt/test_hw_info_config_bxt.cpp | 22 +++++ .../gen9/cfl/test_hw_info_config_cfl.cpp | 22 +++++ .../gen9/glk/test_hw_info_config_glk.cpp | 22 +++++ .../gen9/kbl/test_hw_info_config_kbl.cpp | 22 +++++ .../gen9/skl/test_hw_info_config_skl.cpp | 22 +++++ .../hw_info_config_tests_xe_hp_sdv.cpp | 22 +++++ .../pvc/test_hw_info_config_pvc.cpp | 22 +++++ .../dg2/test_hw_info_config_dg2.cpp | 22 +++++ 28 files changed, 754 insertions(+) diff --git a/shared/source/gen11/hw_cmds_base.h b/shared/source/gen11/hw_cmds_base.h index 8f2d47c6dd..5602928462 100644 --- a/shared/source/gen11/hw_cmds_base.h +++ b/shared/source/gen11/hw_cmds_base.h @@ -25,6 +25,35 @@ struct Gen11 { static constexpr bool isUsingGenericMediaStateClear = true; static constexpr bool isUsingMiMemFence = false; + struct FrontEndStateSupport { + static constexpr bool scratchSize = true; + static constexpr bool privateScratchSize = false; + }; + + struct StateComputeModeStateSupport { + static constexpr bool threadArbitration = true; + static constexpr bool coherency = true; + static constexpr bool largeGrf = false; + static constexpr bool zPassAsyncCompute = false; + static constexpr bool pixelAsyncCompute = false; + static constexpr bool preemptionMode = false; + }; + + struct StateBaseAddressStateSupport { + static constexpr bool globalAtomics = false; + static constexpr bool statelessMocs = true; + }; + + struct PipelineSelectStateSupport { + static constexpr bool commandSupport = true; + }; + + struct PreemptionDebugSupport { + static constexpr bool preemptionMode = true; + static constexpr bool stateSip = true; + static constexpr bool csrSurface = true; + }; + struct DataPortBindlessSurfaceExtendedMessageDescriptor { union { struct { diff --git a/shared/source/gen12lp/hw_cmds_base.h b/shared/source/gen12lp/hw_cmds_base.h index 2eba941db9..b4348b37a3 100644 --- a/shared/source/gen12lp/hw_cmds_base.h +++ b/shared/source/gen12lp/hw_cmds_base.h @@ -28,6 +28,35 @@ struct Gen12Lp { static constexpr uint32_t stateComputeModeForceNonCoherentMask = (0b11u << 3); static constexpr bool isUsingMiMemFence = false; + struct FrontEndStateSupport { + static constexpr bool scratchSize = true; + static constexpr bool privateScratchSize = false; + }; + + struct StateComputeModeStateSupport { + static constexpr bool threadArbitration = false; + static constexpr bool coherency = true; + static constexpr bool largeGrf = false; + static constexpr bool zPassAsyncCompute = false; + static constexpr bool pixelAsyncCompute = false; + static constexpr bool preemptionMode = false; + }; + + struct StateBaseAddressStateSupport { + static constexpr bool globalAtomics = false; + static constexpr bool statelessMocs = true; + }; + + struct PipelineSelectStateSupport { + static constexpr bool commandSupport = true; + }; + + struct PreemptionDebugSupport { + static constexpr bool preemptionMode = true; + static constexpr bool stateSip = true; + static constexpr bool csrSurface = true; + }; + struct DataPortBindlessSurfaceExtendedMessageDescriptor { union { struct { diff --git a/shared/source/gen8/hw_cmds_base.h b/shared/source/gen8/hw_cmds_base.h index d1d6a0cb39..b3f026d37d 100644 --- a/shared/source/gen8/hw_cmds_base.h +++ b/shared/source/gen8/hw_cmds_base.h @@ -27,6 +27,35 @@ struct Gen8 { static constexpr bool isUsingGenericMediaStateClear = true; static constexpr bool isUsingMiMemFence = false; + struct FrontEndStateSupport { + static constexpr bool scratchSize = true; + static constexpr bool privateScratchSize = false; + }; + + struct StateComputeModeStateSupport { + static constexpr bool threadArbitration = false; + static constexpr bool coherency = true; + static constexpr bool largeGrf = false; + static constexpr bool zPassAsyncCompute = false; + static constexpr bool pixelAsyncCompute = false; + static constexpr bool preemptionMode = false; + }; + + struct StateBaseAddressStateSupport { + static constexpr bool globalAtomics = false; + static constexpr bool statelessMocs = true; + }; + + struct PipelineSelectStateSupport { + static constexpr bool commandSupport = true; + }; + + struct PreemptionDebugSupport { + static constexpr bool preemptionMode = true; + static constexpr bool stateSip = true; + static constexpr bool csrSurface = false; + }; + struct DataPortBindlessSurfaceExtendedMessageDescriptor { union { struct { diff --git a/shared/source/gen9/hw_cmds_base.h b/shared/source/gen9/hw_cmds_base.h index 27f6adb674..c9c1c3a639 100644 --- a/shared/source/gen9/hw_cmds_base.h +++ b/shared/source/gen9/hw_cmds_base.h @@ -26,6 +26,35 @@ struct Gen9 { static constexpr bool isUsingGenericMediaStateClear = true; static constexpr bool isUsingMiMemFence = false; + struct FrontEndStateSupport { + static constexpr bool scratchSize = true; + static constexpr bool privateScratchSize = false; + }; + + struct StateComputeModeStateSupport { + static constexpr bool threadArbitration = true; + static constexpr bool coherency = false; + static constexpr bool largeGrf = false; + static constexpr bool zPassAsyncCompute = false; + static constexpr bool pixelAsyncCompute = false; + static constexpr bool preemptionMode = false; + }; + + struct StateBaseAddressStateSupport { + static constexpr bool globalAtomics = false; + static constexpr bool statelessMocs = true; + }; + + struct PipelineSelectStateSupport { + static constexpr bool commandSupport = true; + }; + + struct PreemptionDebugSupport { + static constexpr bool preemptionMode = true; + static constexpr bool stateSip = true; + static constexpr bool csrSurface = true; + }; + struct DataPortBindlessSurfaceExtendedMessageDescriptor { union { struct { diff --git a/shared/source/os_interface/hw_info_config.h b/shared/source/os_interface/hw_info_config.h index 4704b8826f..a8468f8152 100644 --- a/shared/source/os_interface/hw_info_config.h +++ b/shared/source/os_interface/hw_info_config.h @@ -136,6 +136,23 @@ class HwInfoConfig { virtual void adjustNumberOfCcs(HardwareInfo &hwInfo) const = 0; virtual bool isPrefetcherDisablingInDirectSubmissionRequired() const = 0; + virtual bool getFrontEndPropertyScratchSizeSupport() const = 0; + virtual bool getFrontEndPropertyPrivateScratchSizeSupport() const = 0; + + virtual bool getScmPropertyThreadArbitrationSupport() const = 0; + virtual bool getScmPropertyCoherencySupport() const = 0; + virtual bool getScmPropertyZPassAsyncSupport() const = 0; + virtual bool getScmPropertyPixelAsyncSupport() const = 0; + virtual bool getScmPropertyLargeGrfSupport() const = 0; + virtual bool getScmPropertyDevicePreemptionSupport() const = 0; + + virtual bool getSbaPropertyGlobalAtomicsSupport() const = 0; + virtual bool getSbaPropertyStatelessMocsSupport() const = 0; + + virtual bool getPreemptionDbgPropertyPreemptionModeSupport() const = 0; + virtual bool getPreemptionDbgPropertyStateSipSupport() const = 0; + virtual bool getPreemptionDbgPropertyCsrSurfaceSupport() const = 0; + MOCKABLE_VIRTUAL ~HwInfoConfig() = default; protected: @@ -241,6 +258,23 @@ class HwInfoConfigHw : public HwInfoConfig { void adjustNumberOfCcs(HardwareInfo &hwInfo) const override; bool isPrefetcherDisablingInDirectSubmissionRequired() const override; + bool getFrontEndPropertyScratchSizeSupport() const override; + bool getFrontEndPropertyPrivateScratchSizeSupport() const override; + + bool getScmPropertyThreadArbitrationSupport() const override; + bool getScmPropertyCoherencySupport() const override; + bool getScmPropertyZPassAsyncSupport() const override; + bool getScmPropertyPixelAsyncSupport() const override; + bool getScmPropertyLargeGrfSupport() const override; + bool getScmPropertyDevicePreemptionSupport() const override; + + bool getSbaPropertyGlobalAtomicsSupport() const override; + bool getSbaPropertyStatelessMocsSupport() const override; + + bool getPreemptionDbgPropertyPreemptionModeSupport() const override; + bool getPreemptionDbgPropertyStateSipSupport() const override; + bool getPreemptionDbgPropertyCsrSurfaceSupport() 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 7b4f809247..cbfbab58f0 100644 --- a/shared/source/os_interface/hw_info_config.inl +++ b/shared/source/os_interface/hw_info_config.inl @@ -16,6 +16,8 @@ #include "shared/source/os_interface/hw_info_config.h" #include "shared/source/unified_memory/usm_memory_support.h" +#include "hw_cmds.h" + #include namespace NEO { @@ -492,4 +494,83 @@ template bool HwInfoConfigHw::isPrefetcherDisablingInDirectSubmissionRequired() const { return true; } + +template +bool HwInfoConfigHw::getScmPropertyThreadArbitrationSupport() const { + using GfxProduct = typename HwMapper::GfxProduct; + return GfxProduct::StateComputeModeStateSupport::threadArbitration; +} + +template +bool HwInfoConfigHw::getScmPropertyCoherencySupport() const { + using GfxProduct = typename HwMapper::GfxProduct; + return GfxProduct::StateComputeModeStateSupport::coherency; +} + +template +bool HwInfoConfigHw::getScmPropertyZPassAsyncSupport() const { + using GfxProduct = typename HwMapper::GfxProduct; + return GfxProduct::StateComputeModeStateSupport::zPassAsyncCompute; +} + +template +bool HwInfoConfigHw::getScmPropertyPixelAsyncSupport() const { + using GfxProduct = typename HwMapper::GfxProduct; + return GfxProduct::StateComputeModeStateSupport::pixelAsyncCompute; +} + +template +bool HwInfoConfigHw::getScmPropertyLargeGrfSupport() const { + using GfxProduct = typename HwMapper::GfxProduct; + return GfxProduct::StateComputeModeStateSupport::largeGrf; +} + +template +bool HwInfoConfigHw::getScmPropertyDevicePreemptionSupport() const { + using GfxProduct = typename HwMapper::GfxProduct; + return GfxProduct::StateComputeModeStateSupport::preemptionMode; +} + +template +bool HwInfoConfigHw::getSbaPropertyGlobalAtomicsSupport() const { + using GfxProduct = typename HwMapper::GfxProduct; + return GfxProduct::StateBaseAddressStateSupport::globalAtomics; +} + +template +bool HwInfoConfigHw::getSbaPropertyStatelessMocsSupport() const { + using GfxProduct = typename HwMapper::GfxProduct; + return GfxProduct::StateBaseAddressStateSupport::statelessMocs; +} + +template +bool HwInfoConfigHw::getPreemptionDbgPropertyPreemptionModeSupport() const { + using GfxProduct = typename HwMapper::GfxProduct; + return GfxProduct::PreemptionDebugSupport::preemptionMode; +} + +template +bool HwInfoConfigHw::getPreemptionDbgPropertyStateSipSupport() const { + using GfxProduct = typename HwMapper::GfxProduct; + return GfxProduct::PreemptionDebugSupport::stateSip; +} + +template +bool HwInfoConfigHw::getPreemptionDbgPropertyCsrSurfaceSupport() const { + using GfxProduct = typename HwMapper::GfxProduct; + return GfxProduct::PreemptionDebugSupport::csrSurface; +} + +template +bool HwInfoConfigHw::getFrontEndPropertyScratchSizeSupport() const { + using GfxProduct = typename HwMapper::GfxProduct; + return GfxProduct::FrontEndStateSupport::scratchSize; +} + +template +bool HwInfoConfigHw::getFrontEndPropertyPrivateScratchSizeSupport() const { + using GfxProduct = typename HwMapper::GfxProduct; + return GfxProduct::FrontEndStateSupport::privateScratchSize; +} + } // 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 e350b6a933..f0a62a9806 100644 --- a/shared/source/xe_hp_core/hw_cmds_base.h +++ b/shared/source/xe_hp_core/hw_cmds_base.h @@ -34,6 +34,35 @@ struct XeHpCore { static constexpr bool isUsingGenericMediaStateClear = true; static constexpr bool isUsingMiMemFence = false; + struct FrontEndStateSupport { + static constexpr bool scratchSize = true; + static constexpr bool privateScratchSize = true; + }; + + struct StateComputeModeStateSupport { + static constexpr bool threadArbitration = false; + static constexpr bool coherency = true; + static constexpr bool largeGrf = true; + static constexpr bool zPassAsyncCompute = false; + static constexpr bool pixelAsyncCompute = false; + static constexpr bool preemptionMode = false; + }; + + struct StateBaseAddressStateSupport { + static constexpr bool globalAtomics = true; + static constexpr bool statelessMocs = true; + }; + + struct PipelineSelectStateSupport { + static constexpr bool commandSupport = true; + }; + + struct PreemptionDebugSupport { + static constexpr bool preemptionMode = true; + static constexpr bool stateSip = true; + static constexpr bool csrSurface = false; + }; + struct DataPortBindlessSurfaceExtendedMessageDescriptor { union { struct { diff --git a/shared/source/xe_hpc_core/hw_cmds_pvc.h b/shared/source/xe_hpc_core/hw_cmds_pvc.h index 2ef5357efe..d924748230 100644 --- a/shared/source/xe_hpc_core/hw_cmds_pvc.h +++ b/shared/source/xe_hpc_core/hw_cmds_pvc.h @@ -27,6 +27,36 @@ struct PVC : public XeHpcCoreFamily { static const uint32_t maxSubslicesSupported = 64; static const uint32_t maxDualSubslicesSupported = 64; static const RuntimeCapabilityTable capabilityTable; + + struct FrontEndStateSupport { + static constexpr bool scratchSize = true; + static constexpr bool privateScratchSize = true; + }; + + struct StateComputeModeStateSupport { + static constexpr bool threadArbitration = true; + static constexpr bool coherency = true; + static constexpr bool largeGrf = true; + static constexpr bool zPassAsyncCompute = false; + static constexpr bool pixelAsyncCompute = false; + static constexpr bool preemptionMode = false; + }; + + struct StateBaseAddressStateSupport { + static constexpr bool globalAtomics = false; + static constexpr bool statelessMocs = true; + }; + + struct PipelineSelectStateSupport { + static constexpr bool commandSupport = true; + }; + + struct PreemptionDebugSupport { + static constexpr bool preemptionMode = true; + static constexpr bool stateSip = true; + static constexpr bool csrSurface = false; + }; + static void (*setupHardwareInfo)(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, uint64_t hwInfoConfig); static void setupFeatureAndWorkaroundTable(HardwareInfo *hwInfo); static void setupHardwareInfoBase(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable); 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 f4e1780630..078f8db209 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 @@ -34,6 +34,35 @@ struct XeHpgCore { static constexpr bool isUsingGenericMediaStateClear = true; static constexpr bool isUsingMiMemFence = false; + struct FrontEndStateSupport { + static constexpr bool scratchSize = true; + static constexpr bool privateScratchSize = true; + }; + + struct StateComputeModeStateSupport { + static constexpr bool threadArbitration = false; + static constexpr bool coherency = true; + static constexpr bool largeGrf = true; + static constexpr bool zPassAsyncCompute = true; + static constexpr bool pixelAsyncCompute = true; + static constexpr bool preemptionMode = false; + }; + + struct StateBaseAddressStateSupport { + static constexpr bool globalAtomics = false; + static constexpr bool statelessMocs = true; + }; + + struct PipelineSelectStateSupport { + static constexpr bool commandSupport = true; + }; + + struct PreemptionDebugSupport { + static constexpr bool preemptionMode = true; + static constexpr bool stateSip = true; + static constexpr bool csrSurface = false; + }; + struct DataPortBindlessSurfaceExtendedMessageDescriptor { union { struct { diff --git a/shared/test/common/mocks/mock_hw_info_config.cpp b/shared/test/common/mocks/mock_hw_info_config.cpp index e8ada8f683..8169c45929 100644 --- a/shared/test/common/mocks/mock_hw_info_config.cpp +++ b/shared/test/common/mocks/mock_hw_info_config.cpp @@ -421,6 +421,45 @@ uint32_t L1CachePolicyHelper::getUncachedL1CachePolicy() { return 1u; } +struct UnknownProduct { + struct FrontEndStateSupport { + static constexpr bool scratchSize = false; + static constexpr bool privateScratchSize = false; + }; + + struct StateComputeModeStateSupport { + static constexpr bool threadArbitration = false; + static constexpr bool coherency = false; + static constexpr bool largeGrf = false; + static constexpr bool zPassAsyncCompute = false; + static constexpr bool pixelAsyncCompute = false; + static constexpr bool preemptionMode = false; + }; + + struct StateBaseAddressStateSupport { + static constexpr bool globalAtomics = false; + static constexpr bool statelessMocs = false; + }; + + struct PipelineSelectStateSupport { + static constexpr bool commandSupport = false; + }; + + struct PreemptionDebugSupport { + static constexpr bool preemptionMode = false; + static constexpr bool stateSip = false; + static constexpr bool csrSurface = false; + }; +}; + +template <> +struct HwMapper { + enum { gfxFamily = IGFX_UNKNOWN_CORE }; + + static const char *abbreviation; + using GfxProduct = UnknownProduct; +}; + } // namespace NEO #include "shared/source/os_interface/hw_info_config.inl" 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 a2c3b14b3a..504915c286 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 @@ -80,3 +80,25 @@ EHLTEST_F(EhlHwInfo, givenHwInfoConfigWhenGettingEvictIfNecessaryFlagSupportedTh const auto &hwInfoConfig = *HwInfoConfig::get(hwInfo.platform.eProductFamily); EXPECT_TRUE(hwInfoConfig.isEvictionIfNecessaryFlagSupported()); } + +EHLTEST_F(EhlHwInfo, givenHwInfoConfigWhenGetCommandsStreamPropertiesSupportThenExpectCorrectValues) { + HardwareInfo hwInfo = *defaultHwInfo; + const auto &hwInfoConfig = *HwInfoConfig::get(hwInfo.platform.eProductFamily); + + EXPECT_TRUE(hwInfoConfig.getScmPropertyThreadArbitrationSupport()); + EXPECT_TRUE(hwInfoConfig.getScmPropertyCoherencySupport()); + EXPECT_FALSE(hwInfoConfig.getScmPropertyZPassAsyncSupport()); + EXPECT_FALSE(hwInfoConfig.getScmPropertyPixelAsyncSupport()); + EXPECT_FALSE(hwInfoConfig.getScmPropertyLargeGrfSupport()); + EXPECT_FALSE(hwInfoConfig.getScmPropertyDevicePreemptionSupport()); + + EXPECT_FALSE(hwInfoConfig.getSbaPropertyGlobalAtomicsSupport()); + EXPECT_TRUE(hwInfoConfig.getSbaPropertyStatelessMocsSupport()); + + EXPECT_TRUE(hwInfoConfig.getFrontEndPropertyScratchSizeSupport()); + EXPECT_FALSE(hwInfoConfig.getFrontEndPropertyPrivateScratchSizeSupport()); + + EXPECT_TRUE(hwInfoConfig.getPreemptionDbgPropertyPreemptionModeSupport()); + EXPECT_TRUE(hwInfoConfig.getPreemptionDbgPropertyStateSipSupport()); + EXPECT_TRUE(hwInfoConfig.getPreemptionDbgPropertyCsrSurfaceSupport()); +} 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 f166027a82..209a3d3965 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 @@ -107,3 +107,25 @@ ICLLPTEST_F(IcllpHwInfo, givenHwInfoConfigWhenGettingEvictIfNecessaryFlagSupport const auto &hwInfoConfig = *HwInfoConfig::get(hwInfo.platform.eProductFamily); EXPECT_TRUE(hwInfoConfig.isEvictionIfNecessaryFlagSupported()); } + +ICLLPTEST_F(IcllpHwInfo, givenHwInfoConfigWhenGetCommandsStreamPropertiesSupportThenExpectCorrectValues) { + HardwareInfo hwInfo = *defaultHwInfo; + const auto &hwInfoConfig = *HwInfoConfig::get(hwInfo.platform.eProductFamily); + + EXPECT_TRUE(hwInfoConfig.getScmPropertyThreadArbitrationSupport()); + EXPECT_TRUE(hwInfoConfig.getScmPropertyCoherencySupport()); + EXPECT_FALSE(hwInfoConfig.getScmPropertyZPassAsyncSupport()); + EXPECT_FALSE(hwInfoConfig.getScmPropertyPixelAsyncSupport()); + EXPECT_FALSE(hwInfoConfig.getScmPropertyLargeGrfSupport()); + EXPECT_FALSE(hwInfoConfig.getScmPropertyDevicePreemptionSupport()); + + EXPECT_FALSE(hwInfoConfig.getSbaPropertyGlobalAtomicsSupport()); + EXPECT_TRUE(hwInfoConfig.getSbaPropertyStatelessMocsSupport()); + + EXPECT_TRUE(hwInfoConfig.getFrontEndPropertyScratchSizeSupport()); + EXPECT_FALSE(hwInfoConfig.getFrontEndPropertyPrivateScratchSizeSupport()); + + EXPECT_TRUE(hwInfoConfig.getPreemptionDbgPropertyPreemptionModeSupport()); + EXPECT_TRUE(hwInfoConfig.getPreemptionDbgPropertyStateSipSupport()); + EXPECT_TRUE(hwInfoConfig.getPreemptionDbgPropertyCsrSurfaceSupport()); +} 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 730e0eddf7..7b64e1015c 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 @@ -99,3 +99,25 @@ LKFTEST_F(LkfHwInfo, givenHwInfoConfigWhenGettingEvictIfNecessaryFlagSupportedTh const auto &hwInfoConfig = *HwInfoConfig::get(hwInfo.platform.eProductFamily); EXPECT_TRUE(hwInfoConfig.isEvictionIfNecessaryFlagSupported()); } + +LKFTEST_F(LkfHwInfo, givenHwInfoConfigWhenGetCommandsStreamPropertiesSupportThenExpectCorrectValues) { + HardwareInfo hwInfo = *defaultHwInfo; + const auto &hwInfoConfig = *HwInfoConfig::get(hwInfo.platform.eProductFamily); + + EXPECT_TRUE(hwInfoConfig.getScmPropertyThreadArbitrationSupport()); + EXPECT_TRUE(hwInfoConfig.getScmPropertyCoherencySupport()); + EXPECT_FALSE(hwInfoConfig.getScmPropertyZPassAsyncSupport()); + EXPECT_FALSE(hwInfoConfig.getScmPropertyPixelAsyncSupport()); + EXPECT_FALSE(hwInfoConfig.getScmPropertyLargeGrfSupport()); + EXPECT_FALSE(hwInfoConfig.getScmPropertyDevicePreemptionSupport()); + + EXPECT_FALSE(hwInfoConfig.getSbaPropertyGlobalAtomicsSupport()); + EXPECT_TRUE(hwInfoConfig.getSbaPropertyStatelessMocsSupport()); + + EXPECT_TRUE(hwInfoConfig.getFrontEndPropertyScratchSizeSupport()); + EXPECT_FALSE(hwInfoConfig.getFrontEndPropertyPrivateScratchSizeSupport()); + + EXPECT_TRUE(hwInfoConfig.getPreemptionDbgPropertyPreemptionModeSupport()); + EXPECT_TRUE(hwInfoConfig.getPreemptionDbgPropertyStateSipSupport()); + EXPECT_TRUE(hwInfoConfig.getPreemptionDbgPropertyCsrSurfaceSupport()); +} 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 ddee69941e..69b6131bb4 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 @@ -82,3 +82,25 @@ ADLNTEST_F(AdlnHwInfo, givenHwInfoConfigWhenGettingEvictIfNecessaryFlagSupported const auto &hwInfoConfig = *HwInfoConfig::get(hwInfo.platform.eProductFamily); EXPECT_TRUE(hwInfoConfig.isEvictionIfNecessaryFlagSupported()); } + +ADLNTEST_F(AdlnHwInfo, givenHwInfoConfigWhenGetCommandsStreamPropertiesSupportThenExpectCorrectValues) { + HardwareInfo hwInfo = *defaultHwInfo; + const auto &hwInfoConfig = *HwInfoConfig::get(hwInfo.platform.eProductFamily); + + EXPECT_FALSE(hwInfoConfig.getScmPropertyThreadArbitrationSupport()); + EXPECT_TRUE(hwInfoConfig.getScmPropertyCoherencySupport()); + EXPECT_FALSE(hwInfoConfig.getScmPropertyZPassAsyncSupport()); + EXPECT_FALSE(hwInfoConfig.getScmPropertyPixelAsyncSupport()); + EXPECT_FALSE(hwInfoConfig.getScmPropertyLargeGrfSupport()); + EXPECT_FALSE(hwInfoConfig.getScmPropertyDevicePreemptionSupport()); + + EXPECT_FALSE(hwInfoConfig.getSbaPropertyGlobalAtomicsSupport()); + EXPECT_TRUE(hwInfoConfig.getSbaPropertyStatelessMocsSupport()); + + EXPECT_TRUE(hwInfoConfig.getFrontEndPropertyScratchSizeSupport()); + EXPECT_FALSE(hwInfoConfig.getFrontEndPropertyPrivateScratchSizeSupport()); + + EXPECT_TRUE(hwInfoConfig.getPreemptionDbgPropertyPreemptionModeSupport()); + EXPECT_TRUE(hwInfoConfig.getPreemptionDbgPropertyStateSipSupport()); + EXPECT_TRUE(hwInfoConfig.getPreemptionDbgPropertyCsrSurfaceSupport()); +} 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 ebd61866b6..9b49fd99c4 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 @@ -82,3 +82,25 @@ ADLPTEST_F(AdlpHwInfo, givenHwInfoConfigWhenGettingEvictIfNecessaryFlagSupported const auto &hwInfoConfig = *HwInfoConfig::get(hwInfo.platform.eProductFamily); EXPECT_TRUE(hwInfoConfig.isEvictionIfNecessaryFlagSupported()); } + +ADLPTEST_F(AdlpHwInfo, givenHwInfoConfigWhenGetCommandsStreamPropertiesSupportThenExpectCorrectValues) { + HardwareInfo hwInfo = *defaultHwInfo; + const auto &hwInfoConfig = *HwInfoConfig::get(hwInfo.platform.eProductFamily); + + EXPECT_FALSE(hwInfoConfig.getScmPropertyThreadArbitrationSupport()); + EXPECT_TRUE(hwInfoConfig.getScmPropertyCoherencySupport()); + EXPECT_FALSE(hwInfoConfig.getScmPropertyZPassAsyncSupport()); + EXPECT_FALSE(hwInfoConfig.getScmPropertyPixelAsyncSupport()); + EXPECT_FALSE(hwInfoConfig.getScmPropertyLargeGrfSupport()); + EXPECT_FALSE(hwInfoConfig.getScmPropertyDevicePreemptionSupport()); + + EXPECT_FALSE(hwInfoConfig.getSbaPropertyGlobalAtomicsSupport()); + EXPECT_TRUE(hwInfoConfig.getSbaPropertyStatelessMocsSupport()); + + EXPECT_TRUE(hwInfoConfig.getFrontEndPropertyScratchSizeSupport()); + EXPECT_FALSE(hwInfoConfig.getFrontEndPropertyPrivateScratchSizeSupport()); + + EXPECT_TRUE(hwInfoConfig.getPreemptionDbgPropertyPreemptionModeSupport()); + EXPECT_TRUE(hwInfoConfig.getPreemptionDbgPropertyStateSipSupport()); + EXPECT_TRUE(hwInfoConfig.getPreemptionDbgPropertyCsrSurfaceSupport()); +} 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 f68d4d6c48..d555836017 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 @@ -82,3 +82,25 @@ ADLSTEST_F(AdlsHwInfo, givenHwInfoConfigWhenGettingEvictIfNecessaryFlagSupported const auto &hwInfoConfig = *HwInfoConfig::get(hwInfo.platform.eProductFamily); EXPECT_TRUE(hwInfoConfig.isEvictionIfNecessaryFlagSupported()); } + +ADLSTEST_F(AdlsHwInfo, givenHwInfoConfigWhenGetCommandsStreamPropertiesSupportThenExpectCorrectValues) { + HardwareInfo hwInfo = *defaultHwInfo; + const auto &hwInfoConfig = *HwInfoConfig::get(hwInfo.platform.eProductFamily); + + EXPECT_FALSE(hwInfoConfig.getScmPropertyThreadArbitrationSupport()); + EXPECT_TRUE(hwInfoConfig.getScmPropertyCoherencySupport()); + EXPECT_FALSE(hwInfoConfig.getScmPropertyZPassAsyncSupport()); + EXPECT_FALSE(hwInfoConfig.getScmPropertyPixelAsyncSupport()); + EXPECT_FALSE(hwInfoConfig.getScmPropertyLargeGrfSupport()); + EXPECT_FALSE(hwInfoConfig.getScmPropertyDevicePreemptionSupport()); + + EXPECT_FALSE(hwInfoConfig.getSbaPropertyGlobalAtomicsSupport()); + EXPECT_TRUE(hwInfoConfig.getSbaPropertyStatelessMocsSupport()); + + EXPECT_TRUE(hwInfoConfig.getFrontEndPropertyScratchSizeSupport()); + EXPECT_FALSE(hwInfoConfig.getFrontEndPropertyPrivateScratchSizeSupport()); + + EXPECT_TRUE(hwInfoConfig.getPreemptionDbgPropertyPreemptionModeSupport()); + EXPECT_TRUE(hwInfoConfig.getPreemptionDbgPropertyStateSipSupport()); + EXPECT_TRUE(hwInfoConfig.getPreemptionDbgPropertyCsrSurfaceSupport()); +} 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 9717ab55e5..4d9d5d646a 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 @@ -148,3 +148,25 @@ DG1TEST_F(Dg1HwInfo, givenHwInfoConfigWhenGettingEvictIfNecessaryFlagSupportedTh const auto &hwInfoConfig = *HwInfoConfig::get(hwInfo.platform.eProductFamily); EXPECT_TRUE(hwInfoConfig.isEvictionIfNecessaryFlagSupported()); } + +DG1TEST_F(Dg1HwInfo, givenHwInfoConfigWhenGetCommandsStreamPropertiesSupportThenExpectCorrectValues) { + HardwareInfo hwInfo = *defaultHwInfo; + const auto &hwInfoConfig = *HwInfoConfig::get(hwInfo.platform.eProductFamily); + + EXPECT_FALSE(hwInfoConfig.getScmPropertyThreadArbitrationSupport()); + EXPECT_TRUE(hwInfoConfig.getScmPropertyCoherencySupport()); + EXPECT_FALSE(hwInfoConfig.getScmPropertyZPassAsyncSupport()); + EXPECT_FALSE(hwInfoConfig.getScmPropertyPixelAsyncSupport()); + EXPECT_FALSE(hwInfoConfig.getScmPropertyLargeGrfSupport()); + EXPECT_FALSE(hwInfoConfig.getScmPropertyDevicePreemptionSupport()); + + EXPECT_FALSE(hwInfoConfig.getSbaPropertyGlobalAtomicsSupport()); + EXPECT_TRUE(hwInfoConfig.getSbaPropertyStatelessMocsSupport()); + + EXPECT_TRUE(hwInfoConfig.getFrontEndPropertyScratchSizeSupport()); + EXPECT_FALSE(hwInfoConfig.getFrontEndPropertyPrivateScratchSizeSupport()); + + EXPECT_TRUE(hwInfoConfig.getPreemptionDbgPropertyPreemptionModeSupport()); + EXPECT_TRUE(hwInfoConfig.getPreemptionDbgPropertyStateSipSupport()); + EXPECT_TRUE(hwInfoConfig.getPreemptionDbgPropertyCsrSurfaceSupport()); +} 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 7df5f30b73..8e9981283d 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 @@ -92,3 +92,25 @@ RKLTEST_F(RklHwInfo, givenHwInfoConfigWhenGettingEvictIfNecessaryFlagSupportedTh const auto &hwInfoConfig = *HwInfoConfig::get(hwInfo.platform.eProductFamily); EXPECT_TRUE(hwInfoConfig.isEvictionIfNecessaryFlagSupported()); } + +RKLTEST_F(RklHwInfo, givenHwInfoConfigWhenGetCommandsStreamPropertiesSupportThenExpectCorrectValues) { + HardwareInfo hwInfo = *defaultHwInfo; + const auto &hwInfoConfig = *HwInfoConfig::get(hwInfo.platform.eProductFamily); + + EXPECT_FALSE(hwInfoConfig.getScmPropertyThreadArbitrationSupport()); + EXPECT_TRUE(hwInfoConfig.getScmPropertyCoherencySupport()); + EXPECT_FALSE(hwInfoConfig.getScmPropertyZPassAsyncSupport()); + EXPECT_FALSE(hwInfoConfig.getScmPropertyPixelAsyncSupport()); + EXPECT_FALSE(hwInfoConfig.getScmPropertyLargeGrfSupport()); + EXPECT_FALSE(hwInfoConfig.getScmPropertyDevicePreemptionSupport()); + + EXPECT_FALSE(hwInfoConfig.getSbaPropertyGlobalAtomicsSupport()); + EXPECT_TRUE(hwInfoConfig.getSbaPropertyStatelessMocsSupport()); + + EXPECT_TRUE(hwInfoConfig.getFrontEndPropertyScratchSizeSupport()); + EXPECT_FALSE(hwInfoConfig.getFrontEndPropertyPrivateScratchSizeSupport()); + + EXPECT_TRUE(hwInfoConfig.getPreemptionDbgPropertyPreemptionModeSupport()); + EXPECT_TRUE(hwInfoConfig.getPreemptionDbgPropertyStateSipSupport()); + EXPECT_TRUE(hwInfoConfig.getPreemptionDbgPropertyCsrSurfaceSupport()); +} 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 c181525ef1..33956af685 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 @@ -20,3 +20,25 @@ TGLLPTEST_F(HwInfoConfigTestTgllp, givenHwInfoConfigWhenGettingEvictIfNecessaryF const auto &hwInfoConfig = *HwInfoConfig::get(hwInfo.platform.eProductFamily); EXPECT_TRUE(hwInfoConfig.isEvictionIfNecessaryFlagSupported()); } + +TGLLPTEST_F(HwInfoConfigTestTgllp, givenHwInfoConfigWhenGetCommandsStreamPropertiesSupportThenExpectCorrectValues) { + HardwareInfo hwInfo = *defaultHwInfo; + const auto &hwInfoConfig = *HwInfoConfig::get(hwInfo.platform.eProductFamily); + + EXPECT_FALSE(hwInfoConfig.getScmPropertyThreadArbitrationSupport()); + EXPECT_TRUE(hwInfoConfig.getScmPropertyCoherencySupport()); + EXPECT_FALSE(hwInfoConfig.getScmPropertyZPassAsyncSupport()); + EXPECT_FALSE(hwInfoConfig.getScmPropertyPixelAsyncSupport()); + EXPECT_FALSE(hwInfoConfig.getScmPropertyLargeGrfSupport()); + EXPECT_FALSE(hwInfoConfig.getScmPropertyDevicePreemptionSupport()); + + EXPECT_FALSE(hwInfoConfig.getSbaPropertyGlobalAtomicsSupport()); + EXPECT_TRUE(hwInfoConfig.getSbaPropertyStatelessMocsSupport()); + + EXPECT_TRUE(hwInfoConfig.getFrontEndPropertyScratchSizeSupport()); + EXPECT_FALSE(hwInfoConfig.getFrontEndPropertyPrivateScratchSizeSupport()); + + EXPECT_TRUE(hwInfoConfig.getPreemptionDbgPropertyPreemptionModeSupport()); + EXPECT_TRUE(hwInfoConfig.getPreemptionDbgPropertyStateSipSupport()); + EXPECT_TRUE(hwInfoConfig.getPreemptionDbgPropertyCsrSurfaceSupport()); +} 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 0207f32cb9..78a291dbcf 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 @@ -100,3 +100,25 @@ using CompilerHwInfoConfigHelperTestsBdw = ::testing::Test; BDWTEST_F(CompilerHwInfoConfigHelperTestsBdw, givenBdwWhenIsStatelessToStatefulBufferOffsetSupportedIsCalledThenReturnsTrue) { EXPECT_FALSE(CompilerHwInfoConfig::get(productFamily)->isStatelessToStatefulBufferOffsetSupported()); } + +BDWTEST_F(BdwHwInfo, givenHwInfoConfigWhenGetCommandsStreamPropertiesSupportThenExpectCorrectValues) { + HardwareInfo hwInfo = *defaultHwInfo; + const auto &hwInfoConfig = *HwInfoConfig::get(hwInfo.platform.eProductFamily); + + EXPECT_FALSE(hwInfoConfig.getScmPropertyThreadArbitrationSupport()); + EXPECT_TRUE(hwInfoConfig.getScmPropertyCoherencySupport()); + EXPECT_FALSE(hwInfoConfig.getScmPropertyZPassAsyncSupport()); + EXPECT_FALSE(hwInfoConfig.getScmPropertyPixelAsyncSupport()); + EXPECT_FALSE(hwInfoConfig.getScmPropertyLargeGrfSupport()); + EXPECT_FALSE(hwInfoConfig.getScmPropertyDevicePreemptionSupport()); + + EXPECT_FALSE(hwInfoConfig.getSbaPropertyGlobalAtomicsSupport()); + EXPECT_TRUE(hwInfoConfig.getSbaPropertyStatelessMocsSupport()); + + EXPECT_TRUE(hwInfoConfig.getFrontEndPropertyScratchSizeSupport()); + EXPECT_FALSE(hwInfoConfig.getFrontEndPropertyPrivateScratchSizeSupport()); + + EXPECT_TRUE(hwInfoConfig.getPreemptionDbgPropertyPreemptionModeSupport()); + EXPECT_TRUE(hwInfoConfig.getPreemptionDbgPropertyStateSipSupport()); + EXPECT_FALSE(hwInfoConfig.getPreemptionDbgPropertyCsrSurfaceSupport()); +} 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 1e000a590a..a344eb2f8f 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 @@ -106,3 +106,25 @@ BXTTEST_F(BxtHwInfo, givenHwInfoConfigWhenGettingEvictIfNecessaryFlagSupportedTh const auto &hwInfoConfig = *HwInfoConfig::get(hwInfo.platform.eProductFamily); EXPECT_TRUE(hwInfoConfig.isEvictionIfNecessaryFlagSupported()); } + +BXTTEST_F(BxtHwInfo, givenHwInfoConfigWhenGetCommandsStreamPropertiesSupportThenExpectCorrectValues) { + HardwareInfo hwInfo = *defaultHwInfo; + const auto &hwInfoConfig = *HwInfoConfig::get(hwInfo.platform.eProductFamily); + + EXPECT_TRUE(hwInfoConfig.getScmPropertyThreadArbitrationSupport()); + EXPECT_FALSE(hwInfoConfig.getScmPropertyCoherencySupport()); + EXPECT_FALSE(hwInfoConfig.getScmPropertyZPassAsyncSupport()); + EXPECT_FALSE(hwInfoConfig.getScmPropertyPixelAsyncSupport()); + EXPECT_FALSE(hwInfoConfig.getScmPropertyLargeGrfSupport()); + EXPECT_FALSE(hwInfoConfig.getScmPropertyDevicePreemptionSupport()); + + EXPECT_FALSE(hwInfoConfig.getSbaPropertyGlobalAtomicsSupport()); + EXPECT_TRUE(hwInfoConfig.getSbaPropertyStatelessMocsSupport()); + + EXPECT_TRUE(hwInfoConfig.getFrontEndPropertyScratchSizeSupport()); + EXPECT_FALSE(hwInfoConfig.getFrontEndPropertyPrivateScratchSizeSupport()); + + EXPECT_TRUE(hwInfoConfig.getPreemptionDbgPropertyPreemptionModeSupport()); + EXPECT_TRUE(hwInfoConfig.getPreemptionDbgPropertyStateSipSupport()); + EXPECT_TRUE(hwInfoConfig.getPreemptionDbgPropertyCsrSurfaceSupport()); +} 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 d9efadbe08..8fb7e9a695 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 @@ -113,3 +113,25 @@ CFLTEST_F(CflHwInfo, givenHwInfoConfigWhenGettingEvictIfNecessaryFlagSupportedTh const auto &hwInfoConfig = *HwInfoConfig::get(hwInfo.platform.eProductFamily); EXPECT_TRUE(hwInfoConfig.isEvictionIfNecessaryFlagSupported()); } + +CFLTEST_F(CflHwInfo, givenHwInfoConfigWhenGetCommandsStreamPropertiesSupportThenExpectCorrectValues) { + HardwareInfo hwInfo = *defaultHwInfo; + const auto &hwInfoConfig = *HwInfoConfig::get(hwInfo.platform.eProductFamily); + + EXPECT_TRUE(hwInfoConfig.getScmPropertyThreadArbitrationSupport()); + EXPECT_FALSE(hwInfoConfig.getScmPropertyCoherencySupport()); + EXPECT_FALSE(hwInfoConfig.getScmPropertyZPassAsyncSupport()); + EXPECT_FALSE(hwInfoConfig.getScmPropertyPixelAsyncSupport()); + EXPECT_FALSE(hwInfoConfig.getScmPropertyLargeGrfSupport()); + EXPECT_FALSE(hwInfoConfig.getScmPropertyDevicePreemptionSupport()); + + EXPECT_FALSE(hwInfoConfig.getSbaPropertyGlobalAtomicsSupport()); + EXPECT_TRUE(hwInfoConfig.getSbaPropertyStatelessMocsSupport()); + + EXPECT_TRUE(hwInfoConfig.getFrontEndPropertyScratchSizeSupport()); + EXPECT_FALSE(hwInfoConfig.getFrontEndPropertyPrivateScratchSizeSupport()); + + EXPECT_TRUE(hwInfoConfig.getPreemptionDbgPropertyPreemptionModeSupport()); + EXPECT_TRUE(hwInfoConfig.getPreemptionDbgPropertyStateSipSupport()); + EXPECT_TRUE(hwInfoConfig.getPreemptionDbgPropertyCsrSurfaceSupport()); +} 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 87201b678e..614b14057b 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 @@ -96,3 +96,25 @@ GLKTEST_F(GlkHwInfo, givenHwInfoConfigWhenGettingEvictIfNecessaryFlagSupportedTh const auto &hwInfoConfig = *HwInfoConfig::get(hwInfo.platform.eProductFamily); EXPECT_TRUE(hwInfoConfig.isEvictionIfNecessaryFlagSupported()); } + +GLKTEST_F(GlkHwInfo, givenHwInfoConfigWhenGetCommandsStreamPropertiesSupportThenExpectCorrectValues) { + HardwareInfo hwInfo = *defaultHwInfo; + const auto &hwInfoConfig = *HwInfoConfig::get(hwInfo.platform.eProductFamily); + + EXPECT_TRUE(hwInfoConfig.getScmPropertyThreadArbitrationSupport()); + EXPECT_FALSE(hwInfoConfig.getScmPropertyCoherencySupport()); + EXPECT_FALSE(hwInfoConfig.getScmPropertyZPassAsyncSupport()); + EXPECT_FALSE(hwInfoConfig.getScmPropertyPixelAsyncSupport()); + EXPECT_FALSE(hwInfoConfig.getScmPropertyLargeGrfSupport()); + EXPECT_FALSE(hwInfoConfig.getScmPropertyDevicePreemptionSupport()); + + EXPECT_FALSE(hwInfoConfig.getSbaPropertyGlobalAtomicsSupport()); + EXPECT_TRUE(hwInfoConfig.getSbaPropertyStatelessMocsSupport()); + + EXPECT_TRUE(hwInfoConfig.getFrontEndPropertyScratchSizeSupport()); + EXPECT_FALSE(hwInfoConfig.getFrontEndPropertyPrivateScratchSizeSupport()); + + EXPECT_TRUE(hwInfoConfig.getPreemptionDbgPropertyPreemptionModeSupport()); + EXPECT_TRUE(hwInfoConfig.getPreemptionDbgPropertyStateSipSupport()); + EXPECT_TRUE(hwInfoConfig.getPreemptionDbgPropertyCsrSurfaceSupport()); +} 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 bfeebd63b6..23f37d5073 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 @@ -120,3 +120,25 @@ KBLTEST_F(KblHwInfo, givenHwInfoConfigWhenGettingEvictIfNecessaryFlagSupportedTh const auto &hwInfoConfig = *HwInfoConfig::get(hwInfo.platform.eProductFamily); EXPECT_TRUE(hwInfoConfig.isEvictionIfNecessaryFlagSupported()); } + +KBLTEST_F(KblHwInfo, givenHwInfoConfigWhenGetCommandsStreamPropertiesSupportThenExpectCorrectValues) { + HardwareInfo hwInfo = *defaultHwInfo; + const auto &hwInfoConfig = *HwInfoConfig::get(hwInfo.platform.eProductFamily); + + EXPECT_TRUE(hwInfoConfig.getScmPropertyThreadArbitrationSupport()); + EXPECT_FALSE(hwInfoConfig.getScmPropertyCoherencySupport()); + EXPECT_FALSE(hwInfoConfig.getScmPropertyZPassAsyncSupport()); + EXPECT_FALSE(hwInfoConfig.getScmPropertyPixelAsyncSupport()); + EXPECT_FALSE(hwInfoConfig.getScmPropertyLargeGrfSupport()); + EXPECT_FALSE(hwInfoConfig.getScmPropertyDevicePreemptionSupport()); + + EXPECT_FALSE(hwInfoConfig.getSbaPropertyGlobalAtomicsSupport()); + EXPECT_TRUE(hwInfoConfig.getSbaPropertyStatelessMocsSupport()); + + EXPECT_TRUE(hwInfoConfig.getFrontEndPropertyScratchSizeSupport()); + EXPECT_FALSE(hwInfoConfig.getFrontEndPropertyPrivateScratchSizeSupport()); + + EXPECT_TRUE(hwInfoConfig.getPreemptionDbgPropertyPreemptionModeSupport()); + EXPECT_TRUE(hwInfoConfig.getPreemptionDbgPropertyStateSipSupport()); + EXPECT_TRUE(hwInfoConfig.getPreemptionDbgPropertyCsrSurfaceSupport()); +} 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 85cf5fb8c1..e8a58328f6 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 @@ -120,3 +120,25 @@ SKLTEST_F(SklHwInfo, givenHwInfoConfigWhenGettingEvictIfNecessaryFlagSupportedTh const auto &hwInfoConfig = *HwInfoConfig::get(hwInfo.platform.eProductFamily); EXPECT_TRUE(hwInfoConfig.isEvictionIfNecessaryFlagSupported()); } + +SKLTEST_F(SklHwInfo, givenHwInfoConfigWhenGetCommandsStreamPropertiesSupportThenExpectCorrectValues) { + HardwareInfo hwInfo = *defaultHwInfo; + const auto &hwInfoConfig = *HwInfoConfig::get(hwInfo.platform.eProductFamily); + + EXPECT_TRUE(hwInfoConfig.getScmPropertyThreadArbitrationSupport()); + EXPECT_FALSE(hwInfoConfig.getScmPropertyCoherencySupport()); + EXPECT_FALSE(hwInfoConfig.getScmPropertyZPassAsyncSupport()); + EXPECT_FALSE(hwInfoConfig.getScmPropertyPixelAsyncSupport()); + EXPECT_FALSE(hwInfoConfig.getScmPropertyLargeGrfSupport()); + EXPECT_FALSE(hwInfoConfig.getScmPropertyDevicePreemptionSupport()); + + EXPECT_FALSE(hwInfoConfig.getSbaPropertyGlobalAtomicsSupport()); + EXPECT_TRUE(hwInfoConfig.getSbaPropertyStatelessMocsSupport()); + + EXPECT_TRUE(hwInfoConfig.getFrontEndPropertyScratchSizeSupport()); + EXPECT_FALSE(hwInfoConfig.getFrontEndPropertyPrivateScratchSizeSupport()); + + EXPECT_TRUE(hwInfoConfig.getPreemptionDbgPropertyPreemptionModeSupport()); + EXPECT_TRUE(hwInfoConfig.getPreemptionDbgPropertyStateSipSupport()); + EXPECT_TRUE(hwInfoConfig.getPreemptionDbgPropertyCsrSurfaceSupport()); +} 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 b68406ac53..3a54854bc1 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 @@ -20,3 +20,25 @@ XEHPTEST_F(HwInfoConfigTestXeHpSdv, givenHwInfoConfigWhenGettingEvictIfNecessary const auto &hwInfoConfig = *HwInfoConfig::get(hwInfo.platform.eProductFamily); EXPECT_TRUE(hwInfoConfig.isEvictionIfNecessaryFlagSupported()); } + +XEHPTEST_F(HwInfoConfigTestXeHpSdv, givenHwInfoConfigWhenGetCommandsStreamPropertiesSupportThenExpectCorrectValues) { + HardwareInfo hwInfo = *defaultHwInfo; + const auto &hwInfoConfig = *HwInfoConfig::get(hwInfo.platform.eProductFamily); + + EXPECT_FALSE(hwInfoConfig.getScmPropertyThreadArbitrationSupport()); + EXPECT_TRUE(hwInfoConfig.getScmPropertyCoherencySupport()); + EXPECT_FALSE(hwInfoConfig.getScmPropertyZPassAsyncSupport()); + EXPECT_FALSE(hwInfoConfig.getScmPropertyPixelAsyncSupport()); + EXPECT_TRUE(hwInfoConfig.getScmPropertyLargeGrfSupport()); + EXPECT_FALSE(hwInfoConfig.getScmPropertyDevicePreemptionSupport()); + + EXPECT_TRUE(hwInfoConfig.getSbaPropertyGlobalAtomicsSupport()); + EXPECT_TRUE(hwInfoConfig.getSbaPropertyStatelessMocsSupport()); + + EXPECT_TRUE(hwInfoConfig.getFrontEndPropertyScratchSizeSupport()); + EXPECT_TRUE(hwInfoConfig.getFrontEndPropertyPrivateScratchSizeSupport()); + + EXPECT_TRUE(hwInfoConfig.getPreemptionDbgPropertyPreemptionModeSupport()); + EXPECT_TRUE(hwInfoConfig.getPreemptionDbgPropertyStateSipSupport()); + EXPECT_FALSE(hwInfoConfig.getPreemptionDbgPropertyCsrSurfaceSupport()); +} 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 ba04b64615..3b263fda6e 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 @@ -74,3 +74,25 @@ PVCTEST_F(PVCHwInfoConfig, givenPVCHwInfoConfigWhenIsPrefetcherDisablingInDirect const auto &hwInfoConfig = *HwInfoConfig::get(productFamily); EXPECT_FALSE(hwInfoConfig.isPrefetcherDisablingInDirectSubmissionRequired()); } + +PVCTEST_F(PVCHwInfoConfig, givenHwInfoConfigWhenGetCommandsStreamPropertiesSupportThenExpectCorrectValues) { + HardwareInfo hwInfo = *defaultHwInfo; + const auto &hwInfoConfig = *HwInfoConfig::get(hwInfo.platform.eProductFamily); + + EXPECT_TRUE(hwInfoConfig.getScmPropertyThreadArbitrationSupport()); + EXPECT_TRUE(hwInfoConfig.getScmPropertyCoherencySupport()); + EXPECT_FALSE(hwInfoConfig.getScmPropertyZPassAsyncSupport()); + EXPECT_FALSE(hwInfoConfig.getScmPropertyPixelAsyncSupport()); + EXPECT_TRUE(hwInfoConfig.getScmPropertyLargeGrfSupport()); + EXPECT_FALSE(hwInfoConfig.getScmPropertyDevicePreemptionSupport()); + + EXPECT_FALSE(hwInfoConfig.getSbaPropertyGlobalAtomicsSupport()); + EXPECT_TRUE(hwInfoConfig.getSbaPropertyStatelessMocsSupport()); + + EXPECT_TRUE(hwInfoConfig.getFrontEndPropertyScratchSizeSupport()); + EXPECT_TRUE(hwInfoConfig.getFrontEndPropertyPrivateScratchSizeSupport()); + + EXPECT_TRUE(hwInfoConfig.getPreemptionDbgPropertyPreemptionModeSupport()); + EXPECT_TRUE(hwInfoConfig.getPreemptionDbgPropertyStateSipSupport()); + EXPECT_FALSE(hwInfoConfig.getPreemptionDbgPropertyCsrSurfaceSupport()); +} 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 5596155f7d..f2c0dd6acf 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 @@ -70,3 +70,25 @@ DG2TEST_F(TestDg2HwInfoConfig, givenDG2HwInfoConfigWhenCheckDirectSubmissionSupp const auto &hwInfoConfig = *HwInfoConfig::get(hwInfo.platform.eProductFamily); EXPECT_TRUE(hwInfoConfig.isDirectSubmissionSupported(hwInfo)); } + +DG2TEST_F(TestDg2HwInfoConfig, givenHwInfoConfigWhenGetCommandsStreamPropertiesSupportThenExpectCorrectValues) { + HardwareInfo hwInfo = *defaultHwInfo; + const auto &hwInfoConfig = *HwInfoConfig::get(hwInfo.platform.eProductFamily); + + EXPECT_FALSE(hwInfoConfig.getScmPropertyThreadArbitrationSupport()); + EXPECT_TRUE(hwInfoConfig.getScmPropertyCoherencySupport()); + EXPECT_TRUE(hwInfoConfig.getScmPropertyZPassAsyncSupport()); + EXPECT_TRUE(hwInfoConfig.getScmPropertyPixelAsyncSupport()); + EXPECT_TRUE(hwInfoConfig.getScmPropertyLargeGrfSupport()); + EXPECT_FALSE(hwInfoConfig.getScmPropertyDevicePreemptionSupport()); + + EXPECT_FALSE(hwInfoConfig.getSbaPropertyGlobalAtomicsSupport()); + EXPECT_TRUE(hwInfoConfig.getSbaPropertyStatelessMocsSupport()); + + EXPECT_TRUE(hwInfoConfig.getFrontEndPropertyScratchSizeSupport()); + EXPECT_TRUE(hwInfoConfig.getFrontEndPropertyPrivateScratchSizeSupport()); + + EXPECT_TRUE(hwInfoConfig.getPreemptionDbgPropertyPreemptionModeSupport()); + EXPECT_TRUE(hwInfoConfig.getPreemptionDbgPropertyStateSipSupport()); + EXPECT_FALSE(hwInfoConfig.getPreemptionDbgPropertyCsrSurfaceSupport()); +}