Skip to content

[BE] Unify s390x and other linux binary build/test workflows - #182018

Closed
atalman wants to merge 2 commits into
gh/atalman/14/basefrom
gh/atalman/14/head
Closed

atalman wants to merge 2 commits into
gh/atalman/14/basefrom
gh/atalman/14/head

Conversation

@atalman

@atalman atalman commented Apr 30, 2026 •

Copy link
Copy Markdown
Collaborator

Stack from ghstack (oldest at bottom):

Make GHA's container: directive optional via a new
use_container_directive input on _binary-build-linux.yml and
_binary-test-linux.yml:

  • true (default, used by x86 / aarch64 / cuda): launch the build/test
    container via the container: directive — checkout, env-setup, and
    the .ci/* scripts all run directly inside it.
  • false (used by s390x): the container.image expression resolves to an
    empty string, GHA treats it as no-container, and the build/test
    container is spawned via docker run from a step (podman-compatible
    on s390x self-hosted runners, which only register with the bare
    linux.s390x label and lack a host-level docker CLI compatible with
    the container directive).

This deletes the s390x-specific reusables _binary-build-linux-s390x.yml
and _binary-test-linux-s390x.yml introduced in #181599 — both arches
now share the same files, with the per-arch divergence collapsed to
the new boolean input plus a small if:-gated branch in each step.

Authored with Claude.

Make GHA's `container:` directive optional via a new
`use_container_directive` input on `_binary-build-linux.yml` and
`_binary-test-linux.yml`:

- true (default, used by x86 / aarch64 / cuda): launch the build/test
  container via the `container:` directive — checkout, env-setup, and
  the .ci/* scripts all run directly inside it.
- false (used by s390x): the container.image expression resolves to an
  empty string, GHA treats it as no-container, and the build/test
  container is spawned via `docker run` from a step (podman-compatible
  on s390x self-hosted runners, which only register with the bare
  `linux.s390x` label and lack a host-level docker CLI compatible with
  the container directive).

This deletes the s390x-specific reusables `_binary-build-linux-s390x.yml`
and `_binary-test-linux-s390x.yml` introduced in #181599 — both arches
now share the same files, with the per-arch divergence collapsed to
the new boolean input plus a small `if:`-gated branch in each step.

Authored with Claude.

[ghstack-poisoned]
@atalman
atalman requested a review from a team as a code owner April 30, 2026 13:01
@pytorch-bot pytorch-bot Bot added the topic: not user facing topic category label Apr 30, 2026
@pytorch-bot

pytorch-bot Bot commented Apr 30, 2026 •

Copy link
Copy Markdown

🔗 Helpful Links

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

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

⏳ No Failures, 14 Pending

As of commit 0679d6a with merge base f0780d0 (image):
💚 Looks good so far! There are no failures yet. 💚

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

@atalman atalman changed the title Unify s390x and other linux binary build/test workflows [BE] Unify s390x and other linux binary build/test workflows Apr 30, 2026
@atalman atalman added the ciflow/binaries Trigger all binary build and upload jobs on the PR label Apr 30, 2026
Make GHA's `container:` directive optional via a new
`use_container_directive` input on `_binary-build-linux.yml` and
`_binary-test-linux.yml`:

- true (default, used by x86 / aarch64 / cuda): launch the build/test
  container via the `container:` directive — checkout, env-setup, and
  the .ci/* scripts all run directly inside it.
- false (used by s390x): the container.image expression resolves to an
  empty string, GHA treats it as no-container, and the build/test
  container is spawned via `docker run` from a step (podman-compatible
  on s390x self-hosted runners, which only register with the bare
  `linux.s390x` label and lack a host-level docker CLI compatible with
  the container directive).

This deletes the s390x-specific reusables `_binary-build-linux-s390x.yml`
and `_binary-test-linux-s390x.yml` introduced in #181599 — both arches
now share the same files, with the per-arch divergence collapsed to
the new boolean input plus a small `if:`-gated branch in each step.

Authored with Claude.

[ghstack-poisoned]
atalman added a commit that referenced this pull request Apr 30, 2026
Make GHA's `container:` directive optional via a new
`use_container_directive` input on `_binary-build-linux.yml` and
`_binary-test-linux.yml`:

- true (default, used by x86 / aarch64 / cuda): launch the build/test
  container via the `container:` directive — checkout, env-setup, and
  the .ci/* scripts all run directly inside it.
- false (used by s390x): the container.image expression resolves to an
  empty string, GHA treats it as no-container, and the build/test
  container is spawned via `docker run` from a step (podman-compatible
  on s390x self-hosted runners, which only register with the bare
  `linux.s390x` label and lack a host-level docker CLI compatible with
  the container directive).

This deletes the s390x-specific reusables `_binary-build-linux-s390x.yml`
and `_binary-test-linux-s390x.yml` introduced in #181599 — both arches
now share the same files, with the per-arch divergence collapsed to
the new boolean input plus a small `if:`-gated branch in each step.

Authored with Claude.

ghstack-source-id: 14c2c39
Pull Request resolved: #182018
@atalman

atalman commented Apr 30, 2026

Copy link
Copy Markdown
Collaborator Author

@pytorchmergebot merge -f "lint and the rest of the builds looks good"

@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

atalman added a commit to atalman/pytorch that referenced this pull request May 4, 2026
…repair)

Split the monolithic .ci/manywheel/build_cuda.sh and the duplicated
sections of build_cpu.sh / build_common.sh into focused, reusable
scripts:

- build_env_setup.sh    GPU/toolchain environment setup (CUDA, ROCm, XPU)
- build_install_deps.sh shared build-time dependency install
- build_wheel.sh        the actual wheel build
- repair_wheel.sh       auditwheel-style repair using the `wheel` python
                        package (unpack/pack/tags), bundling aarch64
                        BLAS/LAPACK/ACL when needed

Drops build_cuda.sh (its logic is now in build_env_setup.sh +
build_wheel.sh) and trims x86/aarch64-specific branches out of
build_cpu.sh / build_common.sh.

Also drops obsolete numpy version pins in .ci/pytorch/run_tests.sh
and adds ACL_ROOT_DIR to cmake/EnvVarForwarding.cmake so the aarch64
ACL path can be forwarded from the env.

The matching workflow / Jinja-template rework that originally lived in
this branch is no longer needed — the matrix-driven binary workflows
already landed via pytorch#181586 (and follow-ups pytorch#181599, pytorch#182018), so the
new scripts plug into the existing _binary-build-linux.yml.

Authored with Claude.
atalman added a commit to atalman/pytorch that referenced this pull request May 4, 2026
…repair)

Split the monolithic .ci/manywheel/build_cuda.sh and the duplicated
sections of build_cpu.sh / build_common.sh into focused, reusable
scripts:

- build_env_setup.sh    GPU/toolchain environment setup (CUDA, ROCm, XPU)
- build_install_deps.sh shared build-time dependency install
- build_wheel.sh        the actual wheel build
- repair_wheel.sh       auditwheel-style repair using the `wheel` python
                        package (unpack/pack/tags), bundling aarch64
                        BLAS/LAPACK/ACL when needed

Drops build_cuda.sh (its logic is now in build_env_setup.sh +
build_wheel.sh) and trims x86/aarch64-specific branches out of
build_cpu.sh / build_common.sh.

Also drops obsolete numpy version pins in .ci/pytorch/run_tests.sh.

The matching workflow / Jinja-template rework that originally lived in
this branch is no longer needed — the matrix-driven binary workflows
already landed via pytorch#181586 (and follow-ups pytorch#181599, pytorch#182018), so the
new scripts plug into the existing _binary-build-linux.yml.

Authored with Claude.
atalman added a commit to atalman/pytorch that referenced this pull request May 4, 2026
…repair)

Split the monolithic .ci/manywheel/build_cuda.sh and the duplicated
sections of build_cpu.sh / build_common.sh into focused, reusable
scripts:

- build_env_setup.sh    GPU/toolchain environment setup (CUDA, ROCm, XPU)
- build_install_deps.sh shared build-time dependency install
- build_wheel.sh        the actual wheel build (python -m build)
- repair_wheel.sh       auditwheel-style repair using the `wheel` python
                        package (unpack/pack/tags), bundling aarch64
                        BLAS/LAPACK/ACL when needed

Drops build_cuda.sh (its logic is now in build_env_setup.sh +
build_wheel.sh) and trims x86/aarch64-specific branches out of
build_cpu.sh / build_common.sh. The legacy entry point .ci/manywheel/build.sh
now dispatches x86/aarch64 cuda/cpu through the new chain
(set_desired_python -> build_env_setup -> build_install_deps -> build_wheel
-> repair_wheel) and keeps rocm/xpu/cpu-s390x on the legacy build_*.sh
helpers.

Also drops obsolete numpy version pins in .ci/pytorch/run_tests.sh.

The matching workflow / Jinja-template rework that originally lived in
this branch is no longer needed -- the matrix-driven binary workflows
already landed via pytorch#181586 (and follow-ups pytorch#181599, pytorch#182018), so the
new scripts plug into the existing _binary-build-linux.yml.

Authored with Claude.
atalman added a commit that referenced this pull request May 5, 2026
…ps, wheel, repair)"

Split the monolithic .ci/manywheel/build_cuda.sh and the duplicated
sections of build_cpu.sh / build_common.sh into focused, reusable
scripts:

- build_env_setup.sh    GPU/toolchain environment setup (CUDA, ROCm, XPU)
- build_install_deps.sh shared build-time dependency install
- build_wheel.sh        the actual wheel build (python -m build)
- repair_wheel.sh       auditwheel-style repair using the `wheel` python
                        package (unpack/pack/tags), bundling aarch64
                        BLAS/LAPACK/ACL when needed

Drops build_cuda.sh (its logic is now in build_env_setup.sh +
build_wheel.sh) and trims x86/aarch64-specific branches out of
build_cpu.sh / build_common.sh. The legacy entry point .ci/manywheel/build.sh
now dispatches x86/aarch64 cuda/cpu through the new chain
(set_desired_python -> build_env_setup -> build_install_deps -> build_wheel
-> repair_wheel) and keeps rocm/xpu/cpu-s390x on the legacy build_*.sh
helpers.

Also drops obsolete numpy version pins in .ci/pytorch/run_tests.sh.

The matching workflow / Jinja-template rework that originally lived in
this branch is no longer needed -- the matrix-driven binary workflows
already landed via #181586 (and follow-ups #181599, #182018), so the
new scripts plug into the existing _binary-build-linux.yml.

Authored with Claude.

[ghstack-poisoned]
atalman added a commit that referenced this pull request May 5, 2026
Split the monolithic .ci/manywheel/build_cuda.sh and the duplicated
sections of build_cpu.sh / build_common.sh into focused, reusable
helpers, and write the new helpers in Python rather than shell:

- build_env_setup.py    GPU/toolchain environment setup (CUDA, ROCm, XPU)
- build_install_deps.py shared build-time dependency install
- build_wheel.py        the actual wheel build (python -m build)
- repair_wheel.py       auditwheel-style repair using the `wheel` python
                        package (unpack/pack/tags), bundling aarch64
                        BLAS/LAPACK/ACL when needed

Drops build_cuda.sh (its logic is now in build_env_setup.py +
build_wheel.py) and trims x86/aarch64-specific branches out of
build_cpu.sh / build_common.sh. The legacy entry point .ci/manywheel/build.sh
now dispatches x86/aarch64 cuda/cpu through the new chain
(set_desired_python -> build_env_setup -> build_install_deps -> build_wheel
-> repair_wheel) and keeps rocm/xpu/cpu-s390x on the legacy build_*.sh
helpers.

build_env_setup.py writes its build-flag exports (USE_CUDA,
TH_BINARY_BUILD, ...) to a file via --env-out which build.sh sources;
this is what lets those flags reach the wheel-build subprocess (a plain
`bash build_env_setup.sh` would have dropped them).

Also drops obsolete numpy version pins in .ci/pytorch/run_tests.sh.

The matching workflow / Jinja-template rework that originally lived in
this branch is no longer needed -- the matrix-driven binary workflows
already landed via #181586 (and follow-ups #181599, #182018), so the
new scripts plug into the existing _binary-build-linux.yml.

Authored with Claude.

ghstack-source-id: 1c609c3
Pull Request resolved: #182409
atalman added a commit that referenced this pull request May 5, 2026
…ps, wheel, repair)"

Split the monolithic .ci/manywheel/build_cuda.sh and the duplicated
sections of build_cpu.sh / build_common.sh into focused, reusable
scripts:

- build_env_setup.sh    GPU/toolchain environment setup (CUDA, ROCm, XPU)
- build_install_deps.sh shared build-time dependency install
- build_wheel.sh        the actual wheel build (python -m build)
- repair_wheel.sh       auditwheel-style repair using the `wheel` python
                        package (unpack/pack/tags), bundling aarch64
                        BLAS/LAPACK/ACL when needed

Drops build_cuda.sh (its logic is now in build_env_setup.sh +
build_wheel.sh) and trims x86/aarch64-specific branches out of
build_cpu.sh / build_common.sh. The legacy entry point .ci/manywheel/build.sh
now dispatches x86/aarch64 cuda/cpu through the new chain
(set_desired_python -> build_env_setup -> build_install_deps -> build_wheel
-> repair_wheel) and keeps rocm/xpu/cpu-s390x on the legacy build_*.sh
helpers.

Also drops obsolete numpy version pins in .ci/pytorch/run_tests.sh.

The matching workflow / Jinja-template rework that originally lived in
this branch is no longer needed -- the matrix-driven binary workflows
already landed via #181586 (and follow-ups #181599, #182018), so the
new scripts plug into the existing _binary-build-linux.yml.

Authored with Claude.

[ghstack-poisoned]
atalman added a commit that referenced this pull request May 5, 2026
Split the monolithic .ci/manywheel/build_cuda.sh and the duplicated
sections of build_cpu.sh / build_common.sh into focused, reusable
helpers, and write the new helpers in Python rather than shell:

- build_env_setup.py    GPU/toolchain environment setup (CUDA, ROCm, XPU)
- build_install_deps.py shared build-time dependency install
- build_wheel.py        the actual wheel build (python -m build)
- repair_wheel.py       auditwheel-style repair using the `wheel` python
                        package (unpack/pack/tags), bundling aarch64
                        BLAS/LAPACK/ACL when needed

Drops build_cuda.sh (its logic is now in build_env_setup.py +
build_wheel.py) and trims x86/aarch64-specific branches out of
build_cpu.sh / build_common.sh. The legacy entry point .ci/manywheel/build.sh
now dispatches x86/aarch64 cuda/cpu through the new chain
(set_desired_python -> build_env_setup -> build_install_deps -> build_wheel
-> repair_wheel) and keeps rocm/xpu/cpu-s390x on the legacy build_*.sh
helpers.

build_env_setup.py writes its build-flag exports (USE_CUDA,
TH_BINARY_BUILD, ...) to a file via --env-out which build.sh sources;
this is what lets those flags reach the wheel-build subprocess (a plain
`bash build_env_setup.sh` would have dropped them).

Also drops obsolete numpy version pins in .ci/pytorch/run_tests.sh.

The matching workflow / Jinja-template rework that originally lived in
this branch is no longer needed -- the matrix-driven binary workflows
already landed via #181586 (and follow-ups #181599, #182018), so the
new scripts plug into the existing _binary-build-linux.yml.

Authored with Claude.

ghstack-source-id: 0e8b802
Pull Request resolved: #182409
atalman added a commit that referenced this pull request May 5, 2026
…ps, wheel, repair)"

Split the monolithic .ci/manywheel/build_cuda.sh and the duplicated
sections of build_cpu.sh / build_common.sh into focused, reusable
scripts:

- build_env_setup.sh    GPU/toolchain environment setup (CUDA, ROCm, XPU)
- build_install_deps.sh shared build-time dependency install
- build_wheel.sh        the actual wheel build (python -m build)
- repair_wheel.sh       auditwheel-style repair using the `wheel` python
                        package (unpack/pack/tags), bundling aarch64
                        BLAS/LAPACK/ACL when needed

Drops build_cuda.sh (its logic is now in build_env_setup.sh +
build_wheel.sh) and trims x86/aarch64-specific branches out of
build_cpu.sh / build_common.sh. The legacy entry point .ci/manywheel/build.sh
now dispatches x86/aarch64 cuda/cpu through the new chain
(set_desired_python -> build_env_setup -> build_install_deps -> build_wheel
-> repair_wheel) and keeps rocm/xpu/cpu-s390x on the legacy build_*.sh
helpers.

Also drops obsolete numpy version pins in .ci/pytorch/run_tests.sh.

The matching workflow / Jinja-template rework that originally lived in
this branch is no longer needed -- the matrix-driven binary workflows
already landed via #181586 (and follow-ups #181599, #182018), so the
new scripts plug into the existing _binary-build-linux.yml.

Authored with Claude.

[ghstack-poisoned]
atalman added a commit that referenced this pull request May 5, 2026
Split the monolithic .ci/manywheel/build_cuda.sh and the duplicated
sections of build_cpu.sh / build_common.sh into focused, reusable
helpers, and write the new helpers in Python rather than shell:

- build_env_setup.py    GPU/toolchain environment setup (CUDA, ROCm, XPU)
- build_install_deps.py shared build-time dependency install
- build_wheel.py        the actual wheel build (python -m build)
- repair_wheel.py       auditwheel-style repair using the `wheel` python
                        package (unpack/pack/tags), bundling aarch64
                        BLAS/LAPACK/ACL when needed

Drops build_cuda.sh (its logic is now in build_env_setup.py +
build_wheel.py) and trims x86/aarch64-specific branches out of
build_cpu.sh / build_common.sh. The legacy entry point .ci/manywheel/build.sh
now dispatches x86/aarch64 cuda/cpu through the new chain
(set_desired_python -> build_env_setup -> build_install_deps -> build_wheel
-> repair_wheel) and keeps rocm/xpu/cpu-s390x on the legacy build_*.sh
helpers.

build_env_setup.py writes its build-flag exports (USE_CUDA,
TH_BINARY_BUILD, ...) to a file via --env-out which build.sh sources;
this is what lets those flags reach the wheel-build subprocess (a plain
`bash build_env_setup.sh` would have dropped them).

Also drops obsolete numpy version pins in .ci/pytorch/run_tests.sh.

The matching workflow / Jinja-template rework that originally lived in
this branch is no longer needed -- the matrix-driven binary workflows
already landed via #181586 (and follow-ups #181599, #182018), so the
new scripts plug into the existing _binary-build-linux.yml.

Authored with Claude.

ghstack-source-id: 55d543d
Pull Request resolved: #182409
atalman added a commit that referenced this pull request May 5, 2026
…it env setup, deps, wheel, repair)"

Split the monolithic .ci/manywheel/build_cuda.sh and the duplicated
sections of build_cpu.sh / build_common.sh into focused, reusable
scripts:

- build_env_setup.sh    GPU/toolchain environment setup (CUDA, ROCm, XPU)
- build_install_deps.sh shared build-time dependency install
- build_wheel.sh        the actual wheel build (python -m build)
- repair_wheel.sh       auditwheel-style repair using the `wheel` python
                        package (unpack/pack/tags), bundling aarch64
                        BLAS/LAPACK/ACL when needed

Drops build_cuda.sh (its logic is now in build_env_setup.sh +
build_wheel.sh) and trims x86/aarch64-specific branches out of
build_cpu.sh / build_common.sh. The legacy entry point .ci/manywheel/build.sh
now dispatches x86/aarch64 cuda/cpu through the new chain
(set_desired_python -> build_env_setup -> build_install_deps -> build_wheel
-> repair_wheel) and keeps rocm/xpu/cpu-s390x on the legacy build_*.sh
helpers.

Also drops obsolete numpy version pins in .ci/pytorch/run_tests.sh.

The matching workflow / Jinja-template rework that originally lived in
this branch is no longer needed -- the matrix-driven binary workflows
already landed via #181586 (and follow-ups #181599, #182018), so the
new scripts plug into the existing _binary-build-linux.yml.

Authored with Claude.

[ghstack-poisoned]
atalman added a commit that referenced this pull request May 5, 2026
Split the monolithic .ci/manywheel/build_cuda.sh and the duplicated
sections of build_cpu.sh / build_common.sh into focused, reusable
helpers, and write the new helpers in Python rather than shell:

- build_env_setup.py    GPU/toolchain environment setup (CUDA, ROCm, XPU)
- build_install_deps.py shared build-time dependency install
- build_wheel.py        the actual wheel build (python -m build)
- repair_wheel.py       auditwheel-style repair using the `wheel` python
                        package (unpack/pack/tags), bundling aarch64
                        BLAS/LAPACK/ACL when needed

Drops build_cuda.sh (its logic is now in build_env_setup.py +
build_wheel.py) and trims x86/aarch64-specific branches out of
build_cpu.sh / build_common.sh. The legacy entry point .ci/manywheel/build.sh
now dispatches x86/aarch64 cuda/cpu through the new chain
(set_desired_python -> build_env_setup -> build_install_deps -> build_wheel
-> repair_wheel) and keeps rocm/xpu/cpu-s390x on the legacy build_*.sh
helpers.

build_env_setup.py writes its build-flag exports (USE_CUDA,
TH_BINARY_BUILD, ...) to a file via --env-out which build.sh sources;
this is what lets those flags reach the wheel-build subprocess (a plain
`bash build_env_setup.sh` would have dropped them).

Also drops obsolete numpy version pins in .ci/pytorch/run_tests.sh.

The matching workflow / Jinja-template rework that originally lived in
this branch is no longer needed -- the matrix-driven binary workflows
already landed via #181586 (and follow-ups #181599, #182018), so the
new scripts plug into the existing _binary-build-linux.yml.

Authored with Claude.

ghstack-source-id: fc09f27
Pull Request resolved: #182409
atalman added a commit that referenced this pull request May 5, 2026
…ps, wheel, repair)"

Split the monolithic .ci/manywheel/build_cuda.sh and the duplicated
sections of build_cpu.sh / build_common.sh into focused, reusable
scripts:

- build_env_setup.sh    GPU/toolchain environment setup (CUDA, ROCm, XPU)
- build_install_deps.sh shared build-time dependency install
- build_wheel.sh        the actual wheel build (python -m build)
- repair_wheel.sh       auditwheel-style repair using the `wheel` python
                        package (unpack/pack/tags), bundling aarch64
                        BLAS/LAPACK/ACL when needed

Drops build_cuda.sh (its logic is now in build_env_setup.sh +
build_wheel.sh) and trims x86/aarch64-specific branches out of
build_cpu.sh / build_common.sh. The legacy entry point .ci/manywheel/build.sh
now dispatches x86/aarch64 cuda/cpu through the new chain
(set_desired_python -> build_env_setup -> build_install_deps -> build_wheel
-> repair_wheel) and keeps rocm/xpu/cpu-s390x on the legacy build_*.sh
helpers.

Also drops obsolete numpy version pins in .ci/pytorch/run_tests.sh.

The matching workflow / Jinja-template rework that originally lived in
this branch is no longer needed -- the matrix-driven binary workflows
already landed via #181586 (and follow-ups #181599, #182018), so the
new scripts plug into the existing _binary-build-linux.yml.

Authored with Claude.

[ghstack-poisoned]
atalman added a commit that referenced this pull request May 5, 2026
…it env setup, deps, wheel, repair)"

Split the monolithic .ci/manywheel/build_cuda.sh and the duplicated
sections of build_cpu.sh / build_common.sh into focused, reusable
scripts:

- build_env_setup.sh    GPU/toolchain environment setup (CUDA, ROCm, XPU)
- build_install_deps.sh shared build-time dependency install
- build_wheel.sh        the actual wheel build (python -m build)
- repair_wheel.sh       auditwheel-style repair using the `wheel` python
                        package (unpack/pack/tags), bundling aarch64
                        BLAS/LAPACK/ACL when needed

Drops build_cuda.sh (its logic is now in build_env_setup.sh +
build_wheel.sh) and trims x86/aarch64-specific branches out of
build_cpu.sh / build_common.sh. The legacy entry point .ci/manywheel/build.sh
now dispatches x86/aarch64 cuda/cpu through the new chain
(set_desired_python -> build_env_setup -> build_install_deps -> build_wheel
-> repair_wheel) and keeps rocm/xpu/cpu-s390x on the legacy build_*.sh
helpers.

Also drops obsolete numpy version pins in .ci/pytorch/run_tests.sh.

The matching workflow / Jinja-template rework that originally lived in
this branch is no longer needed -- the matrix-driven binary workflows
already landed via #181586 (and follow-ups #181599, #182018), so the
new scripts plug into the existing _binary-build-linux.yml.

Authored with Claude.

[ghstack-poisoned]
atalman added a commit that referenced this pull request May 5, 2026
…ps, wheel, repair)"

Split the monolithic .ci/manywheel/build_cuda.sh and the duplicated
sections of build_cpu.sh / build_common.sh into focused, reusable
scripts:

- build_env_setup.sh    GPU/toolchain environment setup (CUDA, ROCm, XPU)
- build_install_deps.sh shared build-time dependency install
- build_wheel.sh        the actual wheel build (python -m build)
- repair_wheel.sh       auditwheel-style repair using the `wheel` python
                        package (unpack/pack/tags), bundling aarch64
                        BLAS/LAPACK/ACL when needed

Drops build_cuda.sh (its logic is now in build_env_setup.sh +
build_wheel.sh) and trims x86/aarch64-specific branches out of
build_cpu.sh / build_common.sh. The legacy entry point .ci/manywheel/build.sh
now dispatches x86/aarch64 cuda/cpu through the new chain
(set_desired_python -> build_env_setup -> build_install_deps -> build_wheel
-> repair_wheel) and keeps rocm/xpu/cpu-s390x on the legacy build_*.sh
helpers.

Also drops obsolete numpy version pins in .ci/pytorch/run_tests.sh.

The matching workflow / Jinja-template rework that originally lived in
this branch is no longer needed -- the matrix-driven binary workflows
already landed via #181586 (and follow-ups #181599, #182018), so the
new scripts plug into the existing _binary-build-linux.yml.

Authored with Claude.

[ghstack-poisoned]
atalman added a commit that referenced this pull request May 5, 2026
Split the monolithic .ci/manywheel/build_cuda.sh and the duplicated
sections of build_cpu.sh / build_common.sh into focused, reusable
helpers, and write the new helpers in Python rather than shell:

- build_env_setup.py    GPU/toolchain environment setup (CUDA, ROCm, XPU)
- build_install_deps.py shared build-time dependency install
- build_wheel.py        the actual wheel build (python -m build)
- repair_wheel.py       auditwheel-style repair using the `wheel` python
                        package (unpack/pack/tags), bundling aarch64
                        BLAS/LAPACK/ACL when needed

Drops build_cuda.sh (its logic is now in build_env_setup.py +
build_wheel.py) and trims x86/aarch64-specific branches out of
build_cpu.sh / build_common.sh. The legacy entry point .ci/manywheel/build.sh
now dispatches x86/aarch64 cuda/cpu through the new chain
(set_desired_python -> build_env_setup -> build_install_deps -> build_wheel
-> repair_wheel) and keeps rocm/xpu/cpu-s390x on the legacy build_*.sh
helpers.

build_env_setup.py writes its build-flag exports (USE_CUDA,
TH_BINARY_BUILD, ...) to a file via --env-out which build.sh sources;
this is what lets those flags reach the wheel-build subprocess (a plain
`bash build_env_setup.sh` would have dropped them).

Also drops obsolete numpy version pins in .ci/pytorch/run_tests.sh.

The matching workflow / Jinja-template rework that originally lived in
this branch is no longer needed -- the matrix-driven binary workflows
already landed via #181586 (and follow-ups #181599, #182018), so the
new scripts plug into the existing _binary-build-linux.yml.

Authored with Claude.

ghstack-source-id: e620cd3
Pull Request resolved: #182409
atalman added a commit that referenced this pull request May 6, 2026
…it env setup, deps, wheel, repair)"

Split the monolithic .ci/manywheel/build_cuda.sh and the duplicated
sections of build_cpu.sh / build_common.sh into focused, reusable
scripts:

- build_env_setup.sh    GPU/toolchain environment setup (CUDA, ROCm, XPU)
- build_install_deps.sh shared build-time dependency install
- build_wheel.sh        the actual wheel build (python -m build)
- repair_wheel.sh       auditwheel-style repair using the `wheel` python
                        package (unpack/pack/tags), bundling aarch64
                        BLAS/LAPACK/ACL when needed

Drops build_cuda.sh (its logic is now in build_env_setup.sh +
build_wheel.sh) and trims x86/aarch64-specific branches out of
build_cpu.sh / build_common.sh. The legacy entry point .ci/manywheel/build.sh
now dispatches x86/aarch64 cuda/cpu through the new chain
(set_desired_python -> build_env_setup -> build_install_deps -> build_wheel
-> repair_wheel) and keeps rocm/xpu/cpu-s390x on the legacy build_*.sh
helpers.

Also drops obsolete numpy version pins in .ci/pytorch/run_tests.sh.

The matching workflow / Jinja-template rework that originally lived in
this branch is no longer needed -- the matrix-driven binary workflows
already landed via #181586 (and follow-ups #181599, #182018), so the
new scripts plug into the existing _binary-build-linux.yml.

Authored with Claude.

[ghstack-poisoned]
atalman added a commit that referenced this pull request May 6, 2026
…ps, wheel, repair)"

Split the monolithic .ci/manywheel/build_cuda.sh and the duplicated
sections of build_cpu.sh / build_common.sh into focused, reusable
scripts:

- build_env_setup.sh    GPU/toolchain environment setup (CUDA, ROCm, XPU)
- build_install_deps.sh shared build-time dependency install
- build_wheel.sh        the actual wheel build (python -m build)
- repair_wheel.sh       auditwheel-style repair using the `wheel` python
                        package (unpack/pack/tags), bundling aarch64
                        BLAS/LAPACK/ACL when needed

Drops build_cuda.sh (its logic is now in build_env_setup.sh +
build_wheel.sh) and trims x86/aarch64-specific branches out of
build_cpu.sh / build_common.sh. The legacy entry point .ci/manywheel/build.sh
now dispatches x86/aarch64 cuda/cpu through the new chain
(set_desired_python -> build_env_setup -> build_install_deps -> build_wheel
-> repair_wheel) and keeps rocm/xpu/cpu-s390x on the legacy build_*.sh
helpers.

Also drops obsolete numpy version pins in .ci/pytorch/run_tests.sh.

The matching workflow / Jinja-template rework that originally lived in
this branch is no longer needed -- the matrix-driven binary workflows
already landed via #181586 (and follow-ups #181599, #182018), so the
new scripts plug into the existing _binary-build-linux.yml.

Authored with Claude.

[ghstack-poisoned]
atalman added a commit that referenced this pull request May 6, 2026
Split the monolithic .ci/manywheel/build_cuda.sh and the duplicated
sections of build_cpu.sh / build_common.sh into focused, reusable
helpers, and write the new helpers in Python rather than shell:

- build_env_setup.py    GPU/toolchain environment setup (CUDA, ROCm, XPU)
- build_install_deps.py shared build-time dependency install
- build_wheel.py        the actual wheel build (python -m build)
- repair_wheel.py       auditwheel-style repair using the `wheel` python
                        package (unpack/pack/tags), bundling aarch64
                        BLAS/LAPACK/ACL when needed

Drops build_cuda.sh (its logic is now in build_env_setup.py +
build_wheel.py) and trims x86/aarch64-specific branches out of
build_cpu.sh / build_common.sh. The legacy entry point .ci/manywheel/build.sh
now dispatches x86/aarch64 cuda/cpu through the new chain
(set_desired_python -> build_env_setup -> build_install_deps -> build_wheel
-> repair_wheel) and keeps rocm/xpu/cpu-s390x on the legacy build_*.sh
helpers.

build_env_setup.py writes its build-flag exports (USE_CUDA,
TH_BINARY_BUILD, ...) to a file via --env-out which build.sh sources;
this is what lets those flags reach the wheel-build subprocess (a plain
`bash build_env_setup.sh` would have dropped them).

Also drops obsolete numpy version pins in .ci/pytorch/run_tests.sh.

The matching workflow / Jinja-template rework that originally lived in
this branch is no longer needed -- the matrix-driven binary workflows
already landed via #181586 (and follow-ups #181599, #182018), so the
new scripts plug into the existing _binary-build-linux.yml.

Authored with Claude.

ghstack-source-id: d892d0d
Pull Request resolved: #182409
atalman added a commit that referenced this pull request May 6, 2026
…it env setup, deps, wheel, repair)"

Split the monolithic .ci/manywheel/build_cuda.sh and the duplicated
sections of build_cpu.sh / build_common.sh into focused, reusable
scripts:

- build_env_setup.sh    GPU/toolchain environment setup (CUDA, ROCm, XPU)
- build_install_deps.sh shared build-time dependency install
- build_wheel.sh        the actual wheel build (python -m build)
- repair_wheel.sh       auditwheel-style repair using the `wheel` python
                        package (unpack/pack/tags), bundling aarch64
                        BLAS/LAPACK/ACL when needed

Drops build_cuda.sh (its logic is now in build_env_setup.sh +
build_wheel.sh) and trims x86/aarch64-specific branches out of
build_cpu.sh / build_common.sh. The legacy entry point .ci/manywheel/build.sh
now dispatches x86/aarch64 cuda/cpu through the new chain
(set_desired_python -> build_env_setup -> build_install_deps -> build_wheel
-> repair_wheel) and keeps rocm/xpu/cpu-s390x on the legacy build_*.sh
helpers.

Also drops obsolete numpy version pins in .ci/pytorch/run_tests.sh.

The matching workflow / Jinja-template rework that originally lived in
this branch is no longer needed -- the matrix-driven binary workflows
already landed via #181586 (and follow-ups #181599, #182018), so the
new scripts plug into the existing _binary-build-linux.yml.

Authored with Claude.

[ghstack-poisoned]
atalman added a commit that referenced this pull request May 6, 2026
…ps, wheel, repair)"

Split the monolithic .ci/manywheel/build_cuda.sh and the duplicated
sections of build_cpu.sh / build_common.sh into focused, reusable
scripts:

- build_env_setup.sh    GPU/toolchain environment setup (CUDA, ROCm, XPU)
- build_install_deps.sh shared build-time dependency install
- build_wheel.sh        the actual wheel build (python -m build)
- repair_wheel.sh       auditwheel-style repair using the `wheel` python
                        package (unpack/pack/tags), bundling aarch64
                        BLAS/LAPACK/ACL when needed

Drops build_cuda.sh (its logic is now in build_env_setup.sh +
build_wheel.sh) and trims x86/aarch64-specific branches out of
build_cpu.sh / build_common.sh. The legacy entry point .ci/manywheel/build.sh
now dispatches x86/aarch64 cuda/cpu through the new chain
(set_desired_python -> build_env_setup -> build_install_deps -> build_wheel
-> repair_wheel) and keeps rocm/xpu/cpu-s390x on the legacy build_*.sh
helpers.

Also drops obsolete numpy version pins in .ci/pytorch/run_tests.sh.

The matching workflow / Jinja-template rework that originally lived in
this branch is no longer needed -- the matrix-driven binary workflows
already landed via #181586 (and follow-ups #181599, #182018), so the
new scripts plug into the existing _binary-build-linux.yml.

Authored with Claude.

[ghstack-poisoned]
atalman added a commit that referenced this pull request May 6, 2026
Split the monolithic .ci/manywheel/build_cuda.sh and the duplicated
sections of build_cpu.sh / build_common.sh into focused, reusable
helpers, and write the new helpers in Python rather than shell:

- build_env_setup.py    GPU/toolchain environment setup (CUDA, ROCm, XPU)
- build_install_deps.py shared build-time dependency install
- build_wheel.py        the actual wheel build (python -m build)
- repair_wheel.py       auditwheel-style repair using the `wheel` python
                        package (unpack/pack/tags), bundling aarch64
                        BLAS/LAPACK/ACL when needed

Drops build_cuda.sh (its logic is now in build_env_setup.py +
build_wheel.py) and trims x86/aarch64-specific branches out of
build_cpu.sh / build_common.sh. The legacy entry point .ci/manywheel/build.sh
now dispatches x86/aarch64 cuda/cpu through the new chain
(set_desired_python -> build_env_setup -> build_install_deps -> build_wheel
-> repair_wheel) and keeps rocm/xpu/cpu-s390x on the legacy build_*.sh
helpers.

build_env_setup.py writes its build-flag exports (USE_CUDA,
TH_BINARY_BUILD, ...) to a file via --env-out which build.sh sources;
this is what lets those flags reach the wheel-build subprocess (a plain
`bash build_env_setup.sh` would have dropped them).

Also drops obsolete numpy version pins in .ci/pytorch/run_tests.sh.

The matching workflow / Jinja-template rework that originally lived in
this branch is no longer needed -- the matrix-driven binary workflows
already landed via #181586 (and follow-ups #181599, #182018), so the
new scripts plug into the existing _binary-build-linux.yml.

Authored with Claude.

ghstack-source-id: a6345a5
Pull Request resolved: #182409
atalman added a commit that referenced this pull request May 6, 2026
…it env setup, deps, wheel, repair)"

Split the monolithic .ci/manywheel/build_cuda.sh and the duplicated
sections of build_cpu.sh / build_common.sh into focused, reusable
scripts:

- build_env_setup.sh    GPU/toolchain environment setup (CUDA, ROCm, XPU)
- build_install_deps.sh shared build-time dependency install
- build_wheel.sh        the actual wheel build (python -m build)
- repair_wheel.sh       auditwheel-style repair using the `wheel` python
                        package (unpack/pack/tags), bundling aarch64
                        BLAS/LAPACK/ACL when needed

Drops build_cuda.sh (its logic is now in build_env_setup.sh +
build_wheel.sh) and trims x86/aarch64-specific branches out of
build_cpu.sh / build_common.sh. The legacy entry point .ci/manywheel/build.sh
now dispatches x86/aarch64 cuda/cpu through the new chain
(set_desired_python -> build_env_setup -> build_install_deps -> build_wheel
-> repair_wheel) and keeps rocm/xpu/cpu-s390x on the legacy build_*.sh
helpers.

Also drops obsolete numpy version pins in .ci/pytorch/run_tests.sh.

The matching workflow / Jinja-template rework that originally lived in
this branch is no longer needed -- the matrix-driven binary workflows
already landed via #181586 (and follow-ups #181599, #182018), so the
new scripts plug into the existing _binary-build-linux.yml.

Authored with Claude.

[ghstack-poisoned]
atalman added a commit that referenced this pull request May 6, 2026
…ps, wheel, repair)"

Split the monolithic .ci/manywheel/build_cuda.sh and the duplicated
sections of build_cpu.sh / build_common.sh into focused, reusable
scripts:

- build_env_setup.sh    GPU/toolchain environment setup (CUDA, ROCm, XPU)
- build_install_deps.sh shared build-time dependency install
- build_wheel.sh        the actual wheel build (python -m build)
- repair_wheel.sh       auditwheel-style repair using the `wheel` python
                        package (unpack/pack/tags), bundling aarch64
                        BLAS/LAPACK/ACL when needed

Drops build_cuda.sh (its logic is now in build_env_setup.sh +
build_wheel.sh) and trims x86/aarch64-specific branches out of
build_cpu.sh / build_common.sh. The legacy entry point .ci/manywheel/build.sh
now dispatches x86/aarch64 cuda/cpu through the new chain
(set_desired_python -> build_env_setup -> build_install_deps -> build_wheel
-> repair_wheel) and keeps rocm/xpu/cpu-s390x on the legacy build_*.sh
helpers.

Also drops obsolete numpy version pins in .ci/pytorch/run_tests.sh.

The matching workflow / Jinja-template rework that originally lived in
this branch is no longer needed -- the matrix-driven binary workflows
already landed via #181586 (and follow-ups #181599, #182018), so the
new scripts plug into the existing _binary-build-linux.yml.

Authored with Claude.

[ghstack-poisoned]
atalman added a commit that referenced this pull request May 6, 2026
Split the monolithic .ci/manywheel/build_cuda.sh and the duplicated
sections of build_cpu.sh / build_common.sh into focused, reusable
helpers, and write the new helpers in Python rather than shell:

- build_env_setup.py    GPU/toolchain environment setup (CUDA, ROCm, XPU)
- build_install_deps.py shared build-time dependency install
- build_wheel.py        the actual wheel build (python -m build)
- repair_wheel.py       auditwheel-style repair using the `wheel` python
                        package (unpack/pack/tags), bundling aarch64
                        BLAS/LAPACK/ACL when needed

Drops build_cuda.sh (its logic is now in build_env_setup.py +
build_wheel.py) and trims x86/aarch64-specific branches out of
build_cpu.sh / build_common.sh. The legacy entry point .ci/manywheel/build.sh
now dispatches x86/aarch64 cuda/cpu through the new chain
(set_desired_python -> build_env_setup -> build_install_deps -> build_wheel
-> repair_wheel) and keeps rocm/xpu/cpu-s390x on the legacy build_*.sh
helpers.

build_env_setup.py writes its build-flag exports (USE_CUDA,
TH_BINARY_BUILD, ...) to a file via --env-out which build.sh sources;
this is what lets those flags reach the wheel-build subprocess (a plain
`bash build_env_setup.sh` would have dropped them).

Also drops obsolete numpy version pins in .ci/pytorch/run_tests.sh.

The matching workflow / Jinja-template rework that originally lived in
this branch is no longer needed -- the matrix-driven binary workflows
already landed via #181586 (and follow-ups #181599, #182018), so the
new scripts plug into the existing _binary-build-linux.yml.

Authored with Claude.

ghstack-source-id: 7a45e73
Pull Request resolved: #182409
atalman added a commit that referenced this pull request May 7, 2026
…ps, wheel, repair)"

Split the monolithic .ci/manywheel/build_cuda.sh and the duplicated
sections of build_cpu.sh / build_common.sh into focused, reusable
scripts:

- build_env_setup.sh    GPU/toolchain environment setup (CUDA, ROCm, XPU)
- build_install_deps.sh shared build-time dependency install
- build_wheel.sh        the actual wheel build (python -m build)
- repair_wheel.sh       auditwheel-style repair using the `wheel` python
                        package (unpack/pack/tags), bundling aarch64
                        BLAS/LAPACK/ACL when needed

Drops build_cuda.sh (its logic is now in build_env_setup.sh +
build_wheel.sh) and trims x86/aarch64-specific branches out of
build_cpu.sh / build_common.sh. The legacy entry point .ci/manywheel/build.sh
now dispatches x86/aarch64 cuda/cpu through the new chain
(set_desired_python -> build_env_setup -> build_install_deps -> build_wheel
-> repair_wheel) and keeps rocm/xpu/cpu-s390x on the legacy build_*.sh
helpers.

Also drops obsolete numpy version pins in .ci/pytorch/run_tests.sh.

The matching workflow / Jinja-template rework that originally lived in
this branch is no longer needed -- the matrix-driven binary workflows
already landed via #181586 (and follow-ups #181599, #182018), so the
new scripts plug into the existing _binary-build-linux.yml.

Authored with Claude.

[ghstack-poisoned]
pytorchmergebot pushed a commit that referenced this pull request May 7, 2026
…repair) (#182409)

Split the monolithic .ci/manywheel/build_cuda.sh and the duplicated
sections of build_cpu.sh / build_common.sh into focused, reusable
scripts:

- build_env_setup.sh    GPU/toolchain environment setup (CUDA, ROCm, XPU)
- build_install_deps.sh shared build-time dependency install
- build_wheel.sh        the actual wheel build (python -m build)
- repair_wheel.sh       auditwheel-style repair using the `wheel` python
                        package (unpack/pack/tags), bundling aarch64
                        BLAS/LAPACK/ACL when needed

Drops build_cuda.sh (its logic is now in build_env_setup.sh +
build_wheel.sh) and trims x86/aarch64-specific branches out of
build_cpu.sh / build_common.sh. The legacy entry point .ci/manywheel/build.sh
now dispatches x86/aarch64 cuda/cpu through the new chain
(set_desired_python -> build_env_setup -> build_install_deps -> build_wheel
-> repair_wheel) and keeps rocm/xpu/cpu-s390x on the legacy build_*.sh
helpers.

Also drops obsolete numpy version pins in .ci/pytorch/run_tests.sh.

The matching workflow / Jinja-template rework that originally lived in
this branch is no longer needed -- the matrix-driven binary workflows
already landed via #181586 (and follow-ups #181599, #182018), so the
new scripts plug into the existing _binary-build-linux.yml.

Authored with Claude.
Pull Request resolved: #182409
Approved by: https://github.com/seemethere, https://github.com/huydhn
Alokksinha00 pushed a commit to Alokksinha00/pytorch that referenced this pull request May 15, 2026
…#182018)

Make GHA's `container:` directive optional via a new
`use_container_directive` input on `_binary-build-linux.yml` and
`_binary-test-linux.yml`:

- true (default, used by x86 / aarch64 / cuda): launch the build/test
  container via the `container:` directive — checkout, env-setup, and
  the .ci/* scripts all run directly inside it.
- false (used by s390x): the container.image expression resolves to an
  empty string, GHA treats it as no-container, and the build/test
  container is spawned via `docker run` from a step (podman-compatible
  on s390x self-hosted runners, which only register with the bare
  `linux.s390x` label and lack a host-level docker CLI compatible with
  the container directive).

This deletes the s390x-specific reusables `_binary-build-linux-s390x.yml`
and `_binary-test-linux-s390x.yml` introduced in pytorch#181599 — both arches
now share the same files, with the per-arch divergence collapsed to
the new boolean input plus a small `if:`-gated branch in each step.

Authored with Claude.
Pull Request resolved: pytorch#182018
Approved by: https://github.com/huydhn
Alokksinha00 pushed a commit to Alokksinha00/pytorch that referenced this pull request May 15, 2026
…repair) (pytorch#182409)

Split the monolithic .ci/manywheel/build_cuda.sh and the duplicated
sections of build_cpu.sh / build_common.sh into focused, reusable
scripts:

- build_env_setup.sh    GPU/toolchain environment setup (CUDA, ROCm, XPU)
- build_install_deps.sh shared build-time dependency install
- build_wheel.sh        the actual wheel build (python -m build)
- repair_wheel.sh       auditwheel-style repair using the `wheel` python
                        package (unpack/pack/tags), bundling aarch64
                        BLAS/LAPACK/ACL when needed

Drops build_cuda.sh (its logic is now in build_env_setup.sh +
build_wheel.sh) and trims x86/aarch64-specific branches out of
build_cpu.sh / build_common.sh. The legacy entry point .ci/manywheel/build.sh
now dispatches x86/aarch64 cuda/cpu through the new chain
(set_desired_python -> build_env_setup -> build_install_deps -> build_wheel
-> repair_wheel) and keeps rocm/xpu/cpu-s390x on the legacy build_*.sh
helpers.

Also drops obsolete numpy version pins in .ci/pytorch/run_tests.sh.

The matching workflow / Jinja-template rework that originally lived in
this branch is no longer needed -- the matrix-driven binary workflows
already landed via pytorch#181586 (and follow-ups pytorch#181599, pytorch#182018), so the
new scripts plug into the existing _binary-build-linux.yml.

Authored with Claude.
Pull Request resolved: pytorch#182409
Approved by: https://github.com/seemethere, https://github.com/huydhn
@github-actions
github-actions Bot deleted the gh/atalman/14/head branch May 31, 2026 02:29
aperson30 pushed a commit to aperson30/pytorch that referenced this pull request Jun 20, 2026
…#182018)

Make GHA's `container:` directive optional via a new
`use_container_directive` input on `_binary-build-linux.yml` and
`_binary-test-linux.yml`:

- true (default, used by x86 / aarch64 / cuda): launch the build/test
  container via the `container:` directive — checkout, env-setup, and
  the .ci/* scripts all run directly inside it.
- false (used by s390x): the container.image expression resolves to an
  empty string, GHA treats it as no-container, and the build/test
  container is spawned via `docker run` from a step (podman-compatible
  on s390x self-hosted runners, which only register with the bare
  `linux.s390x` label and lack a host-level docker CLI compatible with
  the container directive).

This deletes the s390x-specific reusables `_binary-build-linux-s390x.yml`
and `_binary-test-linux-s390x.yml` introduced in pytorch#181599 — both arches
now share the same files, with the per-arch divergence collapsed to
the new boolean input plus a small `if:`-gated branch in each step.

Authored with Claude.
Pull Request resolved: pytorch#182018
Approved by: https://github.com/huydhn
aperson30 pushed a commit to aperson30/pytorch that referenced this pull request Jun 20, 2026
…repair) (pytorch#182409)

Split the monolithic .ci/manywheel/build_cuda.sh and the duplicated
sections of build_cpu.sh / build_common.sh into focused, reusable
scripts:

- build_env_setup.sh    GPU/toolchain environment setup (CUDA, ROCm, XPU)
- build_install_deps.sh shared build-time dependency install
- build_wheel.sh        the actual wheel build (python -m build)
- repair_wheel.sh       auditwheel-style repair using the `wheel` python
                        package (unpack/pack/tags), bundling aarch64
                        BLAS/LAPACK/ACL when needed

Drops build_cuda.sh (its logic is now in build_env_setup.sh +
build_wheel.sh) and trims x86/aarch64-specific branches out of
build_cpu.sh / build_common.sh. The legacy entry point .ci/manywheel/build.sh
now dispatches x86/aarch64 cuda/cpu through the new chain
(set_desired_python -> build_env_setup -> build_install_deps -> build_wheel
-> repair_wheel) and keeps rocm/xpu/cpu-s390x on the legacy build_*.sh
helpers.

Also drops obsolete numpy version pins in .ci/pytorch/run_tests.sh.

The matching workflow / Jinja-template rework that originally lived in
this branch is no longer needed -- the matrix-driven binary workflows
already landed via pytorch#181586 (and follow-ups pytorch#181599, pytorch#182018), so the
new scripts plug into the existing _binary-build-linux.yml.

Authored with Claude.
Pull Request resolved: pytorch#182409
Approved by: https://github.com/seemethere, https://github.com/huydhn
gplutop7 pushed a commit to gplutop7/pytorch that referenced this pull request Jul 15, 2026
…#182018)

Make GHA's `container:` directive optional via a new
`use_container_directive` input on `_binary-build-linux.yml` and
`_binary-test-linux.yml`:

- true (default, used by x86 / aarch64 / cuda): launch the build/test
  container via the `container:` directive — checkout, env-setup, and
  the .ci/* scripts all run directly inside it.
- false (used by s390x): the container.image expression resolves to an
  empty string, GHA treats it as no-container, and the build/test
  container is spawned via `docker run` from a step (podman-compatible
  on s390x self-hosted runners, which only register with the bare
  `linux.s390x` label and lack a host-level docker CLI compatible with
  the container directive).

This deletes the s390x-specific reusables `_binary-build-linux-s390x.yml`
and `_binary-test-linux-s390x.yml` introduced in pytorch#181599 — both arches
now share the same files, with the per-arch divergence collapsed to
the new boolean input plus a small `if:`-gated branch in each step.

Authored with Claude.
Pull Request resolved: pytorch#182018
Approved by: https://github.com/huydhn
gplutop7 pushed a commit to gplutop7/pytorch that referenced this pull request Jul 15, 2026
…repair) (pytorch#182409)

Split the monolithic .ci/manywheel/build_cuda.sh and the duplicated
sections of build_cpu.sh / build_common.sh into focused, reusable
scripts:

- build_env_setup.sh    GPU/toolchain environment setup (CUDA, ROCm, XPU)
- build_install_deps.sh shared build-time dependency install
- build_wheel.sh        the actual wheel build (python -m build)
- repair_wheel.sh       auditwheel-style repair using the `wheel` python
                        package (unpack/pack/tags), bundling aarch64
                        BLAS/LAPACK/ACL when needed

Drops build_cuda.sh (its logic is now in build_env_setup.sh +
build_wheel.sh) and trims x86/aarch64-specific branches out of
build_cpu.sh / build_common.sh. The legacy entry point .ci/manywheel/build.sh
now dispatches x86/aarch64 cuda/cpu through the new chain
(set_desired_python -> build_env_setup -> build_install_deps -> build_wheel
-> repair_wheel) and keeps rocm/xpu/cpu-s390x on the legacy build_*.sh
helpers.

Also drops obsolete numpy version pins in .ci/pytorch/run_tests.sh.

The matching workflow / Jinja-template rework that originally lived in
this branch is no longer needed -- the matrix-driven binary workflows
already landed via pytorch#181586 (and follow-ups pytorch#181599, pytorch#182018), so the
new scripts plug into the existing _binary-build-linux.yml.

Authored with Claude.
Pull Request resolved: pytorch#182409
Approved by: https://github.com/seemethere, https://github.com/huydhn
aws-kingrj pushed a commit to amazon-contributing/upstream-to-pytorch that referenced this pull request Jul 29, 2026
…#182018)

Make GHA's `container:` directive optional via a new
`use_container_directive` input on `_binary-build-linux.yml` and
`_binary-test-linux.yml`:

- true (default, used by x86 / aarch64 / cuda): launch the build/test
  container via the `container:` directive — checkout, env-setup, and
  the .ci/* scripts all run directly inside it.
- false (used by s390x): the container.image expression resolves to an
  empty string, GHA treats it as no-container, and the build/test
  container is spawned via `docker run` from a step (podman-compatible
  on s390x self-hosted runners, which only register with the bare
  `linux.s390x` label and lack a host-level docker CLI compatible with
  the container directive).

This deletes the s390x-specific reusables `_binary-build-linux-s390x.yml`
and `_binary-test-linux-s390x.yml` introduced in pytorch#181599 — both arches
now share the same files, with the per-arch divergence collapsed to
the new boolean input plus a small `if:`-gated branch in each step.

Authored with Claude.
Pull Request resolved: pytorch#182018
Approved by: https://github.com/huydhn
aws-kingrj pushed a commit to amazon-contributing/upstream-to-pytorch that referenced this pull request Jul 29, 2026
…repair) (pytorch#182409)

Split the monolithic .ci/manywheel/build_cuda.sh and the duplicated
sections of build_cpu.sh / build_common.sh into focused, reusable
scripts:

- build_env_setup.sh    GPU/toolchain environment setup (CUDA, ROCm, XPU)
- build_install_deps.sh shared build-time dependency install
- build_wheel.sh        the actual wheel build (python -m build)
- repair_wheel.sh       auditwheel-style repair using the `wheel` python
                        package (unpack/pack/tags), bundling aarch64
                        BLAS/LAPACK/ACL when needed

Drops build_cuda.sh (its logic is now in build_env_setup.sh +
build_wheel.sh) and trims x86/aarch64-specific branches out of
build_cpu.sh / build_common.sh. The legacy entry point .ci/manywheel/build.sh
now dispatches x86/aarch64 cuda/cpu through the new chain
(set_desired_python -> build_env_setup -> build_install_deps -> build_wheel
-> repair_wheel) and keeps rocm/xpu/cpu-s390x on the legacy build_*.sh
helpers.

Also drops obsolete numpy version pins in .ci/pytorch/run_tests.sh.

The matching workflow / Jinja-template rework that originally lived in
this branch is no longer needed -- the matrix-driven binary workflows
already landed via pytorch#181586 (and follow-ups pytorch#181599, pytorch#182018), so the
new scripts plug into the existing _binary-build-linux.yml.

Authored with Claude.
Pull Request resolved: pytorch#182409
Approved by: https://github.com/seemethere, https://github.com/huydhn
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ciflow/binaries Trigger all binary build and upload jobs on the PR Merged topic: not user facing topic category

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants