Skip to content

ci(rocm): resolve latest stable ROCm version instead of hardcoding 10.1.0 - #2397

Closed
farawayso wants to merge 1 commit into
leejet:masterfrom
farawayso:ci/resolve-rocm-version
Closed

farawayso wants to merge 1 commit into
leejet:masterfrom
farawayso:ci/resolve-rocm-version

Conversation

@farawayso

@farawayso farawayso commented Nov 22, 2026 •

Copy link
Copy Markdown
Contributor

Summary

windows-latest-rocm is stuck on ROCm 10.1.0. The job log shows Cache hit for: rocm-wheels-10.1.0-Windows, even though 10.2.0 has been available since 2026-11-18.

ROCM_VERSION is hardcoded in two places: the windows-latest-rocm job env and the ubuntu-latest-rocm matrix. On Windows the cache key is rocm-wheels-${{ env.ROCM_VERSION }}-${{ runner.os }}. Because actions/cache entries are immutable and Install ROCm with Wheels is guarded by if: cache-hit != 'true', a cache hit freezes the installed tree permanently. Clearing the cache does not help: the next run installs ==10.1.0 again and repopulates the same key. Linux does not cache the install tree, so it just reinstalls the pinned old version on every run.

This PR adds one resolve-rocm job that asks pip for the newest stable version on the exact wheel index the install steps already use, then exports that concrete version to both build jobs.

python3 -m pip index versions rocm \
  --index-url https://stable.repo.amd.com/rocm/whl-next/

pip applies PEP 440 ordering and excludes prereleases by default, so this returns the newest GA version that is actually installable (currently rocm (10.2.0)). It is machine-readable, needs no HTML scraping, and shares its source of truth with the pip install that follows it.

No latest alias is used anywhere. The resolved concrete version is exported once as a job output, so cache keys stay stable until AMD ships a real release — only then does the key change and trigger one clean reinstall.

  • Both jobs declare needs: resolve-rocm and set ROCM_VERSION at job level (needs is allowed in jobs.<job_id>.env).
  • Windows: every existing ${{ env.ROCM_VERSION }} reference keeps working unchanged — install cache key, ccache key, pip pin, Setup ROCm Environment, artifact names.
  • Linux: the version leaves matrix.include (it was never a matrix axis); the 5 matrix.ROCM_VERSION references become env.ROCM_VERSION.
  • release needs no change — it already depends on both build jobs, hence transitively on resolve-rocm.

Related Issue / Discussion

No existing issue or PR covers this. The starting point was a manual observation on run 45028374680: the Windows ROCm job reported a cache hit on rocm-wheels-10.1.0-Windows and skipped Install ROCm with Wheels entirely.

Additional Information

Observed on this PR's own CI run (45039067905):

  • resolve-rocm finished green, so the sed extraction produced a non-empty version and the guard passed.
  • windows-latest-rocm ran Install ROCm with Wheels as success, not skipped — i.e. the cache key changed and the new version is being installed. Setup ROCm Environment also passed, so the resolved root is usable.
  • The repository cache list still contains only rocm-wheels-10.1.0-Windows; the new key is written by the post-job step, which is exactly the intended one-time reinstall.
  • ubuntu-latest-rocm and the other jobs were still running when this description was written.

Checklist to confirm once the full matrix completes:

  • resolve-rocm logs Resolved ROCm 10.2.0.
  • Windows: cache miss on rocm-wheels-10.2.0-Windows, pip fetches rocm_sdk_core-10.2.0-py3-none-win_amd64.whl, Bundle HIP runtime libraries and packaging succeed.
  • Linux: Setup TheRock with Wheels installs ==10.2.0, and the ccache key changes accordingly.
  • Artifact names contain rocm-10.2.0.
  • Re-run with no new ROCm release: Windows cache hits again, no reinstall.

The index currently lists only 10.0.0 / 10.1.0 / 10.2.0, all GA. Bundle HIP runtime libraries still pins amdhip64_7.dll verbatim — if AMD renames it, that step fails loudly instead of silently shipping a mismatched runtime, which is the intent. Changing it to a wildcard is left out of this PR on purpose; say the word and I will add it.

Checklist

  • I have read and confirmed this PR follows the contribution guidelines.
  • If this PR adds or changes model support, I have added or updated its usage guide and relevant model index/README entries following the model documentation requirements. — Not applicable, this is a CI-only change with no model support impact.

@coderabbitai

coderabbitai Bot commented Nov 22, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The build workflow resolves a stable ROCm version from the wheel index. The Windows and Ubuntu ROCm jobs use the resolved version instead of fixed or matrix-defined versions.

Changes: ROCm build version

Layer / File(s) Summary
Resolve stable ROCm version
.github/workflows/build.yml
A new job extracts a three-part ROCm version from the stable wheel index, fails if no version is found, and exposes the version as a job output.
Use the resolved version
.github/workflows/build.yml
The Windows and Ubuntu ROCm jobs use the resolved version. The Ubuntu job also uses it for the cache key, wheel installation, and artifact names and upload metadata.

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix

Suggested reviewers: superm1, leejet

Merge Risk: Minimal · up to 11920

The change replaces hard-coded ROCm versions in the Windows and Linux CI jobs with a version resolved from the wheel index. No concrete defect was identified, so the risk is limited to CI behavior that has not yet been run.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title names the main change: the ROCm version is now resolved from the latest stable release instead of being hardcoded to 10.1.0. It uses the conventional ci(scope) prefix and is specific enough …
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Description check Passed The description follows the repository template. It has Summary, Related Issue / Discussion, Additional Information, and Checklist sections. The Summary explains the problem (windows-latest-rocm stuck…
Full details: Title check

Explanation

The title names the main change: the ROCm version is now resolved from the latest stable release instead of being hardcoded to 10.1.0. It uses the conventional ci(scope) prefix and is specific enough for a teammate scanning history.

Full details: Description check

Explanation

The description follows the repository template. It has Summary, Related Issue / Discussion, Additional Information, and Checklist sections. The Summary explains the problem (windows-latest-rocm stuck on ROCm 10.1.0 due to an immutable cache hit), the root cause, and the fix (a resolve-rocm job that exports a concrete version). The Related Issue section names a manual observation on a specific run and states that no issue exists. The Additional Information section reports CI evidence and gives a verification checklist with unchecked items for the remaining matrix jobs. The Checklist is filled in, and the model-documentation item is marked not applicable with a reason. The main gaps are minor: the verification items are still open, and the description does not address whether the Linux ccache behavior needs any follow-up.

Finishing Touches

Generate unit tests (beta)

  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 1731f96f-af37-49bc-b3fc-d6745bdc9602
Commits

Reviewing files that changed from the base of the PR and between 9e7eed7 and 11920d8.

Files selected for processing: 1

  • .github/workflows/build.yml

Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 7 remain after this review.

@leejet

leejet commented Nov 22, 2026

Copy link
Copy Markdown
Owner

Thanks for the PR. ROCm is part of our build toolchain, so we pin its version.

@leejet leejet closed this Nov 22, 2026
@farawayso
farawayso deleted the ci/resolve-rocm-version branch November 22, 2026 17:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants