Skip to content

Add HRR project orchestration - #7669

Closed
mangupta wants to merge 2 commits into
ROCm:mainfrom
mangupta:hrr-orchestration
Closed

mangupta wants to merge 2 commits into
ROCm:mainfrom
mangupta:hrr-orchestration

Conversation

@mangupta

@mangupta mangupta commented Aug 26, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Register HRR as a standalone core project in TheRock.
  • Add core-hrr artifact packaging for hrr-playback and HRR headers.
  • Make core-hiptests depend on core-hrr so packaged tests have HRR tooling available.
  • Route projects/hrr changes through the rocm-systems runtimes CI matrix with a build-only HRR configuration.
  • Bump the rocm-systems gitlink to the current mainline commit containing the merged HRR migration.

Related

Validation

  • Parsed BUILD_TOPOLOGY.toml, core/artifact-core-hrr.toml, Linux package.json, and test_tools/therock_consumer_graph.json.
  • Consumer graph drift check passes.
  • rocm-systems CI matrix tests: 32 passed.
  • HRR script tests: 24 passed.
  • HRR unit CTest passed.

Pending

  • Full TheRock configure/build validation is best run by CI after this rebased branch is checked out with the current rocm-systems mainline gitlink.

🤖 Generated with Claude Code

@therock-pr-bot

therock-pr-bot Bot commented Aug 26, 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 PR does not contain code files — Unit Test auto-passed
🔎 pre-commit ✅ Pass —
🚫 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 added the Not ready to Review PR has unresolved policy failures — reviews blocked label Aug 26, 2026
@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.

@danielbolsson

Copy link
Copy Markdown
Contributor

Need to add "core-hrr" entry to build_tools/packaging/linux/package.json to include hrr-playback in linux packaging.

@mangupta

mangupta commented Sep 2, 2026

Copy link
Copy Markdown
Contributor Author

Addressed the review comment in commit 4147d8e98.

Added core-hrr to build_tools/packaging/linux/package.json:

  • amdrocm-runtime: core-hrr / run, which packages bin/hrr-playback.
  • amdrocm-runtime-devel: core-hrr / dev, which packages include/hrr/**.

Validation:

  • python3 -m json.tool build_tools/packaging/linux/package.json passes.
  • Confirmed both package manifests contain the expected core-hrr artifact entries.

@mangupta

mangupta commented Sep 3, 2026

Copy link
Copy Markdown
Contributor Author

Addressed the latest review feedback:

  • Added core-hrr to the Linux package manifest (runtime and runtime-devel).
  • Updated TheRock to pass HRR_BUILD_INTEGRATION_TESTS=${THEROCK_BUILD_TESTING}.
  • Updated the rocm-systems CI matrix so projects/hrr changes select a dedicated hrr build-only configuration; GPU integration execution remains outside the blocking path.
  • Changed the HRR integration-test default to OFF; TheRock explicitly enables it for testing builds.
  • Rebased TheRock and updated the rocm-systems gitlink to 62d9eb8b53621cb3d66d6a83a838f260b48701cb.
  • Added ISSUE ID: ROCm/rocm-systems#10761 to satisfy the policy check.

Validation: TheRock JSON/TOML validation, rocm-systems CI matrix tests (32), HRR script tests (24), and HRR unit CTest pass.

@mangupta

mangupta commented Sep 3, 2026

Copy link
Copy Markdown
Contributor Author

Updated the related rocm-systems PR reference from the closed #10761 to the replacement draft PR #11157. The TheRock gitlink is already pinned to rocm-systems commit 62d9eb8b53621cb3d66d6a83a838f260b48701cb, which is the head of #11157.

@mangupta
mangupta marked this pull request as ready for review September 3, 2026 12:08
@mangupta

mangupta commented Sep 3, 2026

Copy link
Copy Markdown
Contributor Author

Updated the paired TheRock PR to follow the rocm-systems review fixes:

  • The rocm-systems gitlink now points to 4a237fc20b0d3e4adf9abaf0ec90f37f2af58c2e.
  • The rocm-systems CI matrix now maps projects/hrr to a dedicated hrr build-only configuration.
  • HRR_BUILD_INTEGRATION_TESTS defaults OFF; TheRock explicitly enables it for testing builds.
  • Linux packaging includes core-hrr runtime and development components.

The runtime-capture relocation proposal remains deferred.

lamikr pushed a commit to ROCm/rocm-systems that referenced this pull request Sep 9, 2026
## Summary
- Move HRR portable layer (wire format, playback, generator, docs,
skills, tests) to `projects/hrr`.
- Keep runtime capture in CLR and add a hip-tests capture smoke
sentinel.
- Add HRR label/CODEOWNERS metadata and update docs/skills for
standalone playback builds.
- Add build-only TheRock CI matrix coverage for `projects/hrr` changes
and make GPU integration tests explicit opt-in.

## Validation
- Static checks: no flat `hrr_api_args.h` includes; no stale old
playback paths; no conflict markers or pycache artifacts.
- TheRock CI matrix tests: 32 passed.
- HRR script tests: 24 passed.
- Generator idempotency: checksum-stable.
- HRR unit CTest passed.
- HRR integration and `hrr-playback` build passed locally with HIP
compiler setup.
- hip-tests `Unit_HRR_CaptureSmoke` passed locally.

## Pending / follow-up
- Full CLR `amdhip64` build needs a matching ROCm/HSA toolchain; the
local attempt hit an unrelated HSA header mismatch.
- HRR integration runtime parity/datacenter validation remains
environment-dependent.
- TheRock orchestration/packaging is paired in ROCm/TheRock#7669.
- Runtime capture relocation remains intentionally out of scope for this
PR.

## Related
- ROCm/TheRock#7669

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: Daniel Olsson <Daniel.Olsson@amd.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
@mangupta

Copy link
Copy Markdown
Contributor Author

Rebased PR #7669 onto the latest TheRock main and resolved the rocm-systems submodule conflict.

The temporary forced HRR pin has been removed: the branch now uses the current mainline rocm-systems gitlink 1091c91191a7c0b475f178354e9b650739726bf8, which already contains the merged HRR migration from rocm-systems PR #11157.

The HRR orchestration, packaging, and explicit integration-test build settings remain intact. JSON/TOML validation passes.

@nunnikri

Copy link
Copy Markdown
Contributor

The ci is failing in runtime step. Please fix it before getting it for review.

[hrr] /__w/TheRock/TheRock/rocm-systems/projects/hrr/tests/integration/hrr_workload_test.cc:2524:20: warning: 'hipCtxSynchronize' is deprecated: This API is marked as deprecated and might not be supported in future releases. For more details please refer https://github.com/ROCm/HIP/blob/develop/docs/reference/deprecated_api_list.md [-Wdeprecated-declarations]
[hrr]  2524 |   { hipError_t e = hipCtxSynchronize();
[hrr]       |                    ^
[hrr] /__w/TheRock/TheRock/build/core/clr/dist/include/hip/hip_runtime_api.h:6871:1: note: 'hipCtxSynchronize' has been explicitly marked deprecated here
[hrr]  6871 | HIP_DEPRECATED(HIP_DEPRECATED_MSG)
[hrr]       | ^
[hrr] /__w/TheRock/TheRock/build/core/clr/dist/include/hip/hip_runtime_api.h:689:44: note: expanded from macro 'HIP_DEPRECATED'
[hrr]   689 | #define HIP_DEPRECATED(msg) __attribute__((deprecated(msg)))
[hrr]       |                                            ^
[hrr] /__w/TheRock/TheRock/rocm-systems/projects/hrr/tests/integration/hrr_workload_test.cc:2682:9: warning: 'hipProfilerStart' is deprecated: use roctracer/rocTX instead [-Wdeprecated-declarations]
[hrr]  2682 |   (void)hipProfilerStart();
[hrr]       |         ^
[hrr] /__w/TheRock/TheRock/build/core/clr/dist/include/hip/hip_runtime_api.h:7789:1: note: 'hipProfilerStart' has been explicitly marked deprecated here
[hrr]  7789 | HIP_DEPRECATED("use roctracer/rocTX instead")
[hrr]       | ^
[hrr] /__w/TheRock/TheRock/build/core/clr/dist/include/hip/hip_runtime_api.h:689:44: note: expanded from macro 'HIP_DEPRECATED'
[hrr]   689 | #define HIP_DEPRECATED(msg) __attribute__((deprecated(msg)))
[hrr]       |                                            ^
[hrr] /__w/TheRock/TheRock/rocm-systems/projects/hrr/tests/integration/hrr_workload_test.cc:2683:9: warning: 'hipProfilerStop' is deprecated: use roctracer/rocTX instead [-Wdeprecated-declarations]
[hrr]  2683 |   (void)hipProfilerStop();
[hrr]       |         ^
[hrr] /__w/TheRock/TheRock/build/core/clr/dist/include/hip/hip_runtime_api.h:7797:1: note: 'hipProfilerStop' has been explicitly marked deprecated here
[hrr]  7797 | HIP_DEPRECATED("use roctracer/rocTX instead")
[hrr]       | ^
[hrr] /__w/TheRock/TheRock/build/core/clr/dist/include/hip/hip_runtime_api.h:689:44: note: expanded from macro 'HIP_DEPRECATED'
[hrr]   689 | #define HIP_DEPRECATED(msg) __attribute__((deprecated(msg)))
[hrr]       |                                            ^
[hrr] 21 warnings generated when compiling for host.
[hrr] [17/17] Linking HIP executable tests/integration/hrr-integration-tests
[hrr] FAILED: tests/integration/hrr-integration-tests 
[hrr] : && /__w/TheRock/TheRock/build/core/clr/dist/lib/llvm/bin/clang++ -O3 -DNDEBUG --offload-arch=gfx942 --offload-arch=gfx1100 --offload-arch=gfx1101 --offload-arch=gfx1102 --offload-arch=gfx1103 --offload-arch=gfx1151 --offload-arch=gfx1200 --offload-arch=gfx1201 --offload-arch=gfx1250 -L/__w/TheRock/TheRock/build/third-party/sysdeps/linux/zlib/build/stage/lib/rocm_sysdeps/lib -Wl,-rpath-link,/__w/TheRock/TheRock/build/third-party/sysdeps/linux/zlib/build/stage/lib/rocm_sysdeps/lib -L/__w/TheRock/TheRock/build/third-party/sysdeps/linux/zstd/build/stage/lib/rocm_sysdeps/lib -Wl,-rpath-link,/__w/TheRock/TheRock/build/third-party/sysdeps/linux/zstd/build/stage/lib/rocm_sysdeps/lib -L/__w/TheRock/TheRock/build/third-party/sysdeps/linux/numactl/build/stage/lib/rocm_sysdeps/lib -Wl,-rpath-link,/__w/TheRock/TheRock/build/third-party/sysdeps/linux/numactl/build/stage/lib/rocm_sysdeps/lib -L/__w/TheRock/TheRock/build/third-party/sysdeps/linux/bzip2/build/stage/lib/rocm_sysdeps/lib -Wl,-rpath-link,/__w/TheRock/TheRock/build/third-party/sysdeps/linux/bzip2/build/stage/lib/rocm_sysdeps/lib -L/__w/TheRock/TheRock/build/third-party/sysdeps/linux/liblzma/build/stage/lib/rocm_sysdeps/lib -Wl,-rpath-link,/__w/TheRock/TheRock/build/third-party/sysdeps/linux/liblzma/build/stage/lib/rocm_sysdeps/lib -L/__w/TheRock/TheRock/build/third-party/sysdeps/linux/elfutils/build/stage/lib/rocm_sysdeps/lib -Wl,-rpath-link,/__w/TheRock/TheRock/build/third-party/sysdeps/linux/elfutils/build/stage/lib/rocm_sysdeps/lib -L/__w/TheRock/TheRock/build/third-party/sysdeps/linux/libdrm/build/stage/lib/rocm_sysdeps/lib -Wl,-rpath-link,/__w/TheRock/TheRock/build/third-party/sysdeps/linux/libdrm/build/stage/lib/rocm_sysdeps/lib -L/__w/TheRock/TheRock/build/compiler/amd-llvm/stage/lib/llvm/lib -Wl,-rpath-link,/__w/TheRock/TheRock/build/compiler/amd-llvm/stage/lib/llvm/lib -L/__w/TheRock/TheRock/build/compiler/amd-comgr/stage/lib -Wl,-rpath-link,/__w/TheRock/TheRock/build/compiler/amd-comgr/stage/lib -L/__w/TheRock/TheRock/build/core/rocm-kpack/stage/lib -Wl,-rpath-link,/__w/TheRock/TheRock/build/core/rocm-kpack/stage/lib -L/__w/TheRock/TheRock/build/base/rocprofiler-register/stage/lib -Wl,-rpath-link,/__w/TheRock/TheRock/build/base/rocprofiler-register/stage/lib -L/__w/TheRock/TheRock/build/core/ROCR-Runtime/stage/lib -Wl,-rpath-link,/__w/TheRock/TheRock/build/core/ROCR-Runtime/stage/lib -L/__w/TheRock/TheRock/build/core/clr/stage/lib -Wl,-rpath-link,/__w/TheRock/TheRock/build/core/clr/stage/lib    --hip-link --rtlib=compiler-rt -unwindlib=libgcc tests/integration/CMakeFiles/hrr-integration-tests.dir/hrr_workload_test.cc.o tests/integration/CMakeFiles/hrr-integration-tests.dir/hrr_repro_workload_test.cc.o tests/integration/CMakeFiles/hrr-integration-tests.dir/hrr_spt_workload_test.cc.o tests/integration/CMakeFiles/hrr-integration-tests.dir/hrr_roundtrip_test.cc.o -o tests/integration/hrr-integration-tests  playback/libhrr_reader.a  /__w/TheRock/TheRock/build/core/clr/dist/lib/libhiprtc.so.7.16.26370-0000000  /__w/TheRock/TheRock/build/third-party/Catch2/dist/lib/libCatch2Main.a  /__w/TheRock/TheRock/build/core/clr/dist/lib/libamdhip64.so.7.16.26370-0000000  /__w/TheRock/TheRock/build/core/clr/dist/lib/llvm/lib/clang/24/lib/linux/libclang_rt.builtins-x86_64.a  -ldl  /__w/TheRock/TheRock/build/third-party/Catch2/dist/lib/libCatch2.a  /__w/TheRock/TheRock/build/core/clr/dist/lib/libamdhip64.so.7.16.26370-0000000  -lstdc++  -lm  -lgcc_s  -lc  -lgcc_s && :
[hrr] ld.lld: error: undefined symbol: hsa_amd_memory_fill
[hrr] >>> referenced by hrr_repro_workload_test.cc
[hrr] >>>               tests/integration/CMakeFiles/hrr-integration-tests.dir/hrr_repro_workload_test.cc.o:(CATCH2_INTERNAL_TEST_137())
[hrr] /__w/TheRock/TheRock/build/core/clr/dist/lib/llvm/bin/clang-linker-wrapper: error: 'ld.lld' failed
[hrr] clang++: error: linker command failed with exit code 1 (use -v to see invocation)
[hrr] ninja: build stopped: subcommand failed.
[382/395] Building sub-project aqlprofile (in background)
[383/395] Stage installing sub-project aqlprofile
[384/395] Populate artifact aqlprofile
[385/395] Configure sub-project rocprofiler-sdk (in background)
[386/395] Building sub-project rocprofiler-sdk (in background)
[387/395] Stage installing sub-project rocprofiler-sdk
[388/395] Populate artifact rocprofiler-sdk
[389/395] Configure sub-project rocprofiler-compute (in background)
[390/395] Building sub-project rocprofiler-compute (in background)
[391/395] Stage installing sub-project rocprofiler-compute
[392/395] Populate artifact rocprofiler-compute
ninja: build stopped: cannot make progress due to previous errors.
Error: Error: failed to run script step: command terminated with non-zero exit code: error executing command [sh -e /__w/_temp/62bec310-b0ee-11f1-87f1-9d8a31d12260.sh], exit code 1
Error: Process completed with exit code 1.
Error: Executing the custom container implementation failed. Please contact your self hosted runner administrator.

@nunnikri nunnikri 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.

Get a clean ci build

danielbolsson added a commit to ROCm/rocm-systems that referenced this pull request Sep 16, 2026
…#11686)

## Summary

`projects/hrr/tests/integration/hrr_repro_workload_test.cc` calls
`hsa_amd_memory_fill` directly, but the `hrr-integration-tests` target
links no ROCr. `hip::host` resolves ROCr for its own needs and does not
carry it in its link interface, so the call has no definition at link
time.

Name the runtime on the target, guarded by `NOT WIN32` because Windows
has no ROCr and the call site compiles out there.

## Why this was not caught

`HRR_BUILD_INTEGRATION_TESTS` defaults to `OFF`, so nothing in CI had
ever compiled the target. The migration in #11157 landed the
`hsa_amd_memory_fill` call on develop on 2026-09-09; this link fix was
written on 2026-09-10 and stayed on a topic branch.

## How it surfaced

ROCm/TheRock#7669 turns `HRR_BUILD_INTEGRATION_TESTS` on, making it the
first build anywhere to compile the target. It fails against the current
develop gitlink:

```
ld.lld: error: undefined symbol: hsa_amd_memory_fill
>>> referenced by hrr_repro_workload_test.cc
>>>   tests/integration/CMakeFiles/hrr-integration-tests.dir/hrr_repro_workload_test.cc.o
```

That CI failure cannot be fixed inside TheRock: it builds rocm-systems
at a pinned gitlink, so this has to land here first and the pin move
past it.

## Validation

- The integration target links and the full suite passes with this
change on `users/danielbolsson/hrr-development`: 23 unit and 70
integration tests green locally on gfx950, and green across gfx94x,
gfx950, gfx103x, gfx110x, gfx1150, gfx1151 and gfx120x in CI.
- No functional change. One CMake block, build configuration only.

Made with [Cursor](https://cursor.com)

Co-authored-by: Cursor <cursoragent@cursor.com>
@danielbolsson

Copy link
Copy Markdown
Contributor

Fix merged into rocm-systems here (missing lib link): 1a89cce

@mangupta now we need a rocm-systems gitlink bump on this branch.

dlamd1dai pushed a commit to dlamd1dai/rocm-systems that referenced this pull request Sep 16, 2026
## Summary
- Move HRR portable layer (wire format, playback, generator, docs,
skills, tests) to `projects/hrr`.
- Keep runtime capture in CLR and add a hip-tests capture smoke
sentinel.
- Add HRR label/CODEOWNERS metadata and update docs/skills for
standalone playback builds.
- Add build-only TheRock CI matrix coverage for `projects/hrr` changes
and make GPU integration tests explicit opt-in.

## Validation
- Static checks: no flat `hrr_api_args.h` includes; no stale old
playback paths; no conflict markers or pycache artifacts.
- TheRock CI matrix tests: 32 passed.
- HRR script tests: 24 passed.
- Generator idempotency: checksum-stable.
- HRR unit CTest passed.
- HRR integration and `hrr-playback` build passed locally with HIP
compiler setup.
- hip-tests `Unit_HRR_CaptureSmoke` passed locally.

## Pending / follow-up
- Full CLR `amdhip64` build needs a matching ROCm/HSA toolchain; the
local attempt hit an unrelated HSA header mismatch.
- HRR integration runtime parity/datacenter validation remains
environment-dependent.
- TheRock orchestration/packaging is paired in ROCm/TheRock#7669.
- Runtime capture relocation remains intentionally out of scope for this
PR.

## Related
- ROCm/TheRock#7669

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: Daniel Olsson <Daniel.Olsson@amd.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
anugodavar pushed a commit to ROCm/rocm-systems that referenced this pull request Sep 17, 2026
## Summary
- Move HRR portable layer (wire format, playback, generator, docs,
skills, tests) to `projects/hrr`.
- Keep runtime capture in CLR and add a hip-tests capture smoke
sentinel.
- Add HRR label/CODEOWNERS metadata and update docs/skills for
standalone playback builds.
- Add build-only TheRock CI matrix coverage for `projects/hrr` changes
and make GPU integration tests explicit opt-in.

## Validation
- Static checks: no flat `hrr_api_args.h` includes; no stale old
playback paths; no conflict markers or pycache artifacts.
- TheRock CI matrix tests: 32 passed.
- HRR script tests: 24 passed.
- Generator idempotency: checksum-stable.
- HRR unit CTest passed.
- HRR integration and `hrr-playback` build passed locally with HIP
compiler setup.
- hip-tests `Unit_HRR_CaptureSmoke` passed locally.

## Pending / follow-up
- Full CLR `amdhip64` build needs a matching ROCm/HSA toolchain; the
local attempt hit an unrelated HSA header mismatch.
- HRR integration runtime parity/datacenter validation remains
environment-dependent.
- TheRock orchestration/packaging is paired in ROCm/TheRock#7669.
- Runtime capture relocation remains intentionally out of scope for this
PR.

## Related
- ROCm/TheRock#7669

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: Daniel Olsson <Daniel.Olsson@amd.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
@mangupta

Copy link
Copy Markdown
Contributor Author

Fixed the latest CI bookkeeping failures in commit 0cd92937a plus 4d4fa88fc:

  • Added source_paths = ["hrr"] to the core-hrr topology entry.
  • Regenerated test_tools/therock_consumer_graph.json with the hrr node and dependency edges.
  • Added core-hrr coverage for all descriptor components in Linux package manifests: run/doc, dev/doc, and lib/test.
  • Restored the current mainline rocm-systems pointer 1091c91191... in commit 5829f87cb.

These address the Consumer Graph Drift and Validate Artifact Structure failures. The unrelated JAX/rocprofiler test failures are not caused by this PR.

Register HRR orchestration, packaging, and consumer graph coverage without changing the rocm-systems submodule pointer.\n\nCo-Authored-By: Claude <noreply@anthropic.com>
@mangupta

Copy link
Copy Markdown
Contributor Author

Reworked the branch so the PR no longer changes the rocm-systems submodule pointer at all.

The branch was reset to current TheRock main and rebuilt with only these five files:

  • BUILD_TOPOLOGY.toml
  • core/CMakeLists.txt
  • core/artifact-core-hrr.toml
  • build_tools/packaging/linux/package.json
  • test_tools/therock_consumer_graph.json

The submodule pointer is inherited unchanged from current TheRock main (1091c91191...). The consumer graph and artifact component coverage fixes remain included. Branch head is now 664c05169.

Regenerate the remaining hrr consumer edge and declare the lib artifact component so artifact structure validation covers every core-hrr component.\n\nCo-Authored-By: Claude <noreply@anthropic.com>
@mangupta

Copy link
Copy Markdown
Contributor Author

Addressed the two remaining bookkeeping failures in commit 72e2815ad:

  1. Consumer graph drift:
  • Added the missing hrr edge to the second aggregate consumer list (the rocm-cmake list around the miopen/ocl-clr entries).
  • check_consumer_graph_drift.py --check now passes against the committed graph.
  1. Artifact Structure:
  • Added the missing [components.lib."core/hrr/stage"] section to core/artifact-core-hrr.toml.
  • The package manifest already covers all core-hrr components: run/doc, dev/doc, and lib/test.

JSON/TOML validation and the consumer graph drift check pass locally. The unrelated JAX/rocprofiler failures remain outside this PR.

@mangupta
mangupta requested a review from nunnikri September 18, 2026 13:23
{
"Name": "hrr",
"Components": [
"lib",

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.

Isnt lib supposed to be part of runtime package and not test package?

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.

Yes. lib is the shared-library slice, so it belongs on amdrocm-runtime next to run, same as core-hip.

"Name": "hrr",
"Components": [
"dev",
"doc"

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.

doc is already in runtime package. For now its empty so its not creating any conflict. But in future if any files are added it can create duplicate files and create conflict at installation

@danielbolsson danielbolsson Oct 6, 2026 •

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.

Yes. I too suggest dropping doc from amdrocm-runtime-devel and leave it only on the runtime package, matching core-hip.

{
"Name": "hrr",
"Components": [
"doc",

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.

Doc component is empty. Are these modules distributed under same license as hip? Isnt it better to have seperate License file for hrr?

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.

Same license as HIP (MIT). A separate LICENSE file is optional; We can add one if you want it in that component.

@nunnikri

Copy link
Copy Markdown
Contributor

@mangupta there is no documentation of how to enable hip replay or how to use the output. Can we add that(may be in rocm-systems) and link that in TheRock docs as well?
Also is this module already approved by the Product. Can you give the super epic for that?

@mangupta

Copy link
Copy Markdown
Contributor Author

@mangupta there is no documentation of how to enable hip replay or how to use the output. Can we add that(may be in rocm-systems) and link that in TheRock docs as well? Also is this module already approved by the Product. Can you give the super epic for that?

@nunnikri : HRR is already part of ROCm since 10.0 I believe. All this PR and the rocm-systems PR is doing is to move it out of CLR project into its own project so that HRR developers don't need to look for HIP runtime team for code approvals. If you need any details of this you can check with @danielbolsson or @rainayera .

@danielbolsson

Copy link
Copy Markdown
Contributor

@mangupta there is no documentation of how to enable hip replay or how to use the output. Can we add that(may be in rocm-systems) and link that in TheRock docs as well? Also is this module already approved by the Product. Can you give the super epic for that?

We have a PR adding HRR documentation in rocm-systems that has been waiting for review approval for over a month now:
ROCm/rocm-systems#10223

@andraghetti

andraghetti commented Sep 22, 2026 •

Copy link
Copy Markdown

Looked at this from the HRR side. The build and packaging wiring look right to me. I opened AIRUNTIME-2810 to track it.

A few questions:

  • rocjitsu and mirage now depend on base and sysdeps. Doesn't look HRR related. Needed here, or leftover from a rebase?
  • artifact-core-hrr.toml declares dbg and lib with no includes, but the artifact still exposes them. On purpose?
  • doc shows up under two packages in the Linux packaging. Is that fine?

On the clean CI ask: the 13 red checks are all in other projects (tensilelite, rocprim, rocsparse, hipsparselt, rocprofiler, hipdnn, rocjpeg, the JAX wheels, two FFT tests on Windows), plus the description bot. Nothing points at this change. Not sure a clean run is reachable at all here. What do you normally do when the red is all elsewhere?

@danielbolsson danielbolsson 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.

Two packaging adjustments so core-hrr matches core-hip. Each note has a suggestion that can be applied directly. Apply all three together.

Comment on lines +256 to +259
"Components": [
"doc",
"run"
]

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.

lib is the shared-library component, so it belongs on this runtime package with run, same as core-hip. It is empty today.

Suggested change
"Components": [
"doc",
"run"
]
"Components": [
"lib",
"run",
"doc"
]

Comment on lines +344 to +347
"Components": [
"dev",
"doc"
]

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.

doc is already on the runtime package. Listing it here too would install the same files twice once share/doc/** has content. core-hip keeps doc on the runtime package only.

Suggested change
"Components": [
"dev",
"doc"
]
"Components": [
"dev"
]

Comment on lines +433 to +436
"Components": [
"lib",
"test"
]

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.

Drop lib here once it is on the runtime package. This package should keep test only.

Suggested change
"Components": [
"lib",
"test"
]
"Components": [
"test"
]

Comment on lines +252 to 264
"Artifact": "core-hrr",
"Artifact_Subdir": [
{
"Name": "hrr",
"Components": [
"doc",
"run"
]
}
]
},
{
"Artifact": "amd-llvm",

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.

hrr-playback is a replay and inspection tool. A HIP application does not load it to run, so this run slice should not ship in amdrocm-runtime.

Package it the way rocgdb is pulled in: its own package, depended on by the amdrocm-developer-tools metapackage. Leave it out of amdrocm-debugger (different product, license, and maintainer). Keep core-hrr in the CORE feature group with its core-hip dependency, so the binary is still built in the same TheRock run as the capture runtime inside amdhip64. artifact-core-hrr.toml and the hip-tests runtime dependency can stay. include/hrr/** is a single dev slice, so hrr_regions.h and the playback headers travel with this package.

amdrocm-runtime-test currently reaches the binary only because amdrocm-runtime-devel depends on amdrocm-runtime. After this move, add amdrocm-hrr to the test package dependencies. The lib and test slices are empty and can drop off amdrocm-runtime-test.

diff --git a/build_tools/packaging/linux/package.json b/build_tools/packaging/linux/package.json
--- a/build_tools/packaging/linux/package.json
+++ b/build_tools/packaging/linux/package.json
@@ -249,18 +249,6 @@
           }
         ]
       },
-      {
-        "Artifact": "core-hrr",
-        "Artifact_Subdir": [
-          {
-            "Name": "hrr",
-            "Components": [
-              "doc",
-              "run"
-            ]
-          }
-        ]
-      },
       {
         "Artifact": "amd-llvm",
@@ -337,18 +325,6 @@
           }
         ]
       },
-      {
-        "Artifact": "core-hrr",
-        "Artifact_Subdir": [
-          {
-            "Name": "hrr",
-            "Components": [
-              "dev",
-              "doc"
-            ]
-          }
-        ]
-      },
       {
         "Artifact": "core-kpack",
@@ -392,6 +368,8 @@
     "DEBDepends": [
       "amdrocm-runtime-devel",
+      "amdrocm-hrr",
       "amdrocm-sysdeps",
@@ -398,6 +376,7 @@
     "RPMRequires": [
       "amdrocm-runtime-devel",
+      "amdrocm-hrr",
       "amdrocm-sysdeps",
@@ -426,18 +405,6 @@
           }
         ]
       },
-      {
-        "Artifact": "core-hrr",
-        "Artifact_Subdir": [
-          {
-            "Name": "hrr",
-            "Components": [
-              "lib",
-              "test"
-            ]
-          }
-        ]
-      },
       {
         "Artifact": "rocrtst",
@@ -3796,6 +3763,46 @@
     "Gfxarch": "False"
   },
+  {
+    "Package": "amdrocm-hrr",
+    "Version": "",
+    "Architecture": "amd64",
+    "BuildArch": "x86_64",
+    "DEBDepends": [
+      "amdrocm-runtime"
+    ],
+    "RPMRequires": [
+      "amdrocm-runtime"
+    ],
+    "Maintainer": "ROCm Dev Support <rocm-dev.support@amd.com>",
+    "Description_Short": "HIP record and replay playback tool",
+    "Description_Long": "hrr-playback replays HIP captures produced by the HRR capture runtime in amdhip64. Provides archive inspection, replay, and device-to-host validation for debugging GPU workloads. Installs the playback binary and HRR headers.",
+    "Section": "devel",
+    "Priority": "optional",
+    "Group": "unknown",
+    "License": "MIT",
+    "Vendor": "Advanced Micro Devices, Inc",
+    "Homepage": "https://github.com/ROCm/rocm-systems",
+    "Artifactory": [
+      {
+        "Artifact": "core-hrr",
+        "Artifact_Subdir": [
+          {
+            "Name": "hrr",
+            "Components": [
+              "run",
+              "dev",
+              "doc"
+            ]
+          }
+        ]
+      }
+    ],
+    "Gfxarch": "False"
+  },
   {
     "Package": "amdrocm-developer-tools",
@@ -3808,7 +3815,8 @@
       "amdrocm-profiler-base",
       "amdrocm-profiler",
       "amdrocm-emulation",
-      "amdrocm-debugger"
+      "amdrocm-debugger",
+      "amdrocm-hrr"
     ],
     "RPMRequires": [
@@ -3817,7 +3825,8 @@
       "amdrocm-profiler-base",
       "amdrocm-profiler",
       "amdrocm-emulation",
-      "amdrocm-debugger"
+      "amdrocm-debugger",
+      "amdrocm-hrr"
     ],

The wheel allowlist and the Windows MSI are separate channels. This PR does not put hrr-playback in either, and that matches rocgdb being absent from the MSI.

@mangupta mangupta closed this Oct 23, 2026
@github-project-automation github-project-automation Bot moved this from TODO to Done in TheRock Triage Oct 23, 2026
danielbolsson added a commit that referenced this pull request Oct 28, 2026
…8965)

## Motivation

HIP Record and Replay (HRR) captures HIP API calls from inside
`amdhip64` and replays them with `hrr-playback`. Since HRR moved out of
CLR into `rocm-systems/projects/hrr` (ROCm/rocm-systems#11157), TheRock
no longer builds or ships `hrr-playback`.

This PR:

- builds `hrr-playback` as a new `hrr` subproject and `core-hrr`
artifact, and packages it as `amdrocm-hrr`;
- maps `projects/hrr` to an artifact, so a rocm-systems PR that touches
only HRR builds one stage instead of all of them. With rocm-systems'
`.github/scripts/compute_build_stages.py --changed-projects
projects/hrr`, current `main` logs `Unrecognized project(s) ['hrr'] ->
build all stages`. With this branch it selects `compiler-runtime` only
and skips Windows (`windows_amdgpu_families=none`), because `core-hrr`
is Linux-only;
- adds a testing-only `hrr-capture` build variant. Release `amdhip64`
compiles capture out, so HRR's GPU tests need a separate build. The
variant is the release build plus a `HIP_HRR_CAPTURE` flag; release
builds and their artifacts are unchanged.

This supersedes #7669 by @mangupta. His two commits are cherry-picked
with his authorship, followed by the corrections below.

JIRA ID : AIRUNTIME-2871

## Technical Details

**Build and packaging (from #7669, corrected)**

- `core-hrr`: `hip-runtime` group, target-neutral, depends on
`core-hip`, components `run` (`bin/hrr-playback`), `dev`
(`include/hrr`), `dbg` and `doc`.
- `core-hrr` is disabled on Windows (`disable_platforms = ["windows"]`).
Nothing uses `hrr-playback` there: `amdrocm-hrr` is a Linux package, and
no Windows build compiles capture into `amdhip64`. Windows builds and
tarballs therefore have no `hrr-playback.exe`.
- The subproject builds playback only (`HRR_BUILD_TESTS=OFF`, no
catch2). The HRR test suites are not installable yet, and the
integration suite needs a capture-enabled `amdhip64`.
- Dropped from #7669: the `rocjitsu`/`mirage` `artifact_deps` change
(unrelated), the `core-hiptests -> core-hrr` edge and the `hip-tests`
runtime dependency on `hrr` (the hip-tests HRR smoke test does not run
`hrr-playback`), and the empty `lib`/`test` components.
- New `amdrocm-hrr` package (`run`, `dev`, `doc`; depends on
`amdrocm-runtime`; MIT). `amdrocm-developer-tools` depends on it, as it
does on `amdrocm-debugger`. Nothing is added to `amdrocm-runtime*`.
- `install_rocm_from_artifacts.py --hrr` installs `core-hrr_run`.
- Regenerated `test_tools/therock_consumer_graph.json` and added
`core-hrr` to `build_tools/artifact_subprojects.json`.

**`HIP_HRR_CAPTURE` flag and `hrr-capture` variant**

- `FLAGS.cmake`: `HIP_HRR_CAPTURE`, default `OFF`, adds
`HIP_HRR_CAPTURE_ENABLED=1` to `hip-clr`. That is the definition CLR's
capture code checks today. `flags.md` recommends `ROCMBuildFlags.cmake`
plus a private header for new C/C++ consumers. CLR has no such consumer
yet, so this uses the scoped `CPP_DEFINES` path, as
`HSA_HOTSWAP_DEFAULT_ON` does for ROCR-Runtime. It can switch once CLR
resolves the flag itself.
- `CMakePresets.json`: `linux-release-hrr-capture` (Release plus the
flag).
- `amdgpu_family_matrix.py`: an `hrr-capture` Linux variant with suffix
`hrr-capture` (artifact group `multi-arch-hrr-capture`). The name avoids
`san`, which `select_build_runner` routes to sanitizer runners. It is
listed for gfx90a, gfx94x, gfx950, gfx103x, gfx110x, gfx1150, gfx1151,
gfx1153, gfx120x and gfx125x.
- No workflow selects the variant yet. `configure_multi_arch_ci.py`
needs no special case: families are filtered by `build_variants`, and
tests follow the normal trigger rules.

**CI path handling**

TheRock's CI code has no HRR-specific path rules. rocm-systems lists its
HRR workflows, and the HRR paths TheRock never reads
(`projects/hrr/tests`, `tools`, `skills`), in its own
`.github/skip-ci-config.toml`
([ROCm/rocm-systems#13256](ROCm/rocm-systems#13256)).
`configure_multi_arch_ci.py` already reads that file, so a rocm-systems
PR that changes only those paths skips TheRock CI.

An earlier revision of this PR changed other things that are no longer
here:

- it aliased those workflows to `projects/hrr` in
`configure_external_repo_ci.py`;
- it passed external-repo changed files into stage reuse and narrowed
the rebuilt stages.

The stage-reuse part changes reuse for every external repo, and it needs
its own design review. It made no difference for HRR-only changes,
because rocm-systems already limits those to `compiler-runtime` through
`build_stages`.

**Dependency added**

- License: MIT (SPDX headers in `projects/hrr`).
- Owner: `@ROCm/hrr-reviewers`, the code owners of `projects/hrr` in
rocm-systems.
- Build impact: host-only C++ with no device code. Built locally,
playback is 5 C++ objects that compile in about 4 s with `-j4`;
`hrr-playback` is 0.9 MB (0.7 MB stripped).

**Follow-ups, not in this PR**

- A `core-hrrtests` artifact once `projects/hrr` installs its test
binaries and configs so their paths resolve from the installed tree.
- A `test_hrr` component in `fetch_test_configurations.py`, following
`miopen-dbsync`: `linux_cpu_runner: True` and `test_types`, running the
suite under rocJITsu. That uses CPU runners, so it needs no GPU-runner
capacity plan.
- A caller for the `hrr-capture` variant, which nothing selects yet. It
would request `build_variant: hrr-capture` with `build_stages` limited
to `compiler-runtime`. Release builds stay unchanged, and that request
does not rebuild `math-libs`.
- Until those land, rocm-systems HRR CI keeps building its own
capture-enabled `amdhip64` on top of TheRock release artifacts.

## Test Plan

- Unit tests: `build_tools/tests/install_rocm_from_artifacts_test.py`,
`build_tools/github_actions/tests/configure_multi_arch_ci_test.py`,
`amdgpu_family_matrix_test.py` and `check_consumer_graph_drift_test.py`.
New tests:
  - `--hrr` installs `core-hrr_run`;
- `hrr-capture` selects only Linux families that list it, uses its
preset and suffix, and keeps presubmit test runners;
- every listed variant is defined, and every variant preset exists in
`CMakePresets.json`. Removing the new preset makes this test fail.
- `build_tools/tests/configure_external_repo_ci_test.py`: a `therock*`
workflow change on rocm-systems runs all tests. That test was added in
an earlier revision and is kept, because no other test reaches that
branch.
- All of `build_tools/tests`, `build_tools/github_actions/tests` and
`test_tools/tests`.
- `fetch_sources.py`, then a full configure (`-DTHEROCK_ENABLE_ALL=ON
-DTHEROCK_AMDGPU_FAMILIES=gfx94X-dcgpu`) in the pinned manylinux build
image, then `check_consumer_graph_drift.py --check`.
- `generate_subproject_manifest.py --verify` and
`build_tools/tests/configure_stage_test.py` in the same image, on this
branch and on `main`.
- `compute_build_stages.py --changed-projects projects/hrr` from
rocm-systems against `main` and this branch.
- `pre-commit` on the changed files; bandit with
`build_tools/scan_tools/bandit.yml`.

## Test Result

- Unit tests from the earlier local run (install, family matrix,
consumer graph, and `configure_multi_arch_ci` as it was then): 205
passed, 1 skipped (an existing skip).
- At the head of this branch, `build_tools/tests`,
`build_tools/github_actions/tests` and `test_tools/tests`: 2372 passed,
17 skipped. Two files were left out because they also fail on `main` on
the test machine (host ASAN runtime and stub compilation):
`exe_stub_gen_test.py` and `configure_asan_env_test.py`.
- Configure succeeds and reports `HIP_HRR_CAPTURE = OFF` and `CORE_HRR`
enabled. The consumer graph is up to date.
- The committed `artifact_subprojects.json` is already stale on `main`:
it predates several artifacts, and the generator now writes a different
layout. This PR adds only the `core-hrr` entry rather than regenerating
the whole file. As a result, `configure_stage_test.py` has the same
single failure (`test_artifact_subprojects_matches_cmake`) on this
branch as on `main`, with 15 passed. CI skips that test when submodules
are not fetched.
- `compute_build_stages.py`: all stages on `main`. On this branch,
`compiler-runtime` only, with `windows_amdgpu_families=none`.
- The configure and consumer-graph results above predate the Linux-only
change. The Linux graph does not depend on Windows availability, and
this PR's consumer graph drift check covers it.
- `pre-commit` and bandit: clean.
- Not run locally: a full TheRock build of the `hrr` subproject, or a
build with the `hrr-capture` preset. TheRock CI covers the first.

## Submission Checklist

- [x] Look over the contributing guidelines at
https://github.com/ROCm/TheRock/blob/main/CONTRIBUTING.md.

---------

Signed-off-by: Daniel Olsson <daniel.olsson@amd.com>
Co-authored-by: Maneesh Gupta <maneesh.gupta@amd.com>
Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Not ready to Review PR has unresolved policy failures — reviews blocked

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

4 participants