Skip to content

[OSDC] Name the OSDC pod directly in the remaining workflows - #198703

Closed
huydhn wants to merge 3 commits into
gh/huydhn/63/basefrom
gh/huydhn/63/head
Closed

huydhn wants to merge 3 commits into
gh/huydhn/63/basefrom
gh/huydhn/63/head

Conversation

@huydhn

@huydhn huydhn commented Sep 26, 2026 •

Copy link
Copy Markdown
Contributor

Stack from ghstack (oldest at bottom):

The same mechanical rewrite as the previous change, applied to every other
workflow: a label the workflow already prefixes keeps the determinator
expression, a label written raw gets the literal Meta pod.

Every edit here was produced by matching runner: / runs-on:, so the diff is
uniform and can be reviewed by spot-check. The handful of places that a search
for those keys does not find are converted separately in the next change.

No job changes runner.

cc @voznesenskym @penguinwu @EikanWang @jgong5 @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @wenzhe-nrv @jiayisunx @kadeng @chauhang @amjames @jataylo @azahed98

[ghstack-poisoned]
@pytorch-bot

pytorch-bot Bot commented Sep 26, 2026 •

Copy link
Copy Markdown

🔗 Helpful Links

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

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

❌ You can merge normally! (7 Unrelated Failures), 2 Unclassified Failures

As of commit acfd75a with merge base aa98cb8 (image):

🟡 GREEN LIGHT - OUTDATED (earlier commit) - PR requires human review:

  • Breadth
    • Rewrites runner labels across about 25 files under .github/workflows/, several hundred runner: entries in all
    • PR body asks for spot-check review, but many uniform edits count as many sites to check, not one trivial change
  • Fleet routing
    • Raw labels such as linux.aws.a100, linux.g5.4xlarge.nvidia.gpu and linux.arm64.m8g.4xlarge are hardcoded to mt- Meta pods
    • .github/arc.yaml meta_only_runners forces mt- only for the H100 labels, so this pins other jobs to the Meta fleet whatever the experiment says
  • Correct but consequential
    • Spot-checked targets match runner_mapping in .github/arc.yaml, but moving periodic, inductor and benchmark CI onto new fleets is a decision the CI owners should see
    • The claim of no runner change is the author's own; the diff alone does not show that the mt- pinning keeps each job's existing routing

reason: not_trivial
Reviewed commit: f7ed3ba (NOT the current head acfd75a)

Inference job

🐛 Report a wrong verdict

NEW FAILURES SUPPRESSED BY AI (non-blocking) - The following jobs failed, but the AI CI Advisor judged the failures not to be evidence against this change:

UNCLASSIFIED FAILURES - DrCI could not classify the following jobs because the workflow did not run on the merge base. The failures may be pre-existing on trunk or introduced by this PR:

UNSTABLE - The following jobs are marked as unstable, possibly due to flakiness on trunk:

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

[ghstack-poisoned]
@huydhn
huydhn marked this pull request as ready for review September 26, 2026 02:14
@huydhn
huydhn requested a review from a team as a code owner September 26, 2026 02:14

@jeanschmidt jeanschmidt left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review summary

🟠 1 major · 🟡 1 minor · ⚪ 1 nit

  • 🟠 Raw mt-l-* matrix labels make map_ec2_to_arc.py exit 1 when the build runs on the lf fleet, hard-failing the build job in nine workflows — .github/workflows/attention_op_microbenchmark.yml:45
  • 🟡 benchmarks/operator_benchmark/README.md documents four runner labels by name that this change renames in the two workflows it describes — .github/workflows/operator_benchmark.yml:57
  • ⚪ The job-name example at benchmarks/dynamo/perf_cli.py:88 cites linux.aws.a100, a runner the renamed inductor-perf-test-nightly job no longer produces — .github/workflows/inductor-perf-test-nightly.yml:95
Extended analysis (ai-generated section)

What this changes

The change rewrites runner labels across 27 GitHub Actions workflow files, replacing EC2 instance names such as linux.aws.h100 and linux.g5.4xlarge.nvidia.gpu with the ARC pod names they currently map to in .github/arc.yaml — l-x86iamx-22-225-h100, l-x86aavx2-11-41-a10g, and so on. Two forms appear. Entries that already carried ${{ needs.get-label-type.outputs.label-type }} keep that expression and gain a bare l-… name; entries written raw get a literal mt- prefix, about 157 sites across 19 files. These matrices are not consumed literally: _linux-build.yml:206-219 still pipes every one through .github/scripts/map_ec2_to_arc.py, so the labels remain inputs to that script rather than final values. That is where the change stops being a rename.

