Repository navigation
[aotinductor] Add check_upperbound to gate the upperbound input check - #196131
Closed
ColinPeppler wants to merge 1 commit into
Closed
ColinPeppler wants to merge 1 commit into
ColinPeppler wants to merge 1 commit into
Conversation
Summary: ## Why? `AOTI_RUNTIME_CHECK_INPUTS=1` codegens input shape checks against the bounds baked in at lowering time. The lowerbound half is already gated by `config.aot_inductor.check_lowerbound` (D88203028). The upperbound half is unconditional. ## How? Add `config.aot_inductor.check_upperbound`, default `True`, and gate the `dim value is too large` codegen on it. No behavior change until a caller flips it. Lowering wires it up in the diff on top. Test Plan: ```bash $ buck2 test @//mode/opt //caffe2/test/inductor:test_aot_inductor -- TestCheckUpperboundConfig TestCheckLowerboundConfig ``` ```text Tests finished: Pass 3. Fail 0. Fatal 0. Skip 0. Build failure 0 ``` https://www.internalfb.com/intern/testinfra/testrun/7318349770355153 Differential Revision: D118874911
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/196131
Note: Links to docs will display an error until the docs builds have been completed. ✅ You can merge normally! (3 Unrelated Failures)As of commit ff29cc3 with merge base 071dd4d ( BROKEN TRUNK - The following job failed but were present on the merge base:👉 Rebase onto the `viable/strict` branch to avoid these failures
CRCR (non-blocking) - The following CRCR downstream CI jobs failed but are non-blocking:
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
|
@ColinPeppler has exported this pull request. If you are a Meta employee, you can view the originating Diff in D118874911. |
desertfire
approved these changes
Sep 8, 2026
Contributor
Author
|
@pytorchbot merge |
Collaborator
Merge startedYour 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary:
Why?
AOTI_RUNTIME_CHECK_INPUTS=1codegens input shape checks against the bounds baked in at lowering time. The lowerbound half is already gated byconfig.aot_inductor.check_lowerbound(D88203028). The upperbound half is unconditional.How?
Add
config.aot_inductor.check_upperbound, defaultTrue, and gate thedim value is too largecodegen on it. No behavior change until a caller flips it.Lowering wires it up in the diff on top.
Differential Revision: D118874911
cc @voznesenskym @penguinwu @EikanWang @jgong5 @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @wenzhe-nrv @jiayisunx @ipiszy @kadeng @muchulee8 @amjames @chauhang @aakhundov @coconutruben @jataylo