From 8286a92fc1066b381cdd99592d8fc7da1671df60 Mon Sep 17 00:00:00 2001 From: adapryor Date: Thu, 16 Jan 2025 14:51:32 -0600 Subject: [PATCH] Implementation for RDC_FI_PROF_OCCUPANCY_PER_ACTIVE_CU SWDEV-50895 Signed-off-by: adapryor Change-Id: I8da7d9846edabe5629c75f50cd2bb4b23e019a17 Signed-off-by: adapryor [ROCm/rdc commit: 290b90dc89db25f460c6e0689decc7c8c493f49e] --- projects/rdc/common/rdc_field.data | 5 +++- projects/rdc/example/rocprofiler_example.cc | 4 ++-- projects/rdc/include/rdc/rdc.h | 24 +++++++++++-------- projects/rdc/python_binding/rdc_bootstrap.py | 2 ++ .../rdc_modules/rdc_rocp/RdcRocpBase.cc | 15 ++++++++++++ 5 files changed, 37 insertions(+), 13 deletions(-) diff --git a/projects/rdc/common/rdc_field.data b/projects/rdc/common/rdc_field.data index 632f64347f..be3510ac5b 100644 --- a/projects/rdc/common/rdc_field.data +++ b/projects/rdc/common/rdc_field.data @@ -139,8 +139,11 @@ FLD_DESC_ENT(RDC_FI_PROF_EVAL_MEM_W_BW, "Written to video memory kb / ms FLD_DESC_ENT(RDC_FI_PROF_EVAL_FLOPS_16, "Number of fp16 OPS / ms", "FLOPS_16", false) FLD_DESC_ENT(RDC_FI_PROF_EVAL_FLOPS_32, "Number of fp32 OPS / ms", "FLOPS_32", false) FLD_DESC_ENT(RDC_FI_PROF_EVAL_FLOPS_64, "Number of fp64 OPS / ms", "FLOPS_64", false) +// metrics below are not divided by time passed FLD_DESC_ENT(RDC_FI_PROF_VALU_PIPE_ISSUE_UTIL, "Percent of Active Pipe VALU", "VALU_UTILIZATION", false) -FLD_DESC_ENT(RDC_FI_PROF_SM_ACTIVE, "Ratio of Cycles with active warp on SM","VALUBusy", false) +FLD_DESC_ENT(RDC_FI_PROF_SM_ACTIVE, "Ratio of Cycles with active warp on SM","VALUBusy", false) +FLD_DESC_ENT(RDC_FI_PROF_OCC_PER_ACTIVE_CU, "Mean occ per active compute unit", "OCC_CU", false) +FLD_DESC_ENT(RDC_FI_PROF_OCC_ELAPSED, "Mean occ per active cu over elapsed", "OCC_CU_ELAPSED", false) // Events FLD_DESC_ENT(RDC_EVNT_XGMI_0_NOP_TX, "NOPs sent to neighbor 0", "XGMI_NOP_0", false) diff --git a/projects/rdc/example/rocprofiler_example.cc b/projects/rdc/example/rocprofiler_example.cc index 3b156f0fbd..2f7f406d62 100644 --- a/projects/rdc/example/rocprofiler_example.cc +++ b/projects/rdc/example/rocprofiler_example.cc @@ -128,8 +128,8 @@ int run() { field_ids.push_back(RDC_FI_GPU_MEMORY_USAGE); field_ids.push_back(RDC_FI_POWER_USAGE); // profiler metrics - field_ids.push_back(RDC_FI_PROF_MEAN_OCCUPANCY_PER_CU); - field_ids.push_back(RDC_FI_PROF_MEAN_OCCUPANCY_PER_ACTIVE_CU); + field_ids.push_back(RDC_FI_PROF_MEAN_OCC_PER_CU); + field_ids.push_back(RDC_FI_PROF_MEAN_OCC_PER_ACTIVE_CU); field_ids.push_back(RDC_FI_PROF_ACTIVE_CYCLES); field_ids.push_back(RDC_FI_PROF_ACTIVE_WAVES); field_ids.push_back(RDC_FI_PROF_ELAPSED_CYCLES); diff --git a/projects/rdc/include/rdc/rdc.h b/projects/rdc/include/rdc/rdc.h index baf50ecc26..b0a12b7bd4 100644 --- a/projects/rdc/include/rdc/rdc.h +++ b/projects/rdc/include/rdc/rdc.h @@ -39,9 +39,9 @@ extern "C" { #include #else +#include #include #include -#include #endif // __cplusplus /** \file rdc.h @@ -195,7 +195,8 @@ typedef enum { RDC_FI_GPU_MM_ENC_UTIL, //!< Multimedia encoder busy percentage RDC_FI_GPU_MM_DEC_UTIL, //!< Multimedia decoder busy percentage RDC_FI_GPU_MEMORY_ACTIVITY, //!< Memory busy percentage - RDC_FI_GPU_MEMORY_MAX_BANDWIDTH, //