Skip to content

[CI] Add ARM64 CUDA CI image definitions - #197575

Closed
arjkesh wants to merge 2 commits into
pytorch:mainfrom
arjkesh:ci/arm64-cuda-images
Closed

arjkesh wants to merge 2 commits into
pytorch:mainfrom
arjkesh:ci/arm64-cuda-images

Conversation

@arjkesh

@arjkesh arjkesh commented Sep 18, 2026

Copy link
Copy Markdown
Collaborator

Add ARM64 CI CUDA images

cc @nWEIdia @huydhn

@arjkesh
arjkesh requested a review from a team as a code owner September 18, 2026 18:30
@pytorch-bot

pytorch-bot Bot commented Sep 18, 2026 •

Copy link
Copy Markdown

🔗 Helpful Links

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

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

✅ You can merge normally! (1 Unrelated Failure)

As of commit 91c620b with merge base 5c6918c (image):

CRCR (non-blocking) - The following CRCR downstream CI job failed but is non-blocking:

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

@pytorch-bot

pytorch-bot Bot commented Sep 18, 2026 •

Copy link
Copy Markdown

Workflows were awaiting approval. CI has now been triggered for the ciflow labels on this PR.

@linux-foundation-easycla

linux-foundation-easycla Bot commented Sep 18, 2026 •

Copy link
Copy Markdown

CLA Signed
The committers listed above are authorized under a signed CLA.

  • ✅ login: arjkesh / name: Arjuna Keshavan (d4ba63c)

@nWEIdia nWEIdia 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.

LGTM!

@huydhn

huydhn commented Sep 18, 2026

Copy link
Copy Markdown
Contributor

@claude Check if the new images are unique and not duplicate

@claude

claude Bot commented Sep 18, 2026 •

Copy link
Copy Markdown

Claude finished @huydhn's task in 7m 12s —— View job


Duplicate check on the new ARM64 CUDA images

Short answer: the three image names are unique — no duplicates. But two of them declare CUDA patch versions that don't match what install_cuda.sh actually installs, which makes the image label (and baked-in DESIRED_CUDA) wrong.

  • Gather context (diff, build.sh, docker-builds.yml, install_cuda.sh, install_magma.sh)
  • Check for duplicate image names / case labels / matrix entries
  • Check whether the three new configs are distinct from each other and from existing images
  • Sanity-check the CUDA versions and the MAGMA skip
Details

1. Uniqueness — clean

.ci/docker/build.sh case labels: no repeated label anywhere in the file. The three new ones are the only aarch64-cuda* entries in the repo:

.ci/docker/build.sh:316:  pytorch-linux-jammy-aarch64-cuda13.0-cudnn9-py3.10-gcc13)
.ci/docker/build.sh:323:  pytorch-linux-jammy-aarch64-cuda13.2-cudnn9-py3.12-gcc13)
.ci/docker/build.sh:330:  pytorch-linux-jammy-aarch64-cuda13.4-cudnn9-py3.12-gcc13)

.github/workflows/docker-builds.yml: the 39 names in the docker-image-name list are all distinct, and none of the three new include: entries collides with a list entry. That matters mechanically — in a GHA matrix, an include entry whose keys match an existing combination is merged into it instead of adding a job. Since these docker-image-name values are new, each include correctly creates a new job with the arm64 buildkit address and runner label, same pattern as the two existing aarch64-py3.10-gcc13 entries.

Each of the three configs is also functionally distinct: 13.0/py3.10, 13.2/py3.12, 13.4/py3.12. The 13.2 and 13.4 ones are identical apart from CUDA version, which mirrors how x86 does it (cuda13.2-cudnn9-py3.12-gcc11 vs cuda13.4-cudnn9-py3.12-gcc11), so that's intended, not accidental duplication.

2. CUDA patch versions don't match what gets installed

.ci/docker/common/install_cuda.sh:234-237 dispatches on major.minor only:

13.2|13.2.*) install_132;   # -> install_cuda 13.2.2 ...
13.4|13.4.*) install_134;   # -> install_cuda 13.4.1 ...

So:

build.sh declares Toolkit actually installed x86 sibling images declare
13.0.3 (line 317) 13.0.3 13.0.3 ✅
13.2.1 (line 324) 13.2.2 13.2.2 (lines 118/126/134)
13.4.0 (line 331) 13.4.1 13.4.1 (line 142), 13.4.0 (line 150)

