Skip to content

feat(rocprofiler-compute): Add missing and incomplete gfx1250 metrics equations and definitions - #10066

Open
ywang103-amd wants to merge 10 commits into
rocprofiler-compute-developfrom
users/cfallows-amd/gfx1250_levelcounters_tables
Open

feat(rocprofiler-compute): Add missing and incomplete gfx1250 metrics equations and definitions#10066
ywang103-amd wants to merge 10 commits into
rocprofiler-compute-developfrom
users/cfallows-amd/gfx1250_levelcounters_tables

Conversation

@ywang103-amd

@ywang103-amd ywang103-amd commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

Motivation

gfx1250 analysis support was incomplete relative to the available ROCprofiler SDK counter set. Several useful WGP, cache, and pipeline metrics were absent from the analysis configuration even though their underlying hardware counters are available.

A particular gap involved level-event metrics, such as LDS access latency. These metrics use accumulate(..., HIGH_RES) counters, which consume an additional hardware counter slot for the paired level event. The existing perfmon grouping logic treated only names ending in _ACCUM specially. Derived SDK metrics ending in _ACCUM_sum could instead be placed through normal first-fit packing, undercounting SQ resource usage and allowing rocprofiler to create a pass that exceeds the hardware SQ counter capacity.

This PR expands gfx1250 coverage while making allocation correct for raw and reduced ACCUM counters, so users can collect and analyze level-based metrics reliably without manually splitting counter files.

Technical Details

Accumulated level counters for gfx1250 — Introduces _ACCUM and _ACCUM_sum counter variants across sdk_config.yaml and the analysis config YAMLs, replacing older _sum-based level counter reductions for more accurate latency measurements in ICache, Dcache, and LDS metrics.

New gfx1250 metric tables — Adds VALU FLOPs/IOPs counting, LDS access latency, TXD data bus utilization, and SQC-GL1 stall rate tables to the WGP panel, and PCIe bandwidth (Read/Write/Atomic) to the GL2-EA interface panel.

soc_base.py infra for accumulated counters — Adds _is_accum_counter() helper and block-level reservation logic to correctly handle the new _ACCUM/_ACCUM_sum counter naming convention at the profiling layer.

  • Updated metric-aware coalescing to avoid adding normal metric groups into accumulator buckets.
  • Accumulator counters are placed into dedicated perfmon files and reserve an additional slot in their hardware block for the implicit paired level event programmed by rocprofiler.

Metric description cleanup and GL naming consistency* — Renames all L2/L1/L0 metric keys to GL2/GL1/GL0 in the per-arch descriptions file, removes orphaned entries (VMEM Load/Store, PCIe BW), and adds new sections (Wavefront Launch Stats, WGP Latencies) to bring gfx1250_metrics_description.yaml fully in sync with the analysis configs.

Hash refresh — Updates .config_hashes.json for all four modified gfx1250 YAML panels to keep the pre-commit hash checker passing.

Issue Tracking

JIRA ID: AIPROFCOMP-727
JIRA ID: ROCM-28631/AIPROFCOMP-181

Test Plan

Manual testing on gfx1250 system:
rocprof-compute profile -VVV -n test --no-roof --no-native-tool -- ./test
rocprof-compute analyze -VVV -p workloads/test/GFX1250/ -b 2 3 7 13 15
Level counters reported are populated, tables are populated and not skipping.

Test Result

All passing manual testing listed above.

Submission Checklist

@ywang103-amd
ywang103-amd requested a review from a team as a code owner August 12, 2026 16:04
@ywang103-amd ywang103-amd changed the title feat(rocprofiler-compute): support level counters of MI450 feat(rocprofiler-compute): Add missing metrics of MI450 including support all that use ACCUM counters Aug 12, 2026
@ywang103-amd
ywang103-amd force-pushed the users/cfallows-amd/gfx1250_levelcounters_tables branch from f66a477 to a90cd85 Compare August 12, 2026 17:26

@xuchen-amd xuchen-amd left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if (X != 0) else None divide-by-zero guards are not needed in the yaml file anymore, this is handled in the code in the metric evaluation engine.

Comment on lines +12408 to +12409
- name: SQG_LEVEL_WGP_ACTIVE_sum
description: Accumulated SQG_LEVEL_WGP_ACTIVE (sum across SQG instances).

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

metric name has the suffix _sum, but description suggests an _ACCUM metric, is this intended?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@cfallows-amd , this is an "ACCUM" and "_sum" counter but it's not named with "*_ACCUM_sum".

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This metric in particular has both the summation and the accumulation in the equation:
reduce(accumulate(SQG_LEVEL_WGP_ACTIVE, HIGH_RES),sum). The other level counter equations in this PR only call accumulate()

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@cfallows-amd
image
Actually, I was doing the same thing as this "LDSLatency" defined in def yaml by fei, which uses accumulate sum. But using it directly in metric would break our existing procedure deciding block side for accum counters. Thus, I created new derived counters of accumulate sum but gets the same result of this "LDSLatency".

Signed-off-by: Carrie Fallows <Carrie.Fallows@amd.com>
…hub.com:ROCm/rocm-systems into users/cfallows-amd/gfx1250_levelcounters_tables

# Conflicts:
#	projects/rocprofiler-compute/tools/config_management/.config_hashes.json

Active WGPs: >-
Average number of WGPs with at least one active wavefront.
Average number of WGPs with at least one active wavefront in a cycle.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adding comment here for clarity to others reviewing: this is a cleanup of the metrics that were unused or had changed titles.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment to assist reveiwers: this is a cleanup sync to all of the gfx1250 yaml metrics descriptions- removing unused descriptions, syncing naming conventions, adding new descriptions.

…ls/config_management/.config_hashes.json

Signed-off-by: Carrie Fallows <Carrie.Fallows@amd.com>
@cfallows-amd cfallows-amd changed the title feat(rocprofiler-compute): Add missing metrics of MI450 including support all that use ACCUM counters feat(rocprofiler-compute): Add missing and incomplete gfx1250 metrics equations and definitions Aug 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants