Skip to content

fix(rocprofiler-sdk): average repeated kernel replay counters in rocpd - #11422

Open
amd-vkale wants to merge 16 commits into
developfrom
users/vkale/rocpd-kernel-replay-passes-with-cursor-fixes-help
Open

amd-vkale wants to merge 16 commits into
developfrom
users/vkale/rocpd-kernel-replay-passes-with-cursor-fixes-help

Conversation

@amd-vkale

@amd-vkale amd-vkale commented Sep 10, 2026 •

Copy link
Copy Markdown
Contributor

Motivation

Kernel replay (#7960) executes one dispatch
once per counter group. Each of those executions is a real dispatch with its own timing and its
own counter readings, and each reports the same dispatch_id — that is what makes them passes of
one dispatch rather than separate dispatches. The rocpd export predates replay and treats
dispatch_id as the identity of an execution, so it merges things that are not the same
execution.

Two separate failures follow from that single assumption.

Dispatch rows are dropped. process_dispatch() returned early whenever it saw a dispatch_id
it had already recorded, so only the first pass produced a rocpd_kernel_dispatch row and the
timestamps of every later pass went with it. The drop was silent: the duplicate-dispatch warning
sat after the unconditional early return and could never be reached.

Counter rows are merged and then summed. The counter path had no duplicate check at all, so
every pass's rocpd_pmc_event rows were written — but they all resolved to the first pass's
event_id, because that was the only event the map held. Nothing on the row recorded which pass
produced it. counters_collection then aggregated with SUM(PMC_E.value) grouped by
dispatch_id, summing a counter across every pass that collected it.

The second failure is the more important and key one. Dropping dispatch rows loses data, which is visible to
anyone who counts them. Summing counters across passes produces a number that is wrong but looks
ordinary, and it hits hardest on the counters people are most likely to trust, because the usual
way to write counter groups repeats a sanity counter in each group:

rocprofv3 --pmc SQ_WAVES,SQ_INSTS_VALU,GRBM_COUNT \
          --pmc SQ_WAVES,SQ_INSTS_VALU,GRBM_GUI_ACTIVE \
          --pmc SQ_WAVES,SQ_INSTS_VALU,SQ_INSTS_SALU \
          --replay-mode kernel --kernel-replay-beta-enabled -- ./app

SQ_WAVES is collected three times, once per pass, each time reporting the same 512 waves.
Grouped by dispatch_id that reads as 1536. Counters appearing in only one group were never
affected, which is why the corruption is uneven and hard to spot in review of the output.

Technical Details

A dispatch execution is identified by dispatch_id together with the replay pass that produced
it. The event map is keyed on that pair, so each pass keeps its own event and its own
rocpd_kernel_dispatch row, and the counters of a pass attach to the execution that produced them
through the event_id foreign key that was already present.

Schema — 3.0.5. rocpd_kernel_dispatch gains a nullable replay_pass column, left NULL for
runs that did not replay, where a dispatch_id identifies a single execution on its own.
counters_collection changes its GROUP BY from K.dispatch_id to E.id. Outside kernel replay
there is exactly one event per dispatch_id, so this grouping returns exactly what grouping on
dispatch_id returned — that equivalence is the whole point of the design, and it is asserted
directly in the tests rather than argued. counters_collection and pmc_events additionally
expose replay_pass.

The live schema files were at 3.0.4 (HIP event tracing), so they are first snapshotted under
versions/3.0.4/ — the same way 3.0.3 was frozen when the HIP event table landed — and the new
top-level version is 3.0.5. Databases written by earlier releases stay readable.

Export — source/lib/output/generateRocpd.cpp. A small dispatch_event_map replaces the flat
stable_vector<uint64_t, 512>. First-pass entries stay in the vector, so the non-replay path
performs exactly as it did; passes beyond the first go into a std::map keyed on
(dispatch_id, replay_pass), which keeps the rare case out of the hot structure. Because several
rows can now share a dispatch_id, dispatch_id can no longer double as the
rocpd_kernel_dispatch primary key: replay runs allocate a surrogate row id from a counter on
rocpd_db, and runs without replay keep id == dispatch_id exactly as before. The
duplicate-dispatch warning is restored to a position where it can actually fire, and deliberately
as ROCP_WARNING_IF rather than ROCP_CI_LOG, so a condition that has been silently tolerated
does not become a CI abort the moment it becomes observable.

The pass index on the counter path is the value the SDK computed (tool_counter_record_t already
carries replay_pass). The kernel dispatch buffer records carry no pass field, so on that path the
n-th record seen for a dispatch_id is taken as its n-th pass. That holds because replay executes
the passes of a dispatch in sequence and the buffer preserves completion order, but it is an
inference rather than a reported value. rocprofiler_kernel_dispatch_info_t has
reserved_padding[56] available for an explicit field; adding it is an SDK change rather than an
output-layer one, and it is called out in the docs as the part of this change most worth replacing.

CSV — source/lib/python/rocpd/csv.py. The counter export emits a Replay_Pass column when
the database actually holds replay data, and leaves the existing column set untouched otherwise.
replay_pass is registered in features.py with min_version=3.0.5, alongside graph_launch,
spm_counters, and hip_event, so databases written before the column existed are never queried
for it.

Docs. source/docs/conceptual/kernel_replay/kernel_replay_rocpd_schema.md records what went
wrong, the fix, and the alternatives that were considered and dropped — most notably a separate
replay table keyed on dispatch_id, modelled on the rocpd_sample table SPM added in 3.0.3. That
was rejected because a replay pass carries one integer rather than a payload of its own, because
the 1:N relationship is dispatch-to-execution rather than counter-to-pass and
rocpd_kernel_dispatch is already the per-execution table, and because putting the pass on
rocpd_pmc_event would stop the summing while leaving the dropped dispatch rows and the lost
per-pass timestamps in place. The page also records what remains open: the derived pass index
above, whether the default view should return one row per pass for a replayed run (a product
question rather than a technical one), and the absence of end-to-end hardware coverage.

Issue Tracking

No GitHub issue or JIRA ID — this was found while working on range replay
(#10864) and is being fixed directly. Happy to
file one and link it if that is preferred for release tracking.

Test Plan

New: tests/rocpd-kernel-replay-schema. Drives the shipped schema SQL against SQLite
directly — no GPU, no profiling run, no built SDK — by loading rocpd_tables.sql,
rocpd_views.sql, and data_views.sql into an in-memory database and inserting constructed rows.
Seven tests:

  1. test_kernel_dispatch_has_replay_pass_column — the pass index has somewhere to live.
  2. test_shared_counter_is_not_multiplied_across_passes — SQ_WAVES, repeated in all three
    counter groups, must read 512 per pass rather than 1536 once, and the per-pass values must
    still sum to what the old view reported, so the fix is shown to separate the passes rather
    than discard any of them.
  3. test_old_schema_reproduces_the_multiplication — guards the claim the fix rests on by building
    the same data under the 3.0.4 snapshot and confirming it really does report 1536.
  4. test_group_unique_counters_are_unaffected — counters that appear in only one group were never
    multiplied and must not change.
  5. test_each_pass_keeps_its_own_dispatch_row — each pass is a real execution with its own
    timing, so it gets its own row.
  6. test_plain_run_matches_previous_schema — a non-replay run is compared row for row, over 16
    columns, against the same data built under 3.0.4. This is the backward-compatibility claim,
    tested rather than asserted.
  7. test_plain_run_leaves_replay_pass_null — the column carries no information outside replay.

Extended: tests/rocpd-back-compat. 3.0.5 is added to ROCPD_COMPAT_TESTED_SCHEMAS, which the
harness derives its old/latest sets from automatically. make_db.py now builds, for 3.0.5 and
later, a dispatch executed over two replay passes with a counter attached to each pass's own event
— these are the first rocpd_pmc_event rows in that harness with sample_id IS NULL, so they are
the first to reach counters_collection and exercise the counter CSV path at all. Two CSV
assertions follow the harness's documented absent/present pattern, including the version guard that
keeps the "absent" test correct once 3.0.5 itself becomes an old schema.

Not covered: that a real replayed run on hardware populates replay_pass end to end. That needs
an integration test on the rocprofv3 side and is recorded as an open item in the docs.

Test Result

All 7 schema tests pass locally against the ported schema:

validate.py::test_kernel_dispatch_has_replay_pass_column PASSED
validate.py::test_shared_counter_is_not_multiplied_across_passes PASSED
validate.py::test_old_schema_reproduces_the_multiplication PASSED
validate.py::test_group_unique_counters_are_unaffected PASSED
validate.py::test_each_pass_keeps_its_own_dispatch_row PASSED
validate.py::test_plain_run_matches_previous_schema PASSED
validate.py::test_plain_run_leaves_replay_pass_null PASSED
7 passed in 0.04s

test_old_schema_reproduces_the_multiplication passing is the notable one: the inflated counter
value this PR removes is demonstrated against the frozen 3.0.4 schema, not just asserted about.
test_plain_run_matches_previous_schema passing means the view change is confirmed to be a no-op
for every database without replay data.

The C++ export change is left to CI to compile — the development VM has no ROCm — and is
format-clean under the project's clang-format. The rocpd back-compat and CSV paths need a built
tree and likewise run in CI.

Submission Checklist

Motivation

Kernel replay runs one dispatch once per --pmc group, and every pass reports the same dispatch_id. The counter readings are stored on that dispatch. counters_collection summed them, so a sanity counter repeated in three groups was reported three times too high: SQ_WAVES collected as 512, 512, and 512 came out as 1536.

The default view should stay one number per dispatch. When every reading is the same, that number is the reading. Hardware instances of one counter are not the same reading, and those still sum.

Technical Details

counters_collection keeps one row per dispatch per counter name. The combined value is:

  • the reading itself, when every grouped row has the same value (one collection, or the same value collected again on each replay pass)
  • SUM, when the grouped rows differ (hardware instances)

The individual readings stay in rocpd_pmc_event. Later passes do not get their own dispatch row or timestamps.

There is no replay_pass column and no per-pass CSV column. Develop's schema 3.0.5 SPM location change is unchanged.

rocprofv3 --pmc SQ_WAVES,SQ_INSTS_VALU,GRBM_COUNT \
          --pmc SQ_WAVES,SQ_INSTS_VALU,GRBM_GUI_ACTIVE \
          --pmc SQ_WAVES,SQ_INSTS_VALU,SQ_INSTS_SALU \
          --replay-mode kernel --kernel-replay-beta-enabled -- ./app

Issue Tracking

Related: #15178 (kernel replay and range replay).

Test Plan

tests/rocpd-kernel-replay-schema loads the shipped schema SQL into SQLite with no GPU:

  1. SQ_WAVES repeated three times at 512 reads 512 once, not 1536.
  2. The three raw readings remain in rocpd_pmc_event.
  3. SUM of those same rows is still 1536.
  4. A counter in only one group is unchanged.
  5. Two different readings of one counter, 100 and 300, still sum to 400.
  6. A dispatch with one reading of a counter reports that reading.

tests/rocprofv3/rocpd/validate.py compares the counter CSV to the JSON and database rows with the same rule.

Test Result

validate.py::test_repeated_counter_is_averaged PASSED
validate.py::test_raw_readings_remain PASSED
validate.py::test_sum_of_the_same_rows_is_the_old_inflated_value PASSED
validate.py::test_group_unique_counters_are_unaffected PASSED
validate.py::test_different_readings_of_one_counter_still_sum PASSED
validate.py::test_single_reading_is_unchanged PASSED
6 passed in 0.03s

No ROCm device here, so this was not run as a rocprofv3 profile. The CI failure this addresses is tests.integration.validate.rocprofv3-test-rocpd timing out at 120 seconds on every GPU job after the view averaged every repeated row.

Submission Checklist

Open in Web Open in Cursor 

cursoragent and others added 8 commits September 10, 2026 04:27
Freeze the current schema under versions/3.0.4 so it stays loadable once the
top-level files move on to 3.0.5, matching how 3.0.3 was frozen when the HIP
event table landed.

Co-authored-by: Vivek Kale <vivek.kale@amd.com>
…schema 3.0.5

Kernel replay executes one dispatch once per counter group and every pass
reports the same dispatch_id, so dispatch_id stopped identifying a single
execution. Add rocpd_kernel_dispatch.replay_pass to complete the key, left NULL
for runs that did not replay.

counters_collection now aggregates per event rather than per dispatch_id.
Grouping on dispatch_id summed a counter that appears in several counter groups
across every pass that collected it, so a sanity counter repeated in three
groups read three times high. Each execution owns one event, so grouping on the
event keeps the passes apart. Outside kernel replay there is exactly one event
per dispatch_id, which makes this grouping identical to the 3.0.4 grouping.

counters_collection and pmc_events also expose replay_pass.

Co-authored-by: Vivek Kale <vivek.kale@amd.com>
…xport

The export keyed dispatch events on dispatch_id alone, which kernel replay
breaks in two ways. Dispatch records for passes after the first hit an early
return and were dropped, taking their timestamps with them. Counter records for
every pass then resolved to the first pass's event, so the passes' counters
piled onto one event with nothing recording which pass produced them, and the
counters_collection view summed them.

Key the event map on the dispatch execution -- dispatch_id plus replay pass --
so each pass keeps its own dispatch row and its counters attach to it. The pass
index is already on tool_counter_record_t; the kernel dispatch buffer records
carry no pass index, so on that path the n-th record seen for a dispatch_id is
taken as its n-th pass, which holds because replay runs its passes in sequence
and the buffer preserves completion order.

Runs without kernel replay are unchanged: nothing reports a non-zero pass, so
the flat vector, the row ids and the emitted columns all stay as they were.

Also restores the duplicate-dispatch warning, which sat after an unconditional
early return and could never fire. It warns rather than using ROCP_CI_LOG so
that a condition which has been silently tolerated does not become a CI abort.

Co-authored-by: Vivek Kale <vivek.kale@amd.com>
A replayed run now writes one counter row per pass, so a CSV without the pass
index shows rows that look like duplicates of one dispatch. Emit the column when
the database holds replay data and leave the existing columns untouched
otherwise, so non-replay exports are unchanged.

Register replay_pass in the schema feature table so databases written before
3.0.5, whose counters_collection has no such column, are not queried for it.

Co-authored-by: Vivek Kale <vivek.kale@amd.com>
Drive the shipped schema SQL against SQLite with no GPU and no profiling run,
and assert the two things the schema has to get right: a counter repeated across
counter groups must not be summed across the passes that collected it, and a run
that did not replay must report exactly what the previous schema reported.

The old-schema case is built from the 3.0.4 snapshot so the multiplication the
fix removes is demonstrated rather than asserted.

Co-authored-by: Vivek Kale <vivek.kale@amd.com>
…3.0.5

The generated database now holds a dispatch executed over two replay passes so
the counter export is exercised with the new column, and the CSV assertions
follow the existing absent/present pattern: pre-3.0.5 databases must convert
without a replay_pass column, the latest must carry one.

Co-authored-by: Vivek Kale <vivek.kale@amd.com>
Record what the export got wrong, why the fix keys on the dispatch execution
rather than the dispatch_id, why a separate replay table modelled on the SPM
rocpd_sample table was rejected, and what the change leaves open.

Co-authored-by: Vivek Kale <vivek.kale@amd.com>
The example showed --kernel-replay-beta-enabled alone, which acknowledges the
beta without selecting replay and so would have collected the counter groups
by application replay.

Co-authored-by: Vivek Kale <vivek.kale@amd.com>
@github-actions github-actions Bot added documentation Improvements or additions to documentation project: rocprofiler-sdk labels Sep 10, 2026
@therock-pr-bot

therock-pr-bot Bot commented Sep 10, 2026 •

Copy link
Copy Markdown

✅ All Policy Checks Passed

Check Status Details
📝 PR Description ✅ Pass —
⛔ Forbidden Files ✅ Pass —
🧪 Unit Test ⚠️ Warning Error: Source/code files changed without an accompanying unit test.
Expected: add at least one test file named like test_<name>.py / test_<name>.cpp (or <name>_test.*).
Current: code file(s) changed: projects/rocprofiler-sdk/tests/rocpd-kernel-replay-schema/validate.py, projects/rocprofiler-sdk/tests/rocprofv3/rocpd/validate.py; no test file found
🚫 Draft PR 🔜 To Be Enabled —
🚩 Feature Flag 🔜 To Be Enabled —
📊 Code Coverage 🔜 To Be Enabled —

🎉 All policy checks passed!

📖 Need help? See the Policy FAQ for details on every check and how to fix failures.

🙋 Wish to Override Policy?

@therock-pr-bot

Copy link
Copy Markdown

🚫 Please fix the failed policies before requesting reviews.

The following policy checks failed:

  • ❌ PR Description

The Not ready to Review label has been added to this PR.
Once all policies pass, the label will be removed automatically.

@amd-vkale amd-vkale changed the title Lkernel replay passes fix(rocprofiler-sdk): stop collapsing kernel replay passes in rocpd output Sep 10, 2026
@amd-vkale
amd-vkale requested a lite review from Copilot September 10, 2026 10:55
@amd-vkale
amd-vkale marked this pull request as ready for review September 10, 2026 10:55
@amd-vkale
amd-vkale requested review from a team as code owners September 10, 2026 10:55

Copilot AI 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.

🟡 Changes recommended

The updated rocpd export can crash or mis-handle replayed counter records if the (dispatch_id, replay_pass) mapping is missing, and the CSV replay detection currently queries an aggregated view in a way that can be unnecessarily expensive.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

This PR updates the RocPD export and schema to correctly represent kernel replay runs where multiple executions (“passes”) share the same dispatch_id, preventing dispatch-row collapsing and incorrect counter aggregation across passes.

Changes:

  • Bumps rocpd schema to 3.0.5 by adding rocpd_kernel_dispatch.replay_pass and changing counters_collection aggregation to group by event id (per-execution) rather than dispatch_id.
  • Updates C++ rocpd export to key dispatch→event mapping by (dispatch_id, replay_pass) and emit per-pass kernel dispatch rows (with surrogate dispatch-row IDs under replay).
  • Adds schema-level SQLite tests plus extends rocpd back-compat coverage/docs for the replay-pass behavior.
File summaries
File Description
projects/rocprofiler-sdk/tests/rocpd-kernel-replay-schema/validate.py New SQLite-driven tests validating replay-pass separation + backward compatibility vs 3.0.4.
projects/rocprofiler-sdk/tests/rocpd-kernel-replay-schema/pytest.ini Pytest configuration for the new schema-only test suite.
projects/rocprofiler-sdk/tests/rocpd-kernel-replay-schema/CMakeLists.txt CMake wiring for the new rocpd kernel replay schema integration test.
projects/rocprofiler-sdk/tests/rocpd-back-compat/validate.py Adds CSV expectations for schema 3.0.5 replay_pass presence/absence.
projects/rocprofiler-sdk/tests/rocpd-back-compat/make_db.py Extends synthetic DB generator to model replay-pass data for schema ≥ 3.0.5.
projects/rocprofiler-sdk/tests/rocpd-back-compat/CMakeLists.txt Adds 3.0.5 to the set of schemas covered by back-compat tests.
projects/rocprofiler-sdk/tests/CMakeLists.txt Registers the new rocpd-kernel-replay-schema test directory.
projects/rocprofiler-sdk/source/share/rocprofiler-sdk-rocpd/versions/CMakeLists.txt Adds the 3.0.4 snapshot directory to the rocpd schema versions build.
projects/rocprofiler-sdk/source/share/rocprofiler-sdk-rocpd/versions/3.0.4/CMakeLists.txt New build registration for the 3.0.4 schema snapshot files.
projects/rocprofiler-sdk/source/share/rocprofiler-sdk-rocpd/versions/3.0.4/rocpd_tables.sql New 3.0.4 snapshot of rocpd table definitions.
projects/rocprofiler-sdk/source/share/rocprofiler-sdk-rocpd/versions/3.0.4/rocpd_views.sql New 3.0.4 snapshot of base rocpd views.
projects/rocprofiler-sdk/source/share/rocprofiler-sdk-rocpd/versions/3.0.4/data_views.sql New 3.0.4 snapshot including counters_collection grouping-by-dispatch_id behavior.
projects/rocprofiler-sdk/source/share/rocprofiler-sdk-rocpd/versions/3.0.4/summary_views.sql New 3.0.4 snapshot of summary views.
projects/rocprofiler-sdk/source/share/rocprofiler-sdk-rocpd/versions/3.0.4/rocpd_metadata.sql New 3.0.4 snapshot of metadata insertion SQL.
projects/rocprofiler-sdk/source/share/rocprofiler-sdk-rocpd/versions/3.0.4/rocpd_indexes.sql New 3.0.4 snapshot of index definitions.
projects/rocprofiler-sdk/source/share/rocprofiler-sdk-rocpd/versions.yml Adds 3.0.4 snapshot mappings and documents 3.0.5 replay_pass changes.
projects/rocprofiler-sdk/source/share/rocprofiler-sdk-rocpd/rocpd_tables.sql Updates live schema to 3.0.5 and adds replay_pass column to rocpd_kernel_dispatch.
projects/rocprofiler-sdk/source/share/rocprofiler-sdk-rocpd/data_views.sql Exposes replay_pass and switches counters_collection grouping to E.id (per-event).
projects/rocprofiler-sdk/source/lib/python/rocpd/features.py Registers replay_pass as a schema-gated feature starting at 3.0.5.
projects/rocprofiler-sdk/source/lib/python/rocpd/csv.py Conditionally adds a Replay_Pass column to counter CSV export when replay data exists.
projects/rocprofiler-sdk/source/lib/output/generateRocpd.cpp Updates export logic to preserve per-pass dispatch rows and map counters via (dispatch_id, replay_pass).
projects/rocprofiler-sdk/source/docs/conceptual/kernel_replay/kernel_replay_rocpd_schema.md New documentation explaining the failure mode and schema/export fix.
projects/rocprofiler-sdk/source/docs/conceptual/kernel_replay/index.md Links the new rocpd schema page from kernel replay docs index.
projects/rocprofiler-sdk/source/docs/_toc.yml.in Adds the new rocpd schema page to the documentation TOC.
projects/rocprofiler-sdk/CHANGELOG.md Documents the rocpd schema 3.0.5 replay_pass change and the kernel replay pass-collapsing fix.
Review details
  • Files reviewed: 25/25 changed files
  • Comments generated: 2
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines 1736 to 1739
// Every pass of a replayed dispatch reports the same dispatch_id, so the pass
// index is what routes these counters to the execution that produced them.
auto evt_id = dispatch_evt_ids.get(dispatch_id, record.replay_pass);
for(const auto& count : record.read())
Comment on lines +398 to +407
# Kernel replay executes a dispatch once per counter group, so a replayed run has several rows
# per dispatch_id and the pass index is the only thing separating them. Runs that did not
# replay leave the column NULL and keep their existing set of CSV columns, as do databases
# written before the column existed.
has_replay_passes = (
"replay_pass" in importData.supported_features
and importData.execute(
'SELECT EXISTS (SELECT 1 FROM "counters_collection" WHERE replay_pass IS NOT NULL)'
).fetchone()[0]
)
@amd-vkale

Copy link
Copy Markdown
Contributor Author

@copilot Fix the code for all comments in this review thread.

When a review comment includes a suggested change, apply the suggestion exactly.

Do not make changes beyond what is described in the linked review thread.

Co-authored-by: amd-vkale <291155109+amd-vkale@users.noreply.github.com>

Copilot AI commented Sep 10, 2026

Copy link
Copy Markdown
Contributor

@copilot Fix the code for all comments in this review thread.

When a review comment includes a suggested change, apply ...

Addressed in dabc89e.

cursoragent and others added 4 commits September 25, 2026 04:32
…NDS target

rocprofiler_add_integration_execute_test rejects a COMMAND without DEPENDS
with SEND_ERROR, which failed CMake configure for every job that builds the
tests, so none of this PR's tests ran. Depend on rocprofiler-sdk::rocprofv3,
as the rocpd-back-compat tests do.

Co-authored-by: Vivek Kale <vivek.kale@amd.com>
top_kernels, top and rocpd summary aggregate every rocpd_kernel_dispatch row,
so with per-pass rows a replayed kernel's calls and total duration include
every pass, matching rocprofv3's --stats. Tools that rank kernels from a
replayed run (kerncap's profile step, for one) should count application
dispatches; give the query, and note the uneven distortion when a kernel
filter limits replay to some kernels.

Co-authored-by: Vivek Kale <vivek.kale@amd.com>
…th-cursor-fixes-help

Brings the branch up to date with develop (1,887 commits). There were no
conflicts. The only rocpd change on develop since the branch point is
#10550's environment-variable filter in generateRocpd.cpp, which merges
alongside the replay-pass changes. The rocpd schema SQL is unchanged on
develop, so the frozen 3.0.4 copy still matches it.

Co-authored-by: Vivek Kale <vivek.kale@amd.com>
The CHANGELOG grew an Unreleased section after this branch was cut, so the
merge left the schema 3.0.5 entry under ROCprofiler-SDK 1.4.1 and the
collapsed-passes fix under that release's Known issues. Move both to
Unreleased, under Changed and Resolved issues.

Co-authored-by: Vivek Kale <vivek.kale@amd.com>
@amd-vkale

Copy link
Copy Markdown
Contributor Author

@copilot resolve the merge conflicts on this branch.

counters_collection now averages a counter that kernel replay collects
once per group, instead of summing it and instead of emitting one row
per pass. A repeated SQ_WAVES of 512 reports 512. The individual
readings stay in rocpd_pmc_event. Develop's schema 3.0.5 SPM location
change is kept; the replay_pass column is not.

Co-authored-by: Vivek Kale <vivek.kale@amd.com>
@cursor cursor Bot changed the title fix(rocprofiler-sdk): stop collapsing kernel replay passes in rocpd output fix(rocprofiler-sdk): average repeated kernel replay counters in rocpd Nov 5, 2026
Identical readings of one counter, the kernel replay case, report that
value once. Readings that differ are hardware instances and still sum.
Averaging every repeated row made rocprofv3-test-rocpd time out: the
counter CSV no longer matched the sum of the raw records.

Co-authored-by: Vivek Kale <vivek.kale@amd.com>
@github-actions

github-actions Bot commented Nov 6, 2026

Copy link
Copy Markdown
Contributor

Code Coverage Report

Code Coverage Report

Tests Only

code coverage tests.png

Samples Only

code coverage samples.png

Tests + Samples

code coverage all.png

This branch has not been deployed

No deployments
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.

4 participants