Skip to content

[BE] Drop ROCm < 7.1 support from CI/CD - #192258

Closed
atalman wants to merge 1 commit into
pytorch:mainfrom
atalman:atalman/drop-rocm-lt-71
Closed

atalman wants to merge 1 commit into
pytorch:mainfrom
atalman:atalman/drop-rocm-lt-71

Conversation

@atalman

@atalman atalman commented Aug 5, 2026 •

Copy link
Copy Markdown
Collaborator

Companion to #192257 (CUDA < 12.6). ROCM_ARCHES = ["7.2", "7.14"], so nothing
below 7.1 is built or shipped any more.

Changes

file change
.ci/docker/manywheel/Dockerfile_2_28 ARG ROCM_VERSION=6.0 → bare ARG ROCM_VERSION
.ci/docker/manywheel/build.sh drop the 7.0 and 6.4 patch-version fixups
.ci/docker/common/install_rocm.sh drop 4 dead version-gated blocks (see below)
.ci/pytorch/test.sh ROCm benchmark baseline rocm6.4 → rocm7.2
.ci/magma-rocm/README.md example target magma-rocm63 → magma-rocm72

install_rocm.sh

  • the 6.4 patch-version fixup (ver == 6.4 → 6.4.2);
  • rocm-llvm-dev is now installed unconditionally — the >= 6.1 guard can
    no longer be false;
  • the < 7.1 precompiled-MIOpen-kernel branch, which is dead by the
    comment's own admission ("removed in ROCm 7.1");
  • the 6.4-only clr/HIP rebuild (~30 lines gated on >= 6.4 && < 7.0) that
    worked around the ROCm 6.3/6.4 static-code-object regression, including the
    pinned HIP_TAG/CLR_HASH values and the libamdhip64.so.6.4.* copy.

The two that are not pure deletions

  • ARG ROCM_VERSION=6.0 — the value you flagged. Dropped the default rather
    than bumping it, so it matches the rocm_final stage in the same file;
    manywheel/build.sh always passes --build-arg ROCM_VERSION.
  • .ci/pytorch/test.sh — this one was a live bug, not just cruft. The ROCm
    benchmark baseline installed nightlies from whl/nightly/rocm6.4, while the
    comment directly above says to keep the version in sync with the benchmarks
    docker image — and that image is ROCM_VERSION=7.2 (.ci/docker/build.sh,
    pytorch-linux-jammy-rocm-n-py3-benchmarks). Now points at rocm7.2.

Deliberately left alone

  • The C++ ROCM_VERSION preprocessor guards: 37 lines below 70100 in
    aten/, torch/, c10/ (23 × 70000, 6 × 60500, 6 × 60300, 2 ×
    60400). Same reasoning as the CUDA PR — separate, larger change.
  • The MIOpen kdb journal_mode loop. Its comment calls it a ROCm 6.0
    workaround, so it looks like a candidate, but it is not version-gated — it
    runs for 7.x too, so deleting it would change current behaviour rather than
    remove dead code. Worth a follow-up if ROCm folks confirm it is obsolete.
  • There is no cmake ROCm minimum to raise (no ROCM_VERSION VERSION_LESS
    check exists), so this PR has no source-build-narrowing counterpart to the
    CUDA one.

Test plan

bash -n and shellcheck -S error clean on all three edited shell scripts. No
references to ROCm 6.x or 7.0 remain in the touched files. Remaining rocm6.x
strings elsewhere in .ci/ are illustrative comments and docstrings
(e.g. "e.g. manylinux2_28-builder:rocm6.2.4 returns 6.2.4").

cc @jeffdaily @sunway513 @jithunnair-amd @pruthvistony @ROCmSupport @jataylo @hongxiayang @naromero77amd @pragupta @jerrymannil @xinyazhang

@atalman
atalman requested review from a team and jeffdaily as code owners August 5, 2026 20:37
@pytorch-bot

pytorch-bot Bot commented Aug 5, 2026 •

Copy link
Copy Markdown

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/192258

Note: Links to docs will display an error until the docs builds have been completed.

❌ 3 Unclassified Failures

As of commit 0a8cfe2 with merge base d73d123 (image):

