Add support for reading GPU's unique ID

Add support and testing for reading the Unique ID associated with a
specific GPU. This ID will persist across reboots, even if the GPU is
moved to a different machine. Note that this is per-GPU, not per-card,
as some cards have multiple GPUs, and each GPU will get a unique
identifier

Change-Id: Idce50c6febc2ceb1a4c1200d2489ec8b9d8fe174
This commit is contained in:
Kent Russell committed 2019-06-21 08:39:36 -04:00
1 والد dbdb1a9248
کامیت 35d2807196
6 files changed
+48

No files matched your search

@@ -120,6 +120,19 @@ void TestSysInfoRead::Run(void) {
std::cout << " (" << std::dec << val_ui64 << ")" << std::endl;
}
err = rsmi_dev_unique_id_get(i, &val_ui64);
if (err == RSMI_STATUS_NOT_SUPPORTED) {
std::cout <<
"\t**rsmi_dev_unique_id() is not supported"
" on this machine" << std::endl;
} else {
CHK_ERR_ASRT(err)
IF_VERB(STANDARD) {
std::cout << "\t**GPU Unique ID : " << std::hex << val_ui64 <<
std::endl;
}
}
err = rsmi_version_get(&ver);
CHK_ERR_ASRT(err)