From ca51e557a29412983de88da91dd5522c8ae0f019 Mon Sep 17 00:00:00 2001 From: Compute-Runtime-Validation Date: Thu, 20 Apr 2023 04:04:39 +0200 Subject: [PATCH] Revert "Remove default support for DCD" This reverts commit a3e923e359766344b448303409d362e85a40adda. Signed-off-by: Compute-Runtime-Validation --- .../unit_tests/fixtures/device_fixture.cpp | 11 +- .../test/unit_tests/fixtures/device_fixture.h | 2 - .../unit_tests/sources/module/test_module.cpp | 46 ++-- .../gen11/ehl/test_device_caps_ehl.cpp | 4 - .../gen11/icllp/test_device_caps_icllp.cpp | 4 - .../gen11/lkf/test_device_caps_lkf.cpp | 4 - .../gen9/bxt/test_device_caps_bxt.cpp | 4 - .../windows/test_device_caps_bxt_windows.cpp | 4 - .../gen9/cfl/test_device_caps_cfl.cpp | 4 - .../windows/test_device_caps_cfl_windows.cpp | 4 - .../gen9/glk/test_device_caps_glk.cpp | 4 - .../windows/test_device_caps_glk_windows.cpp | 4 - .../gen9/kbl/test_device_caps_kbl.cpp | 4 - .../windows/test_device_caps_kbl_windows.cpp | 4 - .../gen9/skl/test_device_caps_skl.cpp | 4 - .../windows/test_device_caps_skl_windows.cpp | 4 - opencl/test/unit_test/mocks/mock_context.cpp | 14 - opencl/test/unit_test/mocks/mock_context.h | 9 - .../unit_test/program/program_data_tests.cpp | 18 +- .../program_with_kernel_debug_tests.cpp | 46 ++-- .../source_level_debugger_tests.cpp | 252 +++++++++--------- .../test_device_caps_xe_hp_core.cpp | 4 - .../xe_hp_core/xehp/test_device_caps_xehp.inl | 4 - shared/source/gen11/hw_info_ehl.cpp | 2 +- shared/source/gen11/hw_info_icllp.cpp | 2 +- shared/source/gen11/hw_info_lkf.cpp | 2 +- shared/source/gen12lp/hw_info_adln.cpp | 2 +- shared/source/gen12lp/hw_info_adlp.cpp | 2 +- shared/source/gen12lp/hw_info_adls.cpp | 2 +- shared/source/gen12lp/hw_info_dg1.cpp | 2 +- shared/source/gen12lp/hw_info_rkl.cpp | 2 +- shared/source/gen12lp/hw_info_tgllp.cpp | 2 +- shared/source/gen9/hw_info_bxt.cpp | 2 +- shared/source/gen9/hw_info_cfl.cpp | 2 +- shared/source/gen9/hw_info_glk.cpp | 2 +- shared/source/gen9/hw_info_kbl.cpp | 2 +- shared/source/gen9/hw_info_skl.cpp | 2 +- .../source/xe_hp_core/hw_info_xe_hp_sdv.cpp | 2 +- shared/source/xe_hpg_core/hw_info_dg2.cpp | 2 +- shared/source/xe_hpg_core/hw_info_mtl.cpp | 2 +- .../libult/source_level_debugger_library.cpp | 3 - .../libult/source_level_debugger_library.h | 1 - .../test_macros/header/common_matchers.h | 18 -- .../compiler_interface/linker_tests.cpp | 23 +- .../gen11/test_device_caps_gen11.cpp | 4 - .../gen12lp/adln/test_device_caps_adln.cpp | 4 - .../gen12lp/adlp/test_device_caps_adlp.cpp | 4 - .../gen12lp/adls/test_device_caps_adls.cpp | 4 - .../gen12lp/dg1/test_device_caps_dg1.cpp | 4 - .../gen12lp/test_device_caps_gen12lp.inl | 4 - .../unit_test/gen8/test_device_caps_gen8.cpp | 4 - .../unit_test/gen9/test_device_caps_gen9.cpp | 4 - .../test_device_caps_xe_hpc_core.cpp | 4 - .../xe_hpg_core/dg2/test_device_caps_dg2.cpp | 4 - .../xe_hpg_core/mtl/test_device_caps_mtl.cpp | 4 - .../test_device_caps_xe_hpg_core.cpp | 4 - 56 files changed, 210 insertions(+), 375 deletions(-) diff --git a/level_zero/core/test/unit_tests/fixtures/device_fixture.cpp b/level_zero/core/test/unit_tests/fixtures/device_fixture.cpp index 4cc322e47e..77d2e2fa31 100644 --- a/level_zero/core/test/unit_tests/fixtures/device_fixture.cpp +++ b/level_zero/core/test/unit_tests/fixtures/device_fixture.cpp @@ -25,19 +25,12 @@ namespace L0 { namespace ult { void DeviceFixture::setUp() { - hardwareInfo = defaultHwInfo.get(); - setUpImpl(hardwareInfo); -} - -void DeviceFixture::setUpImpl(NEO::HardwareInfo *hwInfo) { - hardwareInfo = hwInfo; - auto executionEnvironment = MockDevice::prepareExecutionEnvironment(hardwareInfo, 0u); + auto executionEnvironment = MockDevice::prepareExecutionEnvironment(NEO::defaultHwInfo.get(), 0u); setupWithExecutionEnvironment(*executionEnvironment); } - void DeviceFixture::setupWithExecutionEnvironment(NEO::ExecutionEnvironment &executionEnvironment) { execEnv = &executionEnvironment; - neoDevice = NEO::MockDevice::createWithExecutionEnvironment(hardwareInfo == nullptr ? defaultHwInfo.get() : hardwareInfo, &executionEnvironment, 0u); + neoDevice = NEO::MockDevice::createWithExecutionEnvironment(NEO::defaultHwInfo.get(), &executionEnvironment, 0u); mockBuiltIns = new MockBuiltins(); neoDevice->executionEnvironment->rootDeviceEnvironments[0]->builtins.reset(mockBuiltIns); NEO::DeviceVector devices; diff --git a/level_zero/core/test/unit_tests/fixtures/device_fixture.h b/level_zero/core/test/unit_tests/fixtures/device_fixture.h index fbb5cf5fda..02a982fac1 100644 --- a/level_zero/core/test/unit_tests/fixtures/device_fixture.h +++ b/level_zero/core/test/unit_tests/fixtures/device_fixture.h @@ -34,7 +34,6 @@ class MockBuiltins; struct DeviceFixture { void setUp(); - void setUpImpl(NEO::HardwareInfo *hwInfo); void tearDown(); void setupWithExecutionEnvironment(NEO::ExecutionEnvironment &executionEnvironment); @@ -44,7 +43,6 @@ struct DeviceFixture { L0::ContextImp *context = nullptr; MockBuiltins *mockBuiltIns = nullptr; NEO::ExecutionEnvironment *execEnv = nullptr; - HardwareInfo *hardwareInfo = nullptr; template HelperType &getHelper() const; diff --git a/level_zero/core/test/unit_tests/sources/module/test_module.cpp b/level_zero/core/test/unit_tests/sources/module/test_module.cpp index ac928bd49c..4c637a2fc0 100644 --- a/level_zero/core/test/unit_tests/sources/module/test_module.cpp +++ b/level_zero/core/test/unit_tests/sources/module/test_module.cpp @@ -2553,22 +2553,10 @@ HWTEST_F(ModuleTranslationUnitTest, WithNoCompilerWhenCallingStaticLinkSpirVThen Os::frontEndDllName = oldFclDllName; } -class ModuleTranslationUnitDebuggerSupportedTest : public ModuleTranslationUnitTest { - public: - void SetUp() override { - NEO::HardwareInfo hwInfo = *NEO::defaultHwInfo; - hwInfo.capabilityTable.debuggerSupported = true; - DeviceFixture::setUpImpl(&hwInfo); +HWTEST_F(ModuleTranslationUnitTest, WhenCreatingFromZeBinaryWithoutSpirvDataIncludedAndLegacyDebuggerAttachedThenReturnError) { + if (false == device->getHwInfo().capabilityTable.debuggerSupported) { + GTEST_SKIP(); } - - void TearDown() override { - DeviceFixture::tearDown(); - } - - DebugManagerStateRestore restorer; -}; - -HWTEST2_F(ModuleTranslationUnitDebuggerSupportedTest, WhenCreatingFromZeBinaryWithoutSpirvDataIncludedAndLegacyDebuggerAttachedThenReturnError, HasSourceLevelDebuggerSupport) { ZebinTestData::ValidEmptyProgram<> zebin; const auto &hwInfo = device->getNEODevice()->getHardwareInfo(); zebin.elfHeader->machine = hwInfo.platform.eProductFamily; @@ -2700,7 +2688,12 @@ HWTEST_F(ModuleTranslationUnitTest, givenForceToStatelessRequiredWhenBuildingMod } } -HWTEST2_F(ModuleTranslationUnitDebuggerSupportedTest, givenSourceLevelDebuggerAndEnableZebinBuildOptionWhenBuildWithSpirvThenModuleBuildFails, IsAtMostGen12lp) { +HWTEST2_F(ModuleTranslationUnitTest, givenSourceLevelDebuggerAndEnableZebinBuildOptionWhenBuildWithSpirvThenModuleBuildFails, IsAtMostGen12lp) { + + if (device->getHwInfo().capabilityTable.debuggerSupported == false) { + GTEST_SKIP(); + } + auto mockCompilerInterface = new MockCompilerInterface; neoDevice->executionEnvironment->rootDeviceEnvironments[neoDevice->getRootDeviceIndex()]->debugger.reset(new MockActiveSourceLevelDebugger); auto &rootDeviceEnvironment = neoDevice->executionEnvironment->rootDeviceEnvironments[neoDevice->getRootDeviceIndex()]; @@ -2714,7 +2707,12 @@ HWTEST2_F(ModuleTranslationUnitDebuggerSupportedTest, givenSourceLevelDebuggerAn EXPECT_EQ(result, ZE_RESULT_ERROR_MODULE_BUILD_FAILURE); } -HWTEST2_F(ModuleTranslationUnitDebuggerSupportedTest, givenSourceLevelDebuggerAndEnableZebinBuildOptionWhenBuildWithSpirvThenModuleBuildsWithSuccess, IsAtLeastXeHpCore) { +HWTEST2_F(ModuleTranslationUnitTest, givenSourceLevelDebuggerAndEnableZebinBuildOptionWhenBuildWithSpirvThenModuleBuildsWithSuccess, IsAtLeastXeHpCore) { + + if (device->getHwInfo().capabilityTable.debuggerSupported == false) { + GTEST_SKIP(); + } + auto mockCompilerInterface = new MockCompilerInterface; neoDevice->executionEnvironment->rootDeviceEnvironments[neoDevice->getRootDeviceIndex()]->debugger.reset(new MockActiveSourceLevelDebugger); auto &rootDeviceEnvironment = neoDevice->executionEnvironment->rootDeviceEnvironments[neoDevice->getRootDeviceIndex()]; @@ -2749,7 +2747,12 @@ HWTEST_F(ModuleTranslationUnitTest, givenEnableZebinBuildOptionWhenBuildWithSpir EXPECT_EQ(mockCompilerInterface->inputInternalOptions.find(NEO::CompilerOptions::disableZebin.str()), std::string::npos); } -HWTEST2_F(ModuleTranslationUnitDebuggerSupportedTest, givenSourceLevelDebuggerWhenBuildWithSpirvThenModuleBuildsWithSuccess, HasSourceLevelDebuggerSupport) { +HWTEST_F(ModuleTranslationUnitTest, givenSourceLevelDebuggerWhenBuildWithSpirvThenModuleBuildsWithSuccess) { + + if (device->getHwInfo().capabilityTable.debuggerSupported == false) { + GTEST_SKIP(); + } + auto mockCompilerInterface = new MockCompilerInterface; neoDevice->executionEnvironment->rootDeviceEnvironments[neoDevice->getRootDeviceIndex()]->debugger.reset(new MockActiveSourceLevelDebugger); auto &rootDeviceEnvironment = neoDevice->executionEnvironment->rootDeviceEnvironments[neoDevice->getRootDeviceIndex()]; @@ -3578,9 +3581,10 @@ TEST_F(ModuleTests, givenImplicitArgsRelocationAndStackCallsWhenLinkingModuleThe EXPECT_TRUE(kernelInfo->kernelDescriptor.kernelAttributes.flags.requiresImplicitArgs); } -using ModuleTestsDebuggingSupported = ModuleTranslationUnitDebuggerSupportedTest; - -HWTEST2_F(ModuleTestsDebuggingSupported, givenImplicitArgsRelocationAndDebuggerEnabledWhenLinkingModuleThenSegmentIsPatchedAndImplicitArgsAreRequired, HasSourceLevelDebuggerSupport) { +TEST_F(ModuleTests, givenImplicitArgsRelocationAndDebuggerEnabledWhenLinkingModuleThenSegmentIsPatchedAndImplicitArgsAreRequired) { + if (!defaultHwInfo->capabilityTable.debuggerSupported) { + GTEST_SKIP(); + } DebugManagerStateRestore restorer; DebugManager.flags.EnableMockSourceLevelDebugger.set(1); auto pModule = std::make_unique(device, nullptr, ModuleType::User); diff --git a/opencl/test/unit_test/gen11/ehl/test_device_caps_ehl.cpp b/opencl/test/unit_test/gen11/ehl/test_device_caps_ehl.cpp index 10cf2267c9..1cfa0806c8 100644 --- a/opencl/test/unit_test/gen11/ehl/test_device_caps_ehl.cpp +++ b/opencl/test/unit_test/gen11/ehl/test_device_caps_ehl.cpp @@ -15,10 +15,6 @@ using namespace NEO; using EhlTest = Test; -EHLTEST_F(EhlTest, givenEhlThenDebuggerIsNotSupported) { - EXPECT_FALSE(pDevice->getHardwareInfo().capabilityTable.debuggerSupported); -} - EHLTEST_F(EhlTest, givenEhlWhenSlmSizeIsRequiredThenReturnCorrectValue) { EXPECT_EQ(64u, pDevice->getHardwareInfo().capabilityTable.slmSize); } diff --git a/opencl/test/unit_test/gen11/icllp/test_device_caps_icllp.cpp b/opencl/test/unit_test/gen11/icllp/test_device_caps_icllp.cpp index a64befb677..704c7e15c1 100644 --- a/opencl/test/unit_test/gen11/icllp/test_device_caps_icllp.cpp +++ b/opencl/test/unit_test/gen11/icllp/test_device_caps_icllp.cpp @@ -16,10 +16,6 @@ using namespace NEO; using IcllpTest = Test; -ICLLPTEST_F(IcllpTest, givenIcllpThenDebuggerIsNotSupported) { - EXPECT_FALSE(pDevice->getHardwareInfo().capabilityTable.debuggerSupported); -} - ICLLPTEST_F(IcllpTest, givenIcllpWhenSlmSizeIsRequiredThenReturnCorrectValue) { EXPECT_EQ(64u, pDevice->getHardwareInfo().capabilityTable.slmSize); } diff --git a/opencl/test/unit_test/gen11/lkf/test_device_caps_lkf.cpp b/opencl/test/unit_test/gen11/lkf/test_device_caps_lkf.cpp index 243200c4e5..e4df83788f 100644 --- a/opencl/test/unit_test/gen11/lkf/test_device_caps_lkf.cpp +++ b/opencl/test/unit_test/gen11/lkf/test_device_caps_lkf.cpp @@ -16,10 +16,6 @@ using namespace NEO; using LkfTest = Test; -LKFTEST_F(LkfTest, givenLkfThenDebuggerIsNotSupported) { - EXPECT_FALSE(pDevice->getHardwareInfo().capabilityTable.debuggerSupported); -} - LKFTEST_F(LkfTest, givenLkfWhenSlmSizeIsRequiredThenReturnCorrectValue) { EXPECT_EQ(64u, pDevice->getHardwareInfo().capabilityTable.slmSize); } diff --git a/opencl/test/unit_test/gen9/bxt/test_device_caps_bxt.cpp b/opencl/test/unit_test/gen9/bxt/test_device_caps_bxt.cpp index 60d6cf930e..f5497a632c 100644 --- a/opencl/test/unit_test/gen9/bxt/test_device_caps_bxt.cpp +++ b/opencl/test/unit_test/gen9/bxt/test_device_caps_bxt.cpp @@ -17,10 +17,6 @@ using namespace NEO; typedef Test BxtDeviceCaps; -BXTTEST_F(BxtDeviceCaps, GivenBxtThenDebuggerIsNotSupported) { - EXPECT_FALSE(pDevice->getHardwareInfo().capabilityTable.debuggerSupported); -} - BXTTEST_F(BxtDeviceCaps, WhenCheckingProfilingTimerResolutionThenCorrectResolutionIsReturned) { const auto &caps = pDevice->getDeviceInfo(); EXPECT_EQ(52u, caps.outProfilingTimerResolution); diff --git a/opencl/test/unit_test/gen9/bxt/windows/test_device_caps_bxt_windows.cpp b/opencl/test/unit_test/gen9/bxt/windows/test_device_caps_bxt_windows.cpp index 923d3cd763..9a03086f8d 100644 --- a/opencl/test/unit_test/gen9/bxt/windows/test_device_caps_bxt_windows.cpp +++ b/opencl/test/unit_test/gen9/bxt/windows/test_device_caps_bxt_windows.cpp @@ -16,10 +16,6 @@ using namespace NEO; typedef Test BxtDeviceCapsWindows; -BXTTEST_F(BxtDeviceCapsWindows, GivenBxtWindowsThenDebuggerIsNotSupported) { - EXPECT_FALSE(pDevice->getHardwareInfo().capabilityTable.debuggerSupported); -} - BXTTEST_F(BxtDeviceCapsWindows, GivenWhenGettingKmdNotifyPropertiesThenItIsDisabled) { EXPECT_FALSE(pDevice->getHardwareInfo().capabilityTable.kmdNotifyProperties.enableKmdNotify); EXPECT_EQ(0, pDevice->getHardwareInfo().capabilityTable.kmdNotifyProperties.delayKmdNotifyMicroseconds); diff --git a/opencl/test/unit_test/gen9/cfl/test_device_caps_cfl.cpp b/opencl/test/unit_test/gen9/cfl/test_device_caps_cfl.cpp index 6eca3a6792..64c175f747 100644 --- a/opencl/test/unit_test/gen9/cfl/test_device_caps_cfl.cpp +++ b/opencl/test/unit_test/gen9/cfl/test_device_caps_cfl.cpp @@ -16,10 +16,6 @@ using namespace NEO; typedef Test CflDeviceCaps; -CFLTEST_F(CflDeviceCaps, GivenCFLThenDebuggerIsNotSupported) { - EXPECT_FALSE(pDevice->getHardwareInfo().capabilityTable.debuggerSupported); -} - CFLTEST_F(CflDeviceCaps, GivenCFLWhenCheckftr64KBpagesThenTrue) { EXPECT_TRUE(pDevice->getHardwareInfo().capabilityTable.ftr64KBpages); } diff --git a/opencl/test/unit_test/gen9/cfl/windows/test_device_caps_cfl_windows.cpp b/opencl/test/unit_test/gen9/cfl/windows/test_device_caps_cfl_windows.cpp index 0a9cc5680b..061326e60b 100644 --- a/opencl/test/unit_test/gen9/cfl/windows/test_device_caps_cfl_windows.cpp +++ b/opencl/test/unit_test/gen9/cfl/windows/test_device_caps_cfl_windows.cpp @@ -16,10 +16,6 @@ using namespace NEO; typedef Test CflDeviceCapsWindows; -CFLTEST_F(CflDeviceCapsWindows, GivenCflWindowsThenDebuggerIsNotSupported) { - EXPECT_FALSE(pDevice->getHardwareInfo().capabilityTable.debuggerSupported); -} - CFLTEST_F(CflDeviceCapsWindows, GivenWhenGettingKmdNotifyPropertiesThenItIsDisabled) { EXPECT_FALSE(pDevice->getHardwareInfo().capabilityTable.kmdNotifyProperties.enableKmdNotify); EXPECT_EQ(0, pDevice->getHardwareInfo().capabilityTable.kmdNotifyProperties.delayKmdNotifyMicroseconds); diff --git a/opencl/test/unit_test/gen9/glk/test_device_caps_glk.cpp b/opencl/test/unit_test/gen9/glk/test_device_caps_glk.cpp index 2c07826181..fdf523ec6a 100644 --- a/opencl/test/unit_test/gen9/glk/test_device_caps_glk.cpp +++ b/opencl/test/unit_test/gen9/glk/test_device_caps_glk.cpp @@ -16,10 +16,6 @@ using namespace NEO; using GlkDeviceCaps = Test; -GLKTEST_F(GlkDeviceCaps, givenGlkThenDebuggerIsNotSupported) { - EXPECT_FALSE(pDevice->getHardwareInfo().capabilityTable.debuggerSupported); -} - GLKTEST_F(GlkDeviceCaps, WhenCheckingProfilingTimerResolutionThenCorrectResolutionIsReturned) { const auto &caps = pDevice->getDeviceInfo(); EXPECT_EQ(52u, caps.outProfilingTimerResolution); diff --git a/opencl/test/unit_test/gen9/glk/windows/test_device_caps_glk_windows.cpp b/opencl/test/unit_test/gen9/glk/windows/test_device_caps_glk_windows.cpp index 9ab73a5e05..132e5365d7 100644 --- a/opencl/test/unit_test/gen9/glk/windows/test_device_caps_glk_windows.cpp +++ b/opencl/test/unit_test/gen9/glk/windows/test_device_caps_glk_windows.cpp @@ -16,10 +16,6 @@ using namespace NEO; typedef Test GlkDeviceCapsWindows; -GLKTEST_F(GlkDeviceCapsWindows, GivenGlkWindowsThenDebuggerIsNotSupported) { - EXPECT_FALSE(pDevice->getHardwareInfo().capabilityTable.debuggerSupported); -} - GLKTEST_F(GlkDeviceCapsWindows, WhenCheckingKmdNotifyPropertiesThenKmdNotifyIsEnabledCorrectly) { EXPECT_TRUE(pDevice->getHardwareInfo().capabilityTable.kmdNotifyProperties.enableKmdNotify); EXPECT_EQ(30000, pDevice->getHardwareInfo().capabilityTable.kmdNotifyProperties.delayKmdNotifyMicroseconds); diff --git a/opencl/test/unit_test/gen9/kbl/test_device_caps_kbl.cpp b/opencl/test/unit_test/gen9/kbl/test_device_caps_kbl.cpp index 89194e8f73..8baecc9255 100644 --- a/opencl/test/unit_test/gen9/kbl/test_device_caps_kbl.cpp +++ b/opencl/test/unit_test/gen9/kbl/test_device_caps_kbl.cpp @@ -14,10 +14,6 @@ using namespace NEO; typedef Test KblDeviceCaps; -KBLTEST_F(KblDeviceCaps, GivenKBLThenDebuggerIsNotSupported) { - EXPECT_FALSE(pDevice->getHardwareInfo().capabilityTable.debuggerSupported); -} - KBLTEST_F(KblDeviceCaps, GivenKBLWhenCheckftr64KBpagesThenTrue) { EXPECT_TRUE(pDevice->getHardwareInfo().capabilityTable.ftr64KBpages); } diff --git a/opencl/test/unit_test/gen9/kbl/windows/test_device_caps_kbl_windows.cpp b/opencl/test/unit_test/gen9/kbl/windows/test_device_caps_kbl_windows.cpp index 34b3a99978..11a99f76f2 100644 --- a/opencl/test/unit_test/gen9/kbl/windows/test_device_caps_kbl_windows.cpp +++ b/opencl/test/unit_test/gen9/kbl/windows/test_device_caps_kbl_windows.cpp @@ -14,10 +14,6 @@ using namespace NEO; typedef Test KblDeviceCapsWindows; -KBLTEST_F(KblDeviceCapsWindows, givenKblWindowsThenDebuggerIsNotSupported) { - EXPECT_FALSE(pDevice->getHardwareInfo().capabilityTable.debuggerSupported); -} - KBLTEST_F(KblDeviceCapsWindows, GivenWhenGettingKmdNotifyPropertiesThenItIsDisabled) { EXPECT_FALSE(pDevice->getHardwareInfo().capabilityTable.kmdNotifyProperties.enableKmdNotify); EXPECT_EQ(0, pDevice->getHardwareInfo().capabilityTable.kmdNotifyProperties.delayKmdNotifyMicroseconds); diff --git a/opencl/test/unit_test/gen9/skl/test_device_caps_skl.cpp b/opencl/test/unit_test/gen9/skl/test_device_caps_skl.cpp index 12de1f3316..e34280e76b 100644 --- a/opencl/test/unit_test/gen9/skl/test_device_caps_skl.cpp +++ b/opencl/test/unit_test/gen9/skl/test_device_caps_skl.cpp @@ -17,10 +17,6 @@ using namespace NEO; typedef Test SklDeviceCaps; -SKLTEST_F(SklDeviceCaps, givenSklThenDebuggerIsNotSupported) { - EXPECT_FALSE(pDevice->getHardwareInfo().capabilityTable.debuggerSupported); -} - SKLTEST_F(SklDeviceCaps, WhenCheckingProfilingTimerResolutionThenCorrectResolutionIsReturned) { const auto &caps = pDevice->getDeviceInfo(); EXPECT_EQ(83u, caps.outProfilingTimerResolution); diff --git a/opencl/test/unit_test/gen9/skl/windows/test_device_caps_skl_windows.cpp b/opencl/test/unit_test/gen9/skl/windows/test_device_caps_skl_windows.cpp index 5ba9747964..8d23bdee4b 100644 --- a/opencl/test/unit_test/gen9/skl/windows/test_device_caps_skl_windows.cpp +++ b/opencl/test/unit_test/gen9/skl/windows/test_device_caps_skl_windows.cpp @@ -16,10 +16,6 @@ using namespace NEO; typedef Test SklDeviceCapsWindows; -SKLTEST_F(SklDeviceCapsWindows, GivenSklWindowsThenDebuggerIsNotSupported) { - EXPECT_FALSE(pDevice->getHardwareInfo().capabilityTable.debuggerSupported); -} - SKLTEST_F(SklDeviceCapsWindows, GivenWhenGettingKmdNotifyPropertiesThenItIsDisabled) { EXPECT_FALSE(pDevice->getHardwareInfo().capabilityTable.kmdNotifyProperties.enableKmdNotify); EXPECT_EQ(0, pDevice->getHardwareInfo().capabilityTable.kmdNotifyProperties.delayKmdNotifyMicroseconds); diff --git a/opencl/test/unit_test/mocks/mock_context.cpp b/opencl/test/unit_test/mocks/mock_context.cpp index 67c26d98e0..433422edba 100644 --- a/opencl/test/unit_test/mocks/mock_context.cpp +++ b/opencl/test/unit_test/mocks/mock_context.cpp @@ -165,20 +165,6 @@ MockUnrestrictiveContext::MockUnrestrictiveContext() : MockContext(nullptr, null initializeWithDevices(ClDeviceVector{deviceIds, 3}, true); } -MockUnrestrictiveDebuggingSupportedContext::MockUnrestrictiveDebuggingSupportedContext() : MockContext(nullptr, nullptr) { - NEO::HardwareInfo hwInfo = *NEO::defaultHwInfo; - hwInfo.capabilityTable.debuggerSupported = true; - auto executionEnvironment = MockDevice::prepareExecutionEnvironment(&hwInfo, 0u); - - ultClDeviceFactory = std::make_unique(1, 2, static_cast(executionEnvironment)); - - pRootDevice = ultClDeviceFactory->rootDevices[0]; - pSubDevice0 = ultClDeviceFactory->subDevices[0]; - pSubDevice1 = ultClDeviceFactory->subDevices[1]; - cl_device_id deviceIds[] = {pRootDevice, pSubDevice0, pSubDevice1}; - initializeWithDevices(ClDeviceVector{deviceIds, 3}, true); -} - MockUnrestrictiveContextMultiGPU::MockUnrestrictiveContextMultiGPU() : MockContext(nullptr, nullptr) { pRootDevice0 = ultClDeviceFactory.rootDevices[0]; pSubDevice00 = ultClDeviceFactory.subDevices[0]; diff --git a/opencl/test/unit_test/mocks/mock_context.h b/opencl/test/unit_test/mocks/mock_context.h index 92925f0a32..28112d28e2 100644 --- a/opencl/test/unit_test/mocks/mock_context.h +++ b/opencl/test/unit_test/mocks/mock_context.h @@ -92,15 +92,6 @@ struct MockUnrestrictiveContext : MockContext { ClDevice *pSubDevice1 = nullptr; }; -struct MockUnrestrictiveDebuggingSupportedContext : MockContext { - MockUnrestrictiveDebuggingSupportedContext(); - - std::unique_ptr ultClDeviceFactory; - MockClDevice *pRootDevice; - ClDevice *pSubDevice0 = nullptr; - ClDevice *pSubDevice1 = nullptr; -}; - struct MockUnrestrictiveContextMultiGPU : MockContext { MockUnrestrictiveContextMultiGPU(); diff --git a/opencl/test/unit_test/program/program_data_tests.cpp b/opencl/test/unit_test/program/program_data_tests.cpp index afd1e83c32..bb13505cc0 100644 --- a/opencl/test/unit_test/program/program_data_tests.cpp +++ b/opencl/test/unit_test/program/program_data_tests.cpp @@ -18,7 +18,6 @@ #include "shared/test/common/mocks/mock_csr.h" #include "shared/test/common/mocks/mock_execution_environment.h" #include "shared/test/common/mocks/mock_memory_manager.h" -#include "shared/test/common/test_macros/hw_test.h" #include "shared/test/common/test_macros/test.h" #include "opencl/source/platform/platform.h" @@ -726,9 +725,7 @@ TEST(ProgramStringSectionTest, WhenConstStringBufferIsPresentThenUseItForLinking program.getKernelInfoArray(rootDeviceIndex).clear(); } -using ProgramImplicitArgsTest = ::testing::Test; - -TEST_F(ProgramImplicitArgsTest, givenImplicitRelocationAndStackCallsThenKernelRequiresImplicitArgs) { +TEST(ProgramImplicitArgsTest, givenImplicitRelocationAndStackCallsThenKernelRequiresImplicitArgs) { auto device = std::make_unique(MockDevice::createWithNewExecutionEnvironment(defaultHwInfo.get())); auto rootDeviceIndex = device->getRootDeviceIndex(); MockProgram program{nullptr, false, toClDeviceVector(*device)}; @@ -753,14 +750,13 @@ TEST_F(ProgramImplicitArgsTest, givenImplicitRelocationAndStackCallsThenKernelRe program.getKernelInfoArray(rootDeviceIndex).clear(); } -HWTEST2_F(ProgramImplicitArgsTest, givenImplicitRelocationAndEnabledDebuggerThenKernelRequiresImplicitArgs, HasSourceLevelDebuggerSupport) { +TEST(ProgramImplicitArgsTest, givenImplicitRelocationAndEnabledDebuggerThenKernelRequiresImplicitArgs) { + if (!defaultHwInfo->capabilityTable.debuggerSupported) { + GTEST_SKIP(); + } DebugManagerStateRestore restorer; DebugManager.flags.EnableMockSourceLevelDebugger.set(1); - - NEO::HardwareInfo hwInfo = *NEO::defaultHwInfo; - hwInfo.capabilityTable.debuggerSupported = true; - auto executionEnvironment = MockDevice::prepareExecutionEnvironment(&hwInfo, 0u); - auto device = std::make_unique(MockDevice::createWithExecutionEnvironment(&hwInfo, executionEnvironment, 0u)); + auto device = std::make_unique(MockDevice::createWithNewExecutionEnvironment(defaultHwInfo.get())); EXPECT_NE(nullptr, device->getDebugger()); auto rootDeviceIndex = device->getRootDeviceIndex(); @@ -786,7 +782,7 @@ HWTEST2_F(ProgramImplicitArgsTest, givenImplicitRelocationAndEnabledDebuggerThen program.getKernelInfoArray(rootDeviceIndex).clear(); } -TEST_F(ProgramImplicitArgsTest, givenImplicitRelocationAndNoStackCallsAndDisabledDebuggerThenKernelDoesntRequireImplicitArgs) { +TEST(ProgramImplicitArgsTest, givenImplicitRelocationAndNoStackCallsAndDisabledDebuggerThenKernelDoesntRequireImplicitArgs) { auto device = std::make_unique(MockDevice::createWithNewExecutionEnvironment(defaultHwInfo.get())); EXPECT_EQ(nullptr, device->getDebugger()); auto rootDeviceIndex = device->getRootDeviceIndex(); diff --git a/opencl/test/unit_test/program/program_with_kernel_debug_tests.cpp b/opencl/test/unit_test/program/program_with_kernel_debug_tests.cpp index e516a1c6a2..0d476288e5 100644 --- a/opencl/test/unit_test/program/program_with_kernel_debug_tests.cpp +++ b/opencl/test/unit_test/program/program_with_kernel_debug_tests.cpp @@ -93,6 +93,10 @@ class ProgramWithKernelDebuggingFixture { void setUp() { pDevice = static_cast(&mockContext.getDevice(0)->getDevice()); + if (!pDevice->getHardwareInfo().capabilityTable.debuggerSupported) { + GTEST_SKIP(); + } + std::string filename; std::string kernelOption(CompilerOptions::debugKernelEnable); KernelFilenameHelper::getKernelFilenameFromInternalOption(kernelOption, filename); @@ -102,21 +106,21 @@ class ProgramWithKernelDebuggingFixture { void tearDown() {} - MockUnrestrictiveDebuggingSupportedContext mockContext; + MockUnrestrictiveContext mockContext; std::unique_ptr program = nullptr; MockDevice *pDevice = nullptr; }; using ProgramWithKernelDebuggingTest = Test; -HWTEST2_F(ProgramWithKernelDebuggingTest, givenEnabledKernelDebugWhenProgramIsCompiledThenInternalOptionsIncludeDebugFlag, HasSourceLevelDebuggerSupport) { +TEST_F(ProgramWithKernelDebuggingTest, givenEnabledKernelDebugWhenProgramIsCompiledThenInternalOptionsIncludeDebugFlag) { cl_int retVal = program->compile(program->getDevices(), nullptr, 0, nullptr, nullptr); EXPECT_EQ(CL_SUCCESS, retVal); EXPECT_TRUE(CompilerOptions::contains(program->compilerInterface->buildInternalOptions, CompilerOptions::debugKernelEnable)); } -HWTEST2_F(ProgramWithKernelDebuggingTest, givenEnabledKernelDebugWhenProgramIsCompiledThenInternalOptionsIncludeDashGFlag, HasSourceLevelDebuggerSupport) { +TEST_F(ProgramWithKernelDebuggingTest, givenEnabledKernelDebugWhenProgramIsCompiledThenInternalOptionsIncludeDashGFlag) { cl_int retVal = program->compile(program->getDevices(), nullptr, 0, nullptr, nullptr); EXPECT_EQ(CL_SUCCESS, retVal); @@ -124,7 +128,7 @@ HWTEST2_F(ProgramWithKernelDebuggingTest, givenEnabledKernelDebugWhenProgramIsCo EXPECT_TRUE(hasSubstr(program->getOptions(), "-g")); } -HWTEST2_F(ProgramWithKernelDebuggingTest, givenEnabledKernelDebugAndOptDisabledWhenProgramIsCompiledThenOptionsIncludeClOptDisableFlag, HasSourceLevelDebuggerSupport) { +TEST_F(ProgramWithKernelDebuggingTest, givenEnabledKernelDebugAndOptDisabledWhenProgramIsCompiledThenOptionsIncludeClOptDisableFlag) { MockActiveSourceLevelDebugger *sourceLevelDebugger = new MockActiveSourceLevelDebugger; sourceLevelDebugger->isOptDisabled = true; pDevice->executionEnvironment->rootDeviceEnvironments[pDevice->getRootDeviceIndex()]->debugger.reset(sourceLevelDebugger); @@ -135,7 +139,7 @@ HWTEST2_F(ProgramWithKernelDebuggingTest, givenEnabledKernelDebugAndOptDisabledW EXPECT_TRUE(hasSubstr(program->getOptions(), CompilerOptions::optDisable.data())); } -HWTEST2_F(ProgramWithKernelDebuggingTest, GivenDebugVarDebuggerOptDisableZeroWhenOptDisableIsTrueFromDebuggerThenOptDisableIsNotAdded, HasSourceLevelDebuggerSupport) { +TEST_F(ProgramWithKernelDebuggingTest, GivenDebugVarDebuggerOptDisableZeroWhenOptDisableIsTrueFromDebuggerThenOptDisableIsNotAdded) { DebugManagerStateRestore dgbRestorer; NEO::DebugManager.flags.DebuggerOptDisable.set(0); @@ -149,7 +153,7 @@ HWTEST2_F(ProgramWithKernelDebuggingTest, GivenDebugVarDebuggerOptDisableZeroWhe EXPECT_FALSE(hasSubstr(program->getOptions(), CompilerOptions::optDisable.data())); } -HWTEST2_F(ProgramWithKernelDebuggingTest, GivenDebugVarDebuggerOptDisableOneWhenOptDisableIsFalseFromDebuggerThenOptDisableIsAdded, HasSourceLevelDebuggerSupport) { +TEST_F(ProgramWithKernelDebuggingTest, GivenDebugVarDebuggerOptDisableOneWhenOptDisableIsFalseFromDebuggerThenOptDisableIsAdded) { DebugManagerStateRestore dgbRestorer; NEO::DebugManager.flags.DebuggerOptDisable.set(1); @@ -163,7 +167,7 @@ HWTEST2_F(ProgramWithKernelDebuggingTest, GivenDebugVarDebuggerOptDisableOneWhen EXPECT_TRUE(hasSubstr(program->getOptions(), CompilerOptions::optDisable.data())); } -HWTEST2_F(ProgramWithKernelDebuggingTest, givenEnabledKernelDebugWhenProgramIsCompiledThenOptionsStartsWithDashSFilename, HasSourceLevelDebuggerSupport) { +TEST_F(ProgramWithKernelDebuggingTest, givenEnabledKernelDebugWhenProgramIsCompiledThenOptionsStartsWithDashSFilename) { MockActiveSourceLevelDebugger *sourceLevelDebugger = new MockActiveSourceLevelDebugger; sourceLevelDebugger->sourceCodeFilename = "debugFileName"; pDevice->executionEnvironment->rootDeviceEnvironments[pDevice->getRootDeviceIndex()]->debugger.reset(sourceLevelDebugger); @@ -174,7 +178,7 @@ HWTEST2_F(ProgramWithKernelDebuggingTest, givenEnabledKernelDebugWhenProgramIsCo EXPECT_TRUE(startsWith(program->getOptions(), "-s \"debugFileName\"")); } -HWTEST2_F(ProgramWithKernelDebuggingTest, givenEnabledKernelDebugWhenProgramIsCompiledWithCmCOptionThenDashSFilenameIsNotPrepended, HasSourceLevelDebuggerSupport) { +TEST_F(ProgramWithKernelDebuggingTest, givenEnabledKernelDebugWhenProgramIsCompiledWithCmCOptionThenDashSFilenameIsNotPrepended) { MockActiveSourceLevelDebugger *sourceLevelDebugger = new MockActiveSourceLevelDebugger; sourceLevelDebugger->sourceCodeFilename = "debugFileName"; pDevice->executionEnvironment->rootDeviceEnvironments[pDevice->getRootDeviceIndex()]->debugger.reset(sourceLevelDebugger); @@ -187,19 +191,19 @@ HWTEST2_F(ProgramWithKernelDebuggingTest, givenEnabledKernelDebugWhenProgramIsCo EXPECT_TRUE(hasSubstr(program->getOptions(), CompilerOptions::optDisable.data())); } -HWTEST2_F(ProgramWithKernelDebuggingTest, givenEnabledKernelDebugWhenProgramIsBuiltThenInternalOptionsIncludeDebugFlag, HasSourceLevelDebuggerSupport) { +TEST_F(ProgramWithKernelDebuggingTest, givenEnabledKernelDebugWhenProgramIsBuiltThenInternalOptionsIncludeDebugFlag) { cl_int retVal = program->build(program->getDevices(), nullptr, false); EXPECT_EQ(CL_SUCCESS, retVal); EXPECT_TRUE(CompilerOptions::contains(program->compilerInterface->buildInternalOptions, CompilerOptions::debugKernelEnable)); } -HWTEST2_F(ProgramWithKernelDebuggingTest, givenEnabledKernelDebugWhenProgramIsBuiltThenOptionsIncludeDashGFlag, HasSourceLevelDebuggerSupport) { +TEST_F(ProgramWithKernelDebuggingTest, givenEnabledKernelDebugWhenProgramIsBuiltThenOptionsIncludeDashGFlag) { cl_int retVal = program->build(program->getDevices(), nullptr, false); EXPECT_EQ(CL_SUCCESS, retVal); EXPECT_TRUE(hasSubstr(program->getOptions(), "-g")); } -HWTEST2_F(ProgramWithKernelDebuggingTest, givenEnabledKernelDebugAndOptDisabledWhenProgramIsBuiltThenOptionsIncludeClOptDisableFlag, HasSourceLevelDebuggerSupport) { +TEST_F(ProgramWithKernelDebuggingTest, givenEnabledKernelDebugAndOptDisabledWhenProgramIsBuiltThenOptionsIncludeClOptDisableFlag) { MockActiveSourceLevelDebugger *sourceLevelDebugger = new MockActiveSourceLevelDebugger; sourceLevelDebugger->isOptDisabled = true; pDevice->executionEnvironment->rootDeviceEnvironments[pDevice->getRootDeviceIndex()]->debugger.reset(sourceLevelDebugger); @@ -209,7 +213,7 @@ HWTEST2_F(ProgramWithKernelDebuggingTest, givenEnabledKernelDebugAndOptDisabledW EXPECT_TRUE(hasSubstr(program->getOptions(), CompilerOptions::optDisable.data())); } -HWTEST2_F(ProgramWithKernelDebuggingTest, givenEnabledKernelDebugWhenProgramIsBuiltThenOptionsStartsWithDashSFilename, HasSourceLevelDebuggerSupport) { +TEST_F(ProgramWithKernelDebuggingTest, givenEnabledKernelDebugWhenProgramIsBuiltThenOptionsStartsWithDashSFilename) { MockActiveSourceLevelDebugger *sourceLevelDebugger = new MockActiveSourceLevelDebugger; sourceLevelDebugger->sourceCodeFilename = "debugFileName"; pDevice->executionEnvironment->rootDeviceEnvironments[pDevice->getRootDeviceIndex()]->debugger.reset(sourceLevelDebugger); @@ -219,7 +223,7 @@ HWTEST2_F(ProgramWithKernelDebuggingTest, givenEnabledKernelDebugWhenProgramIsBu EXPECT_TRUE(startsWith(program->getOptions(), "-s \"debugFileName\"")); } -HWTEST2_F(ProgramWithKernelDebuggingTest, givenEnabledKernelDebugWhenProgramIsBuiltWithCmCOptionThenDashSFilenameIsNotPrepended, HasSourceLevelDebuggerSupport) { +TEST_F(ProgramWithKernelDebuggingTest, givenEnabledKernelDebugWhenProgramIsBuiltWithCmCOptionThenDashSFilenameIsNotPrepended) { MockActiveSourceLevelDebugger *sourceLevelDebugger = new MockActiveSourceLevelDebugger; sourceLevelDebugger->sourceCodeFilename = "debugFileName"; pDevice->executionEnvironment->rootDeviceEnvironments[pDevice->getRootDeviceIndex()]->debugger.reset(sourceLevelDebugger); @@ -230,7 +234,7 @@ HWTEST2_F(ProgramWithKernelDebuggingTest, givenEnabledKernelDebugWhenProgramIsBu EXPECT_FALSE(startsWith(program->getOptions(), "-s debugFileName")); } -HWTEST2_F(ProgramWithKernelDebuggingTest, givenEnabledKernelDebugWhenProgramIsLinkedThenKernelDebugOptionsAreAppended, HasSourceLevelDebuggerSupport) { +TEST_F(ProgramWithKernelDebuggingTest, givenEnabledKernelDebugWhenProgramIsLinkedThenKernelDebugOptionsAreAppended) { MockActiveSourceLevelDebugger *sourceLevelDebugger = new MockActiveSourceLevelDebugger; pDevice->executionEnvironment->rootDeviceEnvironments[pDevice->getRootDeviceIndex()]->debugger.reset(sourceLevelDebugger); @@ -249,7 +253,7 @@ HWTEST2_F(ProgramWithKernelDebuggingTest, givenEnabledKernelDebugWhenProgramIsLi EXPECT_EQ(static_cast(mockContext.getRootDeviceIndices().size()), newProgram->appendKernelDebugOptionsCalled); } -HWTEST2_F(ProgramWithKernelDebuggingTest, givenEnabledKernelDebugWhenProgramIsBuiltThenDebuggerIsNotifiedWithKernelDebugData, HasSourceLevelDebuggerSupport) { +TEST_F(ProgramWithKernelDebuggingTest, givenEnabledKernelDebugWhenProgramIsBuiltThenDebuggerIsNotifiedWithKernelDebugData) { const size_t rootDeviceIndicesSize = mockContext.getRootDeviceIndices().size(); std::vector sourceLevelDebugger(rootDeviceIndicesSize, nullptr); size_t i = 0; @@ -275,7 +279,7 @@ HWTEST2_F(ProgramWithKernelDebuggingTest, givenEnabledKernelDebugWhenProgramIsBu } } -HWTEST2_F(ProgramWithKernelDebuggingTest, givenEnabledKernelDebugWhenProgramIsLinkedThenDebuggerIsNotifiedWithKernelDebugData, HasSourceLevelDebuggerSupport) { +TEST_F(ProgramWithKernelDebuggingTest, givenEnabledKernelDebugWhenProgramIsLinkedThenDebuggerIsNotifiedWithKernelDebugData) { const size_t rootDeviceIndicesSize = mockContext.getRootDeviceIndices().size(); std::vector sourceLevelDebugger(rootDeviceIndicesSize, nullptr); size_t i = 0; @@ -307,7 +311,7 @@ HWTEST2_F(ProgramWithKernelDebuggingTest, givenEnabledKernelDebugWhenProgramIsLi } } -HWTEST2_F(ProgramWithKernelDebuggingTest, givenGtpinInitializedWhenCreatingProgramFromBinaryThenDebugDataIsAvailable, HasSourceLevelDebuggerSupport) { +TEST_F(ProgramWithKernelDebuggingTest, givenGtpinInitializedWhenCreatingProgramFromBinaryThenDebugDataIsAvailable) { bool gtpinInitializedBackup = NEO::isGTPinInitialized; NEO::isGTPinInitialized = true; auto retVal = program->build(program->getDevices(), CompilerOptions::debugKernelEnable.data(), false); @@ -318,7 +322,7 @@ HWTEST2_F(ProgramWithKernelDebuggingTest, givenGtpinInitializedWhenCreatingProgr NEO::isGTPinInitialized = gtpinInitializedBackup; } -HWTEST2_F(ProgramWithKernelDebuggingTest, givenGtpinNotInitializedWhenCreatingProgramFromBinaryThenDebugDataINullptr, HasSourceLevelDebuggerSupport) { +TEST_F(ProgramWithKernelDebuggingTest, givenGtpinNotInitializedWhenCreatingProgramFromBinaryThenDebugDataINullptr) { bool gtpinInitializedBackup = NEO::isGTPinInitialized; NEO::isGTPinInitialized = false; program->kernelDebugEnabled = false; @@ -330,7 +334,7 @@ HWTEST2_F(ProgramWithKernelDebuggingTest, givenGtpinNotInitializedWhenCreatingPr NEO::isGTPinInitialized = gtpinInitializedBackup; } -HWTEST2_F(ProgramWithKernelDebuggingTest, givenKernelDebugEnabledWhenProgramIsBuiltThenDebugDataIsStored, HasSourceLevelDebuggerSupport) { +TEST_F(ProgramWithKernelDebuggingTest, givenKernelDebugEnabledWhenProgramIsBuiltThenDebugDataIsStored) { auto retVal = program->build(program->getDevices(), nullptr, false); EXPECT_EQ(CL_SUCCESS, retVal); @@ -339,7 +343,7 @@ HWTEST2_F(ProgramWithKernelDebuggingTest, givenKernelDebugEnabledWhenProgramIsBu EXPECT_NE(0u, program->getDebugDataSize(pDevice->getRootDeviceIndex())); } -HWTEST2_F(ProgramWithKernelDebuggingTest, givenProgramWithKernelDebugEnabledWhenProcessDebugDataIsCalledThenKernelInfosAreFilledWithDebugData, HasSourceLevelDebuggerSupport) { +TEST_F(ProgramWithKernelDebuggingTest, givenProgramWithKernelDebugEnabledWhenProcessDebugDataIsCalledThenKernelInfosAreFilledWithDebugData) { iOpenCL::SProgramDebugDataHeaderIGC debugDataHeader{}; debugDataHeader.NumberOfKernels = 1u; @@ -377,7 +381,7 @@ HWTEST2_F(ProgramWithKernelDebuggingTest, givenProgramWithKernelDebugEnabledWhen EXPECT_NE(nullptr, receivedKernelInfo->debugData.vIsa); } -HWTEST2_F(ProgramWithKernelDebuggingTest, givenProgramWithNonZebinaryFormatAndKernelDebugEnabledWhenProgramIsBuiltThenProcessDebugDataIsCalledAndDebuggerNotified, HasSourceLevelDebuggerSupport) { +TEST_F(ProgramWithKernelDebuggingTest, givenProgramWithNonZebinaryFormatAndKernelDebugEnabledWhenProgramIsBuiltThenProcessDebugDataIsCalledAndDebuggerNotified) { MockSourceLevelDebugger *sourceLevelDebugger = new MockSourceLevelDebugger; pDevice->executionEnvironment->rootDeviceEnvironments[pDevice->getRootDeviceIndex()]->debugger.reset(sourceLevelDebugger); program->enableKernelDebug(); diff --git a/opencl/test/unit_test/source_level_debugger/source_level_debugger_tests.cpp b/opencl/test/unit_test/source_level_debugger/source_level_debugger_tests.cpp index ce6746795b..1a7c9efe2d 100644 --- a/opencl/test/unit_test/source_level_debugger/source_level_debugger_tests.cpp +++ b/opencl/test/unit_test/source_level_debugger/source_level_debugger_tests.cpp @@ -32,15 +32,6 @@ using namespace NEO; using std::string; using std::unique_ptr; -class SourceLevelDebuggerSupportedFixture : public ::testing::Test { - public: - void SetUp() override { - hwInfo.capabilityTable.debuggerSupported = true; - } - - NEO::HardwareInfo hwInfo = *NEO::defaultHwInfo; -}; - class DebuggerLibraryRestorer { public: DebuggerLibraryRestorer() { @@ -64,47 +55,54 @@ TEST(SourceLevelDebugger, whenSourceLevelDebuggerIsCreatedThenLegacyModeIsTrue) EXPECT_TRUE(debugger.isLegacy()); } -HWTEST2_F(SourceLevelDebuggerSupportedFixture, givenPlatformWhenItIsCreatedThenSourceLevelDebuggerIsCreatedInExecutionEnvironment, HasSourceLevelDebuggerSupport) { +TEST(SourceLevelDebugger, givenPlatformWhenItIsCreatedThenSourceLevelDebuggerIsCreatedInExecutionEnvironment) { DebuggerLibraryRestorer restorer; - DebuggerLibrary::setLibraryAvailable(true); - DebuggerLibrary::setDebuggerActive(true); - auto executionEnvironment = MockDevice::prepareExecutionEnvironment(&hwInfo, 0u); - MockPlatform platform(*executionEnvironment); - platform.initializeWithNewDevices(); + if (defaultHwInfo->capabilityTable.debuggerSupported) { + DebuggerLibrary::setLibraryAvailable(true); + DebuggerLibrary::setDebuggerActive(true); + auto executionEnvironment = new ExecutionEnvironment(); + MockPlatform platform(*executionEnvironment); + platform.initializeWithNewDevices(); - EXPECT_NE(nullptr, executionEnvironment->rootDeviceEnvironments[0]->debugger); + EXPECT_NE(nullptr, executionEnvironment->rootDeviceEnvironments[0]->debugger); + } } -HWTEST2_F(SourceLevelDebuggerSupportedFixture, givenPlatformWhenSourceLevelDebuggerIsCreatedThenRuntimeCapabilityHasFusedEusDisabled, HasSourceLevelDebuggerSupport) { +TEST(SourceLevelDebugger, givenPlatformWhenSourceLevelDebuggerIsCreatedThenRuntimeCapabilityHasFusedEusDisabled) { DebuggerLibraryRestorer restorer; - DebuggerLibrary::setLibraryAvailable(true); - DebuggerLibrary::setDebuggerActive(true); - auto executionEnvironment = MockDevice::prepareExecutionEnvironment(&hwInfo, 0u); - MockPlatform platform(*executionEnvironment); - platform.initializeWithNewDevices(); + if (defaultHwInfo->capabilityTable.debuggerSupported) { + DebuggerLibrary::setLibraryAvailable(true); + DebuggerLibrary::setDebuggerActive(true); + auto executionEnvironment = new ExecutionEnvironment(); + MockPlatform platform(*executionEnvironment); + platform.initializeWithNewDevices(); - ASSERT_NE(nullptr, executionEnvironment->rootDeviceEnvironments[0]->debugger); - EXPECT_FALSE(executionEnvironment->rootDeviceEnvironments[0]->getHardwareInfo()->capabilityTable.fusedEuEnabled); + ASSERT_NE(nullptr, executionEnvironment->rootDeviceEnvironments[0]->debugger); + + EXPECT_FALSE(executionEnvironment->rootDeviceEnvironments[0]->getHardwareInfo()->capabilityTable.fusedEuEnabled); + } } -HWTEST2_F(SourceLevelDebuggerSupportedFixture, givenPlatformWhenInitializingSourceLevelDebuggerFailsThenRuntimeCapabilityFusedEusAreNotModified, HasSourceLevelDebuggerSupport) { +TEST(SourceLevelDebugger, givenPlatformWhenInitializingSourceLevelDebuggerFailsThenRuntimeCapabilityFusedEusAreNotModified) { DebuggerLibraryRestorer restorer; - DebuggerLibraryInterceptor interceptor; - DebuggerLibrary::setLibraryAvailable(true); - DebuggerLibrary::setDebuggerActive(true); - interceptor.initRetVal = -1; - DebuggerLibrary::injectDebuggerLibraryInterceptor(&interceptor); - auto executionEnvironment = MockDevice::prepareExecutionEnvironment(&hwInfo, 0u); - MockPlatform platform(*executionEnvironment); - platform.initializeWithNewDevices(); + if (defaultHwInfo->capabilityTable.debuggerSupported) { + DebuggerLibraryInterceptor interceptor; + DebuggerLibrary::setLibraryAvailable(true); + DebuggerLibrary::setDebuggerActive(true); + interceptor.initRetVal = -1; + DebuggerLibrary::injectDebuggerLibraryInterceptor(&interceptor); + auto executionEnvironment = new ExecutionEnvironment(); + MockPlatform platform(*executionEnvironment); + platform.initializeWithNewDevices(); - bool defaultValue = hwInfo.capabilityTable.fusedEuEnabled; + bool defaultValue = defaultHwInfo->capabilityTable.fusedEuEnabled; - ASSERT_NE(nullptr, executionEnvironment->rootDeviceEnvironments[0]->debugger); - EXPECT_EQ(defaultValue, executionEnvironment->rootDeviceEnvironments[0]->getHardwareInfo()->capabilityTable.fusedEuEnabled); + ASSERT_NE(nullptr, executionEnvironment->rootDeviceEnvironments[0]->debugger); + EXPECT_EQ(defaultValue, executionEnvironment->rootDeviceEnvironments[0]->getHardwareInfo()->capabilityTable.fusedEuEnabled); + } } TEST(SourceLevelDebugger, givenNoKernelDebuggerLibraryWhenSourceLevelDebuggerIsCreatedThenLibraryIsNotLoaded) { @@ -550,63 +548,65 @@ TEST(SourceLevelDebugger, givenKernelDebuggerLibraryNotActiveWhenInitializeIsCal EXPECT_FALSE(interceptor.initCalled); } -HWTEST2_F(SourceLevelDebuggerSupportedFixture, givenKernelDebuggerLibraryActiveWhenDeviceIsConstructedThenDebuggerIsInitialized, HasSourceLevelDebuggerSupport) { +TEST(SourceLevelDebugger, givenKernelDebuggerLibraryActiveWhenDeviceIsConstructedThenDebuggerIsInitialized) { DebuggerLibraryRestorer restorer; - DebuggerLibraryInterceptor interceptor; - DebuggerLibrary::setLibraryAvailable(true); - DebuggerLibrary::setDebuggerActive(true); - DebuggerLibrary::injectDebuggerLibraryInterceptor(&interceptor); + if (defaultHwInfo->capabilityTable.debuggerSupported) { + DebuggerLibraryInterceptor interceptor; + DebuggerLibrary::setLibraryAvailable(true); + DebuggerLibrary::setDebuggerActive(true); + DebuggerLibrary::injectDebuggerLibraryInterceptor(&interceptor); - auto executionEnvironment = MockDevice::prepareExecutionEnvironment(&hwInfo, 0u); - auto device = std::make_unique(MockDevice::createWithExecutionEnvironment(&hwInfo, executionEnvironment, 0u)); - EXPECT_TRUE(interceptor.initCalled); + auto device = std::make_unique(MockDevice::createWithNewExecutionEnvironment(nullptr)); + EXPECT_TRUE(interceptor.initCalled); + } } -HWTEST2_F(SourceLevelDebuggerSupportedFixture, givenKernelDebuggerLibraryActiveWhenDeviceImplIsCreatedThenDebuggerIsNotified, HasSourceLevelDebuggerSupport) { +TEST(SourceLevelDebugger, givenKernelDebuggerLibraryActiveWhenDeviceImplIsCreatedThenDebuggerIsNotified) { DebuggerLibraryRestorer restorer; - DebuggerLibraryInterceptor interceptor; - DebuggerLibrary::setLibraryAvailable(true); - DebuggerLibrary::setDebuggerActive(true); - DebuggerLibrary::injectDebuggerLibraryInterceptor(&interceptor); + if (defaultHwInfo->capabilityTable.debuggerSupported) { + DebuggerLibraryInterceptor interceptor; + DebuggerLibrary::setLibraryAvailable(true); + DebuggerLibrary::setDebuggerActive(true); + DebuggerLibrary::injectDebuggerLibraryInterceptor(&interceptor); - auto executionEnvironment = MockDevice::prepareExecutionEnvironment(&hwInfo, 0u); - unique_ptr device(MockDevice::createWithExecutionEnvironment(&hwInfo, executionEnvironment, 0u)); - unique_ptr pClDevice(new MockClDevice{device.get()}); - EXPECT_TRUE(interceptor.newDeviceCalled); - uint32_t deviceHandleExpected = device->getGpgpuCommandStreamReceiver().getOSInterface() != nullptr ? device->getGpgpuCommandStreamReceiver().getOSInterface()->getDriverModel()->getDeviceHandle() : 0; - EXPECT_EQ(reinterpret_cast(static_cast(deviceHandleExpected)), interceptor.newDeviceArgIn.dh); - pClDevice.reset(); - device.release(); + unique_ptr device(MockDevice::createWithNewExecutionEnvironment(defaultHwInfo.get())); + unique_ptr pClDevice(new MockClDevice{device.get()}); + EXPECT_TRUE(interceptor.newDeviceCalled); + uint32_t deviceHandleExpected = device->getGpgpuCommandStreamReceiver().getOSInterface() != nullptr ? device->getGpgpuCommandStreamReceiver().getOSInterface()->getDriverModel()->getDeviceHandle() : 0; + EXPECT_EQ(reinterpret_cast(static_cast(deviceHandleExpected)), interceptor.newDeviceArgIn.dh); + pClDevice.reset(); + device.release(); + } } -HWTEST2_F(SourceLevelDebuggerSupportedFixture, givenKernelDebuggerLibraryActiveWhenDeviceImplIsCreatedWithOsCsrThenDebuggerIsNotifiedWithCorrectDeviceHandle, HasSourceLevelDebuggerSupport) { +TEST(SourceLevelDebugger, givenKernelDebuggerLibraryActiveWhenDeviceImplIsCreatedWithOsCsrThenDebuggerIsNotifiedWithCorrectDeviceHandle) { DebuggerLibraryRestorer restorer; - DebuggerLibraryInterceptor interceptor; - DebuggerLibrary::setLibraryAvailable(true); - DebuggerLibrary::setDebuggerActive(true); - DebuggerLibrary::injectDebuggerLibraryInterceptor(&interceptor); + if (defaultHwInfo->capabilityTable.debuggerSupported) { + DebuggerLibraryInterceptor interceptor; + DebuggerLibrary::setLibraryAvailable(true); + DebuggerLibrary::setDebuggerActive(true); + DebuggerLibrary::injectDebuggerLibraryInterceptor(&interceptor); - VariableBackup backup(&ultHwConfig); - ultHwConfig.useHwCsr = true; + VariableBackup backup(&ultHwConfig); + ultHwConfig.useHwCsr = true; - HardwareInfo *hwInfo = nullptr; - ExecutionEnvironment *executionEnvironment = getExecutionEnvironmentImpl(hwInfo, 1); + HardwareInfo *hwInfo = nullptr; + ExecutionEnvironment *executionEnvironment = getExecutionEnvironmentImpl(hwInfo, 1); - hwInfo->capabilityTable.debuggerSupported = true; - hwInfo->capabilityTable.instrumentationEnabled = true; + hwInfo->capabilityTable.instrumentationEnabled = true; + unique_ptr device(Device::create(executionEnvironment, 0)); + unique_ptr pClDevice(new MockClDevice{device.get()}); - unique_ptr device(Device::create(executionEnvironment, 0)); - unique_ptr pClDevice(new MockClDevice{device.get()}); + ASSERT_NE(nullptr, device->getGpgpuCommandStreamReceiver().getOSInterface()); - ASSERT_NE(nullptr, device->getGpgpuCommandStreamReceiver().getOSInterface()); - - EXPECT_TRUE(interceptor.newDeviceCalled); - uint32_t deviceHandleExpected = device->getGpgpuCommandStreamReceiver().getOSInterface()->getDriverModel()->getDeviceHandle(); - EXPECT_EQ(reinterpret_cast(static_cast(deviceHandleExpected)), interceptor.newDeviceArgIn.dh); - device.release(); + EXPECT_TRUE(interceptor.newDeviceCalled); + uint32_t deviceHandleExpected = device->getGpgpuCommandStreamReceiver().getOSInterface()->getDriverModel()->getDeviceHandle(); + EXPECT_EQ(reinterpret_cast(static_cast(deviceHandleExpected)), interceptor.newDeviceArgIn.dh); + device.release(); + } } TEST(SourceLevelDebugger, givenKernelDebuggerLibraryNotActiveWhenDeviceIsCreatedThenDebuggerIsNotCreatedInitializedAndNotNotified) { @@ -624,19 +624,6 @@ TEST(SourceLevelDebugger, givenKernelDebuggerLibraryNotActiveWhenDeviceIsCreated EXPECT_FALSE(interceptor.newDeviceCalled); } -TEST(SourceLevelDebugger, givenDefaultStateWhenDeviceIsCreatedThenLoadDebuggerLibraryIsNotCalled) { - DebuggerLibraryRestorer restorer; - - DebuggerLibraryInterceptor interceptor; - DebuggerLibrary::setLibraryAvailable(true); - DebuggerLibrary::setDebuggerActive(false); - DebuggerLibrary::injectDebuggerLibraryInterceptor(&interceptor); - - auto device = std::make_unique(MockDevice::createWithNewExecutionEnvironment(nullptr)); - - EXPECT_FALSE(interceptor.loadCalled); -} - TEST(SourceLevelDebugger, givenKernelDebuggerLibraryNotActiveWhenGettingSourceLevelDebuggerThenNullptrIsReturned) { DebuggerLibraryRestorer restorer; @@ -666,46 +653,50 @@ TEST(SourceLevelDebugger, givenDeviceWithDebuggerActiveSetWhenSourceLevelDebugge EXPECT_FALSE(interceptor.deviceDestructionCalled); } -HWTEST2_F(SourceLevelDebuggerSupportedFixture, givenTwoRootDevicesWhenSecondIsCreatedThenCreatingNewSourceLevelDebugger, HasSourceLevelDebuggerSupport) { +TEST(SourceLevelDebugger, givenTwoRootDevicesWhenSecondIsCreatedThenCreatingNewSourceLevelDebugger) { DebuggerLibraryRestorer restorer; - DebuggerLibraryInterceptor interceptor; - DebuggerLibrary::setLibraryAvailable(true); - DebuggerLibrary::setDebuggerActive(true); - DebuggerLibrary::injectDebuggerLibraryInterceptor(&interceptor); + if (defaultHwInfo->capabilityTable.debuggerSupported) { + DebuggerLibraryInterceptor interceptor; + DebuggerLibrary::setLibraryAvailable(true); + DebuggerLibrary::setDebuggerActive(true); + DebuggerLibrary::injectDebuggerLibraryInterceptor(&interceptor); - ExecutionEnvironment *executionEnvironment = platform()->peekExecutionEnvironment(); - executionEnvironment->prepareRootDeviceEnvironments(2); - for (auto i = 0u; i < executionEnvironment->rootDeviceEnvironments.size(); i++) { - executionEnvironment->rootDeviceEnvironments[i]->setHwInfoAndInitHelpers(&hwInfo); - executionEnvironment->rootDeviceEnvironments[i]->initGmm(); + ExecutionEnvironment *executionEnvironment = platform()->peekExecutionEnvironment(); + executionEnvironment->prepareRootDeviceEnvironments(2); + for (auto i = 0u; i < executionEnvironment->rootDeviceEnvironments.size(); i++) { + executionEnvironment->rootDeviceEnvironments[i]->setHwInfoAndInitHelpers(defaultHwInfo.get()); + executionEnvironment->rootDeviceEnvironments[i]->initGmm(); + } + auto device1 = std::make_unique(Device::create(executionEnvironment, 0u)); + EXPECT_NE(nullptr, executionEnvironment->memoryManager); + EXPECT_TRUE(interceptor.initCalled); + + interceptor.initCalled = false; + auto device2 = std::make_unique(Device::create(executionEnvironment, 1u)); + EXPECT_NE(nullptr, executionEnvironment->memoryManager); + EXPECT_TRUE(interceptor.initCalled); } - auto device1 = std::make_unique(Device::create(executionEnvironment, 0u)); - EXPECT_NE(nullptr, executionEnvironment->memoryManager); - EXPECT_TRUE(interceptor.initCalled); - - interceptor.initCalled = false; - auto device2 = std::make_unique(Device::create(executionEnvironment, 1u)); - EXPECT_NE(nullptr, executionEnvironment->memoryManager); - EXPECT_TRUE(interceptor.initCalled); } -HWTEST2_F(SourceLevelDebuggerSupportedFixture, givenMultipleRootDevicesWhenCreatedThenUseDedicatedSourceLevelDebugger, HasSourceLevelDebuggerSupport) { +TEST(SourceLevelDebugger, givenMultipleRootDevicesWhenCreatedThenUseDedicatedSourceLevelDebugger) { DebuggerLibraryRestorer restorer; - DebuggerLibrary::setLibraryAvailable(true); - DebuggerLibrary::setDebuggerActive(true); + if (defaultHwInfo->capabilityTable.debuggerSupported) { + DebuggerLibrary::setLibraryAvailable(true); + DebuggerLibrary::setDebuggerActive(true); - ExecutionEnvironment *executionEnvironment = platform()->peekExecutionEnvironment(); - executionEnvironment->prepareRootDeviceEnvironments(2); - for (auto i = 0u; i < executionEnvironment->rootDeviceEnvironments.size(); i++) { - executionEnvironment->rootDeviceEnvironments[i]->setHwInfoAndInitHelpers(&hwInfo); - executionEnvironment->rootDeviceEnvironments[i]->initGmm(); + ExecutionEnvironment *executionEnvironment = platform()->peekExecutionEnvironment(); + executionEnvironment->prepareRootDeviceEnvironments(2); + for (auto i = 0u; i < executionEnvironment->rootDeviceEnvironments.size(); i++) { + executionEnvironment->rootDeviceEnvironments[i]->setHwInfoAndInitHelpers(defaultHwInfo.get()); + executionEnvironment->rootDeviceEnvironments[i]->initGmm(); + } + auto device1 = std::make_unique(Device::create(executionEnvironment, 0u)); + auto sourceLevelDebugger = device1->getDebugger(); + auto device2 = std::make_unique(Device::create(executionEnvironment, 1u)); + EXPECT_NE(sourceLevelDebugger, device2->getDebugger()); } - auto device1 = std::make_unique(Device::create(executionEnvironment, 0u)); - auto sourceLevelDebugger = device1->getDebugger(); - auto device2 = std::make_unique(Device::create(executionEnvironment, 1u)); - EXPECT_NE(sourceLevelDebugger, device2->getDebugger()); } TEST(SourceLevelDebugger, whenCaptureSBACalledThenNoCommandsAreAddedToStream) { @@ -727,13 +718,16 @@ TEST(SourceLevelDebugger, whenGetSbaTrackingCommandsSizeQueriedThenZeroIsReturne EXPECT_EQ(0u, size); } -HWTEST2_F(SourceLevelDebuggerSupportedFixture, givenEnableMockSourceLevelDebuggerWhenInitializingExecEnvThenActiveDebuggerWithEmptyInterfaceIsCreated, HasSourceLevelDebuggerSupport) { +TEST(SourceLevelDebugger, givenEnableMockSourceLevelDebuggerWhenInitializingExecEnvThenActiveDebuggerWithEmptyInterfaceIsCreated) { + if (!defaultHwInfo->capabilityTable.debuggerSupported) { + GTEST_SKIP_("Source Level Debugger not supported"); + } DebugManagerStateRestore stateRestore; DebuggerLibraryRestorer restorer; DebuggerLibrary::setLibraryAvailable(false); DebugManager.flags.EnableMockSourceLevelDebugger.set(1); - auto executionEnvironment = MockDevice::prepareExecutionEnvironment(&hwInfo, 0u); + auto executionEnvironment = new ExecutionEnvironment(); MockPlatform platform(*executionEnvironment); platform.initializeWithNewDevices(); @@ -772,7 +766,10 @@ HWTEST2_F(SourceLevelDebuggerSupportedFixture, givenEnableMockSourceLevelDebugge EXPECT_TRUE(debugger->notifyDeviceDestruction()); } -HWTEST2_F(SourceLevelDebuggerSupportedFixture, givenMode1InEnableMockSourceLevelDebuggerWhenDebuggerCreatedThenIsOptimizationDisabledReturnsTrue, HasSourceLevelDebuggerSupport) { +TEST(SourceLevelDebugger, givenMode1InEnableMockSourceLevelDebuggerWhenDebuggerCreatedThenIsOptimizationDisabledReturnsTrue) { + if (!defaultHwInfo->capabilityTable.debuggerSupported) { + GTEST_SKIP_("Source Level Debugger not supported"); + } DebugManagerStateRestore stateRestore; DebuggerLibraryRestorer restorer; DebuggerLibrary::setLibraryAvailable(false); @@ -783,7 +780,10 @@ HWTEST2_F(SourceLevelDebuggerSupportedFixture, givenMode1InEnableMockSourceLevel EXPECT_TRUE(sld->isOptimizationDisabled()); } -HWTEST2_F(SourceLevelDebuggerSupportedFixture, givenMode2InEnableMockSourceLevelDebuggerWhenDebuggerCreatedThenIsOptimizationDisabledReturnsFalse, HasSourceLevelDebuggerSupport) { +TEST(SourceLevelDebugger, givenMode2InEnableMockSourceLevelDebuggerWhenDebuggerCreatedThenIsOptimizationDisabledReturnsFalse) { + if (!defaultHwInfo->capabilityTable.debuggerSupported) { + GTEST_SKIP_("Source Level Debugger not supported"); + } DebugManagerStateRestore stateRestore; DebuggerLibraryRestorer restorer; DebuggerLibrary::setLibraryAvailable(false); @@ -904,11 +904,7 @@ HWTEST2_F(LegacyDebuggerTest, givenNotXeHpOrXeHpgCoreAndDebugIsActiveThenDisable HWTEST2_F(LegacyDebuggerTest, givenXeHpOrXeHpgCoreAndDebugIsActiveThenDisableL3CacheInGmmHelperIsSet, IsXeHpOrXeHpgCore) { DebugManagerStateRestore stateRestore; DebugManager.flags.EnableMockSourceLevelDebugger.set(1); - - auto hwInfo = *NEO::defaultHwInfo; - hwInfo.capabilityTable.debuggerSupported = true; - auto executionEnvironment = MockDevice::prepareExecutionEnvironment(&hwInfo, 0u); - + auto executionEnvironment = new ExecutionEnvironment(); MockPlatform platform(*executionEnvironment); platform.initializeWithNewDevices(); diff --git a/opencl/test/unit_test/xe_hp_core/test_device_caps_xe_hp_core.cpp b/opencl/test/unit_test/xe_hp_core/test_device_caps_xe_hp_core.cpp index 2b498fa05c..ad13ae74eb 100644 --- a/opencl/test/unit_test/xe_hp_core/test_device_caps_xe_hp_core.cpp +++ b/opencl/test/unit_test/xe_hp_core/test_device_caps_xe_hp_core.cpp @@ -30,10 +30,6 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, XE_HP_COREDeviceCaps, givenKernelThatDoesStatelessW EXPECT_EQ(statelessWritesEmitted, mockKernel.mockKernel->areStatelessWritesUsed()); } -XE_HP_CORE_TEST_F(XE_HP_COREDeviceCaps, givenXE_HP_COREThenDebuggerIsNotSupported) { - EXPECT_FALSE(pDevice->getHardwareInfo().capabilityTable.debuggerSupported); -} - XE_HP_CORE_TEST_F(XE_HP_COREDeviceCaps, givenXE_HP_COREWhenCheckFtrSupportsInteger64BitAtomicsThenReturnTrue) { EXPECT_TRUE(pDevice->getHardwareInfo().capabilityTable.ftrSupportsInteger64BitAtomics); } diff --git a/opencl/test/unit_test/xe_hp_core/xehp/test_device_caps_xehp.inl b/opencl/test/unit_test/xe_hp_core/xehp/test_device_caps_xehp.inl index 2efbc89844..d3326155b8 100644 --- a/opencl/test/unit_test/xe_hp_core/xehp/test_device_caps_xehp.inl +++ b/opencl/test/unit_test/xe_hp_core/xehp/test_device_caps_xehp.inl @@ -16,10 +16,6 @@ using namespace NEO; typedef Test XeHPUsDeviceIdTest; -XEHPTEST_F(XeHPUsDeviceIdTest, givenXeHPThenDebuggerIsNotSupported) { - EXPECT_FALSE(pDevice->getHardwareInfo().capabilityTable.debuggerSupported); -} - XEHPTEST_F(XeHPUsDeviceIdTest, WhenGettingHardwareInfoThenProductFamilyIsXeHpSdv) { EXPECT_EQ(IGFX_XE_HP_SDV, pDevice->getHardwareInfo().platform.eProductFamily); } diff --git a/shared/source/gen11/hw_info_ehl.cpp b/shared/source/gen11/hw_info_ehl.cpp index 92e00ba761..396461c381 100644 --- a/shared/source/gen11/hw_info_ehl.cpp +++ b/shared/source/gen11/hw_info_ehl.cpp @@ -62,7 +62,7 @@ const RuntimeCapabilityTable EHL::capabilityTable{ false, // ftrRenderCompressedImages true, // ftr64KBpages true, // instrumentationEnabled - false, // sourceLevelDebuggerSupported + true, // sourceLevelDebuggerSupported false, // supportsVme false, // supportCacheFlushAfterWalker true, // supportsImages diff --git a/shared/source/gen11/hw_info_icllp.cpp b/shared/source/gen11/hw_info_icllp.cpp index 54048cbe2d..8085ed8367 100644 --- a/shared/source/gen11/hw_info_icllp.cpp +++ b/shared/source/gen11/hw_info_icllp.cpp @@ -62,7 +62,7 @@ const RuntimeCapabilityTable ICLLP::capabilityTable{ false, // ftrRenderCompressedImages false, // ftr64KBpages true, // instrumentationEnabled - false, // sourceLevelDebuggerSupported + true, // sourceLevelDebuggerSupported true, // supportsVme false, // supportCacheFlushAfterWalker true, // supportsImages diff --git a/shared/source/gen11/hw_info_lkf.cpp b/shared/source/gen11/hw_info_lkf.cpp index 277b4afd41..3579984e16 100644 --- a/shared/source/gen11/hw_info_lkf.cpp +++ b/shared/source/gen11/hw_info_lkf.cpp @@ -62,7 +62,7 @@ const RuntimeCapabilityTable LKF::capabilityTable{ false, // ftrRenderCompressedImages true, // ftr64KBpages true, // instrumentationEnabled - false, // sourceLevelDebuggerSupported + true, // sourceLevelDebuggerSupported false, // supportsVme false, // supportCacheFlushAfterWalker true, // supportsImages diff --git a/shared/source/gen12lp/hw_info_adln.cpp b/shared/source/gen12lp/hw_info_adln.cpp index 3dd172e8bd..668ce987a6 100644 --- a/shared/source/gen12lp/hw_info_adln.cpp +++ b/shared/source/gen12lp/hw_info_adln.cpp @@ -65,7 +65,7 @@ const RuntimeCapabilityTable ADLN::capabilityTable{ false, // ftrRenderCompressedImages true, // instrumentationEnabled true, // ftr64KBpages - false, // sourceLevelDebuggerSupported + true, // sourceLevelDebuggerSupported false, // supportsVme false, // supportCacheFlushAfterWalker true, // supportsImages diff --git a/shared/source/gen12lp/hw_info_adlp.cpp b/shared/source/gen12lp/hw_info_adlp.cpp index 8dd947d1c7..35647d00ee 100644 --- a/shared/source/gen12lp/hw_info_adlp.cpp +++ b/shared/source/gen12lp/hw_info_adlp.cpp @@ -65,7 +65,7 @@ const RuntimeCapabilityTable ADLP::capabilityTable{ false, // ftrRenderCompressedImages true, // instrumentationEnabled true, // ftr64KBpages - false, // sourceLevelDebuggerSupported + true, // sourceLevelDebuggerSupported false, // supportsVme false, // supportCacheFlushAfterWalker true, // supportsImages diff --git a/shared/source/gen12lp/hw_info_adls.cpp b/shared/source/gen12lp/hw_info_adls.cpp index 0000beef47..0c82e526be 100644 --- a/shared/source/gen12lp/hw_info_adls.cpp +++ b/shared/source/gen12lp/hw_info_adls.cpp @@ -65,7 +65,7 @@ const RuntimeCapabilityTable ADLS::capabilityTable{ false, // ftrRenderCompressedImages true, // instrumentationEnabled true, // ftr64KBpages - false, // sourceLevelDebuggerSupported + true, // sourceLevelDebuggerSupported false, // supportsVme false, // supportCacheFlushAfterWalker true, // supportsImages diff --git a/shared/source/gen12lp/hw_info_dg1.cpp b/shared/source/gen12lp/hw_info_dg1.cpp index b72a959179..e08773499d 100644 --- a/shared/source/gen12lp/hw_info_dg1.cpp +++ b/shared/source/gen12lp/hw_info_dg1.cpp @@ -65,7 +65,7 @@ const RuntimeCapabilityTable DG1::capabilityTable{ false, // ftrRenderCompressedImages true, // ftr64KBpages true, // instrumentationEnabled - false, // sourceLevelDebuggerSupported + true, // sourceLevelDebuggerSupported false, // supportsVme true, // supportCacheFlushAfterWalker true, // supportsImages, diff --git a/shared/source/gen12lp/hw_info_rkl.cpp b/shared/source/gen12lp/hw_info_rkl.cpp index f9197a1765..412193a692 100644 --- a/shared/source/gen12lp/hw_info_rkl.cpp +++ b/shared/source/gen12lp/hw_info_rkl.cpp @@ -65,7 +65,7 @@ const RuntimeCapabilityTable RKL::capabilityTable{ false, // ftrRenderCompressedImages true, // ftr64KBpages true, // instrumentationEnabled - false, // sourceLevelDebuggerSupported + true, // sourceLevelDebuggerSupported false, // supportsVme false, // supportCacheFlushAfterWalker true, // supportsImages diff --git a/shared/source/gen12lp/hw_info_tgllp.cpp b/shared/source/gen12lp/hw_info_tgllp.cpp index f76b8cdfdb..0b01215a9b 100644 --- a/shared/source/gen12lp/hw_info_tgllp.cpp +++ b/shared/source/gen12lp/hw_info_tgllp.cpp @@ -65,7 +65,7 @@ const RuntimeCapabilityTable TGLLP::capabilityTable{ false, // ftrRenderCompressedImages true, // instrumentationEnabled true, // ftr64KBpages - false, // sourceLevelDebuggerSupported + true, // sourceLevelDebuggerSupported false, // supportsVme false, // supportCacheFlushAfterWalker true, // supportsImages diff --git a/shared/source/gen9/hw_info_bxt.cpp b/shared/source/gen9/hw_info_bxt.cpp index 72771bd69b..288673f8ff 100644 --- a/shared/source/gen9/hw_info_bxt.cpp +++ b/shared/source/gen9/hw_info_bxt.cpp @@ -62,7 +62,7 @@ const RuntimeCapabilityTable BXT::capabilityTable{ false, // ftrRenderCompressedImages false, // ftr64KBpages true, // instrumentationEnabled - false, // sourceLevelDebuggerSupported + true, // sourceLevelDebuggerSupported true, // supportsVme false, // supportCacheFlushAfterWalker true, // supportsImages diff --git a/shared/source/gen9/hw_info_cfl.cpp b/shared/source/gen9/hw_info_cfl.cpp index 4a027ac675..8e1db4d059 100644 --- a/shared/source/gen9/hw_info_cfl.cpp +++ b/shared/source/gen9/hw_info_cfl.cpp @@ -63,7 +63,7 @@ const RuntimeCapabilityTable CFL::capabilityTable{ false, // ftrRenderCompressedImages true, // ftr64KBpages true, // instrumentationEnabled - false, // sourceLevelDebuggerSupported + true, // sourceLevelDebuggerSupported true, // supportsVme false, // supportCacheFlushAfterWalker true, // supportsImages diff --git a/shared/source/gen9/hw_info_glk.cpp b/shared/source/gen9/hw_info_glk.cpp index 5af8cb8b64..d612dbad26 100644 --- a/shared/source/gen9/hw_info_glk.cpp +++ b/shared/source/gen9/hw_info_glk.cpp @@ -62,7 +62,7 @@ const RuntimeCapabilityTable GLK::capabilityTable{ false, // ftrRenderCompressedImages false, // ftr64KBpages true, // instrumentationEnabled - false, // sourceLevelDebuggerSupported + true, // sourceLevelDebuggerSupported true, // supportsVme false, // supportCacheFlushAfterWalker true, // supportsImages diff --git a/shared/source/gen9/hw_info_kbl.cpp b/shared/source/gen9/hw_info_kbl.cpp index e766a7b3f6..e38b0437c3 100644 --- a/shared/source/gen9/hw_info_kbl.cpp +++ b/shared/source/gen9/hw_info_kbl.cpp @@ -63,7 +63,7 @@ const RuntimeCapabilityTable KBL::capabilityTable{ false, // ftrRenderCompressedImages true, // ftr64KBpages true, // instrumentationEnabled - false, // sourceLevelDebuggerSupported + true, // sourceLevelDebuggerSupported true, // supportsVme false, // supportCacheFlushAfterWalker true, // supportsImages diff --git a/shared/source/gen9/hw_info_skl.cpp b/shared/source/gen9/hw_info_skl.cpp index 7b799aba9a..2f63cb884b 100644 --- a/shared/source/gen9/hw_info_skl.cpp +++ b/shared/source/gen9/hw_info_skl.cpp @@ -62,7 +62,7 @@ const RuntimeCapabilityTable SKL::capabilityTable{ false, // ftrRenderCompressedImages true, // ftr64KBpages true, // instrumentationEnabled - false, // sourceLevelDebuggerSupported + true, // sourceLevelDebuggerSupported true, // supportsVme false, // supportCacheFlushAfterWalker true, // supportsImages diff --git a/shared/source/xe_hp_core/hw_info_xe_hp_sdv.cpp b/shared/source/xe_hp_core/hw_info_xe_hp_sdv.cpp index b5d4050fa1..56fe209103 100644 --- a/shared/source/xe_hp_core/hw_info_xe_hp_sdv.cpp +++ b/shared/source/xe_hp_core/hw_info_xe_hp_sdv.cpp @@ -64,7 +64,7 @@ const RuntimeCapabilityTable XE_HP_SDV::capabilityTable{ false, // ftrRenderCompressedImages true, // ftr64KBpages true, // instrumentationEnabled - false, // sourceLevelDebuggerSupported + true, // sourceLevelDebuggerSupported false, // supportsVme true, // supportCacheFlushAfterWalker true, // supportsImages diff --git a/shared/source/xe_hpg_core/hw_info_dg2.cpp b/shared/source/xe_hpg_core/hw_info_dg2.cpp index 776c43f808..7c5f44e4e3 100644 --- a/shared/source/xe_hpg_core/hw_info_dg2.cpp +++ b/shared/source/xe_hpg_core/hw_info_dg2.cpp @@ -68,7 +68,7 @@ const RuntimeCapabilityTable DG2::capabilityTable{ false, // ftrRenderCompressedImages true, // ftr64KBpages true, // instrumentationEnabled - false, // sourceLevelDebuggerSupported + true, // sourceLevelDebuggerSupported false, // supportsVme true, // supportCacheFlushAfterWalker true, // supportsImages diff --git a/shared/source/xe_hpg_core/hw_info_mtl.cpp b/shared/source/xe_hpg_core/hw_info_mtl.cpp index 8c2a30e58e..e6f7b6db53 100644 --- a/shared/source/xe_hpg_core/hw_info_mtl.cpp +++ b/shared/source/xe_hpg_core/hw_info_mtl.cpp @@ -64,7 +64,7 @@ const RuntimeCapabilityTable MTL::capabilityTable{ false, // ftrRenderCompressedImages true, // ftr64KBpages true, // instrumentationEnabled - false, // sourceLevelDebuggerSupported + true, // sourceLevelDebuggerSupported false, // supportsVme true, // supportCacheFlushAfterWalker true, // supportsImages diff --git a/shared/test/common/libult/source_level_debugger_library.cpp b/shared/test/common/libult/source_level_debugger_library.cpp index e58a96d62d..c67006bba5 100644 --- a/shared/test/common/libult/source_level_debugger_library.cpp +++ b/shared/test/common/libult/source_level_debugger_library.cpp @@ -35,9 +35,6 @@ void *DebuggerLibrary::getProcAddress(const std::string &procName) { } OsLibrary *DebuggerLibrary::load(const std::string &name) { - if (interceptor) { - interceptor->loadCalled = true; - } if (isLibraryAvailable) { return new DebuggerLibrary(); } diff --git a/shared/test/common/libult/source_level_debugger_library.h b/shared/test/common/libult/source_level_debugger_library.h index 4c0dd6306a..ed440f30ca 100644 --- a/shared/test/common/libult/source_level_debugger_library.h +++ b/shared/test/common/libult/source_level_debugger_library.h @@ -36,7 +36,6 @@ struct DebuggerLibraryInterceptor { bool kernelDebugDataCalled = false; bool initCalled = false; bool deviceDestructionCalled = false; - bool loadCalled = false; int newDeviceRetVal = 0; int sourceCodeRetVal = 0; diff --git a/shared/test/common/test_macros/header/common_matchers.h b/shared/test/common/test_macros/header/common_matchers.h index 20aad6c135..2fbf5912d1 100644 --- a/shared/test/common/test_macros/header/common_matchers.h +++ b/shared/test/common/test_macros/header/common_matchers.h @@ -84,21 +84,3 @@ using IsNotPVC = IsNotWithinProducts; using HasStatefulSupport = IsNotAnyGfxCores; using HasNoStatefulSupport = IsAnyGfxCores; - -using HasSourceLevelDebuggerSupport = IsAnyProducts; \ No newline at end of file diff --git a/shared/test/unit_test/compiler_interface/linker_tests.cpp b/shared/test/unit_test/compiler_interface/linker_tests.cpp index c20af15471..7352a6dd43 100644 --- a/shared/test/unit_test/compiler_interface/linker_tests.cpp +++ b/shared/test/unit_test/compiler_interface/linker_tests.cpp @@ -22,7 +22,6 @@ #include "shared/test/common/mocks/mock_graphics_allocation.h" #include "shared/test/common/mocks/mock_modules_zebin.h" #include "shared/test/common/mocks/ult_device_factory.h" -#include "shared/test/common/test_macros/hw_test.h" #include "RelocationInfo.h" #include "gtest/gtest.h" @@ -1988,9 +1987,10 @@ TEST(LinkerTests, givenImplicitArgRelocationAndStackCallsThenPatchRelocationWith EXPECT_TRUE(kernelDescriptor.kernelAttributes.flags.requiresImplicitArgs); } -using LinkerDebuggingSupportedTests = ::testing::Test; - -HWTEST2_F(LinkerDebuggingSupportedTests, givenImplicitArgRelocationAndEnabledDebuggerThenPatchRelocationWithSizeOfImplicitArgStructAndUpdateKernelDescriptor, HasSourceLevelDebuggerSupport) { +TEST(LinkerTests, givenImplicitArgRelocationAndEnabledDebuggerThenPatchRelocationWithSizeOfImplicitArgStructAndUpdateKernelDescriptor) { + if (!defaultHwInfo->capabilityTable.debuggerSupported) { + GTEST_SKIP(); + } NEO::LinkerInput linkerInput; vISA::GenRelocEntry reloc = {}; @@ -2022,10 +2022,7 @@ HWTEST2_F(LinkerDebuggingSupportedTests, givenImplicitArgRelocationAndEnabledDeb DebugManagerStateRestore restorer; DebugManager.flags.EnableMockSourceLevelDebugger.set(1); - NEO::HardwareInfo hwInfo = *NEO::defaultHwInfo; - hwInfo.capabilityTable.debuggerSupported = true; - auto executionEnvironment = MockDevice::prepareExecutionEnvironment(&hwInfo, 0u); - UltDeviceFactory deviceFactory{1, 0, *executionEnvironment}; + UltDeviceFactory deviceFactory{1, 0}; auto device = deviceFactory.rootDevices[0]; EXPECT_NE(nullptr, device->getDebugger()); @@ -2152,7 +2149,10 @@ TEST(LinkerTests, givenNoImplicitArgRelocationAndStackCallsThenImplicitArgsAreNo EXPECT_FALSE(kernelDescriptor.kernelAttributes.flags.requiresImplicitArgs); } -HWTEST2_F(LinkerDebuggingSupportedTests, givenNoImplicitArgRelocationAndEnabledDebuggerThenImplicitArgsAreNotRequired, HasSourceLevelDebuggerSupport) { +TEST(LinkerTests, givenNoImplicitArgRelocationAndEnabledDebuggerThenImplicitArgsAreNotRequired) { + if (!defaultHwInfo->capabilityTable.debuggerSupported) { + GTEST_SKIP(); + } NEO::LinkerInput linkerInput; NEO::Linker linker(linkerInput); @@ -2173,10 +2173,7 @@ HWTEST2_F(LinkerDebuggingSupportedTests, givenNoImplicitArgRelocationAndEnabledD DebugManagerStateRestore restorer; DebugManager.flags.EnableMockSourceLevelDebugger.set(1); - NEO::HardwareInfo hwInfo = *NEO::defaultHwInfo; - hwInfo.capabilityTable.debuggerSupported = true; - auto executionEnvironment = MockDevice::prepareExecutionEnvironment(&hwInfo, 0u); - UltDeviceFactory deviceFactory{1, 0, *executionEnvironment}; + UltDeviceFactory deviceFactory{1, 0}; auto device = deviceFactory.rootDevices[0]; EXPECT_NE(nullptr, device->getDebugger()); diff --git a/shared/test/unit_test/gen11/test_device_caps_gen11.cpp b/shared/test/unit_test/gen11/test_device_caps_gen11.cpp index f07141f635..55b463485c 100644 --- a/shared/test/unit_test/gen11/test_device_caps_gen11.cpp +++ b/shared/test/unit_test/gen11/test_device_caps_gen11.cpp @@ -16,10 +16,6 @@ using namespace NEO; using Gen11DeviceCaps = Test; -GEN11TEST_F(Gen11DeviceCaps, givenGen11ThenDebuggerIsNotSupported) { - EXPECT_FALSE(pDevice->getHardwareInfo().capabilityTable.debuggerSupported); -} - GEN11TEST_F(Gen11DeviceCaps, GivenDefaultWhenCheckingPreemptionModeThenMidThreadIsReturned) { EXPECT_TRUE(PreemptionMode::MidThread == pDevice->getHardwareInfo().capabilityTable.defaultPreemptionMode); } diff --git a/shared/test/unit_test/gen12lp/adln/test_device_caps_adln.cpp b/shared/test/unit_test/gen12lp/adln/test_device_caps_adln.cpp index 28450b55ea..c66661c133 100644 --- a/shared/test/unit_test/gen12lp/adln/test_device_caps_adln.cpp +++ b/shared/test/unit_test/gen12lp/adln/test_device_caps_adln.cpp @@ -16,10 +16,6 @@ using namespace NEO; using AdlnUsDeviceIdTest = Test; -ADLNTEST_F(AdlnUsDeviceIdTest, givenAdlnThenDebuggerIsNotSupported) { - EXPECT_FALSE(pDevice->getHardwareInfo().capabilityTable.debuggerSupported); -} - ADLNTEST_F(AdlnUsDeviceIdTest, givenAdlnWhenCheckFtrSupportsInteger64BitAtomicsThenReturnFalse) { EXPECT_TRUE(pDevice->getHardwareInfo().capabilityTable.ftrSupportsInteger64BitAtomics); } diff --git a/shared/test/unit_test/gen12lp/adlp/test_device_caps_adlp.cpp b/shared/test/unit_test/gen12lp/adlp/test_device_caps_adlp.cpp index d281cfe774..3cf3a734ec 100644 --- a/shared/test/unit_test/gen12lp/adlp/test_device_caps_adlp.cpp +++ b/shared/test/unit_test/gen12lp/adlp/test_device_caps_adlp.cpp @@ -16,10 +16,6 @@ using namespace NEO; using AdlpUsDeviceIdTest = Test; -ADLPTEST_F(AdlpUsDeviceIdTest, givenADLPThenDebuggerIsNotSupported) { - EXPECT_FALSE(pDevice->getHardwareInfo().capabilityTable.debuggerSupported); -} - ADLPTEST_F(AdlpUsDeviceIdTest, givenADLPWhenCheckFtrSupportsInteger64BitAtomicsThenReturnFalse) { EXPECT_TRUE(pDevice->getHardwareInfo().capabilityTable.ftrSupportsInteger64BitAtomics); } diff --git a/shared/test/unit_test/gen12lp/adls/test_device_caps_adls.cpp b/shared/test/unit_test/gen12lp/adls/test_device_caps_adls.cpp index 44f2271c5a..fe9e2102cf 100644 --- a/shared/test/unit_test/gen12lp/adls/test_device_caps_adls.cpp +++ b/shared/test/unit_test/gen12lp/adls/test_device_caps_adls.cpp @@ -16,10 +16,6 @@ using namespace NEO; using AdlsUsDeviceIdTest = Test; -ADLSTEST_F(AdlsUsDeviceIdTest, givenAdlsThenDebuggerIsNotSupported) { - EXPECT_FALSE(pDevice->getHardwareInfo().capabilityTable.debuggerSupported); -} - ADLSTEST_F(AdlsUsDeviceIdTest, givenAdlsWhenCheckFtrSupportsInteger64BitAtomicsThenReturnFalse) { EXPECT_TRUE(pDevice->getHardwareInfo().capabilityTable.ftrSupportsInteger64BitAtomics); } diff --git a/shared/test/unit_test/gen12lp/dg1/test_device_caps_dg1.cpp b/shared/test/unit_test/gen12lp/dg1/test_device_caps_dg1.cpp index 71a313a10b..86dbcb9661 100644 --- a/shared/test/unit_test/gen12lp/dg1/test_device_caps_dg1.cpp +++ b/shared/test/unit_test/gen12lp/dg1/test_device_caps_dg1.cpp @@ -16,10 +16,6 @@ using namespace NEO; using Dg1DeviceCaps = Test; -DG1TEST_F(Dg1DeviceCaps, givenDg1ThenDebuggerIsNotSupported) { - EXPECT_FALSE(pDevice->getHardwareInfo().capabilityTable.debuggerSupported); -} - DG1TEST_F(Dg1DeviceCaps, givenDg1WhenCheckSupportCacheFlushAfterWalkerThenFalse) { EXPECT_TRUE(pDevice->getHardwareInfo().capabilityTable.supportCacheFlushAfterWalker); } diff --git a/shared/test/unit_test/gen12lp/test_device_caps_gen12lp.inl b/shared/test/unit_test/gen12lp/test_device_caps_gen12lp.inl index 7b29f8e521..248cc3f217 100644 --- a/shared/test/unit_test/gen12lp/test_device_caps_gen12lp.inl +++ b/shared/test/unit_test/gen12lp/test_device_caps_gen12lp.inl @@ -14,10 +14,6 @@ using namespace NEO; using Gen12LpDeviceCaps = Test; -GEN12LPTEST_F(Gen12LpDeviceCaps, givenGen12LpThenDebuggerIsNotSupported) { - EXPECT_FALSE(pDevice->getHardwareInfo().capabilityTable.debuggerSupported); -} - GEN12LPTEST_F(Gen12LpDeviceCaps, GivenDefaultWhenCheckingPreemptionModeThenMidThreadIsReported) { EXPECT_EQ(PreemptionMode::MidThread, pDevice->getHardwareInfo().capabilityTable.defaultPreemptionMode); } diff --git a/shared/test/unit_test/gen8/test_device_caps_gen8.cpp b/shared/test/unit_test/gen8/test_device_caps_gen8.cpp index 81db34db3e..1a63cb7b75 100644 --- a/shared/test/unit_test/gen8/test_device_caps_gen8.cpp +++ b/shared/test/unit_test/gen8/test_device_caps_gen8.cpp @@ -16,10 +16,6 @@ using namespace NEO; using Gen8DeviceCaps = Test; -GEN8TEST_F(Gen8DeviceCaps, GivenGen8ThenDebuggerIsNotSupported) { - EXPECT_FALSE(pDevice->getHardwareInfo().capabilityTable.debuggerSupported); -} - GEN8TEST_F(Gen8DeviceCaps, GivenDefaultWhenCheckingPreemptionModeThenDisabledIsReported) { EXPECT_TRUE(PreemptionMode::Disabled == pDevice->getHardwareInfo().capabilityTable.defaultPreemptionMode); } diff --git a/shared/test/unit_test/gen9/test_device_caps_gen9.cpp b/shared/test/unit_test/gen9/test_device_caps_gen9.cpp index 37865339cf..a050de6ad7 100644 --- a/shared/test/unit_test/gen9/test_device_caps_gen9.cpp +++ b/shared/test/unit_test/gen9/test_device_caps_gen9.cpp @@ -17,10 +17,6 @@ using namespace NEO; using Gen9DeviceCaps = Test; -GEN9TEST_F(Gen9DeviceCaps, givenGen9ThenDebuggerIsNotSupported) { - EXPECT_FALSE(pDevice->getHardwareInfo().capabilityTable.debuggerSupported); -} - GEN9TEST_F(Gen9DeviceCaps, GivenDefaultWhenCheckingPreemptionModeThenMidThreadIsSupported) { EXPECT_EQ(PreemptionMode::MidThread, pDevice->getHardwareInfo().capabilityTable.defaultPreemptionMode); } diff --git a/shared/test/unit_test/xe_hpc_core/test_device_caps_xe_hpc_core.cpp b/shared/test/unit_test/xe_hpc_core/test_device_caps_xe_hpc_core.cpp index 4ec0b78d43..65f11e46c2 100644 --- a/shared/test/unit_test/xe_hpc_core/test_device_caps_xe_hpc_core.cpp +++ b/shared/test/unit_test/xe_hpc_core/test_device_caps_xe_hpc_core.cpp @@ -18,10 +18,6 @@ using namespace NEO; using XeHpcCoreDeviceCaps = Test; -XE_HPC_CORETEST_F(XeHpcCoreDeviceCaps, givenXeHpcCoreThenDebuggerIsNotSupported) { - EXPECT_FALSE(pDevice->getHardwareInfo().capabilityTable.debuggerSupported); -} - XE_HPC_CORETEST_F(XeHpcCoreDeviceCaps, givenXeHpcCoreWhenCheckFtrSupportsInteger64BitAtomicsThenReturnTrue) { EXPECT_TRUE(pDevice->getHardwareInfo().capabilityTable.ftrSupportsInteger64BitAtomics); } diff --git a/shared/test/unit_test/xe_hpg_core/dg2/test_device_caps_dg2.cpp b/shared/test/unit_test/xe_hpg_core/dg2/test_device_caps_dg2.cpp index 2a11c6d9a0..7a9c602a8b 100644 --- a/shared/test/unit_test/xe_hpg_core/dg2/test_device_caps_dg2.cpp +++ b/shared/test/unit_test/xe_hpg_core/dg2/test_device_caps_dg2.cpp @@ -15,10 +15,6 @@ using namespace NEO; using Dg2UsDeviceIdTest = Test; -DG2TEST_F(Dg2UsDeviceIdTest, givenDg2ThenDebuggerIsNotSupported) { - EXPECT_FALSE(pDevice->getHardwareInfo().capabilityTable.debuggerSupported); -} - DG2TEST_F(Dg2UsDeviceIdTest, givenDg2ProductWhenCheckBlitterOperationsSupportThenReturnFalse) { EXPECT_FALSE(pDevice->getHardwareInfo().capabilityTable.blitterOperationsSupported); } diff --git a/shared/test/unit_test/xe_hpg_core/mtl/test_device_caps_mtl.cpp b/shared/test/unit_test/xe_hpg_core/mtl/test_device_caps_mtl.cpp index 9dcb3733fe..d75ae646c1 100644 --- a/shared/test/unit_test/xe_hpg_core/mtl/test_device_caps_mtl.cpp +++ b/shared/test/unit_test/xe_hpg_core/mtl/test_device_caps_mtl.cpp @@ -13,10 +13,6 @@ using namespace NEO; using MtlUsDeviceIdTest = Test; -MTLTEST_F(MtlUsDeviceIdTest, givenMtlThenDebuggerIsNotSupported) { - EXPECT_FALSE(pDevice->getHardwareInfo().capabilityTable.debuggerSupported); -} - MTLTEST_F(MtlUsDeviceIdTest, givenMtlProductWhenCheckFp64SupportThenReturnFalse) { EXPECT_TRUE(pDevice->getHardwareInfo().capabilityTable.ftrSupportsFP64); } diff --git a/shared/test/unit_test/xe_hpg_core/test_device_caps_xe_hpg_core.cpp b/shared/test/unit_test/xe_hpg_core/test_device_caps_xe_hpg_core.cpp index 6f8d0b4f0c..8674ffdaf4 100644 --- a/shared/test/unit_test/xe_hpg_core/test_device_caps_xe_hpg_core.cpp +++ b/shared/test/unit_test/xe_hpg_core/test_device_caps_xe_hpg_core.cpp @@ -18,10 +18,6 @@ using namespace NEO; using XeHpgCoreDeviceCaps = Test; -XE_HPG_CORETEST_F(XeHpgCoreDeviceCaps, givenXeHpgCoreThenDebuggerIsNotSupported) { - EXPECT_FALSE(pDevice->getHardwareInfo().capabilityTable.debuggerSupported); -} - XE_HPG_CORETEST_F(XeHpgCoreDeviceCaps, givenXeHpgCoreWhenCheckFtrSupportsInteger64BitAtomicsThenReturnTrue) { EXPECT_TRUE(pDevice->getHardwareInfo().capabilityTable.ftrSupportsInteger64BitAtomics); }