Fix rocprofv3 pmc crash on gfx1151 (#2169) (#2171)

* Fix #2169: rocprofv3 pmc crash on gfx1151

This PR addresses two issues for gfx1151:
- In Pm4Factory::GetGpuId, the first matching entry from the gfxip_map
  vector was taken, but "gfx115" came after "gfx11".
- HsaRsrcFactory::GetHsaAgentsCallback would fail when it saw an NPU
  agent. Now it ignores it and continues.
This commit is contained in:
Matthias Gehre
2025-12-05 16:58:48 +01:00
کامیت شده توسط GitHub
والد 06a3a5ca10
کامیت e9e972144d
4فایلهای تغییر یافته به همراه16 افزوده شده و 14 حذف شده
@@ -46,11 +46,11 @@
// Callback function to get available in the system agents
hsa_status_t HsaRsrcFactory::GetHsaAgentsCallback(hsa_agent_t agent, void* data) {
hsa_status_t status = HSA_STATUS_ERROR;
HsaRsrcFactory* hsa_rsrc = reinterpret_cast<HsaRsrcFactory*>(data);
const AgentInfo* agent_info = hsa_rsrc->AddAgentInfo(agent);
if (agent_info != NULL) status = HSA_STATUS_SUCCESS;
return status;
// AddAgentInfo may return NULL for unsupported agent types (e.g., NPU).
// We should continue iterating regardless.
hsa_rsrc->AddAgentInfo(agent);
return HSA_STATUS_SUCCESS;
}
// This function checks to see if the provided