From 6cf9df4ff0089c0eb586403281992d47320ca658 Mon Sep 17 00:00:00 2001 From: Giovanni LB Date: Thu, 25 Apr 2024 17:47:51 -0300 Subject: [PATCH] Fixing occupancy metrics for MI300 Change-Id: I25a150dbcd3582cd397a658aa9a991956577cfa8 [ROCm/rocprofiler commit: 604738fd8de8393ef45d55b1790e9f4b59b7584a] --- projects/rocprofiler/src/core/counters/derived/metrics.xml | 4 ++-- .../src/core/counters/metrics/derived_counters.xml | 4 ++-- projects/rocprofiler/src/core/counters/metrics/metrics.h | 3 ++- projects/rocprofiler/src/core/metrics.h | 1 + 4 files changed, 7 insertions(+), 5 deletions(-) diff --git a/projects/rocprofiler/src/core/counters/derived/metrics.xml b/projects/rocprofiler/src/core/counters/derived/metrics.xml index 33793b0f7e..edc12850ad 100755 --- a/projects/rocprofiler/src/core/counters/derived/metrics.xml +++ b/projects/rocprofiler/src/core/counters/derived/metrics.xml @@ -266,8 +266,8 @@ - - + + diff --git a/projects/rocprofiler/src/core/counters/metrics/derived_counters.xml b/projects/rocprofiler/src/core/counters/metrics/derived_counters.xml index 892a0bcc6f..5ab53a0c28 100755 --- a/projects/rocprofiler/src/core/counters/metrics/derived_counters.xml +++ b/projects/rocprofiler/src/core/counters/metrics/derived_counters.xml @@ -356,8 +356,8 @@ - - + + diff --git a/projects/rocprofiler/src/core/counters/metrics/metrics.h b/projects/rocprofiler/src/core/counters/metrics/metrics.h index 08c28ff5bf..e446b6285b 100644 --- a/projects/rocprofiler/src/core/counters/metrics/metrics.h +++ b/projects/rocprofiler/src/core/counters/metrics/metrics.h @@ -211,8 +211,9 @@ class MetricsDict { } xml_ = xml::Xml::Create(xml_name); if (xml_ == NULL) EXC_RAISING(HSA_STATUS_ERROR, "metrics .xml open error '" << xml_name << "'"); - xml_->AddConst("top.const.metric", "MAX_WAVE_SIZE", agent_info->GetDeviceInfo().getMaxQueueSize()); + xml_->AddConst("top.const.metric", "MAX_WAVE_SIZE", agent_info->GetDeviceInfo().getMaxWaveSize()); xml_->AddConst("top.const.metric", "CU_NUM", agent_info->GetDeviceInfo().getCUCount()); + xml_->AddConst("top.const.metric", "XCC_NUM", agent_info->GetDeviceInfo().getXccCount()); xml_->AddConst("top.const.metric", "SIMD_NUM", agent_info->GetDeviceInfo().getSimdCountPerCU() * agent_info->GetDeviceInfo().getCUCount()); xml_->AddConst("top.const.metric", "SE_NUM", agent_info->GetDeviceInfo().getShaderEngineCount()); diff --git a/projects/rocprofiler/src/core/metrics.h b/projects/rocprofiler/src/core/metrics.h index 26bdeef807..2a5b8f37ef 100644 --- a/projects/rocprofiler/src/core/metrics.h +++ b/projects/rocprofiler/src/core/metrics.h @@ -198,6 +198,7 @@ class MetricsDict { EXC_RAISING(HSA_STATUS_ERROR, "metrics .xml open error '" << xml_name << "'"); xml_->AddConst("top.const.metric", "MAX_WAVE_SIZE", agent_info->max_wave_size); xml_->AddConst("top.const.metric", "CU_NUM", agent_info->cu_num); + xml_->AddConst("top.const.metric", "XCC_NUM", agent_info->xcc_num); xml_->AddConst("top.const.metric", "SIMD_NUM", agent_info->simds_per_cu * agent_info->cu_num); xml_->AddConst("top.const.metric", "SE_NUM", agent_info->se_num); ImportMetrics(agent_info, "const");