Device SOC Unique ID Extension

Device SOC Unique ID Extension#

Introduced in Level Zero version 1.21

API#

Device SOC Unique ID Overview#

The Device SOC Unique ID extension provides the ability to query the unique ID of the SOC on which the device resides.

Applications can retrieve this property by passing the extension structure via the pNext chain when calling zesDeviceGetProperties. If the SOC unique ID cannot be determined for the device, it will be set to all zeroes.

Querying the SOC Unique ID#

The following pseudo-code demonstrates the usage pattern for querying the SOC unique ID of the device.

// Query device properties with the device SOC unique ID extension
zes_device_properties_t deviceProps = {};
deviceProps.stype = ZES_STRUCTURE_TYPE_DEVICE_PROPERTIES;

zes_device_soc_uid_ext_properties_t socUidProps = {};
socUidProps.stype = ZES_STRUCTURE_TYPE_DEVICE_SOC_UID_EXT_PROPERTIES;
socUidProps.pNext = nullptr;

deviceProps.pNext = &socUidProps;

zesDeviceGetProperties(hDevice, &deviceProps);

output("SOC unique ID: ");
for (uint32_t i = 0; i < ZES_MAX_UUID_SIZE; i++) {
    output("%02x", socUidProps.socUid.id[i]);
}
output("\n");