-
Notifications
You must be signed in to change notification settings - Fork 26.3k
[Inductor] Restrict ND tiling analysis to MemoryDeps #144497
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/144497
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 4ca7680 with merge base e6b9e67 ( UNSTABLE - The following job failed but was likely due to flakiness present on trunk and has been marked as unstable:
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
f04bcbb to
8d477e3
Compare
| boundaries = torch.tensor([-0.9, -0.8, 0.1, 0.2, 0.5, 0.9]) | ||
|
|
||
| for out_int32 in [True, False]: | ||
| for right in [True, False]: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unrelated to this PR: I'm not sure why this test iterates over various values of out_int32 and right, but then hard-codes them to True and False, respectively before actually compiling the model. Should we change this?
|
Looks like some infra issues prevented a lot of tests from running. I'll rebase this and test again. |
|
@pytorchbot rebase |
|
@pytorchbot started a rebase job onto refs/remotes/origin/viable/strict. Check the current status here |
|
Successfully rebased |
e37fb4a to
4ca7680
Compare
|
@pytorchbot merge -i |
Merge startedYour change will be merged while ignoring the following 1 checks: pull / linux-jammy-py3-clang12-executorch / test (executorch, 1, 1, lf.linux.2xlarge, unstable) Learn more about merging in the wiki. Questions? Feedback? Please reach out to the PyTorch DevX Team |
Issue
#137243 introduced a feature where the ND tiling algorithm analyzes memory dependencies. It iterates over all
Dep's of the kernel. However, the analysis is only applicable toMemoryDepinstances, which are a subclass ofDep. In particular, it doesn't work forStarDep's, for the reasons described here: https://github.com/pytorch/pytorch/blob/main/torch/_inductor/codegen/simd.py#L1653Fix
This PR changes the algorithm to only iterate over
MemoryDepinstances.Testing
Parameterized an existing test for
torch.bucketizeto also run with ND tiling. This test emits a node withStarDep's. Without this PR, the compiler would crash on this test case.cc @voznesenskym @penguinwu @EikanWang @jgong5 @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @wenzhe-nrv @jiayisunx @ipiszy @yf225 @chenyang78 @kadeng @muchulee8 @ColinPeppler @amjames @desertfire @chauhang @aakhundov