2
0

Add ability to get ASIC revision from hsa_agent_get_info()

Change-Id: Ie30c64f9e02f9e704c9a4c4145deb9580429fdf6


[ROCm/ROCR-Runtime commit: 3fe95c696a]
Este cometimento está contido em:
Joseph Greathouse
2020-05-28 13:01:30 -05:00
ascendente d70dc701a0
cometimento 0e3850b003
3 ficheiros modificados com 15 adições e 1 eliminações
@@ -363,6 +363,9 @@ hsa_status_t CpuAgent::GetInfo(hsa_agent_info_t attribute, void* value) const {
snprintf((char*)value, sizeof(uuid_tmp), "%s", uuid_tmp);
break;
}
case HSA_AMD_AGENT_INFO_ASIC_REVISION:
*((uint32_t*)value) = static_cast<uint32_t>(properties_.Capability.ui32.ASICRevision);
break;
default:
return HSA_STATUS_ERROR_INVALID_ARGUMENT;
break;
@@ -931,6 +931,9 @@ hsa_status_t GpuAgent::GetInfo(hsa_agent_info_t attribute, void* value) const {
snprintf((char*)value, (ss.str().length() + 1), "%s", (char*)ss.str().c_str());
break;
}
case HSA_AMD_AGENT_INFO_ASIC_REVISION:
*((uint32_t*)value) = static_cast<uint32_t>(properties_.Capability.ui32.ASICRevision);
break;
default:
return HSA_STATUS_ERROR_INVALID_ARGUMENT;
break;
+9 -1
Ver ficheiro
@@ -174,7 +174,15 @@ typedef enum hsa_amd_agent_info_s {
* Agents that do not support UUID will return the string "GPU-XX" or
* "CPU-XX" or "DSP-XX" depending upon their device type ::hsa_device_type_t
*/
HSA_AMD_AGENT_INFO_UUID = 0xA011
HSA_AMD_AGENT_INFO_UUID = 0xA011,
/**
* Queries for the ASIC revision of an agent. The value is an integer that
* increments for each revision. This can be used by user-level software to
* change how it operates, depending on the hardware version. This allows
* selective workarounds for hardware errata.
* The type of this attribute is uint32_t.
*/
HSA_AMD_AGENT_INFO_ASIC_REVISION = 0xA012
} hsa_amd_agent_info_t;
typedef struct hsa_amd_hdp_flush_s {