[dynamic shapes] guard_or_false for infer_size#152146
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/152146
Note: Links to docs will display an error until the docs builds have been completed. ✅ You can merge normally! (2 Unrelated Failures)As of commit b44c787 with merge base 0e2b948 ( BROKEN TRUNK - The following job failed but were present on the merge base:👉 Rebase onto the `viable/strict` branch to avoid these failures
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. |
…k/false_infer_size
|
|
||
| self.assertEqual(counter.frame_count, 2) # not three or four! | ||
|
|
||
| @expectedFailure # TODO(laithsakka, pianpwk): handle guard_or_false before oblivious hint fallback |
There was a problem hiding this comment.
why does this fail now?
| guard_size_oblivious(sizeA == 1) | ||
| or guard_size_oblivious(sizeB == 1) | ||
| or sizeA == sizeB, | ||
| guard_or_false(sizeA == 1) or guard_or_false(sizeB == 1) or sizeA == sizeB, |
There was a problem hiding this comment.
you can land it as for the future i might revisit this to make the code more understandable
basically first we want to check if there is broadcasting using guard_or_none.
if any of them did not return none we are done.
if both return non i would want to add an explicit extra message to the torch_check that says we have assumed this path because both sizeA == sizeB are unbacked
not action required from you at this momment. i will file issue for this.
|
@pytorchbot rebase |
|
@pytorchbot started a rebase job onto refs/remotes/origin/viable/strict. Check the current status here |
|
Rebase failed due to Command Raised by https://github.com/pytorch/pytorch/actions/runs/14851267873 |
|
|
||
|
|
||
| add_loop_eager_dynamic,compile_time_instruction_count,5633000000,0.025 | ||
| add_loop_eager_dynamic,compile_time_instruction_count,5806000000,0.025 |
There was a problem hiding this comment.
due to guard_or_false additional overhead, profiling shows infer_size goes from 14% -> 18% total compile time
|
@pytorchmergebot merge |
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 |
Fixes #ISSUE_NUMBER
cc @voznesenskym @penguinwu @EikanWang @jgong5 @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @wenzhe-nrv @jiayisunx @chenyang78 @kadeng @chauhang @amjames