SWDEV-317716 - Add uuid in device info structure
Change-Id: Ie7f48d0faf7d722bd9bb8bd0f8962a7832dbe4f6
[ROCm/clr commit: 824704c87b]
이 커밋은 다음에 포함됨:
@@ -571,7 +571,8 @@ struct Info : public amd::EmbeddedObject {
|
||||
uint32_t pcieRevisionId_;
|
||||
//! ASIC Revision
|
||||
uint32_t asicRevision_;
|
||||
|
||||
//! Returns the unique identifier for the device
|
||||
char uuid_[16];
|
||||
//! Max numbers of threads per CU
|
||||
uint32_t maxThreadsPerCU_;
|
||||
|
||||
|
||||
@@ -1075,6 +1075,17 @@ bool Device::populateOCLDeviceConstants() {
|
||||
::strncpy(info_.boardName_, device_name, sizeof(info_.boardName_) - 1);
|
||||
}
|
||||
|
||||
char unique_id[32] = {0};
|
||||
if (HSA_STATUS_SUCCESS ==
|
||||
hsa_agent_get_info(_bkendDevice, static_cast<hsa_agent_info_t>(HSA_AMD_AGENT_INFO_UUID),
|
||||
unique_id)) {
|
||||
// ROCr gives the UUID info in the format GPU-XXXX with length 20 bytes
|
||||
// Strip the first 4 bytes and store only the 16 bytes representing UUID
|
||||
for (size_t i = 0; i < 16; i++) {
|
||||
info_.uuid_[i] = unique_id[i+4];
|
||||
}
|
||||
}
|
||||
|
||||
if (HSA_STATUS_SUCCESS !=
|
||||
hsa_agent_get_info(_bkendDevice,
|
||||
(hsa_agent_info_t)HSA_AMD_AGENT_INFO_COOPERATIVE_COMPUTE_UNIT_COUNT,
|
||||
|
||||
새 이슈에서 참조
사용자 차단