What it gets right

The transcription itself is accurate. Every distinct pod name written here matches the corresponding value in arc.yaml's runner_mapping, checked entry by entry, which is the hard part of a mechanical rewrite this wide. The prefixed form is the correct translation and matches the precedent already set in pull.yml, keeping fleet selection expressed once. Partner hardware that arc.yaml passes through unchanged — B200, XPU, ROCm — is left alone, and per-entry metadata survives in place, including owners:, the unstable: keys and the staging comment above the inductor_aoti_fallback shards in inductor-unittest.yml:192-198.

Where the risk is

All of it concentrates in the raw mt- form, and four independent reviews landed on the same lines from four different angles — that convergence is the strongest signal in the run. The mechanism is one thing (c-001): strip_prefix in map_ec2_to_arc.py:38-41 removes only the prefix it is handed, so when the determinator resolves label-type to lf-, a literal mt-l-… is neither a mapping key nor l--prefixed and map_ec2_to_arc.py:101-102 exits 1, failing the build job before anything compiles. One edit settles all four. Whether that path fires today depends on the lf rollout state, which lives outside this repository and could not be settled from the checkout.

A second cluster (c-002) reads the same lines for what they mean rather than what they crash: arc.yaml:124-127 declares exactly three Meta-only runners, and the literal mt- is now written for roughly eleven runner types that are not on that list, so fleet policy is stated in two places that disagree — visibly within one job at operator_benchmark.yml:87 versus :92. These two clusters compound. Fixing the crash narrowly, by teaching the mapper to accept mt-l-… under any prefix, converts the hard failure into the silent fleet pin, and leaves test_non_h100_keeps_lf_prefix guarding an invariant the workflows no longer follow. Deciding whether Meta pinning is intended therefore picks the fix for the crash; it is not a separate question.

A third cluster (c-003) is one consequence of the rewrite's premise: pod names take the unvalidated l- passthrough at map_ec2_to_arc.py:99, so a future typo no longer fails fast, and arc.yaml's table is now duplicated into the workflows with nothing comparing them. Separately and unrelated to any of the above, two documents name labels this change renames: benchmarks/operator_benchmark/README.md lines 157, 158, 177 and 178, and the job-name example at benchmarks/dynamo/perf_cli.py:88.

Before merge, and after

Settle the fleet question first, then fix the mapper crash in the way that answer implies — "raw mt- runner labels crash the build job's map_ec2_to_arc.py step" in the raw-label workflows, and "raw labels are hardcoded with the mt- fleet prefix for runners that arc.yaml's meta_only_runners does not declare Meta-only" in operator_benchmark.yml and its siblings. Writing the determinator expression for non-Meta-only hardware resolves both at once and keeps the change a pure rename, as the description claims it is. The four stale labels in benchmarks/operator_benchmark/README.md are a four-line edit and operator_microbenchmark.yml:2 already asks that the file be kept in sync, so they are cheap to include here.

As follow-up: where runner-label validation should live, raised by "naming ARC pods directly routes these runner labels around map_ec2_to_arc.py's validation" and "ARC pod names are copied out of arc.yaml's runner_mapping into 27 workflows". That needs a design decision about the end state of the migration rather than a patch to this diff, and nothing is broken by it today. The perf_cli.py:88 example is a comment fix whenever convenient.

[ghstack-poisoned]
@huydhn

huydhn commented Sep 27, 2026

Copy link
Copy Markdown
Contributor Author

@pytorchbot merge -i

@pytorch-bot pytorch-bot Bot added the ciflow/trunk Trigger trunk jobs on your pull request label Sep 27, 2026
mtarsel added a commit to mtarsel/pytorch that referenced this pull request Sep 29, 2026
OSDC's pod-naming migration (pytorch#198700, pytorch#198703,
names its ARC pod directly, so there's nothing left to translate.
The one piece that migration doesn't replace -- forcing a
non-allowlisted lf- entry onto mt- (ci-infra#1081) -- has no other
home, so it moves to a new, minimal script.

Drop --prefix entirely. inductor-periodic.yml shows a job's own
runner_prefix and its hardcoded H100 entries can already diverge
(job resolves to lf-, entry hardcodes mt-l-...-h100 directly), so
checking each entry's own literal prefix is both simpler and
avoids double-prefixing that entry to mt-mt-... when the job-level
prefix is used instead. Also drop the now-dead runner_mapping,
meta_only_runners and ARC_LABEL passthrough lookups: every entry
already names a resolved ARC pod by the time this script sees it.

Keep the onnx-config exclusion (TODO(huydo)): unrelated to LF
routing, but nothing else upstream replaces it, and dropping it
here would silently regress that ARC-k8s CPU-affinity workaround.

Ports the still-relevant lf_allowlist coverage into
test_enforce_lf_allowlist.py, drops cases that only exercised the
removed translation logic, and adds a regression test for a matrix
mixing a hardcoded mt- entry with a restricted, dynamically-routed
lf- one.

ci-infra#1081

Co-Authored-By: Claude Sonnet 5 <[email protected]>
Signed-off-by: Mick Tarsel <[email protected]>
mtarsel added a commit to mtarsel/pytorch that referenced this pull request Sep 29, 2026
OSDC's pod-naming migration (pytorch#198700, pytorch#198703,
pytorch#198706) names each ARC pod directly and deletes
map_ec2_to_arc.py, the mapper that used to enforce this allowlist.
The one piece that migration doesn't replace -- forcing a
non-allowlisted lf- entry onto mt- -- has no other home, so it
moves to a new, minimal script, wired into the same
_linux-build.yml step the old mapper occupied.

Checks each matrix entry's own literal lf-/mt- prefix instead of
the job-level runner_prefix input: inductor-periodic.yml shows the
two can already diverge (job resolves to lf-, entry hardcodes
mt-l-...-h100 directly), so using the job-level prefix would have
double-prefixed that entry to mt-mt-... instead. Drops the now-dead
runner_mapping, meta_only_runners, and ARC_LABEL passthrough
lookups: every entry already names a resolved ARC pod by the time
this script sees it. Keeps the onnx-config exclusion (TODO(huydo))
as-is -- unrelated to LF routing, but nothing else upstream
replaces it.

Full test coverage: allowlisted / non-allowlisted / unrestricted /
kill-switch cases, all passing.

ci-infra#1081

Co-Authored-By: Claude Sonnet 5 <[email protected]>
Signed-off-by: Mick Tarsel <[email protected]>
mtarsel added a commit to mtarsel/pytorch that referenced this pull request Sep 30, 2026
meta_only_runners existed only for map_ec2_to_arc.py to force the
'mt-' prefix on Meta-only hardware (H100/B200) regardless of which
experiment picked the build runner. The OSDC pod-naming migration
(pytorch#198700, pytorch#198703, pytorch#198705, pytorch#198706) retired that script, and every
workflow now hardcodes its ARC pod label directly instead of going
through the EC2->ARC mapper, so nothing reads this block anymore.

Confirmed via a repo-wide grep that meta_only_runners has no
references left besides its own definition. Leaves runner_mapping
and lf_allowlist untouched.

ci-infra#1081

Signed-off-by: Mick Tarsel <[email protected]>
Co-Authored-By: Claude Sonnet 5 <[email protected]>
mtarsel added a commit to mtarsel/pytorch that referenced this pull request Sep 30, 2026
meta_only_runners existed only for map_ec2_to_arc.py to force the
'mt-' prefix on Meta-only hardware (H100/B200) regardless of which
experiment picked the build runner. The OSDC pod-naming migration
(pytorch#198700, pytorch#198703, pytorch#198705, pytorch#198706) retired that script, and every
workflow now hardcodes its ARC pod label directly instead of going
through the EC2->ARC mapper, so nothing reads this block anymore.

Confirmed via a repo-wide grep that meta_only_runners has no
references left besides its own definition. Leaves runner_mapping
and lf_allowlist untouched.

ci-infra#1081

Signed-off-by: Mick Tarsel <[email protected]>
Co-Authored-By: Claude Sonnet 5 <[email protected]>
@github-actions
github-actions Bot deleted the gh/huydhn/63/head branch December 1, 2026 01:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants