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
[ROCm/amdsmi commit: 35d2807196]
This commit is contained in:
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user