From e7b96b1e71108dbf7c818e02f7a90edbb909778f Mon Sep 17 00:00:00 2001 From: jatang Date: Tue, 7 May 2024 15:40:56 -0400 Subject: [PATCH] SWDEV-458392 - Add gfx12 support. Change-Id: I91bb6a3329bf77f26005a345c18b63b86922028a --- build.sh | 2 +- src/core/counters/derived/metrics.xml | 27 +++++++++- src/core/counters/metrics/basic_counters.xml | 46 +++++++++++++++++ .../counters/metrics/derived_counters.xml | 32 ++++++++++++ src/core/counters/metrics/metrics.h | 7 +-- src/core/metrics.h | 3 +- test/tool/gfx_metrics.xml | 49 +++++++++++++++++++ test/tool/metrics.xml | 33 +++++++++++++ tests-v2/featuretests/profiler/CMakeLists.txt | 2 +- .../featuretests/profiler/profiler_gtest.cpp | 9 ++-- 10 files changed, 199 insertions(+), 11 deletions(-) diff --git a/build.sh b/build.sh index 8cfcbe21cf..0ce2e8320e 100755 --- a/build.sh +++ b/build.sh @@ -75,7 +75,7 @@ if [ -n "$ROCM_RPATH" ] ; then LD_RUNPATH_FLAG=" -Wl,--enable-new-dtags -Wl,--rp if [ -z "$TO_CLEAN" ] ; then TO_CLEAN=yes; fi if [ -z "$RUN_TEST" ] ; then RUN_TEST=no; fi if [ -z "$ASAN" ] ; then ASAN=False; fi -if [ -z "$GPU_LIST" ] ; then GPU_LIST="gfx900 gfx906 gfx908 gfx90a gfx940 gfx941 gfx942 gfx1030 gfx1100 gfx1101 gfx1102 gfx1031"; fi +if [ -z "$GPU_LIST" ] ; then GPU_LIST="gfx900 gfx906 gfx908 gfx90a gfx940 gfx941 gfx942 gfx1030 gfx1100 gfx1101 gfx1102 gfx1031 gfx1200 gfx1201"; fi ROCPROFILER_ROOT=$(cd $ROCPROFILER_ROOT && echo $PWD) diff --git a/src/core/counters/derived/metrics.xml b/src/core/counters/derived/metrics.xml index edc12850ad..db60b778f6 100755 --- a/src/core/counters/derived/metrics.xml +++ b/src/core/counters/derived/metrics.xml @@ -462,4 +462,29 @@ - \ No newline at end of file + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/core/counters/metrics/basic_counters.xml b/src/core/counters/metrics/basic_counters.xml index 3fc2efc294..22c8680087 100755 --- a/src/core/counters/metrics/basic_counters.xml +++ b/src/core/counters/metrics/basic_counters.xml @@ -737,3 +737,49 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/core/counters/metrics/derived_counters.xml b/src/core/counters/metrics/derived_counters.xml index d9217bc50d..2a873cf2dd 100755 --- a/src/core/counters/metrics/derived_counters.xml +++ b/src/core/counters/metrics/derived_counters.xml @@ -555,6 +555,35 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -581,6 +610,9 @@ +#Navi4x + + diff --git a/src/core/counters/metrics/metrics.h b/src/core/counters/metrics/metrics.h index 609e126bab..78a92d2294 100644 --- a/src/core/counters/metrics/metrics.h +++ b/src/core/counters/metrics/metrics.h @@ -225,10 +225,11 @@ class MetricsDict { agent_name_ = agent_name_.substr(0, agent_name_.find(':')); std::unordered_set supported_agent_names = { - "gfx906", "gfx908", "gfx90a", // Vega - "gfx940", "gfx941", "gfx942", // Mi300 + "gfx906", "gfx908", "gfx90a", // Vega + "gfx940", "gfx941", "gfx942", // Mi300 "gfx1030", "gfx1031", "gfx1032", // Navi2x - "gfx1100", "gfx1101", "gfx1102" // Navi3x + "gfx1100", "gfx1101", "gfx1102", // Navi3x + "gfx1200", "gfx1201", // Navi4x }; if (supported_agent_names.find(agent_name_) != supported_agent_names.end()) { ImportMetrics(agent_info, agent_name_); diff --git a/src/core/metrics.h b/src/core/metrics.h index 2a5b8f37ef..2b8f4286d8 100644 --- a/src/core/metrics.h +++ b/src/core/metrics.h @@ -211,7 +211,8 @@ class MetricsDict { "gfx906", "gfx908", "gfx90a", // Vega "gfx940", "gfx941", "gfx942", // Mi300 "gfx1030", "gfx1031", "gfx1032", // Navi2x - "gfx1100", "gfx1101", "gfx1102" // Navi3x + "gfx1100", "gfx1101", "gfx1102", // Navi3x + "gfx1200", "gfx1201", // Navi4x }; if (supported_agent_names.find(agent_name_) != supported_agent_names.end()) { ImportMetrics(agent_info, agent_name_); diff --git a/test/tool/gfx_metrics.xml b/test/tool/gfx_metrics.xml index 81dc9dde74..f915b653a0 100755 --- a/test/tool/gfx_metrics.xml +++ b/test/tool/gfx_metrics.xml @@ -741,3 +741,52 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/test/tool/metrics.xml b/test/tool/metrics.xml index 75c303077c..8b63912e1c 100755 --- a/test/tool/metrics.xml +++ b/test/tool/metrics.xml @@ -422,6 +422,36 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -459,6 +489,9 @@ + + + # GPUBusy The percentage of time GPU was busy. kernel_id, &kernel_name_c)); - if (profiler_record->counters && !bContainsGFX11Agent) + if (profiler_record->counters && !bSkipCounterNoneZeroCheck) for (uint64_t i = 0; i < profiler_record->counters_count.value; i++) if (profiler_record->counters[i].counter_handler.handle > 0) EXPECT_NE(profiler_record->counters[i].value.value, 0);