libhsakmt: Expose device Unique Id

Read device unique id from sysfs and expose it in HsaNodeProperties.
For devices not supported the value will be 0

Signed-off-by: Divya Shikre <DivyaUday.Shikre@amd.com>
Change-Id: I97b8689dfa090971c6876de6feaa97652e28c03d


[ROCm/ROCR-Runtime commit: ebe7de1f99]
Этот коммит содержится в:
Divya Shikre authored and Divya Uday Shikre committed 2020-03-10 10:06:11 -05:00
1 родитель fbec350744
Коммит b54a23f31a
2 files changed
+4 -1

No files matched your search

+2 -1
Просмотреть файл
@@ -308,7 +308,8 @@ typedef struct _HsaNodeProperties
HSAuint8 Reserved2;
HSAuint32 Domain; // PCI domain of the GPU
HSAuint8 Reserved[28];
HSAuint64 UniqueID; // Globally unique immutable id
HSAuint8 Reserved[20];
} HsaNodeProperties;
+2
Просмотреть файл
@@ -1020,6 +1020,8 @@ HSAKMT_STATUS topology_sysfs_get_node_props(uint32_t node_id,
props->uCodeEngineVersions.Value = (uint32_t)prop_val & 0x3ff;
else if (strcmp(prop_name, "hive_id") == 0)
props->HiveID = prop_val;
else if (strcmp(prop_name, "unique_id") == 0)
props->UniqueID = prop_val;
else if (strcmp(prop_name, "num_sdma_engines") == 0)
props->NumSdmaEngines = prop_val;
else if (strcmp(prop_name, "num_sdma_xgmi_engines") == 0)