Skip to content

feat(setup): pin ROCm + rocm-libraries in rocm-pin.json, remove rocm-libraries submodule (ALMIOPEN-3465) - #147

Merged
SamuelReeder merged 4 commits into
mainfrom
users/sareeder/rocm-pin-quartz
Nov 24, 2026
Merged

SamuelReeder merged 4 commits into
mainfrom
users/sareeder/rocm-pin-quartz

Conversation

@SamuelReeder

@SamuelReeder SamuelReeder commented Nov 23, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Builds on the Quartz reader from #135 (rebased onto main) and supersedes #145.

Previously, setup_env.py --torch-mode rocm installed rolling ROCm/PyTorch nightly wheels while building hipDNN and miopen-provider from the pinned rocm-libraries git submodule. Whenever the nightly wheel's MIOpen and miopen-provider changed together (such as ROCm/rocm-libraries#16128, renaming miopenConvolution*GetWorkSpaceSizeRange to *_impl in libMIOpen_private.so), libmiopen_plugin.so failed to load on main. Conversely, rolling both live on every CI run exposes developer PRs to upstream regressions that Quartz does not test (for example rocKE, which TheRock builds with HIPKERNELPROVIDER_ENABLE_ROCKE=OFF).

This PR replaces the rocm-libraries submodule with a per-architecture checked-in rocm-pin.json updated via gated Quartz bump PRs:

  1. Per-arch checked-in lockstep pin (rocm-pin.json): Maps each architecture (gfx90a, gfx942, gfx950, gfx1151) to its own last-known-good rocm_version, build_date, therock_commit, rocm_libraries_commit, and index_url, with a default fallback (gfx950) for unlisted architectures and non-ROCm modes.
    • gfx90a: 10.3.0a20261120 / rocm-libraries bd4da658… (newest nightly passing gfx90a Quartz tests)
    • gfx942, gfx950, gfx1151: 10.3.0a20261123 / rocm-libraries 6b5f0a16…
    • Default setup_env.py, CI (setup.yml, check-deserialize.yml), and Docker builds read rocm-pin.json with zero Quartz/TheRock network calls.
  2. Removed rocm-libraries git submodule: Deleted the rocm-libraries gitlink and .gitmodules entry (keeping aiter), gitignored /rocm-libraries/, and updated setup_env.py to sparse-clone from https://github.com/ROCm/rocm-libraries.git on demand. Eliminates broken Dependabot rocm-libraries bump PRs.
  3. Opt-in live Quartz & overrides:
    • --rocm-version latest queries Quartz live and resolves the matching rocm-libraries commit from ROCm/TheRock via a bare --depth 1 --filter=tree:0 fetch (~10 KB, no GitHub REST API rate limit).
    • --rocm-version <VERSION> pins another nightly and resolves its matched rocm-libraries commit.
    • --rocm-libraries-ref <SHA> or an existing rocm-libraries/ checkout/worktree overrides the source commit; on an existing checkout, TheRock lookup is advisory (warns instead of failing offline).
  4. Scheduled per-arch Quartz bump workflow (.github/workflows/bump-rocm-pin.yml): Runs Mon/Wed (and on workflow_dispatch), checks each architecture independently in Quartz (gfx90a/gfx942/gfx950 on Linux; gfx1151 on Windows + Linux builds), advances only architectures with a newer passing nightly, leaves failing architectures untouched, opens/updates a PR on chore/bump-rocm-pin (skipping redundant pushes when unchanged), and enables squash auto-merge (gh pr merge --auto --squash). Updated check-deserialize.yml path filters to include rocm-pin.json and setup_env.py.
  5. Docker: build-dnn-benchmark-performance-image.sh reads rocm-pin.json for --device-target offline by default (no host git or network required), validates --rocm-version / --rocm-libraries-ref up front, and Dockerfile.dnn-benchmark-performance-linux declares ROCM_TORCH_INDEX_URL, ROCM_VERSION, and ROCM_LIBRARIES_REF below COPY . . so new pins reuse the apt layer.

Verification

  • .venv/bin/pytest tests/unit/test_setup_env.py tests/unit/metrics/test_machine_info.py tests/unit/reporting/test_schema_v3.py -q: 186 passed, 1 skipped (Windows-only test).
  • uvx black==25.12.0 --check setup_env.py tests/unit/test_setup_env.py: passed.
  • Workflow YAML syntax, bash -n, Docker dry runs across gfx90a/gfx942/gfx950/gfx1201, and live simulations of .github/workflows/bump-rocm-pin.yml (both no-op and single-arch bump paths): all passed.

@tvy-amd tvy-amd left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense to me. Let's try it out.

Comment thread .github/workflows/bump-rocm-pin.yml Resolved
Comment thread .github/workflows/bump-rocm-pin.yml Resolved
tvy-amd and others added 3 commits November 24, 2026 15:56
…le for the GPU arch

