[ci] Add `ci:skip-rocm` as a way to skip straight to PyTorch and JAX CI jobs #9059
<!-- therock-pr-bot-policy-check -->
✅ 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.
<!-- therock-pr-bot-fix-policies -->
🎉 All checks passed! This PR is ready for review.
fyi @ethanwee1 @gulsumgudukbay this (and PRs that build on it) should enable much faster CI times for changes to just pytorch or jax. You may want to review the changes that touch those components too.
@geomin12 if you're okay with this label name we can create it and test for real on this PR. So far I've been testing with workflow_dispatch.
(I'm also considering if we should also have an explicit ci:build-rocm to override the automatic selection...)
The next step will be to automatically detect when a given commit only affects pytorch or jax files and _implicitly_ use this new functionality.
Should have this stacked on top ~tomorrow.
Next PR in the stack, implementing automatic job selection based on files modified, is up now too: https://github.com/ROCm/TheRock/pull/9325
oh i don't think ${{ }} is needed
should we keep this upgrade to another PR? just in case it causes other issues and we can revert
might be helpful to have an explanation as to why? some ppl may know, but i feel it's slightly assumed and better to explain the scenario than have questions
i wonder if we can keep this generic for all package retrievals? (might have a use case later for tarballs, other packages). just food for thought
checked through build_tools/github_actions to see if this fit anywhere better, but this is fine w me
some nits and thoughts, but otherwise lgtm! this is a great feature
Dropping kpack_split from these workflows entirely in https://github.com/ROCm/TheRock/pull/8949
Sure. Needed it for some newer python packages that the github-hosted runners include only in the 26.04 image and didn't want a pip install step ;)
Hmmmm maybe. We already have https://github.com/ROCm/TheRock/blob/main/build_tools/install_rocm_from_artifacts.py with some "get latest from the index" code though. I could put "python" in the file name here at least, or move to https://github.com/ROCm/TheRock/tree/main/build_tools/packaging/python
Oh right, it was pip itself >= 25.1 for pip index version --json.
Working on that update here:
https://github.com/ROCm/TheRock/issues/9335
https://github.com/ROCm/TheRock/pull/9336
I'll pick this back up around Wednesday this week. Still traveling/busy the start of this week.
I added the label at https://github.com/ROCm/TheRock/labels
The input type is string and 'true' is treated as a boolean by actionlint, so this seems to be needed...
Anyways, it'll be removed entirely once that other PR progresses
Moved to build_tools/packaging/python/get_latest_python_package_version.py
Addressed comments and tested again. @marbre / @jayhawk-commits would either of you like to review too?
Planning on merging soon if there is no other review feedback.
geomin12
ScottTodd
Motivation
Progress on https://github.com/ROCm/TheRock/issues/7346
This lets us _explicitly_ choose when a CI run can skip ROCm artifact and package builds altogether and run PyTorch and JAX framework jobs against published packages instead of built-from-source packages. This is most useful for routine changes to the
external-builds/pytorchdirectory such as https://github.com/ROCm/TheRock/commit/7a606919f69dc431d0cec51b63c6a5293aaccf77 where building against any recent enough ROCm python packages is sufficient and we want faster time to signal.The next step will be to automatically detect when a given commit only affects pytorch or jax files and _implicitly_ use this new functionality.
Technical Details
There's quite a bit of plumbing here. They key bits are:
Add
ci:skip-rocmlabel and connect it to job decisions and workflow conditionsCI jobs now carry
framework_rocm_versioninstead ofrocm_package_version.When _building ROCm_, this is the computed package version for the current commit.
* When _skipping ROCm builds_, this is resolved from
rocm_package_index_url(set to https://nightly.repo.amd.com/rocm/whl-next/ )Test Plan
workflow_dispatchwithPR_LABELS: ci:skip-rocm,ci:build-pytorch,ci:build-jaxci:skip-rocmlabel should build pytorch and jax without building rocm: https://github.com/ROCm/TheRock/actions/runs/41110224591?pr=9059Test Result
Workflow dispatch:
https://github.com/ROCm/TheRock/actions/runs/38795725816 (using stable.repo.amd.com)
https://github.com/ROCm/TheRock/actions/runs/38815497486 (using nightly.repo.amd.com)
<img width="1031" height="798" alt="image" src="https://github.com/user-attachments/assets/cc9d1805-56d5-44d9-b590-3ddf7db9b333" />
Submission Checklist