Simplify APU query

Query APU from thunk instead of parsing device id.

Change-Id: I95efa9e2a94fb979eaa88042991ee6921abbed7f
Signed-off-by: Lang Yu <Lang.Yu@amd.com>
Signed-off-by: Chris Freehill <cfreehil@amd.com>
This commit is contained in:
Lang Yu
2024-05-06 15:28:34 +08:00
committed by Chris Freehill
parent 662f6817d7
commit 2f50b35daa
@@ -1192,16 +1192,8 @@ void GpuAgent::GetInfoMemoryProperties(uint8_t value[8]) const {
};
// Fill the HSA_AMD_MEMORY_PROPERTY_AGENT_IS_APU flag
switch (properties_.DeviceId) {
case 0x15DD: /* gfx902 - Raven Ridge */
case 0x15D8: /* gfx909 - Raven Ridge 2 */
case 0x1636: /* gfx90c - Renoir */
case 0x74A0: /* gfx940 and gfx942-APU */
if (properties_.Integrated)
setFlag(HSA_AMD_MEMORY_PROPERTY_AGENT_IS_APU);
break;
default:
break;
}
}
hsa_status_t GpuAgent::GetInfo(hsa_agent_info_t attribute, void* value) const {