UNCLASSIFIED FAILURES - DrCI could not classify the following jobs because the workflow did not run on the merge base. The failures may be pre-existing on trunk or introduced by this PR:

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@pytorch-bot pytorch-bot Bot added ciflow/docker module: rocm AMD GPU support for Pytorch release notes: releng release notes category labels Aug 5, 2026
@pytorchgreenlight

pytorchgreenlight Bot commented Aug 5, 2026 •

Copy link
Copy Markdown

PR approved to be merged without human review

Why
Verified every deleted branch in .ci/docker/common/install_rocm.sh is unreachable: the apt path only ever runs with ROCM_VERSION=7.2 (.ci/docker/build.sh:206) or the `nightly` tarball branch, so the `ver == 6.4` fixup, the `>= 6.1` rocm-llvm-dev guard, the `< 7.1` MIOpen-kernel block (including its `exit 1`), and the `>= 6.4 && < 7.0` clr/HIP rebuild are all dead; the removed 7.0/6.4 fixups in manywheel/build.sh are likewise unreachable since build-manywheel-images.yml only builds rocm7.1/7.2/7.14. Dropping `ARG ROCM_VERSION=6.0` in Dockerfile_2_28 is safe because manywheel/build.sh passes `--build-arg ROCM_VERSION` on both the rocm_final and rocm_final_legacy paths (lines 88, 103), and it now matches the rocm_final stage; an unset value would fail loudly under install_rocm_magma.sh's `set -u` rather than silently building 6.0. The test.sh baseline change is a real fix — the benchmarks image is ROCM_VERSION=7.2 and `rocm7.2` is a published nightly index per ROCM_ARCHES, whereas rocm6.4 is not; the README target magma-rocm72 exists in .ci/magma-rocm/Makefile. Scope is 5 CI/CD files of coherent dead-code removal, no secrets, no weakened live safety check.

reason: clean

Inference job

@atalman atalman changed the title Drop ROCm < 7.1 support from CI/CD [BE] Drop ROCm < 7.1 support from CI/CD Aug 5, 2026
@atalman

atalman commented Aug 6, 2026

Copy link
Copy Markdown
Collaborator Author

@pytorchmergebot merge -f "lint and the builds look ok"

@pytorchmergebot

Copy link
Copy Markdown
Collaborator

Merge started

Your change will be merged immediately since you used the force (-f) flag, bypassing any CI checks (ETA: 1-5 minutes). Please use -f as last resort and instead consider -i/--ignore-current to continue the merge ignoring current failures. This will allow currently pending tests to finish and report signal before the merge.

Learn more about merging in the wiki.

Questions? Feedback? Please reach out to the PyTorch DevX Team

Advanced Debugging
Check the merge workflow status
here

@pytorchmergebot

Copy link
Copy Markdown
Collaborator

Merge failed