The declared value isn't inert: CUDA_VERSION is baked in as ENV DESIRED_CUDA (ubuntu/Dockerfile:68) and is used by install_cusparselt.sh, so an image labeled 13.2.1 ships a 13.2.2 toolkit. 13.2.1 is a brand-new inconsistency (every existing 13.2 image says 13.2.2); 13.4.0 at least matches the pre-existing 13.4.0 on line 150, but that line is already wrong for the same reason. Suggest CUDA_VERSION=13.2.2 and CUDA_VERSION=13.4.1.

Fix this →

3. Other observations (not duplication)

  • No ACL/OPENBLAS. The existing aarch64 images set ACL=yes + OPENBLAS=yes (build.sh:310-315), and the aarch64 CUDA wheel path explicitly uses NVPL BLAS + ACL (.ci/wheel/linux/build_wheel.py:46-50). The new CI images set neither, so builds from them will pick up whatever system BLAS is present and lose oneDNN/ACL. Intentional for a first cut?
  • ARG TARGETARCH is declared too late to help install_cuda.sh. It's added at ubuntu/Dockerfile:72, but install_cuda.sh runs at line 67. That script falls back to uname -m, which is correct here because the arm64 buildkit builder is native — so this works, but the ARG only ever affects the MAGMA step. If you want it to apply consistently, move the ARG TARGETARCH above line 63.
  • MAGMA skip could live in the script. install_magma.sh only fetches x86 tarballs, so an early return there for aarch64 would keep the Dockerfile's one-liner intact rather than growing a 6-line case. ENV MAGMA_HOME staying set is harmless — cmake/Dependencies.cmake:1561-1571 just flips USE_MAGMA off when it can't find the lib.
  • Nothing consumes these images yet. No workflow references the three new names, so each docker-builds run will build three extra ARM64 images that no build/test job pulls. Fine if a follow-up PR wires them up; worth confirming that's the plan so they don't sit as unused weekly builds.
| Branch: [`ci/arm64-cuda-images`](https://github.com/pytorch/pytorch/tree/ci/arm64-cuda-images)

Comment thread .ci/docker/build.sh Resolved

@huydhn huydhn 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.

LGTM!

@nWEIdia

nWEIdia commented Sep 19, 2026 •

Copy link
Copy Markdown
Collaborator

@huydhn how do we find the corresponding ghcr docker image? Or the images generated are only pull-able via 308535385114.dkr.ecr.us-east-1.amazonaws.com/pytorch/manylinuxaarch64-builder:cuda13.4-8b4d9241f58b807e6c71cb26752df93398671785?
https://github.com/pytorch/pytorch/actions/runs/35382197051/job/105720874444?pr=197575

@nWEIdia

nWEIdia commented Sep 19, 2026

Copy link
Copy Markdown
Collaborator

Claude review above has the following call out:

No ACL/OPENBLAS. The existing aarch64 images set ACL=yes + OPENBLAS=yes (build.sh:310-315), and the aarch64 CUDA wheel path explicitly uses NVPL BLAS + ACL (.ci/wheel/linux/build_wheel.py:46-50). The new CI images set neither, so builds from them will pick up whatever system BLAS is present and lose oneDNN/ACL. Intentional for a first cut?

We should mark it as a TODO and follow up in a subsequent PR. The rest of the claude review comments seem cosmetic suggestions.

@arjkesh

arjkesh commented Sep 19, 2026

Copy link
Copy Markdown
Collaborator Author

@pytorchmergebot merge

@pytorch-bot pytorch-bot Bot added the ciflow/trunk Trigger trunk jobs on your pull request label Sep 19, 2026
@pytorchmergebot

Copy link
Copy Markdown
Collaborator

Merge started

Your change will be merged once all checks pass (ETA 0-4 Hours).

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

@huydhn

huydhn commented Sep 19, 2026

Copy link
Copy Markdown
Contributor

@huydhn how do we find the corresponding ghcr docker image? Or the images generated are only pull-able via 308535385114.dkr.ecr.us-east-1.amazonaws.com/pytorch/manylinuxaarch64-builder:cuda13.4-8b4d9241f58b807e6c71cb26752df93398671785? https://github.com/pytorch/pytorch/actions/runs/35382197051/job/105720874444?pr=197575

A CI image will be available on ghcr once the PR is merged. For this change, you can see that the new images should be there now https://github.com/pytorch/pytorch/actions/runs/35427772107/job/105856630304#step:9:26 at ghcr.io/pytorch/ci-image:pytorch-linux-jammy-aarch64-cuda13.4-cudnn9-py3.12-gcc13 or ghcr.io/pytorch/ci-image:pytorch-linux-jammy-aarch64-cuda13.4-cudnn9-py3.12-gcc13-c17ebfb4aa6d05bab5a20e4488119532cfd26ff2 if you want to pin it.

@nWEIdia

nWEIdia commented Sep 19, 2026

Copy link
Copy Markdown
Collaborator

@huydhn how do we find the corresponding ghcr docker image? Or the images generated are only pull-able via 308535385114.dkr.ecr.us-east-1.amazonaws.com/pytorch/manylinuxaarch64-builder:cuda13.4-8b4d9241f58b807e6c71cb26752df93398671785? https://github.com/pytorch/pytorch/actions/runs/35382197051/job/105720874444?pr=197575

A CI image will be available on ghcr once the PR is merged. For this change, you can see that the new images should be there now https://github.com/pytorch/pytorch/actions/runs/35427772107/job/105856630304#step:9:26 at ghcr.io/pytorch/ci-image:pytorch-linux-jammy-aarch64-cuda13.4-cudnn9-py3.12-gcc13 or ghcr.io/pytorch/ci-image:pytorch-linux-jammy-aarch64-cuda13.4-cudnn9-py3.12-gcc13-c17ebfb4aa6d05bab5a20e4488119532cfd26ff2 if you want to pin it.

Fantastic! Thank you @huydhn for the explanation!

pytorchmergebot pushed a commit that referenced this pull request Sep 20, 2026
Addressing #197575 (comment)

I’m adding ACL because the ARM64 build path explicitly enables oneDNN with ACL and expects /acl to exist. I’m not adding OpenBLAS because the CUDA ARM64 wheel path uses NVPL.
Pull Request resolved: #197741
Approved by: https://github.com/huydhn, https://github.com/nWEIdia
atalman added a commit to atalman/pytorch that referenced this pull request Sep 22, 2026
Reverses the wrong half of the previous commit and finishes the aarch64
lane, per review.

pytorch-linux-jammy-aarch64-cuda13.0-cudnn9-py3.10-gcc13 is not dead
weight. It landed three days ago in pytorch#197575 (21f21b4, "[CI] Add ARM64
CUDA CI image definitions"), and has no consumers because it is WIP, not
because it was abandoned. Deleting it would have undone in-flight NVIDIA
work. Restored, at 3.11.

That is the flaw in the zero-references test that both the audit and my
verification of it missed: "nothing references this" reads the same for
an image that is finished with and one that has not been wired up yet.
Checking when a definition was *added*, not just that nothing points at
it, separates the two.

Rather than restore it at 3.10 and leave the lane split, the whole
aarch64 set is now consistent:

  aarch64-cuda13.0-cudnn9-py3.10-gcc13  -> py3.11   (restored, bumped)
  aarch64-py3.10-gcc13                  -> py3.11   (twin already added
                                                     earlier in this PR,
                                                     so the 3.10 case goes)
  aarch64-py3.10-gcc13-inductor-benchmarks -> py3.11
  aarch64-cuda13.2-cudnn9-py3.12-gcc13     unchanged (already 3.12)
  aarch64-cuda13.4-cudnn9-py3.12-gcc13     unchanged (already 3.12)

Consumers retargeted: operator_benchmark.yml and
inductor-perf-test-nightly-aarch64.yml, including the py3_10 job ids in
the latter. This moves those two lanes to 3.11, which is what the review
asked for.

The cuda13.2-cudnn9-py3.10-clang20 removal from the previous commit
stands -- that one was genuinely stranded by this PR repointing its only
consumer, and nobody objected to it.

Verified
--------
No aarch64 py3.10 reference remains anywhere in .github or .ci. All five
aarch64 images in build.sh are built by docker-builds.yml. All four
touched workflows parse as YAML and build.sh passes bash -n. The only
ci-image in the repo not built by docker-builds.yml is
pytorch-linux-jammy-cuda12.8-cudnn9-py3-gcc11 in
operator_microbenchmark_compare.yml, which was already in that state
before this PR.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ciflow/docker ciflow/trunk Trigger trunk jobs on your pull request Merged open source topic: not user facing topic category

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants