Repository navigation
Conversation
Follows pytorch#198271, which did the same for pull and trunk. Renames every 3.10 job in periodic.yml and slow.yml -- job keys, `name`, `build-environment`, `python-version` and the `needs` references between build and test. Docker images: - `pytorch-linux-jammy-cuda13.{0,4}-cudnn9-py3.10-clang20` are consumed only by periodic, so they are renamed in place. Neither has a case in build.sh; the catch-all reads the version out of the tag, so the rename is all that is needed. (pytorch#198271 already renamed the 13.2 image the same way for trunk.) - `pytorch-linux-jammy-py3.10-clang21` is left alone and the two slow jobs plus the periodic debug-distributed job point at the existing `py3.11-clang21` image instead. The 3.10 image still has six consumers -- docs-build, nightly, periodic-strict and td-holdout-unstable -- so renaming it would be out of scope here. The 3.11 image is a superset of it: same CLANG_VERSION, GCC_VERSION, KATEX, DOCS and ONNX, plus TVM. Other workflows keep their own 3.10 jobs; job names are scoped per workflow, so the names shared with inductor.yml, test-h100.yml and the rest are independent definitions rather than references to these. Done with Claude Code.
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/198501
Note: Links to docs will display an error until the docs builds have been completed. ✅ You can merge normally! (5 Unrelated Failures)As of commit 333b79b with merge base a4fb508 ( 🟡 GREEN LIGHT - OUTDATED (earlier commit) - PR requires human review:
reason: 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:
FLAKY - The following jobs failed but were likely due to flakiness present on trunk:
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
Same migration as periodic.yml and slow.yml in this PR, applied to the workflow that was missed. Both job pairs move: the cuda13.0-gcc11 build/test and the clang21 build/test. Job ids, display names, build-environment, needs references, and python-version all follow the convention used for the equivalent jobs in periodic.yml. The clang21 pair also switches docker-image-name to ci-image:pytorch-linux-jammy-py3.11-clang21. The cuda pair's image (pytorch-linux-jammy-cuda13.0-cudnn9-py3-gcc11) carries no Python version in its name, so only the build-environment and python-version change there. Verified: no 3.10 or 3_10 references remain in the file, and it still parses as YAML with the four renamed jobs plus get-label-type.
|
@pytorchmergebot merge -f "this looks good, lets merge" |
Merge startedYour change will be merged immediately since you used the force (-f) flag, bypassing any CI checks (ETA: 1-5 minutes). Please use Learn more about merging in the wiki. Questions? Feedback? Please reach out to the PyTorch DevX Team |
Follows #198271 (pull, trunk) and #198501 (periodic, slow, periodic-strict), covering the 32 workflows those two did not touch. ## What moves The inductor, rocm, h100, xpu, docs, dtensor, native-aot and microbenchmark families. Job ids, display names, `build-environment`, `needs` references, `${{ needs.<job>.* }}` interpolations and `python-version` all move together, following the convention the two earlier PRs established. The only versioned image any of these workflows names is `pytorch-linux-jammy-py3.11-clang21`, which is already defined in `.ci/docker/build.sh` and listed in `docker-builds.yml`. ## Also: a guard that would have lost coverage silently `.ci/pytorch/test.sh` gates a test on the build-environment *name*: ```bash # Remove dill to test that serialization works without it if [[ "$BUILD_ENVIRONMENT" == *py3.10-gcc11 ]]; then pip uninstall -y dill 2>/dev/null || true fi ``` \#198271 renames that environment to `py3.11-gcc11` but does not touch this guard. Once it lands the branch stops matching, dill is never uninstalled, and the without-dill serialization coverage disappears — no failure, just a test that no longer runs. Fixed here since it is the same migration. ## Deliberately left alone | file | why | |---|---| | `lint.yml` | needs `pytorch-linux-jammy-cuda13.0-cudnn9-py3.11-linter`; `.ci/docker/build.sh` has no case for that tag, so the image cannot be built yet | | `.github/scripts/test_trymerge.py` | `py3.10` appears in historical job names used as test fixtures | | `linux_binary_build_workflow.yml.j2`, `_binary-test-macos.yml` | `py3_10` appears in comments and input descriptions about **binary** wheels. The binary matrix still ships 3.10 on the test and release channels; only nightly dropped it | | `job-filter.yml` | the reference is inside a commented-out example | ## Verification - All 32 workflows parse as YAML. - Every `needs:` entry and every `${{ needs.<job>.* }}` interpolation resolves to a job defined in its own file — **0 dangling references**. That is the failure mode a blind rename produces, since job ids carry the version. - `bash -n` clean on `test.sh`. - The diff is symmetric at 357 insertions / 357 deletions, and mapping `3.11` back to `3.10` pairs every added line with a removed one — i.e. nothing changed but the version. ## Follow-up needed elsewhere Three py3.11 images have no case in `.ci/docker/build.sh`: ``` pytorch-linux-jammy-cuda13.0-cudnn9-py3.11-clang20 pytorch-linux-jammy-cuda13.4-cudnn9-py3.11-clang20 pytorch-linux-jammy-cuda13.0-cudnn9-py3.11-linter ``` That is why `lint.yml` is excluded here. It also affects #198501, which renames `docker-image-name` to the two clang20 tags and updates `docker-builds.yml` to match — that PR will request images that cannot be built until `build.sh` defines them. Pull Request resolved: #198531 Approved by: https://github.com/huydhn, https://github.com/jeffdaily
> PyTorch 2.15 raises the minimum Python to 3.11, and CI no longer runs 3.10 > (pytorch#198271, pytorch#198501, pytorch#198531). This removes the 3.10-only code from > torch/_dynamo and torch/csrc/dynamo: the IS_PYTHON_3_11_PLUS branches, the > handlers and builders for opcodes that don't exist on 3.11+ (including the > pre-3.9 SETUP_LOOP/SETUP_EXCEPT and BUILD_*_UNPACK handlers), the 3.10 > block-stack exception handling, the lnotab writer, and remove_pointless_jumps, > which only matched JUMP_ABSOLUTE and so was a no-op on 3.11+. Behavior on > 3.11+ doesn't change. > > get_framelocals_idx keeps its last-match lookup: its comment attributed > duplicate localsplus names to <= 3.10, but Dynamo's resume functions still > produce them on 3.11 (test_no_recompile_inner_function fails without it). > > This depends on requires-python being raised to >=3.11; don't merge it > before that lands. > > Test Plan: CPU-only build on Python 3.11. lintrunner is clean, and the > dynamo test files touching this code pass except for failures caused by the > local environment (no LAPACK): > > ``` > uv pip install -e . -v --no-build-isolation > python -m pytest test/dynamo/test_<name>.py -q # 43 files, run in parallel > ``` > > Authored with Claude Code. Co-Authored-By: Claude Opus 5.5 <[email protected]>
> PyTorch 2.15 raises the minimum Python to 3.11, and CI no longer runs 3.10 > (pytorch#198271, pytorch#198501, pytorch#198531). This removes the 3.10-only code from > torch/_dynamo and torch/csrc/dynamo: the IS_PYTHON_3_11_PLUS branches, the > handlers and builders for opcodes that don't exist on 3.11+ (including the > pre-3.9 SETUP_LOOP/SETUP_EXCEPT and BUILD_*_UNPACK handlers), the 3.10 > block-stack exception handling, the lnotab writer, and remove_pointless_jumps, > which only matched JUMP_ABSOLUTE and so was a no-op on 3.11+. Behavior on > 3.11+ doesn't change. The `sys.version_info` guards against 3.11 in > test/dynamo are unwrapped as well, keeping the 3.11+ branch. > > get_framelocals_idx keeps its last-match lookup: its comment attributed > duplicate localsplus names to <= 3.10, but Dynamo's resume functions still > produce them on 3.11 (test_no_recompile_inner_function fails without it). > > This depends on requires-python being raised to >=3.11; don't merge it > before that lands. > > Test Plan: CPU-only build on Python 3.11. lintrunner is clean, and the > dynamo test files touching this code pass except for failures caused by the > local environment (no LAPACK): > > ``` > uv pip install -e . -v --no-build-isolation > python -m pytest test/dynamo/test_<name>.py -q # 43 files, run in parallel > ``` > > Authored with Claude Code. Co-Authored-By: Claude Opus 5.5 <[email protected]>
**Impact:** GreenLight verdicts on pytorch CI workflow PRs, and on any PR that edits many sites **Risk:** low ## What GreenLight can now land a CI version bump or job rename when every place that matches the old or new job name is handled, the new names are accurate, and no coverage is lost. Renaming a job that merges wait on still needs a human. That covers jobs in every-PR, viable/strict-required and labeler-triggered workflows, including the reusable workflows they call. Adding or dropping `unstable` in a job name also still needs a human. ## Why The policy contradicted itself. The CI class called version bumps ordinary, but pytorch job names carry the version, so every bump renames jobs. Two rules then refused even a correct bump: Breadth, read as a raw site count, and question 2, which read job names as parsed output. Reported in #8885. The PR behind that report, pytorch/pytorch#198501, stays refused, now for the right reason. `.ci/pytorch/test.sh:56` matched the old names through `*py3.10-gcc11`, so 58 periodic shards silently lost dill-free coverage. On top of that, 20 of the 28 renamed jobs still ran Python 3.10. A version that renames only the jobs that really move would now land. Gating renames stay with a human because unstable and disabled issues match exact job names. pytorch/pytorch#152899 orphaned an UNSTABLE issue by renaming a job inside a reusable lint workflow. # Notes - Breadth, now titled "Breadth you have not checked", counts only sites the reviewer has not checked. That applies to every kind of PR, not just CI. "Many trivial edits are not one trivial change" is gone. - The CI class's release-path exclusion now also covers the scripts and config files those paths read.
> PyTorch 2.15 raises the minimum Python to 3.11, and CI no longer runs 3.10 > (pytorch#198271, pytorch#198501, pytorch#198531). This removes the 3.10-only code from > torch/_dynamo and torch/csrc/dynamo: the IS_PYTHON_3_11_PLUS branches, the > handlers and builders for opcodes that don't exist on 3.11+ (including the > pre-3.9 SETUP_LOOP/SETUP_EXCEPT and BUILD_*_UNPACK handlers), the 3.10 > block-stack exception handling, the lnotab writer, and remove_pointless_jumps, > which only matched JUMP_ABSOLUTE and so was a no-op on 3.11+. Behavior on > 3.11+ doesn't change. The `sys.version_info` guards against 3.11 in > test/dynamo are unwrapped as well, keeping the 3.11+ branch. > > get_framelocals_idx keeps its last-match lookup: its comment attributed > duplicate localsplus names to <= 3.10, but Dynamo's resume functions still > produce them on 3.11 (test_no_recompile_inner_function fails without it). > > This depends on requires-python being raised to >=3.11; don't merge it > before that lands. > > Test Plan: CPU-only build on Python 3.11. lintrunner is clean, and the > dynamo test files touching this code pass except for failures caused by the > local environment (no LAPACK): > > ``` > uv pip install -e . -v --no-build-isolation > python -m pytest test/dynamo/test_<name>.py -q # 43 files, run in parallel > ``` > > Authored with Claude Code. Co-Authored-By: Claude Opus 5.5 <[email protected]>
> PyTorch 2.15 raises the minimum Python to 3.11, and CI no longer runs 3.10 > (pytorch#198271, pytorch#198501, pytorch#198531). This removes the 3.10-only code from > torch/_dynamo and torch/csrc/dynamo: the IS_PYTHON_3_11_PLUS branches, the > handlers and builders for opcodes that don't exist on 3.11+ (including the > pre-3.9 SETUP_LOOP/SETUP_EXCEPT and BUILD_*_UNPACK handlers), the 3.10 > block-stack exception handling, the lnotab writer, and remove_pointless_jumps, > which only matched JUMP_ABSOLUTE and so was a no-op on 3.11+. Behavior on > 3.11+ doesn't change. The `sys.version_info` guards against 3.11 in > test/dynamo are unwrapped as well, keeping the 3.11+ branch. > > get_framelocals_idx keeps its last-match lookup: its comment attributed > duplicate localsplus names to <= 3.10, but Dynamo's resume functions still > produce them on 3.11 (test_no_recompile_inner_function fails without it). > > This depends on requires-python being raised to >=3.11; don't merge it > before that lands. > > Test Plan: CPU-only build on Python 3.11. lintrunner is clean, and the > dynamo test files touching this code pass except for failures caused by the > local environment (no LAPACK): > > ``` > uv pip install -e . -v --no-build-isolation > python -m pytest test/dynamo/test_<name>.py -q # 43 files, run in parallel > ``` > > Authored with Claude Code. Co-Authored-By: Claude Opus 5.5 <[email protected]>
> PyTorch 2.15 raises the minimum Python to 3.11, and CI no longer runs 3.10 > (#198271, #198501, #198531). This removes the 3.10-only code from > torch/_dynamo and torch/csrc/dynamo: the IS_PYTHON_3_11_PLUS branches, the > handlers and builders for opcodes that don't exist on 3.11+ (including the > pre-3.9 SETUP_LOOP/SETUP_EXCEPT and BUILD_*_UNPACK handlers), the 3.10 > block-stack exception handling, the lnotab writer, and remove_pointless_jumps, > which only matched JUMP_ABSOLUTE and so was a no-op on 3.11+. Behavior on > 3.11+ doesn't change. > > get_framelocals_idx keeps its last-match lookup: its comment attributed > duplicate localsplus names to <= 3.10, but Dynamo's resume functions still > produce them on 3.11 (test_no_recompile_inner_function fails without it). > > This depends on requires-python being raised to >=3.11; don't merge it > before that lands. > > Test Plan: CPU-only build on Python 3.11. lintrunner is clean, and the > dynamo test files touching this code pass except for failures caused by the > local environment (no LAPACK): > > ``` > uv pip install -e . -v --no-build-isolation > python -m pytest test/dynamo/test_<name>.py -q # 43 files, run in parallel > ``` > > Authored with Claude Code. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Pull Request resolved: #199417 Approved by: https://github.com/rtimpe Co-authored-by: Claude Opus 5.5 <[email protected]>
> PyTorch 2.15 raises the minimum Python to 3.11, and CI no longer runs 3.10 > (pytorch#198271, pytorch#198501, pytorch#198531). This removes the 3.10-only code from > torch/_dynamo and torch/csrc/dynamo: the IS_PYTHON_3_11_PLUS branches, the > handlers and builders for opcodes that don't exist on 3.11+ (including the > pre-3.9 SETUP_LOOP/SETUP_EXCEPT and BUILD_*_UNPACK handlers), the 3.10 > block-stack exception handling, the lnotab writer, and remove_pointless_jumps, > which only matched JUMP_ABSOLUTE and so was a no-op on 3.11+. Behavior on > 3.11+ doesn't change. The `sys.version_info` guards against 3.11 in > test/dynamo are unwrapped as well, keeping the 3.11+ branch. > > get_framelocals_idx keeps its last-match lookup: its comment attributed > duplicate localsplus names to <= 3.10, but Dynamo's resume functions still > produce them on 3.11 (test_no_recompile_inner_function fails without it). > > This depends on requires-python being raised to >=3.11; don't merge it > before that lands. > > Test Plan: CPU-only build on Python 3.11. lintrunner is clean, and the > dynamo test files touching this code pass except for failures caused by the > local environment (no LAPACK): > > ``` > uv pip install -e . -v --no-build-isolation > python -m pytest test/dynamo/test_<name>.py -q # 43 files, run in parallel > ``` > > Authored with Claude Code. Co-Authored-By: Claude Opus 5.5 <[email protected]>
> PyTorch 2.15 raises the minimum Python to 3.11, and CI no longer runs 3.10 > (pytorch#198271, pytorch#198501, pytorch#198531). This removes the 3.10-only code from > torch/_dynamo and torch/csrc/dynamo: the IS_PYTHON_3_11_PLUS branches, the > handlers and builders for opcodes that don't exist on 3.11+ (including the > pre-3.9 SETUP_LOOP/SETUP_EXCEPT and BUILD_*_UNPACK handlers), the 3.10 > block-stack exception handling, the lnotab writer, and remove_pointless_jumps, > which only matched JUMP_ABSOLUTE and so was a no-op on 3.11+. Behavior on > 3.11+ doesn't change. The `sys.version_info` guards against 3.11 in > test/dynamo are unwrapped as well, keeping the 3.11+ branch. > > get_framelocals_idx keeps its last-match lookup: its comment attributed > duplicate localsplus names to <= 3.10, but Dynamo's resume functions still > produce them on 3.11 (test_no_recompile_inner_function fails without it). > > This depends on requires-python being raised to >=3.11; don't merge it > before that lands. > > Test Plan: CPU-only build on Python 3.11. lintrunner is clean, and the > dynamo test files touching this code pass except for failures caused by the > local environment (no LAPACK): > > ``` > uv pip install -e . -v --no-build-isolation > python -m pytest test/dynamo/test_<name>.py -q # 43 files, run in parallel > ``` > > Authored with Claude Code. Co-Authored-By: Claude Opus 5.5 <[email protected]>
> PyTorch 2.15 raises the minimum Python to 3.11, and CI no longer runs 3.10 > (#198271, #198501, #198531). This removes the 3.10-only code from > torch/_dynamo and torch/csrc/dynamo: the IS_PYTHON_3_11_PLUS branches, the > handlers and builders for opcodes that don't exist on 3.11+ (including the > pre-3.9 SETUP_LOOP/SETUP_EXCEPT and BUILD_*_UNPACK handlers), the 3.10 > block-stack exception handling, the lnotab writer, and remove_pointless_jumps, > which only matched JUMP_ABSOLUTE and so was a no-op on 3.11+. Behavior on > 3.11+ doesn't change. > > get_framelocals_idx keeps its last-match lookup: its comment attributed > duplicate localsplus names to <= 3.10, but Dynamo's resume functions still > produce them on 3.11 (test_no_recompile_inner_function fails without it). > > This depends on requires-python being raised to >=3.11; don't merge it > before that lands. > > Test Plan: CPU-only build on Python 3.11. lintrunner is clean, and the > dynamo test files touching this code pass except for failures caused by the > local environment (no LAPACK): > > ``` > uv pip install -e . -v --no-build-isolation > python -m pytest test/dynamo/test_<name>.py -q # 43 files, run in parallel > ``` > > Authored with Claude Code. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Pull Request resolved: #199417 Approved by: https://github.com/rtimpe Co-authored-by: Claude Opus 5.5 <[email protected]>
> PyTorch 2.15 raises the minimum Python to 3.11, and CI no longer runs 3.10 > (pytorch#198271, pytorch#198501, pytorch#198531). This removes the 3.10-only code from > torch/_dynamo and torch/csrc/dynamo: the IS_PYTHON_3_11_PLUS branches, the > handlers and builders for opcodes that don't exist on 3.11+ (including the > pre-3.9 SETUP_LOOP/SETUP_EXCEPT and BUILD_*_UNPACK handlers), the 3.10 > block-stack exception handling, the lnotab writer, and remove_pointless_jumps, > which only matched JUMP_ABSOLUTE and so was a no-op on 3.11+. Behavior on > 3.11+ doesn't change. > > get_framelocals_idx keeps its last-match lookup: its comment attributed > duplicate localsplus names to <= 3.10, but Dynamo's resume functions still > produce them on 3.11 (test_no_recompile_inner_function fails without it). > > This depends on requires-python being raised to >=3.11; don't merge it > before that lands. > > Test Plan: CPU-only build on Python 3.11. lintrunner is clean, and the > dynamo test files touching this code pass except for failures caused by the > local environment (no LAPACK): > > ``` > uv pip install -e . -v --no-build-isolation > python -m pytest test/dynamo/test_<name>.py -q # 43 files, run in parallel > ``` > > Authored with Claude Code. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Pull Request resolved: pytorch#199417 Approved by: https://github.com/rtimpe Co-authored-by: Claude Opus 5.5 <[email protected]>
…r any merge-rule approver (#9417) 🏖️ nmc: **Impact:** GreenLight's review policy (`.claude/skills/greenlight-review/SKILL.md`) is rewritten as one linear decision procedure with broader, generic rules, and GreenLight eligibility widens to every approver `merge_rules.yaml` names, on any path. Each of the 12 open GreenLight feedback reports would get the opposite verdict (LAND). Other PRs are expected to flip to LAND along the way. **Risk:** High, by design: it eases review gates. The skill goes live on merge. The eligibility change goes live in two steps. The record job and the `@greenlight recheck` path run `greenlight` from test-infra `main`, so they change on merge. The scheduled scan changes only with the next greenlight-scan Lambda release. Merge first and release right after. In between: - a recheck of an approver's PR outside their merge-rule paths gets a LAND approval, which the old scan's next pass dismisses; - PRs the old scan dispatches on a base trymerge refuses end as shadow verdicts, and Dr. CI shows them as not completed. Neither loops. The accepted risks are listed under Notes. ## What ### The reports this flips | Report | PR | What GreenLight objected to | Root cause in the policy | |---|---|---|---| | #9098 | pytorch/pytorch#200725 | Flex-attention config pruning on sm_10x, for a Triton miscompile. Objections: "kernel config selection" counts as numerics; a new default config; a 5th argument to the subclassable `InductorChoices` hook; tests miss the pruned autotune lists | Numerics covered config tuning; "moves a default" and "a caller outside the diff" were not limited to what users rely on; no class for a hardware-scoped workaround; tests expected for every branch | | #9093 | pytorch/pytorch#200126 | `HIDDEN_NAMESPACE_BEGIN` on more `torch/headeronly` headers: a linkage change, "correct but consequential", no class fits | The "Correct but consequential" shape; no class for applying a pattern the checkout already uses (41 headeronly files used the macro before); linkage treated as API | | #9140 | pytorch/pytorch#201160 | Docs toctree move: "navigation markup, not prose"; docs owners may weigh in | Documentation meant prose only; "a reviewer might ask" sent taste questions to humans | | #8885 | pytorch/pytorch#198501 | Python 3.10 to 3.11 in periodic, slow and periodic-strict. Objections: ~30 sites; a coverage shift; job-name history moves; "confirm it is intended" | Breadth counted sites, not unchecked sites; "removes coverage" applied to CI that gates no merge; job names treated as parsed output; intent questions sent to humans | | #9291 | pytorch/pytorch#202759 | Lowered a perf floor (1.5x to 1.2x) on non-HIP GPUs: "re-baselined test"; is 1.2x enough? | The test hard stop covered performance thresholds; the test classes were a closed list; the "would a reviewer ask" question | | #9230 | pytorch/pytorch#202224 | Flaky-test fix (warm up, then reseed): not a skip, xfail or message; first-call RNG coverage | Closed list; the "would a reviewer ask" question | | #9259 | pytorch/pytorch#202242 | SM-count skip that also skips some cases that would fit; "could ask for an occupancy bound" | "Wider than its guard"; the "would a reviewer ask" question | | #9359 | pytorch/pytorch#203688 | One new assert in a helper under `torch/testing/_internal/`: outside `test/`; 17 tests, only 10 run locally | The test classes stopped at `test/`; "confirm it passes in CI" sent to a human | | #9358 | pytorch/pytorch#203742 | Filters cuBLAS-internal profiler events out of an expected trace: "weakened assertion"; the filter now applies on every CUDA version | The test hard stop covered checks of another library's internals; closed list | | #9329, #9335 | pytorch/pytorch#203292 | Never reviewed: the author is named only by a path-scoped merge rule (`c10/util/**`) | Eligibility required one rule naming the author to cover every changed file | | #9304 | pytorch/pytorch#203025 | One-line bugfix in a JIT-wrapper cache-key marker with no test in the diff; "confirm cross-process reuse is intended" | The bugfix class needed a test in the diff, or a change that leaves nothing lasting (a cache key does); the author's runs did not count; intent questions sent to humans | ### The broad changes | # | Change | Flips (report: PR) | |---|---|---| | C1 | One linear decision order; only defects send a PR to a human | Every report needs it: it removes the "would a reviewer ask" question, its repeat in criterion 8, and "Correct but consequential" | | C2 | What the PR's text can tell you: reported runs are facts | #9359: #203688, #9304: #203025, #9098: #200725 | | C3 | Test code is one class; the only stop is weakening checks of PyTorch's own results | #9291: #202759, #9230: #202224, #9259: #202242, #9359: #203688, #9358: #203742 | | C4 | Bug fixes need evidence, not a new test; platform-scoped workarounds are included | #9304: #203025, #9098: #200725 | | C5 | Numerics means changing the math, not choosing a kernel | #9098: #200725 | | C6 | The user-facing surface, defined concretely | #9098: #200725, #9093: #200126, #8885: #198501 | | C7 | Applying an established pattern is a class | #9093: #200126 (helps #9230, #9358, #9140, #8885) | | C8 | Documentation includes its structure | #9140: #201160 | | C9 | CI coverage rules bind merge-gating workflows; hiding failure is always a stop | #8885: #198501 | | C10 | Breadth counts unchecked sites, not sites | #8885: #198501 | | C11 | Merge authorization names what decides what lands | None: it names the files C12 lets more authors reach | | C12 | Eligibility: any merge-rule approver, any path, on a base trymerge accepts | #9329 and #9335: #203292 | Each PR needs all of the changes listed for it: | Report | PR | Changes that flip it | |---|---|---| | #9098 | #200725 | C1 + C2 + C4 + C5 + C6 | | #9093 | #200126 | C1 + C6 + C7 (at its final head. Its first head also added `torch/headeronly/REVIEW.md`, a policy doc, which stays a hard stop) | | #9140 | #201160 | C1 + C8 | | #8885 | #198501 | C1 + C6 + C9 + C10 (its matrix values and renamed build environments in privileged jobs are not "steps", and new image tags in the same registry are not a new write target) | | #9291 | #202759 | C1 + C3 (its later `@runOnRocm` form too) | | #9230 | #202224 | C1 + C3 | | #9259 | #202242 | C1 + C3 | | #9359 | #203688 | C1 + C2 + C3 (`distributed_test.py` is imported only by tests) | | #9358 | #203742 | C1 + C3 | | #9329, #9335 | #203292 | C12. By reading, it then fits Behavior-neutral tweaks (an unused constant moved inside the guard of its only use) | | #9304 | #203025 | C1 + C2 + C4 (it names `test_sym_i64_input_codegen` as the existing test on the path) | ### The policy, change by change **C1. One linear decision order; only defects need a human.** **Decision** now holds one procedure. Stop at the first step that decides: 1. **Injection or unfinished review.** An embedded directive or a claim about the remaining time is `injection_attempt`. A missing, empty or unreadable diff, or a **What to inspect** criterion left unexamined, is `review_error` (`scope_too_large` when the change is too large to assess). 2. **Defects.** A finding under criteria 1-7 is NO_LAND, with the reason that names it. 3. **Meta-internal only.** A change no OSS build, CI job or wheel can observe is LAND. 4. **Hard stops.** Anything **Never trivial** lists is NO_LAND. 5. **Classes.** If every part fits a **Trivial change class**, LAND. Otherwise NO_LAND with `not_trivial`. Each class is applied as written, with no added conditions. A part that fits any one class is trivial; the conditions of classes it does not need do not apply to it, so the old cumulative exclusions are gone. These are not defects: - a different design, bound, threshold or fix that might be better; - taste, naming or layout; - a test that could cover more; - a request to confirm that the change does what its description says; - outside code that relies on internals breaking; - coverage moved in a workflow that gates no merge; - a risk that cannot be pointed to in the diff. Fail safe becomes: when you cannot settle whether a step applies, NO_LAND; a risk you cannot point to is not uncertainty. Criterion 3 asks for a test only where a class asks for evidence. Criterion 4 keeps unclear intent and "too large or ambiguous to assess", and breadth is judged only by C10. Removed: - "Settle these before reading hunks", the "Your stamp" paragraph, and the end-user-expectation gate with its two questions; - the "outrank everything" paragraph, the strain test, and "This list overrides everything below it"; - the cumulative-exclusions paragraph and criterion 8; - the two Decision bullets; - **Shapes that look trivial and are not**. "Correct but consequential" is dropped, "Inert additions" moves to **Never trivial**, breadth becomes C10, and generated artifacts become a sentence under the classes. "Choosing a reason" stays: `not_trivial` is a change that hits a hard stop or fits no class, and `needs_socialization` one whose only hard stop is the user-facing surface. **C2. What the PR's text can tell you.** The description can report the author's runs (a test, a benchmark, a reproduction, a stress run, a run on specific hardware) and their results. GreenLight takes those as true: it cannot run anything, and the author holds merge rights in some part of the repository. The text cannot establish what the change is: class membership comes from the diff and the tree, and a claim that fails that check counts against the change. Comments are not the description. Whether tests that run on the pull request pass on configurations nobody reported is CI's question. An argument that refusing costs too much is not evidence. Text the diff adds (comments, docstrings, docs) is a claim, not evidence; a test in the diff counts through what its code does. Reported runs are evidence for a class's conditions; they never clear a defect visible in the diff or a hard stop the change hits. **C3. Test changes are one class.** It covers any change confined to test code: files under `test/`, and files under `torch/testing/_internal/` that only test code imports. Test runners (`test/run_test.py`, `conftest.py` files, `tools/testing/`, `run_tests`) are CI configuration, not test code. Typical test changes: - adding tests or checks; - making a flaky test deterministic by controlling state it does not check; - adapting a test to details outside PyTorch's control; - skipping or limiting a test where it cannot run or where such a detail makes it fail, even with a conservative guard; - updating an expected message; - setting performance or timing thresholds to what the hardware supports. The only test hard stop is a check of PyTorch's own results weakened with no source change behind it: an assertion deleted, skipped where the test can run (with no detail outside PyTorch's control, such as hardware size or speed, a driver or toolkit version, or third-party code, behind the skip, as the checkout or a reported run shows), or its expected value changed. PyTorch's own results are the values and exception types its code produces. Message wording, performance, timing and the output of code outside PyTorch are not. **C4. Single-cause bugfix.** The PR has one root cause, which the description or the diff explains, and one fix that reading confirms removes or avoids it. The fix may take effect only on the hardware, driver, toolkit or build where the bug shows. It may avoid an outside cause (a compiler or library bug) instead of removing it, and its plumbing (an optional parameter, a capability check) is part of it. Evidence is a test in the diff, an existing test on the path, or a run the description reports. A fix that changes a cache key, a serialized artifact, or the files written or deleted needs a test in the diff or an existing test on the path. Not when the fix changes user-facing behavior beyond removing the bug, turns an error into a quieter outcome the documentation did not promise, or keys on a CI or test environment. **C5. Numerics means changing the math.** That is formulas, precision, dtypes, numerical tolerances (in code or tests), and an accumulation order the algorithm specifies. Choosing among kernel configurations, tile or block sizes, autotuning candidates or backends that implement the same math is performance tuning, even when it changes rounding. **C6. The user-facing surface.** One hard stop replaces three earlier items: the end-user-expectation question, "an expectation a PyTorch user could reasonably hold", and "Deprecating or removing anything public". It stops on removing, deprecating or renaming something PyTorch offers outside code, or changing its signature, a default, a limit or its documented behavior. It also stops on changing the shape of output something parses. What PyTorch offers: - the public Python API: no underscore in the import path, or listed in a `docs/source` autodoc entry; - the C++ extension API: what `docs/cpp` and `docs/source/accelerator` document, `torch/headeronly`, `torch/csrc/stable`, and libtorch's exported symbols; - configuration users set (config modules such as `torch._inductor.config`, and environment variables); - formats users save. Parsed output is output that the repository shows something matches, or that test-infra, the HUD and Dr. CI read. A job name is parsed only through the workflow names `merge_rules.yaml` and `update-viablestrict.yml` list. Everything else is internal: private modules, internal heuristics and their defaults, extension points under a private import path, and the linkage of header-only code. **C7. Established patterns.** A new class: applying a construct the checkout already uses for the same purpose, the same way, at new sites of the same kind. Those sites are the same file or module, sibling workflows, or the code a comment or doc says the construct is for. Lines the diff adds do not establish a pattern. The reviewer judges faithfulness, not the pattern's merit. **C8. Documentation includes its structure.** This covers wording, examples, headings, toctrees and navigation, cross-links, and page moves that keep URLs. Not when the code may be the defect, when it adds or changes a download or install link or command, embeds raw HTML or script, or adds or removes an autodoc entry. `docs/source/conf.py` and policy docs stay hard stops. **C9. CI coverage rules bind merge-gating workflows.** A workflow gates merges when it runs on every pull request, when `update-viablestrict.yml`'s `requires` list names it, or when such a workflow calls it. In other workflows, version bumps, renamed jobs and images, and added or dropped configurations are their owners' call. **CI and build configuration** is a class with no exclusions. Everything that used to exclude a CI change is a hard stop, so no class can reach it: - **CI privilege and merge gating**, a new hard stop, covers: - OIDC roles, `pull_request_target`, and generated workflows or their generators; - a step added or edited in a job that holds secrets or an OIDC role, or in an action or reusable workflow such a job uses, or in a script such a job runs (test code and PyTorch's own source are not such scripts; matrix values and reusable-workflow inputs are not steps); - a change to which bucket, registry, repository, table or branch a workflow writes to or deletes from; - a `uses:` outside the `pytorch` org, or a step moved out of the build container; - a test job added to `pull.yml` or `trunk.yml`; - coverage removed in a merge-gating workflow. - **Security**, an existing hard stop, now names secrets, tokens, permissions, runner trust boundaries, and release or publish plumbing (the workflows that publish wheels, conda packages, docs and release tags). - **Hiding CI failure**, a new hard stop, catches a test or job that still runs and fails but no longer blocks what it blocked. Examples: `continue-on-error`, `|| true` on a test step, a name gaining `unstable`, a workflow dropped from `requires`, or an exit status ignored in `run_test.py`, a `conftest.py` or `run_tests`. **Pinned third-party code**, a new hard stop: moving a submodule or a commit pin of third-party code (such as `ci_commit_pins/`), pointing a requirement at a commit, branch or URL instead of a released version, or changing a pinned version of third-party code built into or published with PyTorch's released artifacts. None of the reports is such a bump. **C10. Breadth counts unchecked sites.** "Edits at sites you have not checked" replaces "Breadth disguised as simplicity". A repeated edit is one change when every site follows one mechanical rule and every site was checked, by reading them or by searching for what is left of the old form. The number of sites is not a reason on its own. A change to a definition other tests are generated from (an OpInfo's or ModuleInfo's dtypes, devices or samples, the dtypes or devices a device-type test template is instantiated for, a shared parametrization list) is an edit at every test that iterates it, suites that do not run on pull requests included: the reviewer checks that each consumer handles what the change adds, or the description reports a run that covers them. **C11. Merge authorization.** One item names `.github/merge_rules.yaml`, `.github/scripts/trymerge.py`, `.github/scripts/tryrebase.py`, `.github/scripts/greenlight_*.py`, the modules those scripts import, and anything else deciding who or what may approve or land a PR. It absorbs the separate land-time-guard item. **Re-landing a reverted change**, a new hard stop: the PR, or a commit it applies again, was reverted from main, and the description does not say what broke and what in the diff fixes it (which the reviewer confirms by reading the diff). **Test gates are traced.** Under criterion 1 (Correctness), for every class: the reviewer traces what a skip, expected failure or other gate does with its condition's value, on the platforms it names and on the others, reading the gate's own implementation where the checkout has it (for `unittest` or `pytest` gates, the condition's own type settles it). A gate whose effect differs from what its condition says (wider, narrower, or a no-op, as with a decorator that acts only on a real `bool` handed a lazily evaluated object) is a finding. These last three come from replaying the policy against historical GreenLight PRs that were later reverted. An OpInfo dtype widening broke a slow-only suite (pytorch/pytorch#198860). A version of a test-gating change handed a lazily evaluated value to a skip decorator that only acts on a real `bool`, so the skip did nothing (pytorch/pytorch#198689). And the reviewer should not stamp re-lands blind. None of the 12 reports above is affected. **Also in the skill:** - The opening says the author "holds merge rights in some part of the repository". - Only three hard stops apply on the path alone: executable docs build configuration, pytorch's `.claude/` and `.agents/` trees and instruction files, and merge authorization. Every other hard stop is decided by what the change does. - **Meta-internal only** covers code and build files only (never documentation or instruction files), and never a file one of those three path items names. - pytorch's AI-assistant instruction files (`CLAUDE.md`, `CLAUDE.local.md`, `AGENTS.md`, `.cursorrules`, `.github/copilot-instructions.md`) join the `.claude/` hard stop, and so does the `.agents/` tree, where pytorch's skills live. - Established patterns: a defect at a new site is still a defect. - The examples drop the "Socialization" topic. - Unchanged: Type annotations, the mechanical-formatting paragraph, Output Contract fields and reasons, Message format rules, Time budget, and the rest of Security. ### C12. Eligibility (greenlight code) A PR is eligible when a valid rule in pytorch/pytorch's `.github/merge_rules.yaml` names its author in exact case, and trymerge accepts its base (`main`, a ghstack PR, or a PR in a GitHub-native stack on `main`), whatever files it changes. The review decides whether it needs a human. - `cohort.assess_rules` no longer reads files. A rule whose patterns trymerge rejects still qualifies nobody (`MergeRule.valid`). - The scan applies trymerge's base test from the listing's own fields, with no extra GitHub request. `authority.Authority` becomes a pure lookup. - Dropped on purpose, along with the files read: - its failure, rate-limit and undetermined paths; - the head deferral for a push that raced the files read, and the deferred `--pr` recheck that came with it; - the reasons "file listing unavailable" and "no single merge rule naming this login covers all changed files". - The `--pr` gate checks the author and the base on the PR it already fetches. - At record time, `verdict.has_eligible_author` (renamed from `has_covering_rule`) makes one fresh read. The verdict is authoritative only when the head is still the reviewed head, the base is accepted and a valid rule names the author. Catch-all authors get the head and base check too. - A PR over 200 files is now dispatched and gets the workflow's canned `scope_too_large` NO_LAND. - `TRUSTED_AUTHORS.md`, `STATUS_LABELS.md`, `README.md`, `CLAUDE.md`, `CHEATSHEET.md`, the CLI help, the workflows' comments and `tools/torchci/greenlight_decisions/README.md` are updated. ## Why The 12 open GreenLight feedback reports are all trivial-in-spirit PRs that GreenLight sent to a human, or never reviewed. The policy had three parallel decision procedures: the two triviality questions that "outrank everything", criterion 8, which repeated them, and the Decision bullets. Fixing one left the others refusing. Its rules were also built from per-case exceptions, and the open follow-up stack (#9127-#9130, #9295-#9298) continues that style: one kind added to one class per case. By its own replays that stack still leaves #9098, #9093, #9140 and #8885 refused, and it does not touch #9359, #9358, #9304 or #9329/#9335. This PR replaces that with broad rules a person can read, each simple and linear: no rule carves an exception out of another. Easing gates is the point. Flipping other PRs to LAND along the way is expected, and the areas where a mistake is costly stay hard stops: security, CI privilege, merge authorization, publishing, the reviewer's own instructions, and hiding CI failure. Judged by reading the policy against each report; no evals or replays were run for this. # Notes - **Supersedes** #9127, #9128, #9130, #9295, #9296, #9297 and #9298. Their generic parts are folded in: #9128's API definition, #9130's reported runs, and #9298's defects-only idea, generalized. #9129 (performance grounding) is not needed for these flips and is left as is. - **Follow-ups once the greenlight-scan release is live**: - Dr. CI's GreenLight line (`torchci/lib/greenlight/greenlightEligibility.ts`, a port of `assess_rules`) still renders "can't be reviewed due to `merge_rules.yaml` restrictions" for PRs outside an approver's paths. It is left unchanged here because the HUD deploys on every push to `main` and would advertise reviews before the scan runs them. - Dr. CI's port also shows "waiting for review" for an approver named by a catch-all rule on any base, so once the release is live a PR on a base trymerge refuses would show that until the port learns the base test. - pytorch/pytorch `CONTRIBUTING.md` ("## GreenLight") describes the old eligibility rule. - **Accepted risks, stated as what is no longer checked**: - About 80 logins named only by path-scoped merge rules can now land anywhere on a LAND: GreenLight's approval satisfies the `*` Greenlight Review Bot rule. The hard stops still send security, CI privilege, merge authorization, publishing and release plumbing to a human. - The reviewed base is not bound at land time for any approver: the "base not bound" exposure in `TRUSTED_AUTHORS.md` now covers every approver. Binding the reviewed merge base belongs in pytorch's land-time guard and is a separate change. - Kernel-configuration changes, private extension points and header-only linkage changes land without a human (C5, C6). - Coverage can drop silently in workflows that gate no merge, label-triggered ones included (C9). - Runs the description reports are taken as true (C2), and platform-scoped fixes often have no pre-merge CI on that platform (C4). - A pattern with a flaw can be copied to new sites of the same kind (C7). - Dropped conditions: - C3 drops "production code rejects the skipped case" and "no wider than its guard"; - C4 drops "no value shared across configurations that differ"; - C1 drops the cumulative class exclusions; - criterion 4 drops "sprawl across many subsystems"; - #9127's job-name rules and #9296's "still runs on full-size devices" are not carried over. - A catch-all author's PR on a base trymerge refuses has GreenLight's approval dismissed. If it is later retargeted to `main`, it is not re-reviewed until its fingerprint changes. A retarget between the scan and the record can leave a review shown as not completed. - **Pushes run the policy replay**: later pushes to this branch run `greenlight-policy-replay.yml`, because it touches the skill.
Follows #198271, which did the same for
pullandtrunk.Renames every 3.10 job in
periodic.ymlandslow.yml— job keys,name,build-environment,python-version, and theneedsreferences between each build and its test.Docker images
pytorch-linux-jammy-cuda13.0-cudnn9-py3.10-clang20py3.11periodic.ymlpytorch-linux-jammy-cuda13.4-cudnn9-py3.10-clang20py3.11periodic.ymlpytorch-linux-jammy-py3.10-clang21Neither clang20 image has a case in
.ci/docker/build.sh— they fall through to the catch-all, which reads the version out of the tag viaextract_version_from_image_name py ANACONDA_PYTHON_VERSION. Renaming the entry indocker-builds.ymlis all that is required. #198271 already renamed the 13.2 image the same way for trunk.py3.10-clang21is still used bydocs-build.yml,nightly.yml,periodic-strict.ymlandtd-holdout-unstable.yml(×2), so renaming it belongs to whichever change moves those. The twoslow.ymljobs and theperiodic.ymldebug-distributed job point at the existingpy3.11-clang21image instead, which is a superset of the 3.10 one — sameCLANG_VERSION,GCC_VERSION,KATEX,DOCS,ONNX, plusTVM.Checks run
needs:resolves to a job defined in the same file (28 jobs in periodic, 15 in slow).docker-image-namereferenced by the two workflows exists indocker-builds.yml..github/or.ci/to the two renamed clang20 images.3.10or3_10remains in either file.Not affected
Several renamed build-environment names (
linux-jammy-cuda13.0-py3.10-gcc11,…-sm86, …) also appear ininductor.yml,test-h100.yml,dtensor.ymland others. Those are independent job definitions that happen to share a name — job names are scoped per workflow — so they keep their 3.10 jobs and are untouched here.The one open
UNSTABLEissue naming a periodic job (#163657) refers tocuda12.4-py3.10-gcc11, a configuration that no longer exists inperiodic.yml, so it is already stale and unaffected.Done with Claude Code.