From fbe01e534b8af86dff46e6d849af59062c652b77 Mon Sep 17 00:00:00 2001 From: Mateusz Jablonski Date: Fri, 10 Mar 2023 10:50:02 +0000 Subject: [PATCH] fix l0 debug: correct UNRECOVERABLE_IF condition correct debug API tests to respect more than 8 threads per eu Related-To: NEO-7442 Signed-off-by: Mateusz Jablonski --- level_zero/tools/source/debug/debug_session_imp.cpp | 2 +- .../sources/debug/linux/test_debug_api_linux.cpp | 13 +++++++++---- manifests/manifest.yml | 2 +- 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/level_zero/tools/source/debug/debug_session_imp.cpp b/level_zero/tools/source/debug/debug_session_imp.cpp index e70ca9541d..d88f2dece3 100644 --- a/level_zero/tools/source/debug/debug_session_imp.cpp +++ b/level_zero/tools/source/debug/debug_session_imp.cpp @@ -147,7 +147,7 @@ std::vector DebugSession::getSingleThreadsForDevice(uint32_t const uint32_t numEuPerSubslice = hwInfo.gtSystemInfo.MaxEuPerSubSlice; const uint32_t numThreadsPerEu = (hwInfo.gtSystemInfo.ThreadCount / hwInfo.gtSystemInfo.EUCount); - UNRECOVERABLE_IF(numThreadsPerEu > 8); + UNRECOVERABLE_IF(numThreadsPerEu > 16); std::vector threads; diff --git a/level_zero/tools/test/unit_tests/sources/debug/linux/test_debug_api_linux.cpp b/level_zero/tools/test/unit_tests/sources/debug/linux/test_debug_api_linux.cpp index 0d7510448a..b97298720c 100644 --- a/level_zero/tools/test/unit_tests/sources/debug/linux/test_debug_api_linux.cpp +++ b/level_zero/tools/test/unit_tests/sources/debug/linux/test_debug_api_linux.cpp @@ -13,6 +13,8 @@ #include "shared/source/gmm_helper/gmm_helper.h" #include "shared/source/helpers/aligned_memory.h" +#include "shared/source/helpers/basic_math.h" +#include "shared/source/helpers/compiler_product_helper.h" #include "shared/source/os_interface/linux/drm_debug.h" #include "shared/source/os_interface/linux/engine_info.h" #include "shared/source/os_interface/os_interface.h" @@ -5494,6 +5496,8 @@ TEST_F(DebugApiLinuxTest, GivenResumeWARequiredWhenCallingResumeThenWaIsAppliedT config.pid = 0x1234; auto &l0GfxCoreHelper = neoDevice->getRootDeviceEnvironment().getHelper(); + auto &compilerProductHelper = neoDevice->getRootDeviceEnvironment().getHelper(); + auto numBytesPerThread = Math::divideAndRoundUp(compilerProductHelper.getNumThreadsPerEu(), 8u); auto sessionMock = std::make_unique(config, device, 10); ASSERT_NE(nullptr, sessionMock); SIP::version version = {2, 0, 0}; @@ -5515,10 +5519,12 @@ TEST_F(DebugApiLinuxTest, GivenResumeWARequiredWhenCallingResumeThenWaIsAppliedT auto bitmask = handler->euControlArgs[euControlIndex].euControlBitmask.get(); EXPECT_EQ(1u, bitmask[0]); + + auto bitmaskIndex = 4 * numBytesPerThread; if (l0GfxCoreHelper.isResumeWARequired()) { - EXPECT_EQ(1u, bitmask[4]); + EXPECT_EQ(1u, bitmask[bitmaskIndex]); } else { - EXPECT_EQ(0u, bitmask[4]); + EXPECT_EQ(0u, bitmask[bitmaskIndex]); } thread = {0, 0, 4, 0}; @@ -5533,11 +5539,10 @@ TEST_F(DebugApiLinuxTest, GivenResumeWARequiredWhenCallingResumeThenWaIsAppliedT if (l0GfxCoreHelper.isResumeWARequired()) { EXPECT_EQ(1u, bitmask[0]); - EXPECT_EQ(1u, bitmask[4]); } else { EXPECT_EQ(0u, bitmask[0]); - EXPECT_EQ(1u, bitmask[4]); } + EXPECT_EQ(1u, bitmask[bitmaskIndex]); } TEST_F(DebugApiLinuxTest, GivenSliceALLWhenCallingResumeThenSliceIdIsNotRemapped) { diff --git a/manifests/manifest.yml b/manifests/manifest.yml index d6a48691a0..de42e8d2d4 100644 --- a/manifests/manifest.yml +++ b/manifests/manifest.yml @@ -38,7 +38,7 @@ components: dest_dir: kernels_bin type: git branch: kernels_bin - revision: 2032-585 + revision: 2032-589 kmdaf: branch: kmdaf dest_dir: kmdaf