-
Notifications
You must be signed in to change notification settings - Fork 25.7k
[AOTI] Delay the fallback kernel naming decision to the codegen time #113660
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
Summary: This is to prepare for a later change that changes AOTI's second-pass to perform codegen only. [ghstack-poisoned]
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/113660
Note: Links to docs will display an error until the docs builds have been completed. ✅ No FailuresAs of commit 93482e7 with merge base cebad98 ( This comment was automatically generated by Dr. CI and updates every 15 minutes. |
…degen time" Summary: This is to prepare for a later change that changes AOTI's second-pass to perform codegen only. cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng wenzhe-nrv jiayisunx peterbell10 ipiszy yf225 chenyang78 kadeng muchulee8 aakhundov ColinPeppler [ghstack-poisoned]
…degen time" Summary: This is to prepare for a later change that changes AOTI's second-pass to perform codegen only. cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng wenzhe-nrv jiayisunx peterbell10 ipiszy yf225 chenyang78 kadeng muchulee8 aakhundov ColinPeppler [ghstack-poisoned]
…degen time" Summary: This is to prepare for a later change that changes AOTI's second-pass to perform codegen only. cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng wenzhe-nrv jiayisunx peterbell10 ipiszy yf225 chenyang78 kadeng muchulee8 aakhundov ColinPeppler [ghstack-poisoned]
| x, | ||
| [x, self.constant_args[0], index, src], | ||
| self.kernel, | ||
| self.cpp_kernel if V.graph.cpp_wrapper else self.kernel, |
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.
Can we call self.codegen_kernel_name here?
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.
This is because codegen_kernel_name doesn't exist in the base class ExternKernel, since not all ExternKernel has a kernel name. I think @int3 raised a similar question in a different context, codegen_kwargs. I will create some other PRs to do some refactoring to the base/child classes here.
| wrapper.writeline(wrapper.wrap_kernel_call(self.kernel, args)) | ||
| wrapper.writeline( | ||
| wrapper.wrap_kernel_call( | ||
| self.cpp_kernel if V.graph.cpp_wrapper else self.kernel, args |
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.
ditto - can we call self.codegen_kernel_name?
| wrapper.generate_extern_kernel_alloc_and_find_schema_if_needed( | ||
| self.get_name(), | ||
| self.kernel, | ||
| self.cpp_kernel if V.graph.cpp_wrapper else self.kernel, |
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.
ditto
| self.codegen_reference(), | ||
| args, | ||
| self.kernel, | ||
| self.cpp_kernel if V.graph.cpp_wrapper else self.kernel, |
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.
same
|
@desertfire has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
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.
LGTM. Thanks!
…degen time" Summary: This is to prepare for a later change that changes AOTI's second-pass to perform codegen only. cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng wenzhe-nrv jiayisunx peterbell10 ipiszy yf225 chenyang78 kadeng muchulee8 aakhundov ColinPeppler Differential Revision: [D51382677](https://our.internmc.facebook.com/intern/diff/D51382677) [ghstack-poisoned]
|
@desertfire has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
…degen time" Summary: This is to prepare for a later change that changes AOTI's second-pass to perform codegen only. cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng wenzhe-nrv jiayisunx peterbell10 ipiszy yf225 chenyang78 kadeng muchulee8 aakhundov ColinPeppler Differential Revision: [D51382677](https://our.internmc.facebook.com/intern/diff/D51382677) [ghstack-poisoned]
|
@desertfire has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
|
@pytorchbot merge (Initiating merge automatically since Phabricator Diff has merged) |
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 |
Stack from ghstack (oldest at bottom):
Summary: This is to prepare for a later change that changes AOTI's second-pass to perform codegen only.
cc @voznesenskym @penguinwu @EikanWang @jgong5 @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @wenzhe-nrv @jiayisunx @peterbell10 @ipiszy @yf225 @chenyang78 @kadeng @muchulee8 @aakhundov @ColinPeppler
Differential Revision: D51382677