KEMBAR78
consolidate guard_or_x and definitely_x by laithsakka · Pull Request #152463 · pytorch/pytorch · GitHub
Skip to content

Conversation

laithsakka
Copy link
Contributor

@laithsakka laithsakka commented Apr 29, 2025

Stack from ghstack (oldest at bottom):

definitely_true is almost same as guard_or_false, the potential differences are not meaningful to a degree that justify the
existence of both. same for definitely_false, it can be expressed with guard_or_true and guard_or_false.

cc @ezyang @SherlockNoMad @EikanWang @jgong5 @wenzhe-nrv @voznesenskym @penguinwu @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @jiayisunx @ipiszy @chenyang78 @kadeng @muchulee8 @amjames @chauhang @aakhundov

@pytorch-bot
Copy link

pytorch-bot bot commented Apr 29, 2025

🔗 Helpful Links

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

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

❗ 1 Active SEVs

There are 1 currently active SEVs. If your PR is affected, please view them below:

❌ 3 Cancelled Jobs, 2 Unrelated Failures

As of commit 523a84f with merge base a3123dd (image):

CANCELLED JOBS - The following jobs were cancelled. Please retry:

FLAKY - The following job failed but was likely due to flakiness present on trunk:

UNSTABLE - The following job is marked as unstable, possibly due to flakiness on trunk:

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

laithsakka added a commit that referenced this pull request Apr 29, 2025
ghstack-source-id: 6e8ff65
Pull Request resolved: #152463
@laithsakka laithsakka requested review from aorenste and pianpwk April 29, 2025 20:55
@albanD albanD removed their request for review April 29, 2025 20:56
@bobrenjc93
Copy link
Contributor

This is BC breaking right? @albanD is there a process we need to go through to make this change? At the very least this change should be included in the release notes of the next version bump.

@bobrenjc93
Copy link
Contributor

@laithsakka in the meantime can you include a summary of the differences and why they don't matter in the PR summary?

Copy link
Contributor

@aorenste aorenste left a comment

Choose a reason for hiding this comment

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

Generally LGTM but Bob's right about the BC concerns.

@albanD
Copy link
Collaborator

albanD commented Apr 30, 2025

I would check on github if there are users using this out of core: https://github.com/search?q=%2Fdefinitely_true%5C%28%2F+AND+NOT+%2Fis_definitely_false%2F+-path%3A%2F%5Etorch%5C%2F_functorch%5C%2F_aot_autograd%5C%2F%2F+-path%3A%2F%5Etorch%5C%2Ffx%5C%2Fexperimental%5C%2F%2F+language%3APython&type=code&l=Python

If there are, then you should go through the standard cycle: deprecate for 2 releases then delete.
If there aren't or you can update them all, you can go with a hard removal and just add a notice in the release notes (just label this PR topic: bc-breaking and will be be added to the list to be processed for the release notes)

@soulitzer soulitzer removed their request for review April 30, 2025 22:24
@laithsakka
Copy link
Contributor Author

I would check on github if there are users using this out of core: https://github.com/search?q=%2Fdefinitely_true%5C%28%2F+AND+NOT+%2Fis_definitely_false%2F+-path%3A%2F%5Etorch%5C%2F_functorch%5C%2F_aot_autograd%5C%2F%2F+-path%3A%2F%5Etorch%5C%2Ffx%5C%2Fexperimental%5C%2F%2F+language%3APython&type=code&l=Python

If there are, then you should go through the standard cycle: deprecate for 2 releases then delete. If there aren't or you can update them all, you can go with a hard removal and just add a notice in the release notes (just label this PR topic: bc-breaking and will be be added to the list to be processed for the release notes)

I went throw the usages nothing other copies of torch code.

@laithsakka laithsakka added the suppress-bc-linter Suppresses the failures of API backward-compatibility linter (Lint/bc_linter) label May 1, 2025
@laithsakka
Copy link
Contributor Author

@pytorchbot merge

@pytorch-bot
Copy link

pytorch-bot bot commented May 1, 2025

This PR needs to be approved by an authorized maintainer before merge.

@laithsakka
Copy link
Contributor Author

@pytorchbot merge

@pytorch-bot pytorch-bot bot added the ciflow/trunk Trigger trunk jobs on your pull request label May 1, 2025
@pytorchmergebot
Copy link
Collaborator

Merge started

Your change will be merged once all checks pass (ETA 0-4 Hours).

Learn more about merging in the wiki.

Questions? Feedback? Please reach out to the PyTorch DevX Team

Advanced Debugging
Check the merge workflow status
here

@pytorchmergebot
Copy link
Collaborator

Merge failed

Reason: 3 jobs have failed, first few of them are: inductor / unit-test / cuda12.6-py3.10-gcc9-sm86 / build, inductor / unit-test / cuda12.6-py3.12-gcc9-sm86 / build, inductor / unit-test / cuda12.6-py3.13-gcc9-sm86 / build

Details for Dev Infra team Raised by workflow job

@laithsakka
Copy link
Contributor Author

@pytorchbot merge -i

@pytorchmergebot
Copy link
Collaborator

Merge started

Your change will be merged while ignoring the following 5 checks: BC Lint / bc_linter, pull / unstable-linux-focal-cuda12.6-py3.10-gcc11-sm89-xfail / build, inductor / unit-test / cuda12.6-py3.10-gcc9-sm86 / build, inductor / unit-test / cuda12.6-py3.12-gcc9-sm86 / build, inductor / unit-test / cuda12.6-py3.13-gcc9-sm86 / build

Learn more about merging in the wiki.

Questions? Feedback? Please reach out to the PyTorch DevX Team

Advanced Debugging
Check the merge workflow status
here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ciflow/inductor ciflow/trunk Trigger trunk jobs on your pull request fx Merged module: inductor release notes: fx release notes category suppress-bc-linter Suppresses the failures of API backward-compatibility linter (Lint/bc_linter)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants