* 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.
Cette révision appartient à :
@@ -412,11 +412,13 @@ inline bool Pm4Factory::CheckConcurrent(const profile_t* profile) {
|
||||
|
||||
// Return GPU id for a given agent
|
||||
inline gpu_id_t Pm4Factory::GetGpuId(std::string_view gfx_ip) {
|
||||
// More specific GPU IDs must come before less specific IDs.
|
||||
std::vector<std::pair<std::string, gpu_id_t>> gfxip_map = {
|
||||
{"gfx908", MI100_GPU_ID}, {"gfx90a", MI200_GPU_ID}, {"gfx900", GFX9_GPU_ID},
|
||||
{"gfx902", GFX9_GPU_ID}, {"gfx906", GFX9_GPU_ID}, {"gfx94", MI300_GPU_ID},
|
||||
{"gfx95", MI350_GPU_ID}, {"gfx10", GFX10_GPU_ID}, {"gfx11", GFX11_GPU_ID},
|
||||
{"gfx115", GFX115X_GPU_ID}, {"gfx12", GFX12_GPU_ID},
|
||||
{"gfx95", MI350_GPU_ID}, {"gfx10", GFX10_GPU_ID},
|
||||
{"gfx115", GFX115X_GPU_ID}, {"gfx11", GFX11_GPU_ID},
|
||||
{"gfx12", GFX12_GPU_ID},
|
||||
};
|
||||
|
||||
for (const auto& [name, id] : gfxip_map) {
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -73,11 +73,11 @@ static const char* cpp_demangle(const char* symname) {
|
||||
|
||||
// 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 != nullptr) 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
|
||||
|
||||
@@ -56,11 +56,11 @@ static const char* cpp_demangle(const char* symname) {
|
||||
|
||||
// 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
|
||||
|
||||
Référencer dans un nouveau ticket
Bloquer un utilisateur