Reason: This PR changes files under .ci/docker/, so the docker-builds builds must all pass before merging, but 1 of them failed, the first few are: docker-builds / docker-build (tcp://buildkitd-amd64.buildkit:1234, pytorch-linux-jammy-py3.12-halide). The docker images could not be built, so trunk jobs would be unable to find them. Please fix the docker build and re-run ciflow/docker before merging.

Details for Dev Infra team Raised by workflow job

@atalman

atalman commented Aug 6, 2026

Copy link
Copy Markdown
Collaborator Author

@pytorchmergebot merge -f "lint and the builds look ok"

1 similar comment
@atalman

atalman commented Aug 6, 2026

Copy link
Copy Markdown
Collaborator Author

@pytorchmergebot merge -f "lint and the builds look ok"

@pytorchmergebot

Copy link
Copy Markdown
Collaborator

Merge started

Your change will be merged immediately since you used the force (-f) flag, bypassing any CI checks (ETA: 1-5 minutes). Please use -f as last resort and instead consider -i/--ignore-current to continue the merge ignoring current failures. This will allow currently pending tests to finish and report signal before the merge.

Learn more about merging in the wiki.

Questions? Feedback? Please reach out to the PyTorch DevX Team

Advanced Debugging
Check the merge workflow status
here

@pytorchmergebot

Copy link
Copy Markdown
Collaborator

Merge failed

Reason: Refusing to merge: this PR modifies the CI docker images, but the .ci/docker tree of the merge commit (37ab260664002b8855d806549867573ffc705516) does not match the tree that ciflow/docker built and tested on the PR head (d2ad5bcb594c48527ad7cdb7796bc3aa15b70966). Another docker-affecting change landed on the base branch after your docker images were built, so the images required after this merge were never built or tested (a land race). Please rebase this PR (e.g. @pytorchbot rebase), let the ciflow/docker builds re-run, and then merge again.

Details for Dev Infra team Raised by workflow job

@atalman

atalman commented Aug 6, 2026

Copy link
Copy Markdown
Collaborator Author

@pytorchbot rebase

@pytorchmergebot

Copy link
Copy Markdown
Collaborator

@pytorchbot started a rebase job onto refs/remotes/origin/viable/strict. Check the current status here

@pytorchmergebot

Copy link
Copy Markdown
Collaborator

Successfully rebased atalman/drop-rocm-lt-71 onto refs/remotes/origin/viable/strict, please pull locally before adding more changes (for example, via git checkout atalman/drop-rocm-lt-71 && git pull --rebase)

@pytorchmergebot
pytorchmergebot force-pushed the atalman/drop-rocm-lt-71 branch from 05d63ef to 1d92431 Compare August 6, 2026 20:04
@atalman

atalman commented Aug 7, 2026

Copy link
Copy Markdown
Collaborator Author

@pytorchmergebot merge -f "lint and the builds look ok"

@pytorchmergebot

Copy link
Copy Markdown
Collaborator

Merge started

Your change will be merged immediately since you used the force (-f) flag, bypassing any CI checks (ETA: 1-5 minutes). Please use -f as last resort and instead consider -i/--ignore-current to continue the merge ignoring current failures. This will allow currently pending tests to finish and report signal before the merge.

Learn more about merging in the wiki.

Questions? Feedback? Please reach out to the PyTorch DevX Team

Advanced Debugging
Check the merge workflow status
here

@pytorchmergebot

Copy link
Copy Markdown
Collaborator

Merge failed

Reason: This PR changes files under .ci/docker/, but the docker-builds workflow has not run on it. The CI docker images must be pre-built and pushed to ECR before this lands, otherwise trunk jobs will not be able to find the image they need. Please add the ciflow/docker label to this PR, wait for the docker builds to finish, and then re-issue the merge command.

Details for Dev Infra team Raised by workflow job

@atalman

atalman commented Aug 7, 2026

Copy link
Copy Markdown
Collaborator Author

@pytorchbot rebase

@pytorchmergebot

Copy link
Copy Markdown
Collaborator

@pytorchbot started a rebase job onto refs/remotes/origin/viable/strict. Check the current status here

@pytorchmergebot

Copy link
Copy Markdown
Collaborator

Tried to rebase and push PR #192258, but it was already up to date. Try rebasing against main by issuing:
@pytorchbot rebase -b main

@atalman

atalman commented Aug 7, 2026

Copy link
Copy Markdown
Collaborator Author

@pytorchbot rebase -b main

@pytorchmergebot

Copy link
Copy Markdown
Collaborator

@pytorchbot started a rebase job onto refs/remotes/origin/main. Check the current status here

@pytorchmergebot

Copy link
Copy Markdown
Collaborator

Successfully rebased atalman/drop-rocm-lt-71 onto refs/remotes/origin/main, please pull locally before adding more changes (for example, via git checkout atalman/drop-rocm-lt-71 && git pull --rebase)

@pytorchmergebot
pytorchmergebot force-pushed the atalman/drop-rocm-lt-71 branch from 1d92431 to 26f81dd Compare August 7, 2026 18:40
ROCM_ARCHES is ["7.2", "7.14"], so nothing below 7.1 is built or shipped.
Remove the leftovers:

- .ci/docker/manywheel/Dockerfile_2_28: ARG ROCM_VERSION default was 6.0. Drop
  the default so it matches the rocm_final stage in the same file; manywheel
  build.sh always passes --build-arg ROCM_VERSION.
- .ci/docker/manywheel/build.sh: drop the 7.0 and 6.4 patch-version fixups.
- .ci/docker/common/install_rocm.sh:
  * drop the 6.4 patch-version fixup;
  * install rocm-llvm-dev unconditionally -- the >= 6.1 guard is now always true;
  * drop the < 7.1 precompiled-miopen-kernel branch. Those packages were removed
    in ROCm 7.1, as the comment there already noted, so the branch is dead;
  * drop the 6.4-only clr/HIP rebuild that worked around the ROCm 6.3/6.4 static
    code object regression (~30 lines, gated on >= 6.4 && < 7.0).
- .ci/pytorch/test.sh: the ROCm benchmark baseline pulled nightlies from
  whl/nightly/rocm6.4 while the comment above it says to keep the version in
  sync with the benchmarks docker image, which is ROCM_VERSION=7.2. Point it at
  rocm7.2.
- .ci/magma-rocm/README.md: the example target was magma-rocm63; the Makefile
  only defines magma-rocm72 and magma-rocm71.

The C++ ROCM_VERSION preprocessor guards are intentionally left alone, and so is
the ungated MIOpen kdb journal_mode loop (commented as a ROCm 6.0 workaround but
not version-gated, so removing it would change behaviour for 7.x).
@atalman
atalman force-pushed the atalman/drop-rocm-lt-71 branch from 26f81dd to 0a8cfe2 Compare August 10, 2026 13:45
@atalman

atalman commented Aug 13, 2026

Copy link
Copy Markdown
Collaborator Author

@pytorchmergebot merge -f "lint and the builds look ok"

@pytorchmergebot

Copy link
Copy Markdown
Collaborator

Merge started

Your change will be merged immediately since you used the force (-f) flag, bypassing any CI checks (ETA: 1-5 minutes). Please use -f as last resort and instead consider -i/--ignore-current to continue the merge ignoring current failures. This will allow currently pending tests to finish and report signal before the merge.

Learn more about merging in the wiki.

Questions? Feedback? Please reach out to the PyTorch DevX Team

Advanced Debugging
Check the merge workflow status
here

cyyever added a commit to cyyever/pytorch that referenced this pull request Aug 27, 2026
ROCm minimum supported version is now 7.1 (pytorch#192258), so guards for
ROCM_VERSION >= 60300/60400/60500/70000 and == 60400 are always true or
always false and can be dropped. Version-specific compiler/API
compatibility shims (e.g. typedefs for pre-7.0 toolchains, differing
HIP API call shapes) are left alone even where the same reasoning would
apply, since they can't be verified without a real ROCm build.
cyyever added a commit to cyyever/pytorch that referenced this pull request Aug 27, 2026
ROCm minimum supported version is now 7.1 (pytorch#192258), so guards for
ROCM_VERSION >= 60300/60400/60500/70000 and == 60400 are always true or
always false and can be dropped. Version-specific compiler/API
compatibility shims (e.g. typedefs for pre-7.0 toolchains, differing
HIP API call shapes) are left alone even where the same reasoning would
apply, since they can't be verified without a real ROCm build.
cyyever added a commit to cyyever/pytorch that referenced this pull request Aug 27, 2026
ROCm minimum supported version is now 7.1 (pytorch#192258), so guards for
ROCM_VERSION >= 60300/60400/60500/70000 and == 60400 are always true or
always false and can be dropped. Version-specific compiler/API
compatibility shims (e.g. typedefs for pre-7.0 toolchains, differing
HIP API call shapes) are left alone even where the same reasoning would
apply, since they can't be verified without a real ROCm build.
cyyever added a commit to cyyever/pytorch that referenced this pull request Aug 27, 2026
ROCm minimum supported version is now 7.1 (pytorch#192258), so guards for
ROCM_VERSION >= 60300/60400/60500/70000 and == 60400 are always true or
always false and can be dropped. Version-specific compiler/API
compatibility shims (e.g. typedefs for pre-7.0 toolchains, differing
HIP API call shapes) are left alone even where the same reasoning would
apply, since they can't be verified without a real ROCm build.
cyyever added a commit to cyyever/pytorch that referenced this pull request Aug 27, 2026
ROCm minimum supported version is now 7.1 (pytorch#192258), so the
ROCM_VERSION == 60400 workarounds for the hipblaslt TT fp32 regression
are dead code. This bug-specific exact-match workaround was duplicated
in three places; all three are removed together here.

Signed-off-by: cyy <[email protected]>
jeffdaily pushed a commit to cyyever/pytorch that referenced this pull request Sep 1, 2026
ROCm minimum supported version is now 7.1 (pytorch#192258), so the
ROCM_VERSION == 60400 workarounds for the hipblaslt TT fp32 regression
are dead code. This bug-specific exact-match workaround was duplicated
in three places; all three are removed together here.

Signed-off-by: cyy <[email protected]>
orrangetabby17 pushed a commit to orrangetabby17/pytorch that referenced this pull request Sep 2, 2026
Companion to pytorch#192257 (CUDA < 12.6). `ROCM_ARCHES = ["7.2", "7.14"]`, so nothing
below 7.1 is built or shipped any more.

## Changes

| file | change |
|---|---|
| `.ci/docker/manywheel/Dockerfile_2_28` | `ARG ROCM_VERSION=6.0` → bare `ARG ROCM_VERSION` |
| `.ci/docker/manywheel/build.sh` | drop the 7.0 and 6.4 patch-version fixups |
| `.ci/docker/common/install_rocm.sh` | drop 4 dead version-gated blocks (see below) |
| `.ci/pytorch/test.sh` | ROCm benchmark baseline `rocm6.4` → `rocm7.2` |
| `.ci/magma-rocm/README.md` | example target `magma-rocm63` → `magma-rocm72` |

### `install_rocm.sh`

- the **6.4 patch-version fixup** (`ver == 6.4 → 6.4.2`);
- **`rocm-llvm-dev` is now installed unconditionally** — the `>= 6.1` guard can
  no longer be false;
- the **`< 7.1` precompiled-MIOpen-kernel branch**, which is dead by the
  comment's own admission ("removed in ROCm 7.1");
- the **6.4-only clr/HIP rebuild** (~30 lines gated on `>= 6.4 && < 7.0`) that
  worked around the ROCm 6.3/6.4 static-code-object regression, including the
  pinned `HIP_TAG`/`CLR_HASH` values and the `libamdhip64.so.6.4.*` copy.

### The two that are not pure deletions

- **`ARG ROCM_VERSION=6.0`** — the value you flagged. Dropped the default rather
  than bumping it, so it matches the `rocm_final` stage in the same file;
  `manywheel/build.sh` always passes `--build-arg ROCM_VERSION`.
- **`.ci/pytorch/test.sh`** — this one was a live bug, not just cruft. The ROCm
  benchmark baseline installed nightlies from `whl/nightly/rocm6.4`, while the
  comment directly above says to keep the version in sync with the benchmarks
  docker image — and that image is `ROCM_VERSION=7.2` (`.ci/docker/build.sh`,
  `pytorch-linux-jammy-rocm-n-py3-benchmarks`). Now points at `rocm7.2`.

## Deliberately left alone

- The **C++ `ROCM_VERSION` preprocessor guards**: 37 lines below `70100` in
  `aten/`, `torch/`, `c10/` (23 × `70000`, 6 × `60500`, 6 × `60300`, 2 ×
  `60400`). Same reasoning as the CUDA PR — separate, larger change.
- The **MIOpen kdb `journal_mode` loop.** Its comment calls it a ROCm 6.0
  workaround, so it looks like a candidate, but it is *not* version-gated — it
  runs for 7.x too, so deleting it would change current behaviour rather than
  remove dead code. Worth a follow-up if ROCm folks confirm it is obsolete.
- There is **no cmake ROCm minimum** to raise (no `ROCM_VERSION VERSION_LESS`
  check exists), so this PR has no source-build-narrowing counterpart to the
  CUDA one.

## Test plan

`bash -n` and `shellcheck -S error` clean on all three edited shell scripts. No
references to ROCm 6.x or 7.0 remain in the touched files. Remaining `rocm6.x`
strings elsewhere in `.ci/` are illustrative comments and docstrings
(e.g. "`e.g. manylinux2_28-builder:rocm6.2.4 returns 6.2.4`").

Pull Request resolved: pytorch#192258
Approved by: https://github.com/pytorchgreenlight, https://github.com/jeffdaily
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ciflow/docker Merged module: rocm AMD GPU support for Pytorch release notes: releng release notes category

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants