Skip to content

Build the Linux wheels on OSDC runners - #22753

Merged
huydhn merged 1 commit into
mainfrom
osdc/wheel-release-runners
Sep 15, 2026
Merged

huydhn merged 1 commit into
mainfrom
osdc/wheel-release-runners

Conversation

@huydhn

@huydhn huydhn commented Sep 11, 2026 •

Copy link
Copy Markdown
Contributor

Takes all four Linux wheel workflows off EC2.

One input on the matrix generator. pytorch/test-infra#8789 adds runner-fleet, which maps each row's validation_runner to its ARC equivalent — release-isolated on the refs these workflows publish from, regular otherwise, so PR builds move off EC2 too.

arch rows regular release
x86_64 cpu mt-l-x86iavx512-8-64 mt-rel-l-x86iavx512-44-340
x86_64 cuda mt-l-x86aavx2-29-113-a10g mt-rel-l-x86aavx2-29-113-l4
aarch64 any mt-l-arm64g4-16-62 mt-rel-l-arm64g3-44-340

The cuda x86_64 rows keep a device, which they need: test_cuda_linux.py exports a model through the CUDA partitioner and runs it against eager, and on a CPU runner that check would skip rather than fail.

Depends on pytorch/test-infra#8789.

Authored with Claude Code.

@pytorch-bot

pytorch-bot Bot commented Sep 11, 2026 •

Copy link
Copy Markdown

🔗 Helpful Links

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

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

✅ No Failures

As of commit 44a9778 with merge base 1d95a2a (image):
💚 Looks good so far! There are no failures yet. 💚

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

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Sep 11, 2026
@github-actions

Copy link
Copy Markdown

This PR needs a release notes: label

If your change should be included in the release notes (i.e. would users of this library care about this change?), please use a label starting with release notes:. This helps us keep track and include your important work in the next release notes.

To add a label, you can comment to pytorchbot, for example
@pytorchbot label "release notes: none"

For more information, see
https://github.com/pytorch/pytorch/wiki/PyTorch-AutoLabel-Bot#why-categorize-for-release-notes-and-how-does-it-work.

@huydhn
huydhn requested a review from atalman September 11, 2026 20:01
huydhn added a commit to pytorch/test-infra that referenced this pull request Sep 11, 2026
The release runner groups are org-level and shared, but the script assumed a
single consumer: it computed a desired allow-list from pytorch/pytorch and
PATCHed selected_workflows to exactly that set. Pointing a second repository at
the same groups would have had each run remove the other's entries, so the two
would fight on every release.

Reconcile only the entries prefixed with the target repo and carry the rest
through untouched. reconcile_repo_access already added without removing, so it
needed no change beyond taking the repo for its log lines.

--repo selects the target, defaulting to pytorch/pytorch so the existing caller
is unaffected. The version anchor is the one part that cannot be shared:
pytorch/pytorch reads CURRENT_CANDIDATE_VERSION from generate_binary_build_matrix,
which other repos do not publish, so they anchor on their newest protected
release/X.Y branch instead. Reading a version file would be wrong for repos whose
main carries the next dev version -- executorch's version.txt says 1.6.0 while
its newest branch is release/1.5.

Tests cover the scoping (other repos' entries survive, a stale entry for the
target is still replaced, pytorch/executorch-examples is not mistaken for
pytorch/executorch, an empty desired set still refuses to write) and the anchor.

For pytorch/executorch#22753.
huydhn added a commit to pytorch/test-infra that referenced this pull request Sep 11, 2026
The release runner groups are org-level and shared, but the script assumed a
single consumer: it computed a desired allow-list from pytorch/pytorch and
PATCHed selected_workflows to exactly that set. Pointing a second repository at
the same groups would have had each run remove the other's entries, so the two
would fight on every release.

Reconcile only the entries prefixed with the target repo and carry the rest
through untouched. reconcile_repo_access already added without removing, so it
needed no change beyond taking the repo for its log lines.

--repo selects the target, defaulting to pytorch/pytorch so the existing caller
is unaffected. The version anchor is the one part that cannot be shared:
pytorch/pytorch reads CURRENT_CANDIDATE_VERSION from generate_binary_build_matrix,
which other repos do not publish, so they anchor on their newest protected
release/X.Y branch instead.

