From 2f50b35daa655930033c5250109a8c5111378587 Mon Sep 17 00:00:00 2001 From: Lang Yu Date: Mon, 6 May 2024 15:28:34 +0800 Subject: [PATCH] Simplify APU query Query APU from thunk instead of parsing device id. Change-Id: I95efa9e2a94fb979eaa88042991ee6921abbed7f Signed-off-by: Lang Yu Signed-off-by: Chris Freehill --- runtime/hsa-runtime/core/runtime/amd_gpu_agent.cpp | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/runtime/hsa-runtime/core/runtime/amd_gpu_agent.cpp b/runtime/hsa-runtime/core/runtime/amd_gpu_agent.cpp index 40d6ea06ad..ead270b716 100644 --- a/runtime/hsa-runtime/core/runtime/amd_gpu_agent.cpp +++ b/runtime/hsa-runtime/core/runtime/amd_gpu_agent.cpp @@ -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 {