-
Notifications
You must be signed in to change notification settings - Fork 25.6k
[inductor] Fix split-scan interaction with multi-kernel #131044
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/131044
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 6831061 with merge base fedae41 ( 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. |
@shunting314 PTAL |
Thanks for fixing these! Can you also add a tests in test/inductor/test_kernel_benchmark.py for the handling of WorkspaceArg in kernel benchmarking? |
@pytorchbot 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 |
…7724) Persistent kernels are sometimes able to remove intermediate buffers that would otherwise be needed for the non-persistent reduction kernel. This makes multi kernel's codegen more complicated as it needs to drop these extra arguments at runtime after selecting the correct kernel to run. Instead, this PR updates the persistent kernel's `must_keep_buffers` so these aren't dropped during codegen so both kernels have the same signature. Pull Request resolved: #127724 Approved by: https://github.com/shunting314 ghstack dependencies: #131044
Pull Request resolved: #127725 Approved by: https://github.com/lezcano ghstack dependencies: #131044, #127724
Stack from ghstack (oldest at bottom):
This fixes a couple errors that come up when multi-kernel is used with
split-scan.
a multi-kernel to be created but this isn't supported. Fix is to
never mark split-scan as persistent.
KeyError during codegen.
cc @voznesenskym @penguinwu @EikanWang @jgong5 @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @wenzhe-nrv @jiayisunx @ipiszy @yf225 @chenyang78 @kadeng @muchulee8 @ColinPeppler @amjames @desertfire @chauhang