For pytorch/executorch#22753.
@huydhn
huydhn force-pushed the osdc/wheel-release-runners branch from 048bb93 to a57dc3e Compare September 11, 2026 21:06
@huydhn huydhn changed the title Build release wheels on the release-isolated runners Build the Linux wheels on OSDC runners Sep 11, 2026
@huydhn
huydhn marked this pull request as ready for review September 12, 2026 22:03
huydhn added a commit to pytorch/vision that referenced this pull request Sep 12, 2026
Same shape as pytorch/executorch#22753: _select-release-runner.yml is the single
place the labels are named, and the callers pass its outputs to
build_wheels_linux.yml. Release-isolated mt-rel-l-* on the refs these workflows
publish from (nightly, main, release/* and the v* candidate tags), regular
mt-l-* everywhere else including pull requests. No path returns an EC2 label.

    x86_64  cpu/rocm/xpu  mt-l-x86iavx512-8-64      mt-rel-l-x86iavx512-44-340
    x86_64  cuda          mt-l-x86aavx2-29-113-a10g mt-rel-l-x86aavx2-29-113-l4
    aarch64 any           mt-l-arm64g4-16-62        mt-rel-l-arm64g3-44-340

The x86 matrix mixes four CPU rows (cpu, rocm10_0, rocm7_14, xpu) with three
cuda ones, and a single runner override cannot express that: it either puts the
CPU builds on a GPU runner or takes the device away from the cuda rows, whose
smoke test guards its CUDA checks with torch.cuda.is_available() and so skips
them silently. pytorch/test-infra#8789 adds a runner-gpu input for exactly this,
applied to the cuda rows only, so the split is expressed by the caller and the
per-row selection stays in the shared workflow rather than in a script here.

aarch64 needs only the one label: OSDC has no arm64 GPU runner, which matches
today, since its cuda rows already build on an m7g box with no device. The rocm
rows build ROCm wheels on an ordinary CPU builder and need no AMD hardware.

Depends on pytorch/test-infra#8789 for runner-gpu, and because without it
build_wheels_linux.yml cannot run on an OSDC pod at all.

Authored with Claude Code.
@huydhn
huydhn force-pushed the osdc/wheel-release-runners branch from a57dc3e to a759ebb Compare September 12, 2026 22:58
huydhn added a commit to pytorch/test-infra that referenced this pull request Sep 12, 2026
The release runner groups are org-level and shared, but the script
assumed a single consumer: it computed a desired allow-list from
`pytorch/pytorch` and PATCHed `selected_workflows` to exactly that set.
Pointing a second repository at the same groups would have had each run
remove the other's entries, so the two would fight on every release.

Now it reconciles only the entries prefixed with the target repo and
carries the rest through untouched. `reconcile_repo_access` already
added without removing, so it needed no change beyond taking the repo
for its log lines.

`--repo` selects the target, defaulting to `pytorch/pytorch`, so the
existing caller is unaffected. The version anchor is the one part that
cannot be shared: `pytorch/pytorch` reads `CURRENT_CANDIDATE_VERSION`
from `generate_binary_build_matrix`, which other repos do not publish,
so they anchor on their newest protected `release/X.Y` branch instead.
Reading a version file would be wrong for repos whose main carries the
next dev version — executorch's `version.txt` says `1.6.0` while its
newest branch is `release/1.5`.

Tests: 31 pass. New coverage for the scoping (other repos' entries
survive, a stale entry for the target is still replaced,
`pytorch/executorch-examples` is not mistaken for `pytorch/executorch`,
an empty desired set still refuses to write) and for the anchor.

For pytorch/executorch#22753.
@huydhn
huydhn requested a review from atalman September 14, 2026 18:20
huydhn added a commit to pytorch/test-infra that referenced this pull request Sep 14, 2026
Two things stopped `build_wheels_linux.yml` running on an OSDC pod, both
found by probing executorch's x86 wheel build on `mt-l-x86iavx512-8-64`:

- the workspace clean removed `GITHUB_WORKSPACE`, detaching the mount,
so every later step failed with `getcwd: cannot access parent
directories`. It now clears the contents instead.
- the four `uses: ./test-infra/...` actions could not resolve. OSDC
copies the workspace into the pod, so a checkout inside it is invisible
to the runner on the host. They are referenced remotely now, as
`linux_job_v3.yml` and `_binary-build-linux.yml` already do.

Also adds a `runner-fleet` input to `generate_binary_build_matrix.yml`.
On `osdc` each row's `validation_runner` becomes its ARC equivalent, so
callers move off EC2 with one input and no per-repo runner plumbing.
Defaults to `ec2`, so existing callers are unaffected.

Release-isolated on `main`, `nightly`, `release/*` and `v*` tags;
regular otherwise. Treating `main` as a publish ref is deliberate — it
matches pytorch/pytorch's `_select-release-runner.yml`, and means a repo
that builds wheels on main pushes (vision does, executorch does not)
uses the release fleet for them.

| arch | rows | regular | release |
| --- | --- | --- | --- |
| x86_64 | cpu / rocm / xpu | `mt-l-x86iavx512-8-64` |
`mt-rel-l-x86iavx512-44-340` |
| x86_64 | cuda | `mt-l-x86aavx2-29-113-a10g` |
`mt-rel-l-x86aavx2-29-113-l4` |
| aarch64 | any | `mt-l-arm64g4-16-62` | `mt-rel-l-arm64g3-44-340` |

aarch64 gets one label either way — OSDC has no arm64 GPU runner,
matching the `linux.arm64.m7g.4xlarge` it replaces. Windows and macOS
rows are untouched.

Consumers: pytorch/executorch#22753, pytorch/vision#9668 — both green on
OSDC.
One input on the matrix generator. pytorch/test-infra#8789 adds runner-fleet,
which maps each row's validation_runner to its ARC equivalent: release-isolated
on the refs these workflows publish from, regular otherwise, so pull request
builds move off EC2 too.

    x86_64  cpu   mt-l-x86iavx512-8-64      mt-rel-l-x86iavx512-44-340
    x86_64  cuda  mt-l-x86aavx2-29-113-a10g mt-rel-l-x86aavx2-29-113-l4
    aarch64 any   mt-l-arm64g4-16-62        mt-rel-l-arm64g3-44-340

The cuda x86_64 rows keep a device, which they need: test_cuda_linux.py exports
a model through the CUDA partitioner and runs it against eager, and on a CPU
runner that check would skip rather than fail.

Depends on pytorch/test-infra#8789, which also carries the two fixes
build_wheels_linux.yml needs to run on an OSDC pod at all.

Authored with Claude Code.
huydhn added a commit to pytorch/test-infra that referenced this pull request Sep 14, 2026
Discovery looked for a `rel-` label in the workflow file, or a caller of
`_select-release-runner.yml`. After #8789 a wheel workflow has neither —
it passes `runner-fleet: osdc` to `generate_binary_build_matrix.yml`,
and the generator resolves each row's `validation_runner` to a `rel-`
runner on the refs a wheel is published from. The label never appears in
the caller's file.

Measured against the two consumers before this change:

```
contains a rel- label?            False
mentions _select-release-runner?  False
has runner-fleet: osdc?           True
```

So pytorch/executorch#22753 and pytorch/vision#9668 would be discovered
as 0 release workflows indefinitely, the allow-list would stay empty,
and the groups would need seeding by hand at every branch cut and RC
tag.

Treats that input as the same signal. `ec2`, the default, is not a
match.
@huydhn
huydhn merged commit 13ec99a into main Sep 15, 2026
234 of 240 checks passed
@huydhn
huydhn deleted the osdc/wheel-release-runners branch September 15, 2026 00:00
huydhn added a commit that referenced this pull request Sep 16, 2026
Mirrors the workflow of the same name in `pytorch/pytorch`. On a release
or release-candidate tag it reconciles the org-level release runner
groups so the workflows this repository builds from stay allow-listed;
on a PR touching this file, and on dispatch without the flag, it only
prints the diff.

Passes `--repo` so the run touches only this repository's entries. The
groups are shared with `pytorch/pytorch`, and before
pytorch/test-infra#8788 the script PATCHed the allow-list to exactly one
repository's desired set — the two would have removed each other's
entries on every release. That landed, so this now runs against
`test-infra@main`.

Reads `RUNNER_GROUP_TOKEN` from the `runner-group` environment. A PR run
does not select that environment, so it falls back to `GITHUB_TOKEN` and
the script takes its discovery-only path.

Verified against this repo: anchors on `release/1.5`, pins `main`,
`nightly`, `release/1.5`, `release/1.4` and the `v1.4.1` tags. 0
workflows discovered so far, which is correct — nothing here uses a
release runner label until #22753 lands, and the script refuses to apply
an empty allow-list.

Authored with Claude Code.
mtarsel pushed a commit to mtarsel/ci-infra that referenced this pull request Sep 16, 2026
Adds `rel-l-x86aavx2-29-113-l4` on `g6.8xlarge`, plus the
`g6-8xlarge-release` NodePool it schedules onto.

Both existing release runners are CPU-only, so the CUDA x86_64 wheel
rows have nowhere isolated to build: their smoke test exports a model
through the CUDA partitioner and runs it, so pointing them at the r7a
release pool would turn that check into a silent skip.

g6 over g5: same 32c/128Gi 1-GPU shape, and this fleet's own measured
numbers put `g6.8xlarge` at the 1-GPU cost optimum ($2.01/runner-hr) vs
~$2.45 for `g5.8xlarge`. L4 is sm_89, which the wheel rows already
compile device code for (`8.0 8.6 8.9 9.0 10.0 12.0`), so the smoke test
still exercises an architecture the artifact claims.

Tests: `generate_nodepools` and `generate_runners` suites pass. Rendered
against `meta-prod-aws-ue1` — `g6-8xlarge-release` carries
`osdc.io/runner-class: release` and the NVIDIA AMI; the runner lands in
`meta-prod-aws-ue1-release-runners` with `nvidia.com/gpu: 1`.

Consumer: pytorch/executorch#22753.

This branch was previously deployed

1 inactive deployment
cadence — 44a97780 Deployed Sep 14, 2026 by huydhn via hifi-op-test / hifi4 #27774
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. topic: not user facing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants