Skip to content

ci(hrr): add HRR CI with a capture gate - #12794

Closed
danielbolsson wants to merge 6 commits into
developfrom
users/danielbolsson/hrr-ci-capture
Closed

danielbolsson wants to merge 6 commits into
developfrom
users/danielbolsson/hrr-ci-capture

Conversation

@danielbolsson

Copy link
Copy Markdown
Contributor

Motivation

HRR has no CI on develop. The suites exist on hrr-development (#12517, a not-for-merge integration draft); this brings the CI itself onto develop so every HRR PR gets it, and makes it skip cleanly when HRR capture is not enabled.

Technical Details

  • Adds .github/workflows/hrr-ci.yml: host-only unit suite (ubuntu, windows), a multi-arch build of CLR with the capture shims plus projects/hrr, and integration suites on every GPU family with a runner, with per-family reporting. Starts on every pull request; the gate job skips it when no HRR path changed (projects/hrr/** except skills/, projects/clr/hipamd/src/hrr/**, the workflow and the runner-config action), so HRR CI Summary always reports and can be a required check. Also runs on pushes to develop touching those paths, which seeds the ccache that pull requests restore; only develop saves it.
  • The integration jobs install the SDK version the build job used, and select the hidden [hrr] driver cases with [hrr]~[direct].
  • Adds the helpers the workflow calls: run_catch2.py, summarize_junit.py, check_expected_cases.py and the expected-case manifests, with unit tests that run in the Linux unit job.
  • Defines HRR_HAVE_HSA for the integration binary so the HSA cases are compiled and match the manifest.
  • Skip rule. Capture is compiled in only under HIP_HRR_CAPTURE_ENABLED (hip_capture.cpp); no CMake option exists for it. A Capture enabled? gate job turns it off for a manual capture=false run, repository variable HRR_CAPTURE_ENABLED=false/0, or when the guard is gone from hip_capture.cpp. Every other job then skips, not fails. HRR CI Summary resolves to success when capture is off and fails on any failed or unexpectedly skipped job, so it can be a required check.
  • No change to projects/clr. Test-source and CLR changes that live in the HRR stack (feat(hrr): record pointed-to payloads and replay the handler families #10641 and below) are not included.

Not in scope: Multi-Arch CI Summary belongs to therock-multi-arch-ci.yml and is unaffected. It already builds HRR through the hrr entry in therock_matrix.py.

Risk: low for develop (new workflow, path-filtered). Integration jobs on this branch run against develop's test sources and have not been run end to end; see below.

Test Plan

  • actionlint: no findings other than the custom self-hosted runner labels.
  • Gate and summary scripts run locally with capture on, off (variable and dispatch input) and with the guard removed, and with failure, unexpected-skip and fork cases.
  • HRR CI on this PR (capture enabled).

Test Result

Pending CI.

Submission Checklist

danielbolsson and others added 5 commits October 5, 2026 10:35
Bring the HRR CI workflow and its test tooling over from
hrr-development: host-only unit suite on Linux and Windows, a
multi-arch build of CLR with capture shims plus projects/hrr, and
integration suites on every GPU family with a runner, reported per
platform and family.

HRR capture is compiled in only under HIP_HRR_CAPTURE_ENABLED, which has
no CMake option. A "Capture enabled?" gate job turns it off for a manual
capture=false run, for HRR_CAPTURE_ENABLED=false in repository
variables, or when the CLR guard is gone. Every other job then skips
instead of failing, and "HRR CI Summary" resolves to success so it can
be a required check.

Also define HRR_HAVE_HSA for the integration binary so the HSA cases
are compiled and match the expected-case manifest.
Catch2 attaches a failure inside a SECTION to the "Case/Section" record
only, and a case whose assertions all sit in sections has no record
under its own name. Counting only slash-free names printed PASS for a
case with a failing section, and dropped section-only cases entirely.
Group records by top-level case in run_catch2.py and summarize_junit.py,
failure ahead of skip ahead of pass.

Also dump the Catch2 transcript for any non-zero status other than 4
when no case failed, so a crash at exit after some skips still leaves a
log.

Add unit tests for the three helper scripts.
- Start on every pull request and filter paths in the gate, so a required
  "HRR CI Summary" always reports; run on pushes to develop so PRs find a
  warm ccache, and save the cache only there instead of per run.
- Install in the integration jobs the exact SDK version the build job
  used, so capture amdhip64 cannot meet a newer ROCr.
- Select the hidden [hrr] driver cases (API-matrix tiers, kernel-arg and
  HSA first-touch cases) with "[hrr]~[direct]"; default selection
  skipped them.
- Publish no check run for fork pull requests, whose token is read-only.
- Match the capture macro by name outside comments and warn when it is
  missing.
- Fix the RUNPATH comment and the [cpu] case count, and run the helper
  tests in the Linux unit job.
@github-actions github-actions Bot added github actions Pull requests that update GitHub Actions code project: hrr labels Oct 5, 2026
@therock-pr-bot

therock-pr-bot Bot commented Oct 5, 2026

Copy link
Copy Markdown

❌ PR Check — Action Required

Check Status Details
📝 PR Description ❌ Fail Error: PR description must reference a JIRA ID, ISSUE ID, or a GitHub closing keyword.
Expected: include a JIRA ID / ISSUE ID line (separator : or -, or omitted; value may be a JIRA key, a number with/without #, or a link), OR a closing keyword + issue reference. Accepted examples:
• JIRA ID : TESTAUTO-6039
• JIRA ID - #330
• JIRA ID #330
• JIRA ID (on separate line)
ROCM-25757
• ISSUE ID : TESTUTO-3334
• ISSUE ID #3334
• ISSUE ID - TESTAUTO-3433
• ISSUE ID (on separate line)
AIRUNTIME-2352
• ISSUE ID : https://github.com/<org_name>/<repo_name>/issues/1234
• Closes #10
• Fixes octo-org/octo-repo#100
• Resolves: #123
• #123
• https://github.com/<org_name>/<repo_name>/issues/123
Current: no valid JIRA/ISSUE/closing-keyword reference found
⛔ Forbidden Files ✅ Pass —
🧪 Unit Test ✅ Pass —
🔎 pre-commit ⏳ Pending ⏳ Still running…
🚫 Draft PR 🔜 To Be Enabled —
🚩 Feature Flag 🔜 To Be Enabled —
📊 Code Coverage 🔜 To Be Enabled —

⚠️ 1 policy check(s) failed. Please address the issues above before this PR can be Reviewed.

🚫 Please fix the failed policies

  • ❌ PR Description

The Not ready to Review label was added to this PR. Once all policies pass, the label is removed automatically.

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

🙋 Wish to Override Policy?

@therock-pr-bot

therock-pr-bot Bot commented Oct 5, 2026

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.

Signed-off-by: Daniel Olsson <daniel.olsson@amd.com>
@danielbolsson
danielbolsson deleted the users/danielbolsson/hrr-ci-capture branch October 6, 2026 07:11
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.

1 participant