Skip to content

feat(ci): build wsl-rocdxg when a PR has the ci:run-wsl label - #14472

Open
amd-justchen wants to merge 1 commit into
developfrom
users/justchen/wsl-label-opt-in
Open

amd-justchen wants to merge 1 commit into
developfrom
users/justchen/wsl-label-opt-in

Conversation

@amd-justchen

Copy link
Copy Markdown
Contributor

Note

Drafted with Claude (AI agent), run and reviewed by @amd-justchen.

Motivation

ROCm/TheRock#8457 added opt-in WSL GPU tests: with the ci:run-wsl label, hip-tests and rocrtst also run, non-blocking (xfail), on WSL2 V710 runners next to the native Linux jobs. rocm-systems picked this up with the TheRock bump in #14272.

This makes the label usable on every rocm-systems PR, so HIP and ROCr developers can see and triage WSL results before WSL becomes blocking.

Technical Details

The WSL tests need TheRock's wsl-rocdxg stage (the WSL libhsakmt), and TheRock rejects ci:run-wsl when the build_stages allowlist leaves it out. Full builds (clr, hip, hip-tests, rocr-runtime, CI changes, ...) already include it, but a narrow PR with the label would fail the setup job.

  • compute_build_stages.py takes --pr-labels. With ci:run-wsl it adds the wsl-rocdxg artifact before mapping artifacts to stages, so the stage and its upstream stages are built. Full builds and PRs without the label are unchanged.
  • therock-multi-arch-ci.yml passes the PR labels to it (through env, since label names come from the PR).
  • The ci:run-wsl label now exists in this repo.

To run WSL tests on a PR, add ci:run-wsl plus ci:gfx110X-all (the WSL pool is gfx1101, and gfx110X is not in this repo's default Linux families).

Issue Tracking

GitHub issue: https://github.com/ROCm/TheRock-Infra/issues/317

Test Plan

  • python -m pytest .github/scripts/tests/compute_build_stages_test.py
  • compute_build_stages.py against the real topology at the pinned TheRock b063323.
  • TheRock's configure_multi_arch_ci.py at b063323, fed this repo's PR inputs (families gfx94X,gfx950,gfx125X, labels ci:run-wsl,ci:gfx110X-all).
  • This PR carries ci:run-wsl, ci:gfx110X-all, test:hip-tests and test:rocrtst, so its own CI shows the WSL jobs.

Test Result

  • Unit tests: 21 passed (2 new).
  • Real topology (projects/rdc): compiler-runtime,dctools-core without the label; compiler-runtime,dctools-core,wsl-rocdxg with it. projects/clr stays a full build.
  • TheRock configure: with compiler-runtime,dctools-core and ci:run-wsl it raises ci:run-wsl needs the wsl-rocdxg stage; with this change's allowlist it passes and gives gfx110X-all the wsl-gfx1101-gpu-rocm runner.
  • This PR's CI: see the Test gfx110X-all (WSL) jobs.

Submission Checklist

TheRock (ROCm/TheRock#8457) can also test the Linux build on WSL GPU
runners when a PR has ci:run-wsl. Those tests need TheRock's wsl-rocdxg
stage, and TheRock rejects ci:run-wsl when the build_stages allowlist
omits it, so narrow PRs with the label would fail setup.

compute_build_stages.py now takes the PR labels and, with ci:run-wsl,
adds the wsl-rocdxg artifact before mapping artifacts to stages, so its
upstream stages come along too. Full builds are unchanged.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@amd-justchen amd-justchen added ci:gfx110X-all Opt-in to gfx110X-all builds/tests test:hip-tests Run hip-tests test:rocrtst Run rocrtst tests ci:run-wsl Opt-in to also running WSL-capable Linux tests on WSL GPU runners (non-blocking) labels Oct 28, 2026
@amd-justchen
amd-justchen requested a review from a team as a code owner October 28, 2026 16:52
Copilot AI balanced review requested due to automatic review settings October 28, 2026 16:52
@github-actions github-actions Bot added the github actions Pull requests that update GitHub Actions code label Oct 28, 2026
@therock-pr-bot

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?

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.

🟢 Approval recommended

No active review issues are reported for the opt-in WSL testing changes.

No open issues 🎉

What changed in this PR

Enables opt-in WSL testing for narrowly scoped PRs by including the required wsl-rocdxg build stages when ci:run-wsl is present. Full builds and PRs without the label remain unchanged.

Changes:

  • Passes PR labels through an environment variable to the build-stage script.
  • Adds the WSL artifact before resolving required stages and their dependencies.
  • Adds tests for WSL stage inclusion and label handling.
File Description
.github/​workflows/​therock-multi-arch-ci.yml Passes PR labels to build-stage computation.
.github/​scripts/​tests/​compute_build_stages_test.py Tests WSL stage inclusion and CLI label propagation.
.github/​scripts/​compute_build_stages.py Parses labels and includes WSL stages for opted-in PRs.

Review effort: Balanced

# (ROCm/TheRock#8457). Those tests need the wsl-rocdxg artifact (the WSL
# libhsakmt), and TheRock rejects ci:run-wsl when the allowlist omits its stage.
WSL_RUN_LABEL = "ci:run-wsl"
WSL_ARTIFACT = "wsl-rocdxg"

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 one-off hardcode handling I think should be fine? I can't think of another case where we'd want to do something like this again

If/once we have mature WSL support and enough runner capacity, would the eventual goal be to always build+test WSL for every PR? Or to keep having this opt in system? rocdxg builds fairly quickly (for now) so having it always build may not be so bad.

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.

Opt-in (xfail) for now; default-on once WSL results are green.

- name: Compute build-stage allowlist
id: build_stages
env:
PR_LABELS: ${{ join(github.event.pull_request.labels.*.name, ',') }}

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 will be removed soon (TheRock CI will handle this entirely). can we fix the label issue inside TheRock instead?

if the label is added to a rocm-systems PR, does WSL not run as expected?

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.

It runs today on full-build PRs (clr, hip, hip-tests, rocr-runtime, CI changes), e.g. this PR's run. On narrow PRs, TheRock's setup rejects ci:run-wsl because build_stages lacks wsl-rocdxg; that's the case this change covers.

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.

Makes sense, moved it into TheRock in ROCm/TheRock#9628: ci:run-wsl now adds the wsl-rocdxg stage instead of failing. I'll close this once the pin picks it up.

@amd-justchen

Copy link
Copy Markdown
Contributor Author

CI on this PR: run 40733409077 (the first run was cancelled by a bot-triggered rerun). With ci:run-wsl + ci:gfx110X-all it built WSL ROCDXG and ran WSL hip-tests and WSL rocrtst as xfail next to native gfx110X Linux. The only failure, Windows Build MSI, also fails on other full-build PRs (e.g. https://github.com/ROCm/rocm-systems/actions/runs/40724375558).

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

Labels

ci:gfx110X-all Opt-in to gfx110X-all builds/tests ci:run-wsl Opt-in to also running WSL-capable Linux tests on WSL GPU runners (non-blocking) github actions Pull requests that update GitHub Actions code organization: ROCm test:hip-tests Run hip-tests test:rocrtst Run rocrtst tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants