test: add new matcher for xe lpg platforms

Related-To: NEO-8187
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
Mateusz Jablonski
2023-08-31 14:46:02 +00:00
committed by Compute-Runtime-Automation
parent c456225654
commit a0ed1ab846
8 changed files with 158 additions and 226 deletions

View File

@@ -85,3 +85,10 @@ using IsNotPvcOrDg2 = IsNotWithinProducts<IGFX_DG2, IGFX_PVC>;
using HasStatefulSupport = IsNotAnyGfxCores<IGFX_XE_HPC_CORE>;
using HasNoStatefulSupport = IsAnyGfxCores<IGFX_XE_HPC_CORE>;
struct IsXeLpg {
template <PRODUCT_FAMILY productFamily>
static constexpr bool isMatched() {
return IsXeHpgCore::isMatched<productFamily>() && !IsDG2::isMatched<productFamily>();
}
};

View File

@@ -17,7 +17,6 @@ if(TESTS_XE_HPG_CORE)
${CMAKE_CURRENT_SOURCE_DIR}/gfx_core_helper_tests_xe_hpg_core.cpp
${CMAKE_CURRENT_SOURCE_DIR}/image_surface_state_tests_xe_hpg_core.cpp
${CMAKE_CURRENT_SOURCE_DIR}/os_agnostic_product_helper_xe_lpg_tests.cpp
${CMAKE_CURRENT_SOURCE_DIR}/os_agnostic_product_helper_xe_lpg_tests.h
${CMAKE_CURRENT_SOURCE_DIR}/simd_helper_tests_xe_hpg_core.cpp
${CMAKE_CURRENT_SOURCE_DIR}/test_device_caps_xe_hpg_core.cpp
${CMAKE_CURRENT_SOURCE_DIR}/test_encode_dispatch_kernel_xe_hpg_core.cpp

View File

@@ -17,7 +17,6 @@ if(TESTS_MTL)
${CMAKE_CURRENT_SOURCE_DIR}/product_helper_tests_mtl.cpp
${CMAKE_CURRENT_SOURCE_DIR}/hw_info_tests_mtl.cpp
${CMAKE_CURRENT_SOURCE_DIR}/product_config_helper_tests_mtl.cpp
${CMAKE_CURRENT_SOURCE_DIR}/test_device_caps_mtl.cpp
)
add_subdirectories()

View File

@@ -80,18 +80,6 @@ MTLTEST_F(MtlHwInfoTests, givenMtlCapabilityTableWhenCheckDirectSubmissionEngine
}
}
MTLTEST_F(MtlHwInfoTests, WhenSetupHardwareInfoWithSetupFeatureTableFlagTrueOrFalseIsCalledThenFeatureTableHasCorrectValueOfFtrLinearCCS) {
HardwareInfo hwInfo = *defaultHwInfo;
auto compilerProductHelper = CompilerProductHelper::create(hwInfo.platform.eProductFamily);
FeatureTable &featureTable = hwInfo.featureTable;
EXPECT_FALSE(featureTable.flags.ftrLinearCCS);
MtlHwConfig::setupHardwareInfo(&hwInfo, false, *compilerProductHelper);
EXPECT_FALSE(featureTable.flags.ftrLinearCCS);
MtlHwConfig::setupHardwareInfo(&hwInfo, true, *compilerProductHelper);
EXPECT_TRUE(featureTable.flags.ftrLinearCCS);
}
MTLTEST_F(MtlHwInfoTests, WhenSetupHardwareInfoThenCorrectValuesOfCCSAndMultiTileInfoAreSet) {
HardwareInfo hwInfo = *defaultHwInfo;
auto compilerProductHelper = CompilerProductHelper::create(hwInfo.platform.eProductFamily);
@@ -134,3 +122,19 @@ MTLTEST_F(MtlHwInfoTests, GivenEmptyHwInfoForUnitTestsWhenSetupHardwareInfoIsCal
EXPECT_TRUE(gtSystemInfo.SliceInfo[i].Enabled);
}
}
MTLTEST_F(MtlHwInfoTests, givenMtlConfigWhenSetupHardwareInfoBaseThenGtSystemInfoIsCorrect) {
HardwareInfo hwInfo = *defaultHwInfo;
auto compilerProductHelper = CompilerProductHelper::create(hwInfo.platform.eProductFamily);
GT_SYSTEM_INFO &gtSystemInfo = hwInfo.gtSystemInfo;
MtlHwConfig::setupHardwareInfoBase(&hwInfo, false, *compilerProductHelper);
EXPECT_EQ(336u, gtSystemInfo.TotalVsThreads);
EXPECT_EQ(336u, gtSystemInfo.TotalHsThreads);
EXPECT_EQ(336u, gtSystemInfo.TotalDsThreads);
EXPECT_EQ(336u, gtSystemInfo.TotalGsThreads);
EXPECT_EQ(64u, gtSystemInfo.TotalPsThreadsWindowerRange);
EXPECT_EQ(8u, gtSystemInfo.CsrSizeInMb);
EXPECT_FALSE(gtSystemInfo.IsL3HashModeEnabled);
EXPECT_FALSE(gtSystemInfo.IsDynamicallyPopulated);
}

View File

@@ -5,186 +5,18 @@
*
*/
#include "shared/source/command_stream/stream_properties.h"
#include "shared/source/execution_environment/execution_environment.h"
#include "shared/source/execution_environment/root_device_environment.h"
#include "shared/source/helpers/compiler_product_helper.h"
#include "shared/source/memory_manager/allocation_type.h"
#include "shared/source/os_interface/product_helper.h"
#include "shared/source/release_helper/release_helper.h"
#include "shared/source/xe_hpg_core/hw_cmds_mtl.h"
#include "shared/test/common/fixtures/device_fixture.h"
#include "shared/test/common/helpers/debug_manager_state_restore.h"
#include "shared/test/common/helpers/default_hw_info.h"
#include "shared/test/common/helpers/gtest_helpers.h"
#include "shared/test/common/helpers/variable_backup.h"
#include "shared/test/common/mocks/mock_command_stream_receiver.h"
#include "shared/test/common/mocks/mock_device.h"
#include "shared/test/common/test_macros/header/per_product_test_definitions.h"
#include "shared/test/common/test_macros/test.h"
#include "shared/test/unit_test/os_interface/product_helper_tests.h"
#include "shared/test/unit_test/xe_hpg_core/os_agnostic_product_helper_xe_lpg_tests.h"
#include "aubstream/product_family.h"
#include "platforms.h"
using namespace NEO;
using MtlProductHelper = ProductHelperTest;
MTLTEST_F(MtlProductHelper, givenMtlConfigWhenSetupHardwareInfoBaseThenGtSystemInfoIsCorrect) {
HardwareInfo hwInfo = *defaultHwInfo;
auto compilerProductHelper = CompilerProductHelper::create(hwInfo.platform.eProductFamily);
GT_SYSTEM_INFO &gtSystemInfo = hwInfo.gtSystemInfo;
MtlHwConfig::setupHardwareInfoBase(&hwInfo, false, *compilerProductHelper);
EXPECT_EQ(336u, gtSystemInfo.TotalVsThreads);
EXPECT_EQ(336u, gtSystemInfo.TotalHsThreads);
EXPECT_EQ(336u, gtSystemInfo.TotalDsThreads);
EXPECT_EQ(336u, gtSystemInfo.TotalGsThreads);
EXPECT_EQ(64u, gtSystemInfo.TotalPsThreadsWindowerRange);
EXPECT_EQ(8u, gtSystemInfo.CsrSizeInMb);
EXPECT_FALSE(gtSystemInfo.IsL3HashModeEnabled);
EXPECT_FALSE(gtSystemInfo.IsDynamicallyPopulated);
}
MTLTEST_F(MtlProductHelper, givenMtlConfigWhenSetupHardwareInfoThenGtSystemInfoHasNonZeroValues) {
HardwareInfo hwInfo = *defaultHwInfo;
auto compilerProductHelper = CompilerProductHelper::create(hwInfo.platform.eProductFamily);
GT_SYSTEM_INFO &gtSystemInfo = hwInfo.gtSystemInfo;
MtlHwConfig::setupHardwareInfo(&hwInfo, false, *compilerProductHelper);
EXPECT_GT(gtSystemInfo.SliceCount, 0u);
EXPECT_GT(gtSystemInfo.SubSliceCount, 0u);
EXPECT_GT(gtSystemInfo.DualSubSliceCount, 0u);
EXPECT_GT(gtSystemInfo.EUCount, 0u);
EXPECT_GT(gtSystemInfo.MaxEuPerSubSlice, 0u);
EXPECT_GT(gtSystemInfo.MaxSlicesSupported, 0u);
EXPECT_GT_VAL(gtSystemInfo.L3CacheSizeInKb, 0u);
EXPECT_GT(gtSystemInfo.L3BankCount, 0u);
EXPECT_TRUE(gtSystemInfo.CCSInfo.IsValid);
EXPECT_GT(gtSystemInfo.CCSInfo.NumberOfCCSEnabled, 0u);
}
MTLTEST_F(MtlProductHelper, whenGettingAubstreamProductFamilyThenProperEnumValueIsReturned) {
EXPECT_EQ(aub_stream::ProductFamily::Mtl, productHelper->getAubStreamProductFamily());
}
MTLTEST_F(MtlProductHelper, givenProductHelperWhenCheckDirectSubmissionSupportedThenTrueIsReturned) {
EXPECT_TRUE(productHelper->isDirectSubmissionSupported(pInHwInfo));
}
MTLTEST_F(MtlProductHelper, givenMtlProductHelperWhenCheckDirectSubmissionConstantCacheInvalidationNeededThenTrueIsReturned) {
auto hwInfo = *defaultHwInfo;
EXPECT_TRUE(productHelper->isDirectSubmissionConstantCacheInvalidationNeeded(hwInfo));
}
MTLTEST_F(MtlProductHelper, givenMtlProductHelperWhenIsInitBuiltinAsyncSupportedThenReturnFalse) {
EXPECT_FALSE(productHelper->isInitBuiltinAsyncSupported(*defaultHwInfo));
}
MTLTEST_F(MtlProductHelper, givenProductHelperWhenGettingEvictIfNecessaryFlagSupportedThenExpectTrue) {
EXPECT_TRUE(productHelper->isEvictionIfNecessaryFlagSupported());
}
MTLTEST_F(MtlProductHelper, givenProductHelperWhenGetCommandsStreamPropertiesSupportThenExpectCorrectValues) {
EXPECT_FALSE(productHelper->getScmPropertyThreadArbitrationPolicySupport());
EXPECT_TRUE(productHelper->getScmPropertyCoherencyRequiredSupport());
EXPECT_TRUE(productHelper->getScmPropertyZPassAsyncComputeThreadLimitSupport());
EXPECT_TRUE(productHelper->getScmPropertyPixelAsyncComputeThreadLimitSupport());
EXPECT_TRUE(productHelper->getScmPropertyLargeGrfModeSupport());
EXPECT_FALSE(productHelper->getScmPropertyDevicePreemptionModeSupport());
EXPECT_FALSE(productHelper->getStateBaseAddressPropertyGlobalAtomicsSupport());
EXPECT_TRUE(productHelper->getStateBaseAddressPropertyBindingTablePoolBaseAddressSupport());
EXPECT_TRUE(productHelper->getFrontEndPropertyScratchSizeSupport());
EXPECT_TRUE(productHelper->getFrontEndPropertyPrivateScratchSizeSupport());
EXPECT_TRUE(productHelper->getPreemptionDbgPropertyPreemptionModeSupport());
EXPECT_TRUE(productHelper->getPreemptionDbgPropertyStateSipSupport());
EXPECT_FALSE(productHelper->getPreemptionDbgPropertyCsrSurfaceSupport());
EXPECT_FALSE(productHelper->getFrontEndPropertyComputeDispatchAllWalkerSupport());
EXPECT_TRUE(productHelper->getFrontEndPropertyDisableEuFusionSupport());
EXPECT_TRUE(productHelper->getFrontEndPropertyDisableOverDispatchSupport());
EXPECT_TRUE(productHelper->getFrontEndPropertySingleSliceDispatchCcsModeSupport());
EXPECT_FALSE(productHelper->getPipelineSelectPropertyMediaSamplerDopClockGateSupport());
EXPECT_TRUE(productHelper->getPipelineSelectPropertySystolicModeSupport());
}
MTLTEST_F(MtlProductHelper, givenProductHelperWhenAdditionalKernelExecInfoSupportCheckedThenCorrectValueIsReturned) {
auto hwInfo = *defaultHwInfo;
EXPECT_TRUE(productHelper->isDisableOverdispatchAvailable(hwInfo));
FrontEndPropertiesSupport fePropertiesSupport{};
productHelper->fillFrontEndPropertiesSupportStructure(fePropertiesSupport, hwInfo);
EXPECT_TRUE(fePropertiesSupport.disableOverdispatch);
}
MTLTEST_F(MtlProductHelper, givenCompressionFtrEnabledWhenAskingForPageTableManagerThenReturnCorrectValue) {
auto hwInfo = *defaultHwInfo;
hwInfo.capabilityTable.ftrRenderCompressedBuffers = false;
hwInfo.capabilityTable.ftrRenderCompressedImages = false;
EXPECT_FALSE(productHelper->isPageTableManagerSupported(hwInfo));
hwInfo.capabilityTable.ftrRenderCompressedBuffers = true;
hwInfo.capabilityTable.ftrRenderCompressedImages = false;
EXPECT_TRUE(productHelper->isPageTableManagerSupported(hwInfo));
hwInfo.capabilityTable.ftrRenderCompressedBuffers = false;
hwInfo.capabilityTable.ftrRenderCompressedImages = true;
EXPECT_TRUE(productHelper->isPageTableManagerSupported(hwInfo));
hwInfo.capabilityTable.ftrRenderCompressedBuffers = true;
hwInfo.capabilityTable.ftrRenderCompressedImages = true;
EXPECT_TRUE(productHelper->isPageTableManagerSupported(hwInfo));
}
MTLTEST_F(MtlProductHelper, givenHwIpVersionWhenIsPipeControlPriorToNonPipelinedStateCommandsWARequiredIsCalledOnCcsThenAllowBasedOnReleaseHelper) {
HardwareInfo hwInfo = *defaultHwInfo;
auto isRcs = false;
AOT::PRODUCT_CONFIG ipReleases[] = {AOT::MTL_M_A0, AOT::MTL_M_B0, AOT::MTL_P_A0, AOT::MTL_P_B0};
for (auto &ipRelease : ipReleases) {
hwInfo.ipVersion.value = ipRelease;
refreshReleaseHelper(&hwInfo);
const auto &[isBasicWARequired, isExtendedWARequired] = productHelper->isPipeControlPriorToNonPipelinedStateCommandsWARequired(hwInfo, isRcs, releaseHelper);
EXPECT_FALSE(isExtendedWARequired);
EXPECT_EQ(releaseHelper->isPipeControlPriorToNonPipelinedStateCommandsWARequired(), isBasicWARequired);
}
}
MTLTEST_F(MtlProductHelper, givenMtlAndReleaseHelperNullptrWhenCallingGetMediaFrequencyTileIndexThenReturnFalse) {
uint32_t tileIndex = 0;
ReleaseHelper *releaseHelper = nullptr;
EXPECT_FALSE(productHelper->getMediaFrequencyTileIndex(releaseHelper, tileIndex));
}
MTLTEST_F(MtlProductHelper, givenCompilerProductHelperWhenGetDefaultHwIpVersionThenCorrectValueIsSet) {
EXPECT_EQ(compilerProductHelper->getDefaultHwIpVersion(), AOT::MTL_M_A0);
}
using ProductHelperTestMtl = Test<DeviceFixture>;
MTLTEST_F(ProductHelperTestMtl, givenMtlWhenCheckIsCachingOnCpuAvailableThenAlwaysFalse) {
const auto &productHelper = getHelper<ProductHelper>();
EXPECT_FALSE(productHelper.isCachingOnCpuAvailable());
}
MTLTEST_F(ProductHelperTestMtl, givenMtlWhenCheckPreferredAllocationMethodThenAllocateByKmdIsReturned) {
const auto &productHelper = getHelper<ProductHelper>();
XeLpgTests::testPreferredAllocationMethod(productHelper);
}
MTLTEST_F(ProductHelperTestMtl, givenBooleanUncachedWhenCallOverridePatIndexThenProperPatIndexIsReturned) {
const auto &productHelper = getHelper<ProductHelper>();
XeLpgTests::testOverridePatIndex(productHelper);
}

View File

@@ -1,18 +0,0 @@
/*
* Copyright (C) 2022-2023 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#include "shared/test/common/fixtures/device_fixture.h"
#include "shared/test/common/mocks/mock_device.h"
#include "shared/test/common/test_macros/hw_test.h"
using namespace NEO;
using MtlUsDeviceIdTest = Test<DeviceFixture>;
MTLTEST_F(MtlUsDeviceIdTest, givenMtlProductWhenCheckFp64SupportThenReturnFalse) {
EXPECT_TRUE(pDevice->getHardwareInfo().capabilityTable.ftrSupportsFP64);
}

View File

@@ -5,26 +5,31 @@
*
*/
#include "shared/test/unit_test/xe_hpg_core/os_agnostic_product_helper_xe_lpg_tests.h"
#include "shared/source/memory_manager/allocation_type.h"
#include "shared/source/os_interface/product_helper.h"
#include "shared/test/common/test_macros/test.h"
#include "shared/source/release_helper/release_helper.h"
#include "shared/test/common/fixtures/device_fixture.h"
#include "shared/test/common/helpers/default_hw_info.h"
#include "shared/test/common/mocks/mock_device.h"
#include "shared/test/common/test_macros/hw_test.h"
#include "aubstream/product_family.h"
#include "platforms.h"
using namespace NEO;
void XeLpgTests::testOverridePatIndex(const ProductHelper &productHelper) {
uint64_t patIndex = 1u;
bool isUncached = true;
EXPECT_EQ(2u, productHelper.overridePatIndex(isUncached, patIndex));
isUncached = false;
EXPECT_EQ(patIndex, productHelper.overridePatIndex(isUncached, patIndex));
}
struct XeLpgProductHelperTests : public ::Test<DeviceFixture> {
void SetUp() override {
::Test<DeviceFixture>::SetUp();
productHelper = &pDevice->getProductHelper();
}
ProductHelper const *productHelper = nullptr;
};
void XeLpgTests::testPreferredAllocationMethod(const ProductHelper &productHelper) {
HWTEST2_F(XeLpgProductHelperTests, whenCheckPreferredAllocationMethodThenAllocateByKmdIsReturned, IsXeLpg) {
for (auto i = 0; i < static_cast<int>(AllocationType::COUNT); i++) {
auto allocationType = static_cast<AllocationType>(i);
auto preferredAllocationMethod = productHelper.getPreferredAllocationMethod(allocationType);
auto preferredAllocationMethod = productHelper->getPreferredAllocationMethod(allocationType);
if (allocationType == AllocationType::TAG_BUFFER ||
allocationType == AllocationType::TIMESTAMP_PACKET_TAG_BUFFER) {
EXPECT_FALSE(preferredAllocationMethod.has_value());
@@ -34,3 +39,121 @@ void XeLpgTests::testPreferredAllocationMethod(const ProductHelper &productHelpe
}
}
}
HWTEST2_F(XeLpgProductHelperTests, givenBooleanUncachedWhenCallOverridePatIndexThenProperPatIndexIsReturned, IsXeLpg) {
uint64_t patIndex = 1u;
bool isUncached = true;
EXPECT_EQ(2u, productHelper->overridePatIndex(isUncached, patIndex));
isUncached = false;
EXPECT_EQ(patIndex, productHelper->overridePatIndex(isUncached, patIndex));
}
HWTEST2_F(XeLpgProductHelperTests, whenGettingAubstreamProductFamilyThenProperEnumValueIsReturned, IsXeLpg) {
EXPECT_EQ(aub_stream::ProductFamily::Mtl, productHelper->getAubStreamProductFamily());
}
HWTEST2_F(XeLpgProductHelperTests, givenProductHelperWhenCheckDirectSubmissionSupportedThenTrueIsReturned, IsXeLpg) {
EXPECT_TRUE(productHelper->isDirectSubmissionSupported(*defaultHwInfo));
}
HWTEST2_F(XeLpgProductHelperTests, givenProductHelperWhenCheckDirectSubmissionConstantCacheInvalidationNeededThenTrueIsReturned, IsXeLpg) {
auto hwInfo = *defaultHwInfo;
EXPECT_TRUE(productHelper->isDirectSubmissionConstantCacheInvalidationNeeded(hwInfo));
}
HWTEST2_F(XeLpgProductHelperTests, givenProductHelperWhenIsInitBuiltinAsyncSupportedThenReturnFalse, IsXeLpg) {
EXPECT_FALSE(productHelper->isInitBuiltinAsyncSupported(*defaultHwInfo));
}
HWTEST2_F(XeLpgProductHelperTests, givenProductHelperWhenGettingEvictIfNecessaryFlagSupportedThenExpectTrue, IsXeLpg) {
EXPECT_TRUE(productHelper->isEvictionIfNecessaryFlagSupported());
}
HWTEST2_F(XeLpgProductHelperTests, givenProductHelperWhenGetCommandsStreamPropertiesSupportThenExpectCorrectValues, IsXeLpg) {
EXPECT_FALSE(productHelper->getScmPropertyThreadArbitrationPolicySupport());
EXPECT_TRUE(productHelper->getScmPropertyCoherencyRequiredSupport());
EXPECT_TRUE(productHelper->getScmPropertyZPassAsyncComputeThreadLimitSupport());
EXPECT_TRUE(productHelper->getScmPropertyPixelAsyncComputeThreadLimitSupport());
EXPECT_TRUE(productHelper->getScmPropertyLargeGrfModeSupport());
EXPECT_FALSE(productHelper->getScmPropertyDevicePreemptionModeSupport());
EXPECT_FALSE(productHelper->getStateBaseAddressPropertyGlobalAtomicsSupport());
EXPECT_TRUE(productHelper->getStateBaseAddressPropertyBindingTablePoolBaseAddressSupport());
EXPECT_TRUE(productHelper->getFrontEndPropertyScratchSizeSupport());
EXPECT_TRUE(productHelper->getFrontEndPropertyPrivateScratchSizeSupport());
EXPECT_TRUE(productHelper->getPreemptionDbgPropertyPreemptionModeSupport());
EXPECT_TRUE(productHelper->getPreemptionDbgPropertyStateSipSupport());
EXPECT_FALSE(productHelper->getPreemptionDbgPropertyCsrSurfaceSupport());
EXPECT_FALSE(productHelper->getFrontEndPropertyComputeDispatchAllWalkerSupport());
EXPECT_TRUE(productHelper->getFrontEndPropertyDisableEuFusionSupport());
EXPECT_TRUE(productHelper->getFrontEndPropertyDisableOverDispatchSupport());
EXPECT_TRUE(productHelper->getFrontEndPropertySingleSliceDispatchCcsModeSupport());
EXPECT_FALSE(productHelper->getPipelineSelectPropertyMediaSamplerDopClockGateSupport());
EXPECT_TRUE(productHelper->getPipelineSelectPropertySystolicModeSupport());
}
HWTEST2_F(XeLpgProductHelperTests, givenProductHelperWhenAdditionalKernelExecInfoSupportCheckedThenCorrectValueIsReturned, IsXeLpg) {
auto hwInfo = *defaultHwInfo;
EXPECT_TRUE(productHelper->isDisableOverdispatchAvailable(hwInfo));
FrontEndPropertiesSupport fePropertiesSupport{};
productHelper->fillFrontEndPropertiesSupportStructure(fePropertiesSupport, hwInfo);
EXPECT_TRUE(fePropertiesSupport.disableOverdispatch);
}
HWTEST2_F(XeLpgProductHelperTests, givenCompressionFtrEnabledWhenAskingForPageTableManagerThenReturnCorrectValue, IsXeLpg) {
auto hwInfo = *defaultHwInfo;
hwInfo.capabilityTable.ftrRenderCompressedBuffers = false;
hwInfo.capabilityTable.ftrRenderCompressedImages = false;
EXPECT_FALSE(productHelper->isPageTableManagerSupported(hwInfo));
hwInfo.capabilityTable.ftrRenderCompressedBuffers = true;
hwInfo.capabilityTable.ftrRenderCompressedImages = false;
EXPECT_TRUE(productHelper->isPageTableManagerSupported(hwInfo));
hwInfo.capabilityTable.ftrRenderCompressedBuffers = false;
hwInfo.capabilityTable.ftrRenderCompressedImages = true;
EXPECT_TRUE(productHelper->isPageTableManagerSupported(hwInfo));
hwInfo.capabilityTable.ftrRenderCompressedBuffers = true;
hwInfo.capabilityTable.ftrRenderCompressedImages = true;
EXPECT_TRUE(productHelper->isPageTableManagerSupported(hwInfo));
}
HWTEST2_F(XeLpgProductHelperTests, givenHwIpVersionWhenIsPipeControlPriorToNonPipelinedStateCommandsWARequiredIsCalledOnCcsThenAllowBasedOnReleaseHelper, IsXeLpg) {
HardwareInfo hwInfo = *defaultHwInfo;
auto isRcs = false;
AOT::PRODUCT_CONFIG ipReleases[] = {AOT::MTL_M_A0, AOT::MTL_M_B0, AOT::MTL_P_A0, AOT::MTL_P_B0};
for (auto &ipRelease : ipReleases) {
hwInfo.ipVersion.value = ipRelease;
auto releaseHelper = ReleaseHelper::create(ipRelease);
const auto &[isBasicWARequired, isExtendedWARequired] = productHelper->isPipeControlPriorToNonPipelinedStateCommandsWARequired(hwInfo, isRcs, releaseHelper.get());
EXPECT_FALSE(isExtendedWARequired);
EXPECT_EQ(releaseHelper->isPipeControlPriorToNonPipelinedStateCommandsWARequired(), isBasicWARequired);
}
}
HWTEST2_F(XeLpgProductHelperTests, givenReleaseHelperNullptrWhenCallingGetMediaFrequencyTileIndexThenReturnFalse, IsXeLpg) {
uint32_t tileIndex = 0;
ReleaseHelper *releaseHelper = nullptr;
EXPECT_FALSE(productHelper->getMediaFrequencyTileIndex(releaseHelper, tileIndex));
}
HWTEST2_F(XeLpgProductHelperTests, whenCheckIsCachingOnCpuAvailableThenAlwaysFalse, IsXeLpg) {
EXPECT_FALSE(productHelper->isCachingOnCpuAvailable());
}
HWTEST2_F(XeLpgProductHelperTests, whenCheckFp64SupportThenReturnTrue, IsXeLpg) {
EXPECT_TRUE(pDevice->getHardwareInfo().capabilityTable.ftrSupportsFP64);
}

View File

@@ -1,14 +0,0 @@
/*
* Copyright (C) 2023 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
namespace NEO {
class ProductHelper;
struct XeLpgTests {
static void testOverridePatIndex(const ProductHelper &productHelper);
static void testPreferredAllocationMethod(const ProductHelper &productHelper);
};
} // namespace NEO