From 51f3ec1cc69e56eb5a69908afac7df528e9e3f59 Mon Sep 17 00:00:00 2001 From: Xavier Hallade Date: Fri, 20 Jun 2025 14:12:29 +0200 Subject: [PATCH] [Unitrace] Use L0 core extension to query PCI properties Since Level-Zero 1.3.0 specification, we can use zeDevicePciGetPropertiesExt instead of sysman. Unitrace used sysman in legacy mode (zeInit + ZES_ENABLE_SYSMAN), however this was not supported for Xe2 and newer platforms: https://github.com/intel/compute-runtime/blob/releases/25.22/programmers-guide/SYSMAN.md#support-and-limitations hence leading to an abort from ./src/levelzero/ze_metrics.h:66: `void PrintDeviceList(): Assertion `status == ZE_RESULT_SUCCESS' failed.` on Xe2 and newer devices when calling `unitrace --device-list`. As sysman was only used to query PCI information, we could remove its use and switch to the core extension instead. --- tools/unitrace/src/levelzero/ze_metrics.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/tools/unitrace/src/levelzero/ze_metrics.h b/tools/unitrace/src/levelzero/ze_metrics.h index 2f0b07b..cabeea2 100644 --- a/tools/unitrace/src/levelzero/ze_metrics.h +++ b/tools/unitrace/src/levelzero/ze_metrics.h @@ -11,7 +11,6 @@ #include #include -#include #include #include #include "ze_loader.h" @@ -61,8 +60,8 @@ inline void PrintDeviceList() { status = ZE_FUNC(zeDeviceGetProperties)(device_list[i], &device_properties); PTI_ASSERT(status == ZE_RESULT_SUCCESS); - zes_pci_properties_t pci_props{ZES_STRUCTURE_TYPE_PCI_PROPERTIES, }; - status = ZE_FUNC(zesDevicePciGetProperties)(device_list[i], &pci_props); + ze_pci_ext_properties_t pci_props{ZE_STRUCTURE_TYPE_PCI_EXT_PROPERTIES, }; + status = ZE_FUNC(zeDevicePciGetPropertiesExt)(device_list[i], &pci_props); PTI_ASSERT(status == ZE_RESULT_SUCCESS); std::cout << "Device #" << i << ": [" << std::hex <<