Skip to content

dev(hrr): add a local Docker runner for the test suites - #13620

Merged
danielbolsson merged 6 commits into
developfrom
users/danielbolsson/hrr-local-dev-20c1
Oct 19, 2026
Merged

danielbolsson merged 6 commits into
developfrom
users/danielbolsson/hrr-local-dev-20c1

Conversation

@danielbolsson

@danielbolsson danielbolsson commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

hrr_dev.py builds an image when it is missing and runs the host unit suite plus the integration drivers, under rocJitsu or on local GPUs.

Motivation

Technical Details

Issue Tracking

JIRA ID : AIRUNTIME-2947

Test Plan

Test Result

Submission Checklist

Motivation

Running the HRR host unit suite and the capture/replay integration drivers locally should not require a ROCm or rocJitsu install on the workstation. hrr_dev.py builds an image when it is missing and runs the host unit suite plus the integration drivers, under rocJitsu or on local GPUs. The host only needs Docker.

This is a development tool. It is separate from the HRR CI workflow in #13256.

Technical Details

Every changed file is under projects/hrr.

  • projects/hrr/tests/scripts/hrr_dev.py is the command you run on the host.
    • python3 projects/hrr/tests/scripts/hrr_dev.py emulator
    • python3 projects/hrr/tests/scripts/hrr_dev.py gpu
    • Image name hrr-dev, container name hrr-dev. A missing image is built from projects/hrr/tests/docker/Dockerfile. A missing container is created. A stopped container is started, not recreated.
    • Inside the container the script installs rocm[devel]==10.1.0a20260822 from the ROCm nightly index, builds the host unit suite with HRR_BUILD_INTEGRATION_TESTS=OFF, builds CLR with -DHIP_HRR_CAPTURE_ENABLED, and builds the integration suite for gfx950 and gfx1250.
    • emulator also builds the rocJitsu CLI and runs the integration drivers under rocjitsu --daemon with emulation/rocjitsu/configs/gfx950_mi355x_kmd_2gpu.json (two GPUs) and emulation/rocjitsu/configs/gfx1250_mi455x_kmd_4gpu.json (four GPUs). One family failing still runs the other.
    • gpu passes --device /dev/kfd, --device /dev/dri, and --group-add video, and runs the same integration binary with --arch auto.
    • The host unit binary runs once either way. It has no device code, so it is not launched under rocJitsu or on a GPU.
  • projects/hrr/tests/docker/Dockerfile starts from the TheRock manylinux build image and adds PyYAML, the GitHub CLI, and GCC 13.
  • run_catch2.py gains --launcher. Case listing still executes hrr-integration-tests directly. The launcher prefixes only the suite process, which is how the emulator command wraps rocJitsu.
  • projects/hrr/tests/README.md points at the two commands.

Issue Tracking

JIRA ID : AIRUNTIME-2947

Test Plan

  • From projects/hrr/tests/scripts: python3 -m unittest test_hrr_dev.py test_run_catch2.py. These do not start Docker.
  • On a machine with Docker: python3 projects/hrr/tests/scripts/hrr_dev.py emulator.
  • On a machine with Docker and /dev/kfd: python3 projects/hrr/tests/scripts/hrr_dev.py gpu.

Test Result

On 921a5db92f, test_hrr_dev.py and test_run_catch2.py: 31 passed. The image was not built, and the suites were not run inside a container.

Submission Checklist

Open in Web Open in Cursor 

hrr_dev.py builds an image when it is missing and runs the host unit
suite plus the integration drivers, under rocJitsu or on local GPUs.
Copilot AI balanced review requested due to automatic review settings October 16, 2026 10:56
@danielbolsson
danielbolsson requested a review from a team as a code owner October 16, 2026 10:56

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.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@therock-pr-bot

therock-pr-bot Bot commented Oct 16, 2026 •

Copy link
Copy Markdown

✅ All Policy Checks Passed

Check Status Details
📝 PR Description ✅ Pass —
⛔ Forbidden Files ✅ Pass —
🧪 Unit Test ✅ Pass —
🚫 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.

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

Useful tool. Five points inline; the first three make the default runs fail or leak a token.

Comment thread projects/hrr/tests/scripts/hrr_dev.py Resolved
Comment thread projects/hrr/tests/scripts/hrr_dev.py Resolved
Comment thread projects/hrr/tests/scripts/hrr_dev.py Resolved
Comment thread projects/hrr/tests/scripts/hrr_dev.py Resolved
Comment thread projects/hrr/tests/scripts/hrr_dev.py Resolved
danielbolsson and others added 2 commits October 19, 2026 07:44
Drop the missing handler config, export the capture amdhip64 in emulator
mode, pass the token by name, set HOME for the non-root user, and build
gpu mode for the detected arch.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Signed-off-by: Daniel Olsson <Daniel.Olsson@amd.com>
danielbolsson and others added 3 commits October 19, 2026 09:48
With HOME=/tmp and a non-root uid, pip installs rocm[devel] to
/tmp/.local, so rocm-sdk was not found and the script stopped there.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Daniel Olsson <daniel.olsson@amd.com>
The container sets only ROCM_PATH, so detect_archs could not find the
SDK's amdgpu-arch or rocminfo. An empty list then configured the build
with no GPU target. Point ROCM_SDK at the SDK and stop on an empty list.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Daniel Olsson <daniel.olsson@amd.com>

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

All five points are fixed, and the MI350 gate on 222f148 is green.

@danielbolsson
danielbolsson merged commit f92b29c into develop Oct 19, 2026
85 of 86 checks passed
@danielbolsson
danielbolsson deleted the users/danielbolsson/hrr-local-dev-20c1 branch October 19, 2026 09:46
@systems-assistant

Copy link
Copy Markdown
Contributor

TheRock Submodule Bump Activity

Newest first

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