-
Notifications
You must be signed in to change notification settings - Fork 25.7k
Move unboxed dispatch decision into dispatcher #28251
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
Before, the dispatch key for unboxed operators from native_functions.yaml was generated in codegen and passed to the c10 dispatcher. Now, we generate it inside of the dispatcher, right next to where the same thing happens for boxed calls. Differential Revision: [D17989951](https://our.internmc.facebook.com/intern/diff/D17989951/) [ghstack-poisoned]
Before, the dispatch key for unboxed operators from native_functions.yaml was generated in codegen and passed to the c10 dispatcher. Now, we generate it inside of the dispatcher, right next to where the same thing happens for boxed calls. Differential Revision: [D17989951](https://our.internmc.facebook.com/intern/diff/D17989951/) ghstack-source-id: 92136929 Pull Request resolved: #28251
template<class... Args> | ||
const KernelFunction& lookup(const Args&... args) const { | ||
return lookup_([&] () -> c10::optional<TensorTypeId> { | ||
if (!dispatch_strategy_.is_valid_) { |
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.
Still not sure why we need to indirect through a dispatch strategy
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.
I'm currently working on another simplification diff that will probably address that
Before, the dispatch key for unboxed operators from native_functions.yaml was generated in codegen and passed to the c10 dispatcher. Now, we generate it inside of the dispatcher, right next to where the same thing happens for boxed calls. Differential Revision: [D17989951](https://our.internmc.facebook.com/intern/diff/D17989951/) [ghstack-poisoned]
Pull Request resolved: #28251 Before, the dispatch key for unboxed operators from native_functions.yaml was generated in codegen and passed to the c10 dispatcher. Now, we generate it inside of the dispatcher, right next to where the same thing happens for boxed calls. ghstack-source-id: 92211517 Differential Revision: [D17989951](https://our.internmc.facebook.com/intern/diff/D17989951/)
Before, the dispatch key for unboxed operators from native_functions.yaml was generated in codegen and passed to the c10 dispatcher. Now, we generate it inside of the dispatcher, right next to where the same thing happens for boxed calls. Differential Revision: [D17989951](https://our.internmc.facebook.com/intern/diff/D17989951/) [ghstack-poisoned]
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.
nice and clean!
Before, the dispatch key for unboxed operators from native_functions.yaml was generated in codegen and passed to the c10 dispatcher. Now, we generate it inside of the dispatcher, right next to where the same thing happens for boxed calls. Differential Revision: [D17989951](https://our.internmc.facebook.com/intern/diff/D17989951/) [ghstack-poisoned]
Before, the dispatch key for unboxed operators from native_functions.yaml was generated in codegen and passed to the c10 dispatcher. Now, we generate it inside of the dispatcher, right next to where the same thing happens for boxed calls. Differential Revision: [D17989951](https://our.internmc.facebook.com/intern/diff/D17989951/) [ghstack-poisoned]
Before, the dispatch key for unboxed operators from native_functions.yaml was generated in codegen and passed to the c10 dispatcher. Now, we generate it inside of the dispatcher, right next to where the same thing happens for boxed calls. Differential Revision: [D17989951](https://our.internmc.facebook.com/intern/diff/D17989951/) [ghstack-poisoned]
Before, the dispatch key for unboxed operators from native_functions.yaml was generated in codegen and passed to the c10 dispatcher. Now, we generate it inside of the dispatcher, right next to where the same thing happens for boxed calls. Differential Revision: [D17989951](https://our.internmc.facebook.com/intern/diff/D17989951/) [ghstack-poisoned]
Before, the dispatch key for unboxed operators from native_functions.yaml was generated in codegen and passed to the c10 dispatcher. Now, we generate it inside of the dispatcher, right next to where the same thing happens for boxed calls. Differential Revision: [D17989951](https://our.internmc.facebook.com/intern/diff/D17989951/) [ghstack-poisoned]
Before, the dispatch key for unboxed operators from native_functions.yaml was generated in codegen and passed to the c10 dispatcher. Now, we generate it inside of the dispatcher, right next to where the same thing happens for boxed calls. Differential Revision: [D17989951](https://our.internmc.facebook.com/intern/diff/D17989951/) [ghstack-poisoned]
Before, the dispatch key for unboxed operators from native_functions.yaml was generated in codegen and passed to the c10 dispatcher. Now, we generate it inside of the dispatcher, right next to where the same thing happens for boxed calls. Differential Revision: [D17989951](https://our.internmc.facebook.com/intern/diff/D17989951/) [ghstack-poisoned]
Before, the dispatch key for unboxed operators from native_functions.yaml was generated in codegen and passed to the c10 dispatcher. Now, we generate it inside of the dispatcher, right next to where the same thing happens for boxed calls. Differential Revision: [D17989951](https://our.internmc.facebook.com/intern/diff/D17989951/) [ghstack-poisoned]
Before, the dispatch key for unboxed operators from native_functions.yaml was generated in codegen and passed to the c10 dispatcher. Now, we generate it inside of the dispatcher, right next to where the same thing happens for boxed calls. Differential Revision: [D17989951](https://our.internmc.facebook.com/intern/diff/D17989951/) [ghstack-poisoned]
Before, the dispatch key for unboxed operators from native_functions.yaml was generated in codegen and passed to the c10 dispatcher. Now, we generate it inside of the dispatcher, right next to where the same thing happens for boxed calls. Differential Revision: [D17989951](https://our.internmc.facebook.com/intern/diff/D17989951/) [ghstack-poisoned]
Before, the dispatch key for unboxed operators from native_functions.yaml was generated in codegen and passed to the c10 dispatcher. Now, we generate it inside of the dispatcher, right next to where the same thing happens for boxed calls. Differential Revision: [D17989951](https://our.internmc.facebook.com/intern/diff/D17989951/) [ghstack-poisoned]
Before, the dispatch key for unboxed operators from native_functions.yaml was generated in codegen and passed to the c10 dispatcher. Now, we generate it inside of the dispatcher, right next to where the same thing happens for boxed calls. Differential Revision: [D17989951](https://our.internmc.facebook.com/intern/diff/D17989951/) [ghstack-poisoned]
Before, the dispatch key for unboxed operators from native_functions.yaml was generated in codegen and passed to the c10 dispatcher. Now, we generate it inside of the dispatcher, right next to where the same thing happens for boxed calls. Differential Revision: [D17989951](https://our.internmc.facebook.com/intern/diff/D17989951/) [ghstack-poisoned]
Differential Revision: [D18212009](https://our.internmc.facebook.com/intern/diff/D18212009/) [ghstack-poisoned]
Differential Revision: [D18212009](https://our.internmc.facebook.com/intern/diff/D18212009/) ghstack-source-id: 92856230 Pull Request resolved: #28851
Before, the dispatch key for unboxed operators from native_functions.yaml was generated in codegen and passed to the c10 dispatcher. Now, we generate it inside of the dispatcher, right next to where the same thing happens for boxed calls. Differential Revision: [D17989951](https://our.internmc.facebook.com/intern/diff/D17989951/) [ghstack-poisoned]
Differential Revision: [D18212009](https://our.internmc.facebook.com/intern/diff/D18212009/) [ghstack-poisoned]
Pull Request resolved: #28851 ghstack-source-id: 92965835 Differential Revision: [D18212009](https://our.internmc.facebook.com/intern/diff/D18212009/)
CircleCI build failures summaryAs of commit 4e5398d:
Here are the reasons each build failed. This comment was automatically generated by Dr. CI. Please report bugs/suggestions on the GitHub issue tracker. This comment has been revised 2 time(s). |
Differential Revision: [D18212009](https://our.internmc.facebook.com/intern/diff/D18212009/) [ghstack-poisoned]
Pull Request resolved: #28851 ghstack-source-id: 93054489 Differential Revision: [D18212009](https://our.internmc.facebook.com/intern/diff/D18212009/)
Before, the dispatch key for unboxed operators from native_functions.yaml was generated in codegen and passed to the c10 dispatcher. Now, we generate it inside of the dispatcher, right next to where the same thing happens for boxed calls. Differential Revision: [D17989951](https://our.internmc.facebook.com/intern/diff/D17989951/) [ghstack-poisoned]
Before, the dispatch key for unboxed operators from native_functions.yaml was generated in codegen and passed to the c10 dispatcher. Now, we generate it inside of the dispatcher, right next to where the same thing happens for boxed calls. Differential Revision: [D17989951](https://our.internmc.facebook.com/intern/diff/D17989951/) [ghstack-poisoned]
Summary: Pull Request resolved: pytorch/pytorch#28251 Before, the dispatch key for unboxed operators from native_functions.yaml was generated in codegen and passed to the c10 dispatcher. Now, we generate it inside of the dispatcher, right next to where the same thing happens for boxed calls. ghstack-source-id: 93085152 Test Plan: unit tests Differential Revision: D17989951 fbshipit-source-id: b343d9650debc62bfcff84cf4d6bdaf9dacc9d16
This pull request has been merged in 88a34ef. |
This diff appears to reliably cause Windows to run out of memory when linking:
I verified the last three CI results on the PR all failed this way. I am reverting it to give us more headroom on master. |
Stack from ghstack:
Before, the dispatch key for unboxed operators from native_functions.yaml was generated in codegen and passed to the c10 dispatcher.
Now, we generate it inside of the dispatcher, right next to where the same thing happens for boxed calls.
Differential Revision: D17989951