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
[inductor] Fix CPP wrapper codegen for ExternKernel args #117931
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/117931
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 d64e7a6 with merge base 05ef203 (): 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. |
This pull request was exported from Phabricator. Differential Revision: D52936248 |
2070e5a
to
9a1d2f0
Compare
) Summary: Recently, this has been fixed for the Python wrapper codegen in D52899373 (pytorch#117838). Here we extend the fix to CPP wrapper codegen / AOTInductor. Test Plan: New unit tests. In OSS: ``` python test/inductor/test_aot_inductor.py -k test_triton_kernel_multi_output_arg ``` ``` python test/inductor/test_aot_inductor.py -k test_triton_kernel_extern_kernel_arg ``` Differential Revision: D52936248
This pull request was exported from Phabricator. Differential Revision: D52936248 |
) Summary: Recently, this has been fixed for the Python wrapper codegen in D52899373 (pytorch#117838). Here we extend the fix to CPP wrapper codegen / AOTInductor. Test Plan: New unit tests. In OSS: ``` python test/inductor/test_aot_inductor.py -k test_triton_kernel_multi_output_arg ``` ``` python test/inductor/test_aot_inductor.py -k test_triton_kernel_extern_kernel_arg ``` Differential Revision: D52936248
9a1d2f0
to
719a71f
Compare
This pull request was exported from Phabricator. Differential Revision: D52936248 |
719a71f
to
34feaf8
Compare
) Summary: Recently, this has been fixed for the Python wrapper codegen in D52899373 (pytorch#117838). Here we extend the fix to CPP wrapper codegen / AOTInductor. Test Plan: New unit tests. In OSS: ``` python test/inductor/test_aot_inductor.py -k test_triton_kernel_multi_output_arg ``` ``` python test/inductor/test_aot_inductor.py -k test_triton_kernel_extern_kernel_arg ``` Reviewed By: oulgen Differential Revision: D52936248
This pull request was exported from Phabricator. Differential Revision: D52936248 |
I mentioned this in a direct message to Adnan but for posterity, it would be good to do a bit of a code clean up in wrapper.py. There are so many semi identical functions between jit inductor and aot inductor, |
Yeah, the wrapper codegen refactoring is planned. cc @desertfire @chenyang78. |
) Summary: Recently, this has been fixed for the Python wrapper codegen in D52899373 (pytorch#117838). Here we extend the fix to CPP wrapper codegen / AOTInductor. Test Plan: New unit tests. In OSS: ``` python test/inductor/test_aot_inductor.py -k test_triton_kernel_multi_output_arg ``` ``` python test/inductor/test_aot_inductor.py -k test_triton_kernel_extern_kernel_arg ``` Reviewed By: oulgen, chenyang78 Differential Revision: D52936248
34feaf8
to
d395df7
Compare
This pull request was exported from Phabricator. Differential Revision: D52936248 |
) Summary: Recently, this has been fixed for the Python wrapper codegen in D52899373 (pytorch#117838). Here we extend the fix to CPP wrapper codegen / AOTInductor. Test Plan: New unit tests. In OSS: ``` python test/inductor/test_aot_inductor.py -k test_triton_kernel_multi_output_arg ``` ``` python test/inductor/test_aot_inductor.py -k test_triton_kernel_extern_kernel_arg ``` Reviewed By: oulgen, chenyang78 Differential Revision: D52936248
d395df7
to
d64e7a6
Compare
This pull request was exported from Phabricator. Differential Revision: D52936248 |
Yeah, wrapper.py is getting quite messy now. I will start refactoring it very soon, likely this coming week. Thanks. |
@pytorchbot merge -f 'Landed internally' (Initiating merge automatically since Phabricator Diff has merged, using force because this PR might not pass merge_rules.json but landed internally) |
Merge startedYour change will be merged immediately since you used the force (-f) flag, bypassing any CI checks (ETA: 1-5 minutes). Please use Learn more about merging in the wiki. Questions? Feedback? Please reach out to the PyTorch DevX Team |
Summary: We see IR nodes
repr
-ed directly in the CPP wrapper codegen. Recently, this issue has been fixed for the Python wrapper codegen in D52899373 (#117838). Here we extend the fix to CPP wrapper codegen / AOTInductor.Test Plan:
New unit tests. In OSS:
Differential Revision: D52936248
cc @voznesenskym @penguinwu @EikanWang @jgong5 @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @wenzhe-nrv @jiayisunx @peterbell10 @ipiszy @yf225 @chenyang78 @kadeng @muchulee8 @ColinPeppler