Repository navigation
Build the Linux wheels on OSDC runners - #22753
Conversation
🔗 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 FailuresAs of commit 44a9778 with merge base 1d95a2a ( This comment was automatically generated by Dr. CI and updates every 15 minutes. |
This PR needs a
|
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.
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.
048bb93 to
a57dc3e
Compare
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.
a57dc3e to
a759ebb
Compare
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.
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.
0d1e0b6 to
44a9778
Compare
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.
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.
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.
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'svalidation_runnerto its ARC equivalent — release-isolated on the refs these workflows publish from, regular otherwise, so PR builds move off EC2 too.mt-l-x86iavx512-8-64mt-rel-l-x86iavx512-44-340mt-l-x86aavx2-29-113-a10gmt-rel-l-x86aavx2-29-113-l4mt-l-arm64g4-16-62mt-rel-l-arm64g3-44-340The cuda x86_64 rows keep a device, which they need:
test_cuda_linux.pyexports 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.