setup_env.py --torch-mode rocm reads the Quartz status.json of each TheRock
nightly and installs the newest one of the last 14 days that qualifies for
the host platform and the GPU architecture:

- the ROCm and PyTorch builds of the platform are success
- the TheRock target of the arch is among the built architectures
- the wheels URL is set
- pipelines.rocm.test and pipelines.pytorch.test of the target are success,
  when the entry exists

A missing test entry does not reject the nightly. Setup prints the suites
without a result and records them as untested. When no nightly qualifies,
setup lists each nightly with every failed check, for example
"linux rocm tests of gfx94X-dcgpu are failure".

--rocm-version pins a build and warns when Quartz reports a failed build or
test for the arch. --torch-index-url without --rocm-version installs the
newest build on that index and does not read Quartz.

Setup writes dnn-bench-rocm-build.json into the venv. Result files copy it to
environment.rocm_build_version, rocm_build_date, therock_commit and
rocm_build_untested.

The image build script selects the nightly on the host and passes it as
ROCM_VERSION. CI logs the selected build and takes the ROCM_VERSION
repository variable. check-deserialize builds for gfx942: Quartz reports
failed gfx90a ROCm tests on every nightly from 20261106 to 20261119.
…libraries submodule, add Quartz bump workflow

Replace the independent rocm-libraries git submodule + rolling nightly wheel
setup with a single checked-in rocm-pin.json that pins the ROCm/PyTorch
wheel version, TheRock commit, and matching rocm-libraries commit together:

- Add rocm-pin.json (10.3.0a20261123 / TheRock eaa2f988 / rocm-libraries
  6b5f0a16) so default setup_env.py, CI, and Docker builds stay in lockstep
  (preventing MIOpen/miopen-provider ABI skew such as ROCm/rocm-libraries#16128)
  with zero runtime Quartz/TheRock network calls.
- Remove the rocm-libraries git submodule (.gitmodules, gitlink, add
  /rocm-libraries/ to .gitignore); keep the aiter submodule. setup_env.py
  sparse-clones rocm-libraries on demand from https://github.com/ROCm/rocm-libraries.git.
- Support --rocm-version latest for opt-in live Quartz selection, resolving
  the matching rocm-libraries commit from ROCm/TheRock via a tree-filtered
  git fetch (advisory on existing checkouts; --rocm-libraries-ref still
  overrides).
- Add .github/workflows/bump-rocm-pin.yml to open/update bump PRs from the
  newest Quartz nightly passing Linux gfx942 + gfx950 tests and Windows
  gfx1151 builds, skipping redundant pushes when the open bump branch already
  has the candidate pin. Trigger check-deserialize on rocm-pin.json and
  setup_env.py changes.
- Simplify build-dnn-benchmark-performance-image.sh and move
  ROCM_TORCH_INDEX_URL, ROCM_VERSION, and ROCM_LIBRARIES_REF below COPY . .
  in Dockerfile.dnn-benchmark-performance-linux so new pins reuse the apt layer.
… auto-merge

Address review feedback on #147:
- Key rocm-pin.json by architecture under archs (gfx90a, gfx942, gfx950,
  gfx1151) with a default fallback (gfx950), so each arch tracks its own
  last-known-good ROCm nightly + matched rocm-libraries commit (gfx90a
  pinned at 10.3.0a20261120 / bd4da658; gfx942, gfx950, gfx1151 at
  10.3.0a20261123 / 6b5f0a16).
- Update bump-rocm-pin.yml to advance each arch independently from Quartz
  (leaving failing archs untouched) and enable squash auto-merge on the
  bump PR (main ruleset blocks direct/force pushes).
- Update Docker build script, docs/setup.md, and unit tests.
@SamuelReeder
SamuelReeder force-pushed the users/sareeder/rocm-pin-quartz branch from 2d80e09 to 436727c Compare November 24, 2026 16:01
…ual-dispatch

Extract per-arch Quartz pin resolution into tools/bump_rocm_pin.py (with
unit tests in tests/unit/test_bump_rocm_pin.py) so both manual GitHub
Actions dispatches and local scheduled automation share one script.
Remove the schedule trigger from .github/workflows/bump-rocm-pin.yml to
avoid racing local cron bumps while keeping workflow_dispatch available.
@SamuelReeder
SamuelReeder force-pushed the users/sareeder/rocm-pin-quartz branch from 66f09c0 to 65aec3e Compare November 24, 2026 16:17
@SamuelReeder SamuelReeder changed the title feat(setup): pin ROCm + rocm-libraries in rocm-pin.json, remove rocm-libraries submodule feat(setup): pin ROCm + rocm-libraries in rocm-pin.json, remove rocm-libraries submodule (ALMIOPEN-3465) Nov 24, 2026
@SamuelReeder
SamuelReeder merged commit 1e6c8a5 into main Nov 24, 2026
18 of 19 checks passed
@SamuelReeder
SamuelReeder deleted the users/sareeder/rocm-pin-quartz branch November 24, 2026 17:22
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