diff --git a/opencl/source/gen11/hw_info_ehl.inl b/opencl/source/gen11/hw_info_ehl.inl index 74bc40d7a5..4351800e54 100644 --- a/opencl/source/gen11/hw_info_ehl.inl +++ b/opencl/source/gen11/hw_info_ehl.inl @@ -58,8 +58,8 @@ const RuntimeCapabilityTable EHL::capabilityTable{ false, // ftrSupports64BitMath false, // ftrSvm false, // ftrSupportsCoherency - true, // ftrSupportsVmeAvcTextureSampler - true, // ftrSupportsVmeAvcPreemption + false, // ftrSupportsVmeAvcTextureSampler + false, // ftrSupportsVmeAvcPreemption false, // ftrRenderCompressedBuffers false, // ftrRenderCompressedImages true, // ftr64KBpages diff --git a/opencl/test/unit_test/gen11/ehl/linux/hw_info_config_tests_ehl.cpp b/opencl/test/unit_test/gen11/ehl/linux/hw_info_config_tests_ehl.cpp index 57813a63fa..1872b4e262 100644 --- a/opencl/test/unit_test/gen11/ehl/linux/hw_info_config_tests_ehl.cpp +++ b/opencl/test/unit_test/gen11/ehl/linux/hw_info_config_tests_ehl.cpp @@ -69,7 +69,7 @@ EHLTEST_F(HwInfoConfigTestLinuxEhl, GivenInvalidDeviceIdWhenConfiguringHwInfoThe template class EhlHwInfoTests : public ::testing::Test {}; TEST(EhlHwInfoTests, WhenGtIsSetupThenGtSystemInfoIsCorrect) { - HardwareInfo hwInfo; + HardwareInfo hwInfo = *defaultHwInfo; auto executionEnvironment = std::make_unique(); executionEnvironment->prepareRootDeviceEnvironments(1); executionEnvironment->rootDeviceEnvironments[0]->setHwInfo(defaultHwInfo.get()); diff --git a/opencl/test/unit_test/gen11/ehl/test_hw_info_config_ehl.cpp b/opencl/test/unit_test/gen11/ehl/test_hw_info_config_ehl.cpp index 18ee5e6ac9..84a33924a3 100644 --- a/opencl/test/unit_test/gen11/ehl/test_hw_info_config_ehl.cpp +++ b/opencl/test/unit_test/gen11/ehl/test_hw_info_config_ehl.cpp @@ -5,14 +5,15 @@ * */ -#include "test.h" +#include "shared/test/common/helpers/default_hw_info.h" +#include "test.h" using namespace NEO; using EhlHwInfo = ::testing::Test; EHLTEST_F(EhlHwInfo, givenHwInfoConfigStringThenAfterSetupResultingVmeIsDisabled) { - HardwareInfo hwInfo; + HardwareInfo hwInfo = *defaultHwInfo; hardwareInfoSetup[productFamily](&hwInfo, false, 0x100040008); EXPECT_FALSE(hwInfo.capabilityTable.ftrSupportsVmeAvcTextureSampler); @@ -23,7 +24,7 @@ EHLTEST_F(EhlHwInfo, givenHwInfoConfigStringThenAfterSetupResultingVmeIsDisabled EHLTEST_F(EhlHwInfo, givenBoolWhenCallEhlHardwareInfoSetupThenFeatureTableAndWorkaroundTableAreSetCorrect) { bool boolValue[]{ true, false}; - HardwareInfo hwInfo; + HardwareInfo hwInfo = *defaultHwInfo; GT_SYSTEM_INFO >SystemInfo = hwInfo.gtSystemInfo; FeatureTable &featureTable = hwInfo.featureTable; WorkaroundTable &workaroundTable = hwInfo.workaroundTable; diff --git a/opencl/test/unit_test/gen11/icllp/linux/hw_info_config_tests_icllp.cpp b/opencl/test/unit_test/gen11/icllp/linux/hw_info_config_tests_icllp.cpp index 90fa9821d5..cac973e69b 100644 --- a/opencl/test/unit_test/gen11/icllp/linux/hw_info_config_tests_icllp.cpp +++ b/opencl/test/unit_test/gen11/icllp/linux/hw_info_config_tests_icllp.cpp @@ -71,7 +71,7 @@ class IcllpHwInfoTests : public ::testing::Test {}; typedef ::testing::Types icllpTestTypes; TYPED_TEST_CASE(IcllpHwInfoTests, icllpTestTypes); TYPED_TEST(IcllpHwInfoTests, WhenGettingSystemInfoThenParamsAreValid) { - HardwareInfo hwInfo; + HardwareInfo hwInfo = *defaultHwInfo; auto executionEnvironment = std::make_unique(); executionEnvironment->prepareRootDeviceEnvironments(1); DrmMock drm(*executionEnvironment->rootDeviceEnvironments[0]); diff --git a/opencl/test/unit_test/gen11/icllp/test_hw_info_config_icllp.cpp b/opencl/test/unit_test/gen11/icllp/test_hw_info_config_icllp.cpp index 007e1e93a0..ce76d7fe6f 100644 --- a/opencl/test/unit_test/gen11/icllp/test_hw_info_config_icllp.cpp +++ b/opencl/test/unit_test/gen11/icllp/test_hw_info_config_icllp.cpp @@ -5,15 +5,16 @@ * */ -#include "test.h" +#include "shared/test/common/helpers/default_hw_info.h" +#include "test.h" using namespace NEO; TEST(IcllpHwInfoConfig, givenInvalidSystemInfoWhenSettingHardwareInfoThenExpectThrow) { if (IGFX_ICELAKE_LP != productFamily) { return; } - HardwareInfo hwInfo; + HardwareInfo hwInfo = *defaultHwInfo; GT_SYSTEM_INFO >SystemInfo = hwInfo.gtSystemInfo; gtSystemInfo = {0}; @@ -36,7 +37,7 @@ ICLLPTEST_F(IcllpHwInfo, givenBoolWhenCallIcllpHardwareInfoSetupThenFeatureTable bool boolValue[]{ true, false}; - HardwareInfo hwInfo; + HardwareInfo hwInfo = *defaultHwInfo; GT_SYSTEM_INFO >SystemInfo = hwInfo.gtSystemInfo; FeatureTable &featureTable = hwInfo.featureTable; WorkaroundTable &workaroundTable = hwInfo.workaroundTable; diff --git a/opencl/test/unit_test/gen11/lkf/linux/hw_info_config_tests_lkf.cpp b/opencl/test/unit_test/gen11/lkf/linux/hw_info_config_tests_lkf.cpp index 4f813d79df..a00feb37e7 100644 --- a/opencl/test/unit_test/gen11/lkf/linux/hw_info_config_tests_lkf.cpp +++ b/opencl/test/unit_test/gen11/lkf/linux/hw_info_config_tests_lkf.cpp @@ -71,7 +71,7 @@ class LkfHwInfoTests : public ::testing::Test {}; typedef ::testing::Types lkfTestTypes; TYPED_TEST_CASE(LkfHwInfoTests, lkfTestTypes); TYPED_TEST(LkfHwInfoTests, gtSetupIsCorrect) { - HardwareInfo hwInfo; + HardwareInfo hwInfo = *defaultHwInfo; auto executionEnvironment = std::make_unique(); executionEnvironment->prepareRootDeviceEnvironments(1); executionEnvironment->rootDeviceEnvironments[0]->setHwInfo(defaultHwInfo.get()); diff --git a/opencl/test/unit_test/gen11/lkf/test_hw_info_config_lkf.cpp b/opencl/test/unit_test/gen11/lkf/test_hw_info_config_lkf.cpp index 6c7990f780..e35d1c3919 100644 --- a/opencl/test/unit_test/gen11/lkf/test_hw_info_config_lkf.cpp +++ b/opencl/test/unit_test/gen11/lkf/test_hw_info_config_lkf.cpp @@ -5,15 +5,16 @@ * */ -#include "test.h" +#include "shared/test/common/helpers/default_hw_info.h" +#include "test.h" using namespace NEO; TEST(LkfHwInfoConfig, givenInvalidSystemInfoWhenSettingHardwareInfoThenExpectThrow) { if (IGFX_LAKEFIELD != productFamily) { return; } - HardwareInfo hwInfo; + HardwareInfo hwInfo = *defaultHwInfo; GT_SYSTEM_INFO >SystemInfo = hwInfo.gtSystemInfo; uint64_t config = 0xdeadbeef; @@ -28,7 +29,7 @@ TEST(LkfHwInfoConfig, givenInvalidSystemInfoWhenSettingHardwareInfoThenExpectThr using LkfHwInfo = ::testing::Test; LKFTEST_F(LkfHwInfo, givenHwInfoConfigStringThenAfterSetupResultingVmeIsDisabled) { - HardwareInfo hwInfo; + HardwareInfo hwInfo = *defaultHwInfo; uint64_t config = 0x100080008; hardwareInfoSetup[productFamily](&hwInfo, false, config); @@ -40,7 +41,7 @@ LKFTEST_F(LkfHwInfo, givenHwInfoConfigStringThenAfterSetupResultingVmeIsDisabled LKFTEST_F(LkfHwInfo, givenBoolWhenCallLkfHardwareInfoSetupThenFeatureTableAndWorkaroundTableAreSetCorrect) { bool boolValue[]{ true, false}; - HardwareInfo hwInfo; + HardwareInfo hwInfo = *defaultHwInfo; GT_SYSTEM_INFO >SystemInfo = hwInfo.gtSystemInfo; FeatureTable &featureTable = hwInfo.featureTable; WorkaroundTable &workaroundTable = hwInfo.workaroundTable; diff --git a/opencl/test/unit_test/gen12lp/adls/linux/hw_info_config_tests_adls.cpp b/opencl/test/unit_test/gen12lp/adls/linux/hw_info_config_tests_adls.cpp index 3467dee58d..88d3671034 100644 --- a/opencl/test/unit_test/gen12lp/adls/linux/hw_info_config_tests_adls.cpp +++ b/opencl/test/unit_test/gen12lp/adls/linux/hw_info_config_tests_adls.cpp @@ -72,7 +72,7 @@ ADLSTEST_F(HwInfoConfigTestLinuxAdls, GivenIncorrectDataWhenConfiguringHwInfoThe } TEST(AdlsHwInfoTests, WhenSettingUpHwInfoThenConfigIsCorrect) { - HardwareInfo hwInfo; + HardwareInfo hwInfo = *defaultHwInfo; auto executionEnvironment = std::make_unique(); executionEnvironment->prepareRootDeviceEnvironments(1); executionEnvironment->rootDeviceEnvironments[0]->setHwInfo(defaultHwInfo.get()); diff --git a/opencl/test/unit_test/gen12lp/dg1/hw_info_tests_dg1.cpp b/opencl/test/unit_test/gen12lp/dg1/hw_info_tests_dg1.cpp index 8cb263caa9..20e8b37761 100644 --- a/opencl/test/unit_test/gen12lp/dg1/hw_info_tests_dg1.cpp +++ b/opencl/test/unit_test/gen12lp/dg1/hw_info_tests_dg1.cpp @@ -7,6 +7,7 @@ #include "shared/source/helpers/hw_info.h" #include "shared/test/common/helpers/debug_manager_state_restore.h" +#include "shared/test/common/helpers/default_hw_info.h" #include "opencl/test/unit_test/helpers/gtest_helpers.h" #include "test.h" @@ -18,7 +19,7 @@ typedef ::testing::Types dg1TestTypes; TYPED_TEST_CASE(Dg1HwInfoTests, dg1TestTypes); TYPED_TEST(Dg1HwInfoTests, WhenSetupHardwareInfoWithSetupFeatureTableFlagTrueOrFalseIsCalledThenFeatureTableHasCorrectValueOfLocalMemoryFeature) { - HardwareInfo hwInfo; + HardwareInfo hwInfo = *defaultHwInfo; FeatureTable &featureTable = hwInfo.featureTable; EXPECT_FALSE(featureTable.ftrLocalMemory); diff --git a/opencl/test/unit_test/gen12lp/dg1/test_hw_info_config_dg1.cpp b/opencl/test/unit_test/gen12lp/dg1/test_hw_info_config_dg1.cpp index b7d3a04f5c..480064ecc6 100644 --- a/opencl/test/unit_test/gen12lp/dg1/test_hw_info_config_dg1.cpp +++ b/opencl/test/unit_test/gen12lp/dg1/test_hw_info_config_dg1.cpp @@ -6,6 +6,7 @@ */ #include "shared/source/helpers/hw_helper.h" +#include "shared/test/common/helpers/default_hw_info.h" #include "opencl/source/helpers/hardware_commands_helper.h" #include "test.h" @@ -16,7 +17,7 @@ TEST(Dg1HwInfoConfig, givenInvalidSystemInfoWhenSettingHardwareInfoThenExpectThr if (IGFX_DG1 != productFamily) { return; } - HardwareInfo hwInfo; + HardwareInfo hwInfo = *defaultHwInfo; GT_SYSTEM_INFO >SystemInfo = hwInfo.gtSystemInfo; uint64_t config = 0xdeadbeef; @@ -33,7 +34,7 @@ using Dg1HwInfo = ::testing::Test; DG1TEST_F(Dg1HwInfo, givenBoolWhenCallDg1HardwareInfoSetupThenFeatureTableAndWorkaroundTableAreSetCorrect) { bool boolValue[]{ true, false}; - HardwareInfo hwInfo; + HardwareInfo hwInfo = *defaultHwInfo; GT_SYSTEM_INFO >SystemInfo = hwInfo.gtSystemInfo; FeatureTable &featureTable = hwInfo.featureTable; WorkaroundTable &workaroundTable = hwInfo.workaroundTable; diff --git a/opencl/test/unit_test/gen12lp/rkl/linux/hw_info_config_tests_rkl.cpp b/opencl/test/unit_test/gen12lp/rkl/linux/hw_info_config_tests_rkl.cpp index 772be5da28..b810ae6c2d 100644 --- a/opencl/test/unit_test/gen12lp/rkl/linux/hw_info_config_tests_rkl.cpp +++ b/opencl/test/unit_test/gen12lp/rkl/linux/hw_info_config_tests_rkl.cpp @@ -72,7 +72,7 @@ RKLTEST_F(HwInfoConfigTestLinuxRkl, GivenIncorrectDataWhenConfiguringHwInfoThenE } TEST(RklHwInfoTests, WhenSettingUpHwInfoThenConfigIsCorrect) { - HardwareInfo hwInfo{}; + HardwareInfo hwInfo = *defaultHwInfo; auto executionEnvironment = std::make_unique(); executionEnvironment->prepareRootDeviceEnvironments(1); executionEnvironment->rootDeviceEnvironments[0]->setHwInfo(defaultHwInfo.get()); diff --git a/opencl/test/unit_test/gen12lp/tgllp/linux/hw_info_config_tests_tgllp.cpp b/opencl/test/unit_test/gen12lp/tgllp/linux/hw_info_config_tests_tgllp.cpp index fcd031d651..40580ec29e 100644 --- a/opencl/test/unit_test/gen12lp/tgllp/linux/hw_info_config_tests_tgllp.cpp +++ b/opencl/test/unit_test/gen12lp/tgllp/linux/hw_info_config_tests_tgllp.cpp @@ -90,7 +90,7 @@ class TgllpHwInfoTests : public ::testing::Test {}; typedef ::testing::Types tgllpTestTypes; TYPED_TEST_CASE(TgllpHwInfoTests, tgllpTestTypes); TYPED_TEST(TgllpHwInfoTests, gtSetupIsCorrect) { - HardwareInfo hwInfo; + HardwareInfo hwInfo = *defaultHwInfo; auto executionEnvironment = std::make_unique(); executionEnvironment->prepareRootDeviceEnvironments(1); executionEnvironment->rootDeviceEnvironments[0]->setHwInfo(defaultHwInfo.get()); diff --git a/opencl/test/unit_test/gen12lp/tgllp/test_hw_info_config_tgllp.cpp b/opencl/test/unit_test/gen12lp/tgllp/test_hw_info_config_tgllp.cpp index 5c46bb2882..13cea25334 100644 --- a/opencl/test/unit_test/gen12lp/tgllp/test_hw_info_config_tgllp.cpp +++ b/opencl/test/unit_test/gen12lp/tgllp/test_hw_info_config_tgllp.cpp @@ -16,7 +16,7 @@ using namespace NEO; using TgllpHwInfoConfig = ::testing::Test; TGLLPTEST_F(TgllpHwInfoConfig, givenHwInfoErrorneousConfigStringThenThrow) { - HardwareInfo hwInfo; + HardwareInfo hwInfo = *defaultHwInfo; GT_SYSTEM_INFO >SystemInfo = hwInfo.gtSystemInfo; uint64_t config = 0xdeadbeef; @@ -29,7 +29,7 @@ TGLLPTEST_F(TgllpHwInfoConfig, givenHwInfoErrorneousConfigStringThenThrow) { } TGLLPTEST_F(TgllpHwInfoConfig, whenUsingCorrectConfigValueThenCorrectHwInfoIsReturned) { - HardwareInfo hwInfo; + HardwareInfo hwInfo = *defaultHwInfo; GT_SYSTEM_INFO >SystemInfo = hwInfo.gtSystemInfo; uint64_t config = 0x100060010; @@ -52,7 +52,7 @@ using TgllpHwInfo = ::testing::Test; TGLLPTEST_F(TgllpHwInfo, givenBoolWhenCallTgllpHardwareInfoSetupThenFeatureTableAndWorkaroundTableAreSetCorrect) { static bool boolValue[]{ true, false}; - HardwareInfo hwInfo; + HardwareInfo hwInfo = *defaultHwInfo; GT_SYSTEM_INFO >SystemInfo = hwInfo.gtSystemInfo; FeatureTable &featureTable = hwInfo.featureTable; WorkaroundTable &workaroundTable = hwInfo.workaroundTable; @@ -98,7 +98,7 @@ TGLLPTEST_F(TgllpHwInfo, givenBoolWhenCallTgllpHardwareInfoSetupThenFeatureTable } TGLLPTEST_F(TgllpHwInfo, givenHwInfoConfigStringThenAfterSetupResultingVmeIsDisabled) { - HardwareInfo hwInfo; + HardwareInfo hwInfo = *defaultHwInfo; uint64_t config = 0x100060010; hardwareInfoSetup[productFamily](&hwInfo, false, config); diff --git a/opencl/test/unit_test/gen8/bdw/linux/hw_info_config_tests_bdw.cpp b/opencl/test/unit_test/gen8/bdw/linux/hw_info_config_tests_bdw.cpp index e8321f161f..9e3a1974a6 100644 --- a/opencl/test/unit_test/gen8/bdw/linux/hw_info_config_tests_bdw.cpp +++ b/opencl/test/unit_test/gen8/bdw/linux/hw_info_config_tests_bdw.cpp @@ -156,7 +156,7 @@ class BdwHwInfoTests : public ::testing::Test { typedef ::testing::Types bdwTestTypes; TYPED_TEST_CASE(BdwHwInfoTests, bdwTestTypes); TYPED_TEST(BdwHwInfoTests, WhenGtIsSetupThenGtSystemInfoIsCorrect) { - HardwareInfo hwInfo; + HardwareInfo hwInfo = *defaultHwInfo; auto executionEnvironment = std::make_unique(); executionEnvironment->prepareRootDeviceEnvironments(1); executionEnvironment->rootDeviceEnvironments[0]->setHwInfo(defaultHwInfo.get()); diff --git a/opencl/test/unit_test/gen8/bdw/test_hw_info_config_bdw.cpp b/opencl/test/unit_test/gen8/bdw/test_hw_info_config_bdw.cpp index b62134676b..04fc9b746e 100644 --- a/opencl/test/unit_test/gen8/bdw/test_hw_info_config_bdw.cpp +++ b/opencl/test/unit_test/gen8/bdw/test_hw_info_config_bdw.cpp @@ -5,15 +5,16 @@ * */ -#include "test.h" +#include "shared/test/common/helpers/default_hw_info.h" +#include "test.h" using namespace NEO; TEST(BdwHwInfoConfig, givenInvalidSystemInfoWhenSettingHardwareInfoThenExpectThrow) { if (IGFX_BROADWELL != productFamily) { return; } - HardwareInfo hwInfo; + HardwareInfo hwInfo = *defaultHwInfo; GT_SYSTEM_INFO >SystemInfo = hwInfo.gtSystemInfo; uint64_t config = 0xdeadbeef; @@ -35,7 +36,7 @@ BDWTEST_F(BdwHwInfo, givenBoolWhenCallBdwHardwareInfoSetupThenFeatureTableAndWor 0x100030006}; bool boolValue[]{ true, false}; - HardwareInfo hwInfo; + HardwareInfo hwInfo = *defaultHwInfo; GT_SYSTEM_INFO >SystemInfo = hwInfo.gtSystemInfo; FeatureTable &featureTable = hwInfo.featureTable; WorkaroundTable &workaroundTable = hwInfo.workaroundTable; @@ -68,7 +69,7 @@ BDWTEST_F(BdwHwInfo, givenBoolWhenCallBdwHardwareInfoSetupThenFeatureTableAndWor } BDWTEST_F(BdwHwInfo, givenHwInfoConfigStringThenAfterSetupResultingVmeIsDisabled) { - HardwareInfo hwInfo; + HardwareInfo hwInfo = *defaultHwInfo; uint64_t config = 0x0; hardwareInfoSetup[productFamily](&hwInfo, false, config); diff --git a/opencl/test/unit_test/gen9/bxt/linux/hw_info_config_tests.cpp b/opencl/test/unit_test/gen9/bxt/linux/hw_info_config_tests.cpp index 597ce33155..ff834ca928 100644 --- a/opencl/test/unit_test/gen9/bxt/linux/hw_info_config_tests.cpp +++ b/opencl/test/unit_test/gen9/bxt/linux/hw_info_config_tests.cpp @@ -5,9 +5,10 @@ * */ +#include "shared/test/common/helpers/default_hw_info.h" + #include "opencl/test/unit_test/helpers/gtest_helpers.h" #include "opencl/test/unit_test/os_interface/linux/hw_info_config_linux_tests.h" - using namespace NEO; struct HwInfoConfigTestLinuxBxt : HwInfoConfigTestLinux { @@ -215,7 +216,7 @@ class BxtHwInfoTests : public ::testing::Test { typedef ::testing::Types bxtTestTypes; TYPED_TEST_CASE(BxtHwInfoTests, bxtTestTypes); TYPED_TEST(BxtHwInfoTests, WhenConfiguringHwInfoThenConfigIsCorrect) { - HardwareInfo hwInfo; + HardwareInfo hwInfo = *defaultHwInfo; auto executionEnvironment = std::make_unique(); executionEnvironment->prepareRootDeviceEnvironments(1); executionEnvironment->rootDeviceEnvironments[0]->setHwInfo(defaultHwInfo.get()); diff --git a/opencl/test/unit_test/gen9/bxt/test_hw_info_config_bxt.cpp b/opencl/test/unit_test/gen9/bxt/test_hw_info_config_bxt.cpp index 7a55513585..7bd5894ea3 100644 --- a/opencl/test/unit_test/gen9/bxt/test_hw_info_config_bxt.cpp +++ b/opencl/test/unit_test/gen9/bxt/test_hw_info_config_bxt.cpp @@ -5,15 +5,16 @@ * */ -#include "test.h" +#include "shared/test/common/helpers/default_hw_info.h" +#include "test.h" using namespace NEO; TEST(BxtHwInfoConfig, givenInvalidSystemInfoWhenSettingHardwareInfoThenExpectThrow) { if (IGFX_BROXTON != productFamily) { return; } - HardwareInfo hwInfo; + HardwareInfo hwInfo = *defaultHwInfo; GT_SYSTEM_INFO >SystemInfo = hwInfo.gtSystemInfo; uint64_t config = 0xdeadbeef; @@ -33,7 +34,7 @@ BXTTEST_F(BxtHwInfo, givenBoolWhenCallBxtHardwareInfoSetupThenFeatureTableAndWor 0x100030006}; bool boolValue[]{ true, false}; - HardwareInfo hwInfo; + HardwareInfo hwInfo = *defaultHwInfo; GT_SYSTEM_INFO >SystemInfo = hwInfo.gtSystemInfo; FeatureTable &featureTable = hwInfo.featureTable; WorkaroundTable &workaroundTable = hwInfo.workaroundTable; diff --git a/opencl/test/unit_test/gen9/cfl/linux/hw_info_config_tests_cfl.cpp b/opencl/test/unit_test/gen9/cfl/linux/hw_info_config_tests_cfl.cpp index ac0fd1a2b5..107fddb48f 100644 --- a/opencl/test/unit_test/gen9/cfl/linux/hw_info_config_tests_cfl.cpp +++ b/opencl/test/unit_test/gen9/cfl/linux/hw_info_config_tests_cfl.cpp @@ -170,7 +170,7 @@ class CflHwInfoTests : public ::testing::Test { typedef ::testing::Types cflTestTypes; TYPED_TEST_CASE(CflHwInfoTests, cflTestTypes); TYPED_TEST(CflHwInfoTests, WhenGtIsSetupThenGtSystemInfoIsCorrect) { - HardwareInfo hwInfo; + HardwareInfo hwInfo = *defaultHwInfo; auto executionEnvironment = std::make_unique(); executionEnvironment->prepareRootDeviceEnvironments(1); executionEnvironment->rootDeviceEnvironments[0]->setHwInfo(defaultHwInfo.get()); diff --git a/opencl/test/unit_test/gen9/cfl/test_hw_info_config_cfl.cpp b/opencl/test/unit_test/gen9/cfl/test_hw_info_config_cfl.cpp index abb32d16eb..3485f4468e 100644 --- a/opencl/test/unit_test/gen9/cfl/test_hw_info_config_cfl.cpp +++ b/opencl/test/unit_test/gen9/cfl/test_hw_info_config_cfl.cpp @@ -5,15 +5,16 @@ * */ -#include "test.h" +#include "shared/test/common/helpers/default_hw_info.h" +#include "test.h" using namespace NEO; TEST(CflHwInfoConfig, GivenIncorrectDataWhenConfiguringHwInfoThenErrorIsReturned) { if (IGFX_COFFEELAKE != productFamily) { return; } - HardwareInfo hwInfo; + HardwareInfo hwInfo = *defaultHwInfo; GT_SYSTEM_INFO >SystemInfo = hwInfo.gtSystemInfo; uint64_t config = 0xdeadbeef; @@ -36,7 +37,7 @@ CFLTEST_F(CflHwInfo, givenBoolWhenCallCflHardwareInfoSetupThenFeatureTableAndWor 0x100030006}; bool boolValue[]{ true, false}; - HardwareInfo hwInfo; + HardwareInfo hwInfo = *defaultHwInfo; GT_SYSTEM_INFO >SystemInfo = hwInfo.gtSystemInfo; FeatureTable &featureTable = hwInfo.featureTable; WorkaroundTable &workaroundTable = hwInfo.workaroundTable; diff --git a/opencl/test/unit_test/gen9/glk/linux/hw_info_config_tests_glk.cpp b/opencl/test/unit_test/gen9/glk/linux/hw_info_config_tests_glk.cpp index f53028e353..966ddf254b 100644 --- a/opencl/test/unit_test/gen9/glk/linux/hw_info_config_tests_glk.cpp +++ b/opencl/test/unit_test/gen9/glk/linux/hw_info_config_tests_glk.cpp @@ -206,7 +206,7 @@ class GlkHwInfoTests : public ::testing::Test { typedef ::testing::Types glkTestTypes; TYPED_TEST_CASE(GlkHwInfoTests, glkTestTypes); TYPED_TEST(GlkHwInfoTests, WhenGtIsSetupThenGtSystemInfoIsCorrect) { - HardwareInfo hwInfo; + HardwareInfo hwInfo = *defaultHwInfo; auto executionEnvironment = std::make_unique(); executionEnvironment->prepareRootDeviceEnvironments(1); executionEnvironment->rootDeviceEnvironments[0]->setHwInfo(defaultHwInfo.get()); diff --git a/opencl/test/unit_test/gen9/glk/test_hw_info_config_glk.cpp b/opencl/test/unit_test/gen9/glk/test_hw_info_config_glk.cpp index 983ff663fb..8cc6b4c435 100644 --- a/opencl/test/unit_test/gen9/glk/test_hw_info_config_glk.cpp +++ b/opencl/test/unit_test/gen9/glk/test_hw_info_config_glk.cpp @@ -5,15 +5,16 @@ * */ -#include "test.h" +#include "shared/test/common/helpers/default_hw_info.h" +#include "test.h" using namespace NEO; TEST(GlkHwInfoConfig, GivenIncorrectDataWhenConfiguringHwInfoThenErrorIsReturned) { if (IGFX_GEMINILAKE != productFamily) { return; } - HardwareInfo hwInfo; + HardwareInfo hwInfo = *defaultHwInfo; GT_SYSTEM_INFO >SystemInfo = hwInfo.gtSystemInfo; gtSystemInfo = {0}; @@ -34,7 +35,7 @@ GLKTEST_F(GlkHwInfo, givenBoolWhenCallGlkHardwareInfoSetupThenFeatureTableAndWor 0x100030006}; bool boolValue[]{ true, false}; - HardwareInfo hwInfo; + HardwareInfo hwInfo = *defaultHwInfo; GT_SYSTEM_INFO >SystemInfo = hwInfo.gtSystemInfo; FeatureTable &featureTable = hwInfo.featureTable; WorkaroundTable &workaroundTable = hwInfo.workaroundTable; diff --git a/opencl/test/unit_test/gen9/kbl/linux/hw_info_config_tests_kbl.cpp b/opencl/test/unit_test/gen9/kbl/linux/hw_info_config_tests_kbl.cpp index 7167dd148d..6350fca6da 100644 --- a/opencl/test/unit_test/gen9/kbl/linux/hw_info_config_tests_kbl.cpp +++ b/opencl/test/unit_test/gen9/kbl/linux/hw_info_config_tests_kbl.cpp @@ -225,7 +225,7 @@ class KblHwInfoTests : public ::testing::Test { typedef ::testing::Types kblTestTypes; TYPED_TEST_CASE(KblHwInfoTests, kblTestTypes); TYPED_TEST(KblHwInfoTests, WhenGtIsSetupThenGtSystemInfoIsCorrect) { - HardwareInfo hwInfo; + HardwareInfo hwInfo = *defaultHwInfo; auto executionEnvironment = std::make_unique(); executionEnvironment->prepareRootDeviceEnvironments(1); executionEnvironment->rootDeviceEnvironments[0]->setHwInfo(defaultHwInfo.get()); diff --git a/opencl/test/unit_test/gen9/kbl/test_hw_info_config_kbl.cpp b/opencl/test/unit_test/gen9/kbl/test_hw_info_config_kbl.cpp index 1add977d2b..db1fc2a171 100644 --- a/opencl/test/unit_test/gen9/kbl/test_hw_info_config_kbl.cpp +++ b/opencl/test/unit_test/gen9/kbl/test_hw_info_config_kbl.cpp @@ -5,15 +5,16 @@ * */ -#include "test.h" +#include "shared/test/common/helpers/default_hw_info.h" +#include "test.h" using namespace NEO; TEST(KblHwInfoConfig, GivenIncorrectDataWhenConfiguringHwInfoThenErrorIsReturned) { if (IGFX_KABYLAKE != productFamily) { return; } - HardwareInfo hwInfo; + HardwareInfo hwInfo = *defaultHwInfo; GT_SYSTEM_INFO >SystemInfo = hwInfo.gtSystemInfo; uint64_t config = 0xdeadbeef; @@ -36,7 +37,7 @@ KBLTEST_F(KblHwInfo, givenBoolWhenCallKblHardwareInfoSetupThenFeatureTableAndWor 0x100030006}; bool boolValue[]{ true, false}; - HardwareInfo hwInfo; + HardwareInfo hwInfo = *defaultHwInfo; GT_SYSTEM_INFO >SystemInfo = hwInfo.gtSystemInfo; FeatureTable &featureTable = hwInfo.featureTable; WorkaroundTable &workaroundTable = hwInfo.workaroundTable; diff --git a/opencl/test/unit_test/gen9/skl/linux/hw_info_config_tests_skl.cpp b/opencl/test/unit_test/gen9/skl/linux/hw_info_config_tests_skl.cpp index 2e38400504..ca9de7a2d9 100644 --- a/opencl/test/unit_test/gen9/skl/linux/hw_info_config_tests_skl.cpp +++ b/opencl/test/unit_test/gen9/skl/linux/hw_info_config_tests_skl.cpp @@ -249,7 +249,7 @@ class SklHwInfoTests : public ::testing::Test { typedef ::testing::Types sklTestTypes; TYPED_TEST_CASE(SklHwInfoTests, sklTestTypes); TYPED_TEST(SklHwInfoTests, WhenGtIsSetupThenGtSystemInfoIsCorrect) { - HardwareInfo hwInfo; + HardwareInfo hwInfo = *defaultHwInfo; auto executionEnvironment = std::make_unique(); executionEnvironment->prepareRootDeviceEnvironments(1); executionEnvironment->rootDeviceEnvironments[0]->setHwInfo(defaultHwInfo.get()); @@ -271,7 +271,7 @@ TYPED_TEST(SklHwInfoTests, WhenGtIsSetupThenGtSystemInfoIsCorrect) { } TYPED_TEST(SklHwInfoTests, givenGTSystemInfoTypeWhenConfigureHardwareCustomThenSliceCountDontChange) { - HardwareInfo hwInfo; + HardwareInfo hwInfo = *defaultHwInfo; auto osInterface = std::unique_ptr(new OSInterface()); GT_SYSTEM_INFO >SystemInfo = hwInfo.gtSystemInfo; diff --git a/opencl/test/unit_test/gen9/skl/test_hw_info_config_skl.cpp b/opencl/test/unit_test/gen9/skl/test_hw_info_config_skl.cpp index ea1e84e122..6f927c0321 100644 --- a/opencl/test/unit_test/gen9/skl/test_hw_info_config_skl.cpp +++ b/opencl/test/unit_test/gen9/skl/test_hw_info_config_skl.cpp @@ -5,15 +5,16 @@ * */ -#include "test.h" +#include "shared/test/common/helpers/default_hw_info.h" +#include "test.h" using namespace NEO; TEST(SklHwInfoConfig, GivenIncorrectDataWhenConfiguringHwInfoThenErrorIsReturned) { if (IGFX_SKYLAKE != productFamily) { return; } - HardwareInfo hwInfo; + HardwareInfo hwInfo = *defaultHwInfo; GT_SYSTEM_INFO >SystemInfo = hwInfo.gtSystemInfo; gtSystemInfo = {0}; @@ -37,7 +38,7 @@ SKLTEST_F(SklHwInfo, givenBoolWhenCallSklHardwareInfoSetupThenFeatureTableAndWor bool boolValue[]{ true, false}; - HardwareInfo hwInfo; + HardwareInfo hwInfo = *defaultHwInfo; GT_SYSTEM_INFO >SystemInfo = hwInfo.gtSystemInfo; FeatureTable &featureTable = hwInfo.featureTable; WorkaroundTable &workaroundTable = hwInfo.workaroundTable; diff --git a/opencl/test/unit_test/helpers/hw_helper_tests.cpp b/opencl/test/unit_test/helpers/hw_helper_tests.cpp index b1fd368f7e..dbc628c9f9 100644 --- a/opencl/test/unit_test/helpers/hw_helper_tests.cpp +++ b/opencl/test/unit_test/helpers/hw_helper_tests.cpp @@ -368,7 +368,7 @@ HWTEST_F(PipeControlHelperTests, givenNotifyEnableArgumentIsTrueWhenHelperIsUsed } TEST(HwInfoTest, givenHwInfoWhenChosenEngineTypeQueriedThenDefaultIsReturned) { - HardwareInfo hwInfo; + HardwareInfo hwInfo = *defaultHwInfo; hwInfo.capabilityTable.defaultEngineType = aub_stream::ENGINE_RCS; auto engineType = getChosenEngineType(hwInfo); EXPECT_EQ(aub_stream::ENGINE_RCS, engineType); @@ -377,7 +377,7 @@ TEST(HwInfoTest, givenHwInfoWhenChosenEngineTypeQueriedThenDefaultIsReturned) { TEST(HwInfoTest, givenNodeOrdinalSetWhenChosenEngineTypeQueriedThenSetValueIsReturned) { DebugManagerStateRestore dbgRestore; DebugManager.flags.NodeOrdinal.set(aub_stream::ENGINE_VECS); - HardwareInfo hwInfo; + HardwareInfo hwInfo = *defaultHwInfo; hwInfo.capabilityTable.defaultEngineType = aub_stream::ENGINE_RCS; auto engineType = getChosenEngineType(hwInfo); EXPECT_EQ(aub_stream::ENGINE_VECS, engineType); @@ -1301,9 +1301,9 @@ TEST_F(HwHelperTest, whenGettingDefaultRevisionIdThenCorrectValueIsReturned) { } } -TEST_F(HwHelperTest, whenGettingNumberOfCacheRegionsThenReturnZero) { +HWTEST_F(HwHelperTest, whenGettingNumberOfCacheRegionsThenReturnZero) { auto &hwHelper = HwHelper::get(renderCoreFamily); - EXPECT_EQ(0u, hwHelper.getNumCacheRegions(*defaultHwInfo)); + EXPECT_EQ(0u, hwHelper.getNumCacheRegions()); } HWCMDTEST_F(IGFX_GEN8_CORE, HwHelperTest, whenCheckingForSmallKernelPreferenceThenFalseIsReturned) { diff --git a/opencl/test/unit_test/os_interface/linux/drm_memory_manager_tests.cpp b/opencl/test/unit_test/os_interface/linux/drm_memory_manager_tests.cpp index eeea7c1157..248b9d6546 100644 --- a/opencl/test/unit_test/os_interface/linux/drm_memory_manager_tests.cpp +++ b/opencl/test/unit_test/os_interface/linux/drm_memory_manager_tests.cpp @@ -4404,7 +4404,7 @@ TEST_F(DrmMemoryManagerTest, givenDrmAllocationWithHostPtrWhenItIsCreatedWithCac memoryManager->cleanOsHandles(storage, rootDeviceIndex); } -TEST_F(DrmMemoryManagerTest, givenDrmAllocationWithHostPtrWhenItIsCreatedWithIncorrectCacheRegionThenReturnNull) { +HWTEST_F(DrmMemoryManagerTest, givenDrmAllocationWithHostPtrWhenItIsCreatedWithIncorrectCacheRegionThenReturnNull) { mock->ioctl_expected.total = -1; auto drm = static_cast(executionEnvironment->rootDeviceEnvironments[rootDeviceIndex]->osInterface->getDriverModel()->as()); drm->setupCacheInfo(*defaultHwInfo.get()); @@ -4420,7 +4420,7 @@ TEST_F(DrmMemoryManagerTest, givenDrmAllocationWithHostPtrWhenItIsCreatedWithInc EXPECT_EQ(allocation, nullptr); } -TEST_F(DrmMemoryManagerTest, givenDrmAllocationWithWithAlignmentFromUserptrWhenItIsCreatedWithIncorrectCacheRegionThenReturnNull) { +HWTEST_F(DrmMemoryManagerTest, givenDrmAllocationWithWithAlignmentFromUserptrWhenItIsCreatedWithIncorrectCacheRegionThenReturnNull) { mock->ioctl_expected.total = -1; auto drm = static_cast(executionEnvironment->rootDeviceEnvironments[rootDeviceIndex]->osInterface->getDriverModel()->as()); drm->setupCacheInfo(*defaultHwInfo.get()); diff --git a/opencl/test/unit_test/os_interface/linux/drm_system_info_tests.cpp b/opencl/test/unit_test/os_interface/linux/drm_system_info_tests.cpp index 71ad08eb1d..dbf0f47c3d 100644 --- a/opencl/test/unit_test/os_interface/linux/drm_system_info_tests.cpp +++ b/opencl/test/unit_test/os_interface/linux/drm_system_info_tests.cpp @@ -60,7 +60,7 @@ TEST(DrmSystemInfoTest, givenSetupHardwareInfoWhenQuerySystemInfoFailsThenSystem executionEnvironment->rootDeviceEnvironments[0]->setHwInfo(defaultHwInfo.get()); DrmMockToFailQuerySystemInfo drm(*executionEnvironment->rootDeviceEnvironments[0]); - HardwareInfo hwInfo; + HardwareInfo hwInfo = *defaultHwInfo; auto setupHardwareInfo = [](HardwareInfo *, bool) {}; DeviceDescriptor device = {0, &hwInfo, setupHardwareInfo, GTTYPE_UNDEFINED}; @@ -79,7 +79,7 @@ TEST(DrmSystemInfoTest, givenSetupHardwareInfoWhenSystemInfoIsCreatedThenSetHard executionEnvironment->rootDeviceEnvironments[0]->setHwInfo(defaultHwInfo.get()); DrmMock drm(*executionEnvironment->rootDeviceEnvironments[0]); - HardwareInfo hwInfo; + HardwareInfo hwInfo = *defaultHwInfo; auto setupHardwareInfo = [](HardwareInfo *, bool) {}; GT_SYSTEM_INFO >SystemInfo = hwInfo.gtSystemInfo; DeviceDescriptor device = {0, &hwInfo, setupHardwareInfo, GTTYPE_UNDEFINED}; diff --git a/shared/source/helpers/hw_helper.h b/shared/source/helpers/hw_helper.h index 2a7275d7d3..f8c7d5a468 100644 --- a/shared/source/helpers/hw_helper.h +++ b/shared/source/helpers/hw_helper.h @@ -140,7 +140,7 @@ class HwHelper { virtual bool isDirectSubmissionSupported() const = 0; virtual aub_stream::MMIOList getExtraMmioList(const HardwareInfo &hwInfo, const GmmHelper &gmmHelper) const = 0; virtual uint32_t getDefaultRevisionId(const HardwareInfo &hwInfo) const = 0; - virtual uint32_t getNumCacheRegions(const HardwareInfo &hwInfo) const = 0; + virtual uint32_t getNumCacheRegions() const = 0; virtual bool isSubDeviceEngineSupported(const HardwareInfo &hwInfo, const DeviceBitfield &deviceBitfield, aub_stream::EngineType engineType) const = 0; virtual uint32_t getPlanarYuvMaxHeight() const = 0; virtual bool isBlitterForImagesSupported(const HardwareInfo &hwInfo) const = 0; @@ -363,7 +363,7 @@ class HwHelperHw : public HwHelper { uint32_t getDefaultRevisionId(const HardwareInfo &hwInfo) const override; - uint32_t getNumCacheRegions(const HardwareInfo &hwInfo) const override; + uint32_t getNumCacheRegions() const override; bool isSubDeviceEngineSupported(const HardwareInfo &hwInfo, const DeviceBitfield &deviceBitfield, aub_stream::EngineType engineType) const override; diff --git a/shared/source/helpers/hw_helper_base.inl b/shared/source/helpers/hw_helper_base.inl index d5725916ec..166f6f5a74 100644 --- a/shared/source/helpers/hw_helper_base.inl +++ b/shared/source/helpers/hw_helper_base.inl @@ -633,7 +633,7 @@ uint32_t HwHelperHw::getDefaultRevisionId(const HardwareInfo &hwInfo) } template -uint32_t HwHelperHw::getNumCacheRegions(const HardwareInfo &hwInfo) const { +uint32_t HwHelperHw::getNumCacheRegions() const { return 0; } diff --git a/shared/test/common/gen12lp/adls/test_hw_info_config_adls.cpp b/shared/test/common/gen12lp/adls/test_hw_info_config_adls.cpp index 64804c9202..eb5304f8d8 100644 --- a/shared/test/common/gen12lp/adls/test_hw_info_config_adls.cpp +++ b/shared/test/common/gen12lp/adls/test_hw_info_config_adls.cpp @@ -6,10 +6,10 @@ */ #include "shared/source/helpers/hw_helper.h" +#include "shared/test/common/helpers/default_hw_info.h" #include "opencl/source/helpers/hardware_commands_helper.h" #include "test.h" - using namespace NEO; using AdlsHwInfo = ::testing::Test; @@ -17,7 +17,7 @@ using AdlsHwInfo = ::testing::Test; ADLSTEST_F(AdlsHwInfo, givenBoolWhenCallAdlsHardwareInfoSetupThenFeatureTableAndWorkaroundTableAreSetCorrect) { static bool boolValue[]{ true, false}; - HardwareInfo hwInfo; + HardwareInfo hwInfo = *defaultHwInfo; GT_SYSTEM_INFO >SystemInfo = hwInfo.gtSystemInfo; FeatureTable &featureTable = hwInfo.featureTable; WorkaroundTable &workaroundTable = hwInfo.workaroundTable; diff --git a/shared/test/common/gen12lp/rkl/test_hw_info_config_rkl.cpp b/shared/test/common/gen12lp/rkl/test_hw_info_config_rkl.cpp index d16265306f..f6fa52bba6 100644 --- a/shared/test/common/gen12lp/rkl/test_hw_info_config_rkl.cpp +++ b/shared/test/common/gen12lp/rkl/test_hw_info_config_rkl.cpp @@ -6,6 +6,7 @@ */ #include "shared/source/helpers/hw_helper.h" +#include "shared/test/common/helpers/default_hw_info.h" #include "opencl/source/helpers/hardware_commands_helper.h" #include "test.h" @@ -19,7 +20,7 @@ RKLTEST_F(RklHwInfo, givenBoolWhenCallRklHardwareInfoSetupThenFeatureTableAndWor 0x100020010}; bool boolValue[]{ true, false}; - HardwareInfo hwInfo; + HardwareInfo hwInfo = *defaultHwInfo; GT_SYSTEM_INFO >SystemInfo = hwInfo.gtSystemInfo; FeatureTable &featureTable = hwInfo.featureTable; WorkaroundTable &workaroundTable = hwInfo.workaroundTable; diff --git a/shared/test/unit_test/compiler_interface/compiler_cache_tests.cpp b/shared/test/unit_test/compiler_interface/compiler_cache_tests.cpp index ad8747df75..64f38c74e5 100644 --- a/shared/test/unit_test/compiler_interface/compiler_cache_tests.cpp +++ b/shared/test/unit_test/compiler_interface/compiler_cache_tests.cpp @@ -142,7 +142,7 @@ TEST(CompilerCacheHashTests, WhenHashingThenResultIsDeterministic) { TEST(CompilerCacheHashTests, GivenCompilingOptionsWhenGettingCacheThenCorrectCacheIsReturned) { static const size_t bufSize = 64; - HardwareInfo hwInfo; + HardwareInfo hwInfo = *defaultHwInfo; std::set hashes;