SWDEV-317716 - Add uuid in device info structure

Change-Id: Ie7f48d0faf7d722bd9bb8bd0f8962a7832dbe4f6


[ROCm/clr commit: 824704c87b]
이 커밋은 다음에 포함됨:
Satyanvesh Dittakavi
2022-01-13 14:04:42 +00:00
부모 1f9f598d92
커밋 31aa18f1a9
2개의 변경된 파일13개의 추가작업 그리고 1개의 파일을 삭제
+2 -1
파일 보기
@@ -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_;
+11
파일 보기
@@ -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,