Add ability to get ASIC revision from hsa_agent_get_info()

Change-Id: Ie30c64f9e02f9e704c9a4c4145deb9580429fdf6
This commit is contained in:
Joseph Greathouse
2020-05-28 13:01:30 -05:00
parent 584ef1e1ca
commit 3fe95c696a
3 changed files with 15 additions and 1 deletions
@@ -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;