Repository navigation
Build the Linux wheels on OSDC runners - #9668
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/vision/9668
Note: Links to docs will display an error until the docs builds have been completed. ❌ 1 Unclassified FailureAs of commit 879c63e with merge base 447c937 ( UNCLASSIFIED FAILURE - DrCI could not classify the following job because the workflow did not run on the merge base. The failure may be pre-existing on trunk or introduced by this PR:
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
da4e59a to
f35477c
Compare
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 (nightly, main, release/* and the v* candidate tags), regular otherwise, so pull request builds move off EC2 too. 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 split matters for x86: the matrix mixes four CPU rows (cpu, rocm10_0, rocm7_14, xpu) with three cuda ones, and test/smoke_test.py guards its CUDA checks with torch.cuda.is_available(), so a cuda row on a CPU runner would skip them rather than fail. aarch64 gets one label either way, matching the runner it replaces: linux.arm64.m7g.4xlarge has no device either. The rocm rows build ROCm wheels on an ordinary CPU builder and need no AMD hardware. 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.
f35477c to
2948f6c
Compare
Drop before merging. Points both the matrix generator and the wheel build at that PR's branch, and the test-infra checkout with them, so CI here exercises runner-fleet and the two OSDC fixes it carries. Against test-infra main the runner-fleet input does not exist and the call is rejected outright.
| jobs: | ||
| generate-matrix: | ||
| uses: pytorch/test-infra/.github/workflows/generate_binary_build_matrix.yml@main | ||
| uses: pytorch/test-infra/.github/workflows/generate_binary_build_matrix.yml@build-wheels-linux-osdc-workspace |
There was a problem hiding this comment.
Thanks for the PR @huydhn
Can you share more on how these refs should be updated upon releases? I was usually changing main into e.g. release/2.14 both here and below for test-infra-ref.
There was a problem hiding this comment.
It would be the same as before. I'm using @build-wheels-linux-osdc-workspace here just to test this with pytorch/test-infra#8789, and will revert this back to @main once pytorch/test-infra#8789 merges
Basically, this PR depends on pytorch/test-infra#8789
There was a problem hiding this comment.
It's back to main now
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.
pytorch/test-infra#8789 landed, so runner-fleet and the two OSDC fixes for build_wheels_linux.yml are on main. Undoes the temporary pin to that PR's branch.
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.
GitHub matches a runner group's allow-list against the workflow that **declares** the job, not the caller. pytorch/pytorch's own entries show it directly — `_binary-build-linux.yml` and `_select-release-runner.yml` are listed alongside the generated callers. Those are local to pytorch/pytorch, so the caller-path model happened to cover them. `build_wheels_linux.yml` is remote to every repo that calls it, so nothing emitted it, and pytorch/vision#9668's first nightly queued for 5.5 hours with no error until the entry was added by hand. A consumer's own refresh cannot fix this: discovery there only follows local `uses:`, and an entry under another repository's prefix is foreign to it — preserved, but never created. So this repository allow-lists its own reusable. `--self-allow` names the path explicitly, since discovery finds nothing here. The refs are `main` **plus every `release/X.Y` branch**, not the protected ones — only `main` is protected here, which would leave `release/2.1` through `release/2.14` uncovered. A caller pins whichever ref it likes (every consumer pins `@main` today, including from their own release branches), and an entry nothing matches grants nothing. Dry-run against this repo: ``` pytorch/test-infra has no protected release line; skipping discovery Self-allowed refs: refs/heads/main, refs/heads/release/2.1 … refs/heads/release/2.14 Desired allow-list (15 references) ``` No regression for pytorch/pytorch — still `release/2.14` and the same 50 references. The push trigger has no `paths` filter on purpose: the entries follow this repository's own branches, so cutting `release/X.Y` is exactly when the set changes, and a branch creation carries no diff for a paths filter to match. 41 tests, mypy and ruff clean. ### Testing https://github.com/pytorch/test-infra/actions/runs/35005817689/job/104505167831#step:4:23
…#1073) `rel-l-x86aavx2-29-113-l4` asked for **600Gi of ephemeral storage on a g6.8xlarge whose nodepool provisions a 600GB disk**. Allocatable is below that once the AMI, container images and kubelet reserves are taken, so Karpenter could never place the pod. The scale set registered with GitHub and looked healthy while every job sat queued — pytorch/vision#9668's nightly CUDA wheels queued indefinitely while the CPU rows on `rel-l-x86iavx512-44-340` finished normally in the same run. ``` rel-l-x86aavx2-29-113-l4 disk_size: 600 node_disk_size: 600 ← never fits l-x86aavx2-29-113-l4 disk_size: 150 node_disk_size: 600 ← CI runner, same instance, works rel-l-x86iavx512-44-340 disk_size: 600 node_disk_size: 900 ← CPU release runner, works ``` 600 came from copying the CPU release runner in pytorch#1067, which works only because its nodepool provisions 900 for that request. 150Gi is what both the CI runner on this same instance and the `linux.g5.4xlarge.nvidia.gpu` EC2 runner this replaces already use for the same builds, so it is not a reduction in practice. Renders as `ephemeral-storage: "150Gi"`; runner and nodepool generator tests pass.
Co-authored-by: Nicolas Hug <[email protected]>
Second of three taking vision's Linux CI off EC2, after #9667.
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 per-row split matters for x86: the matrix mixes four CPU rows with three cuda ones, and
test/smoke_test.pyguards its CUDA checks withtorch.cuda.is_available(), so a cuda row on a CPU runner would skip them rather than fail. aarch64 gets one label either way, matching the runner it replaces —linux.arm64.m7g.4xlargehas no device either.Depends on pytorch/test-infra#8789.
Authored with Claude Code.