Skip to content

IterativePassGroup: warn when the step cap is hit (#24759) - #24759

Merged
meta-codesync[bot] merged 1 commit into
mainfrom
export-D129194624
Nov 9, 2026
Merged

meta-codesync[bot] merged 1 commit into
mainfrom
export-D129194624

Conversation

@mcremon-meta

@mcremon-meta mcremon-meta commented Nov 7, 2026 •

Copy link
Copy Markdown
Contributor

Summary:

IterativePassGroup re-runs its passes until they stop changing the
graph, up to steps rounds. Until now it handed steps to
ExportedProgramPassManager, which stops quietly at the cap, so a group that
never converged looked the same as one that did.

The group now loops itself, one manager step per round, and returns as soon as
a round leaves the graph unchanged. If a multi-step group is still changing the
graph after its last allowed round, it logs a warning naming the group and the
cap. Single-step groups run once by design and never warn.

AdvanceQuantizeOpAboveDefInBranchPass now reports whether it changed the
graph. It returned ExportPass.call's result, which always says modified, so
a group containing it could never converge: it ran all of its rounds and hit
this warning. Like AdvanceQuantizeOpAboveDefChainPass, it now re-traces and
reports a change only when it advanced a quantize. The rewrite itself is
unchanged.

Differential Revision: D129194624

@pytorch-bot

pytorch-bot Bot commented Nov 7, 2026 •

Copy link
Copy Markdown

🔗 Helpful Links

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

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

✅ You can merge normally! (1 Unrelated Failure)

As of commit 85d0c52 with merge base e0015e1 (image):

BROKEN TRUNK - The following job failed but were present on the merge base:

👉 Rebase onto the `viable/strict` branch to avoid these failures

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 Nov 7, 2026
@meta-codesync

meta-codesync Bot commented Nov 7, 2026

Copy link
Copy Markdown
Contributor

@mcremon-meta has exported this pull request. If you are a Meta employee, you can view the originating Diff in D129194624.

@github-actions

github-actions Bot commented Nov 7, 2026

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.

Summary:

`IterativePassGroup` re-runs its passes until they stop changing the
graph, up to `steps` rounds. Until now it handed `steps` to
`ExportedProgramPassManager`, which stops quietly at the cap, so a group that
never converged looked the same as one that did.

The group now loops itself, one manager step per round, and returns as soon as
a round leaves the graph unchanged. If a multi-step group is still changing the
graph after its last allowed round, it logs a warning naming the group and the
cap. Single-step groups run once by design and never warn.

`AdvanceQuantizeOpAboveDefInBranchPass` now reports whether it changed the
graph. It returned `ExportPass.call`'s result, which always says modified, so
a group containing it could never converge: it ran all of its rounds and hit
this warning. Like `AdvanceQuantizeOpAboveDefChainPass`, it now re-traces and
reports a change only when it advanced a quantize. The rewrite itself is
unchanged.

Differential Revision: D129194624
@meta-codesync meta-codesync Bot changed the title IterativePassGroup: warn when the step cap is hit IterativePassGroup: warn when the step cap is hit (#24759) Nov 8, 2026

@rascani rascani 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 automatically exported from Phabricator review in Meta.

@meta-codesync
meta-codesync Bot merged commit 62903fa into main Nov 9, 2026
227 of 228 checks passed
@meta-codesync
meta-codesync Bot deleted the export-D129194624 branch November 9, 2026 18:38

This branch was previously deployed

1 inactive deployment
cadence — 85d0c52e Deployed Nov 8, 2026 by meta-codesync[bot] via hifi-op-test / hifi4 #37275
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. meta-exported

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants