From efeee0018fffd8260c39d4d176942ebbbeacfeab Mon Sep 17 00:00:00 2001 From: Jemale Lockett Date: Thu, 5 Sep 2024 15:51:38 +0000 Subject: [PATCH] fix: Set debugger supported on arl Resolves: NEO-12136 Signed-off-by: Jemale Lockett --- .../sources/debug/xe_hpg_core/CMakeLists.txt | 12 +++++++ .../debug_session_tests_xe_hpg_core.cpp | 34 +++++++++++++++++++ shared/source/xe_hpg_core/hw_info_arl.cpp | 2 +- 3 files changed, 47 insertions(+), 1 deletion(-) create mode 100644 level_zero/tools/test/unit_tests/sources/debug/xe_hpg_core/CMakeLists.txt create mode 100644 level_zero/tools/test/unit_tests/sources/debug/xe_hpg_core/debug_session_tests_xe_hpg_core.cpp diff --git a/level_zero/tools/test/unit_tests/sources/debug/xe_hpg_core/CMakeLists.txt b/level_zero/tools/test/unit_tests/sources/debug/xe_hpg_core/CMakeLists.txt new file mode 100644 index 0000000000..71b31be55c --- /dev/null +++ b/level_zero/tools/test/unit_tests/sources/debug/xe_hpg_core/CMakeLists.txt @@ -0,0 +1,12 @@ +# +# Copyright (C) 2024 Intel Corporation +# +# SPDX-License-Identifier: MIT +# + +if(TESTS_XE_HPG_CORE) + target_sources(${TARGET_NAME} PRIVATE + ${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt + ${CMAKE_CURRENT_SOURCE_DIR}/debug_session_tests_xe_hpg_core.cpp + ) +endif() diff --git a/level_zero/tools/test/unit_tests/sources/debug/xe_hpg_core/debug_session_tests_xe_hpg_core.cpp b/level_zero/tools/test/unit_tests/sources/debug/xe_hpg_core/debug_session_tests_xe_hpg_core.cpp new file mode 100644 index 0000000000..247d6c2a1a --- /dev/null +++ b/level_zero/tools/test/unit_tests/sources/debug/xe_hpg_core/debug_session_tests_xe_hpg_core.cpp @@ -0,0 +1,34 @@ +/* + * Copyright (C) 2024 Intel Corporation + * + * SPDX-License-Identifier: MIT + * + */ + +#include "shared/test/common/mocks/mock_device.h" +#include "shared/test/common/mocks/mock_sip.h" +#include "shared/test/common/test_macros/hw_test.h" + +#include "level_zero/core/test/unit_tests/mocks/mock_built_ins.h" +#include "level_zero/tools/source/debug/debug_session_imp.h" +#include "level_zero/tools/test/unit_tests/sources/debug/debug_session_common.h" +#include "level_zero/tools/test/unit_tests/sources/debug/mock_debug_session.h" + +namespace L0 { +namespace ult { + +using DebugApiTest = Test; +HWTEST2_F(DebugApiTest, givenDeviceWhenDebugAttachIsAvaialbleThenGetPropertiesReturnsCorrectFlagForXeHPG, IsARL) { + zet_device_debug_properties_t debugProperties = {}; + debugProperties.flags = ZET_DEVICE_DEBUG_PROPERTY_FLAG_FORCE_UINT32; + + neoDevice->executionEnvironment->rootDeviceEnvironments[0]->osInterface.reset(new OsInterfaceWithDebugAttach); + + auto result = zetDeviceGetDebugProperties(device->toHandle(), &debugProperties); + + EXPECT_EQ(ZE_RESULT_SUCCESS, result); + EXPECT_EQ(ZET_DEVICE_DEBUG_PROPERTY_FLAG_ATTACH, debugProperties.flags); +} + +} // namespace ult +} // namespace L0 diff --git a/shared/source/xe_hpg_core/hw_info_arl.cpp b/shared/source/xe_hpg_core/hw_info_arl.cpp index ade36b7ac3..954419f082 100644 --- a/shared/source/xe_hpg_core/hw_info_arl.cpp +++ b/shared/source/xe_hpg_core/hw_info_arl.cpp @@ -77,7 +77,7 @@ const RuntimeCapabilityTable ARL::capabilityTable{ false, // p2pAccessSupported false, // p2pAtomicAccessSupported true, // fusedEuEnabled - false, // l0DebuggerSupported + true, // l0DebuggerSupported true, // supportsFloatAtomics 0 // cxlType };