Skip to content

better boxing#29681

Closed
smessmer wants to merge 13 commits intogh/smessmer/115/basefrom
gh/smessmer/115/head
Closed

better boxing#29681
smessmer wants to merge 13 commits intogh/smessmer/115/basefrom
gh/smessmer/115/head

Conversation

@smessmer
Copy link
Contributor

@smessmer smessmer commented Nov 12, 2019

Stack from ghstack:

Remove callUnboxedOnly() and instead use metaprogramming to figure out if an operator can use a boxed fallback or not.
This enables boxed fallback for ops in native_functions.yaml even if they don't have use_c10_dispatcher: full set, as long as they're in the range of supported types.

Differential Revision: D18462653

Remove callUnboxedOnly() and instead use metaprogramming to figure out if an operator can use a boxed fallback or not.
This enables boxed fallback for ops in native_functions.yaml even if they don't have `use_c10_dispatcher: full` set, as long as they're in the range of supported types.

Differential Revision: [D18462653](https://our.internmc.facebook.com/intern/diff/D18462653/)

[ghstack-poisoned]
Remove callUnboxedOnly() and instead use metaprogramming to figure out if an operator can use a boxed fallback or not.
This enables boxed fallback for ops in native_functions.yaml even if they don't have `use_c10_dispatcher: full` set, as long as they're in the range of supported types.

Differential Revision: [D18462653](https://our.internmc.facebook.com/intern/diff/D18462653/)

[ghstack-poisoned]
@ezyang
Copy link
Contributor

ezyang commented Nov 13, 2019

There is a lot of irrelevant code motion in this PR, which makes it hard to read the diff. Could you please explain what happened?


namespace c10 {

inline KernelFunction::KernelFunction()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are there any changes to this file?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

callUnboxed now calls into impl::boxAndCallBoxedFunc instead of detail::boxAndCallBoxedFunc and that function implementation moved into its own header boxing.h. That's also the reason why this whole code movement happens - there's a dependency cycle between KernelFunction.h and boxing.h that I'm resolving by creating a KernelFunction_impl.h.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK... but did you change any of the code in this file? :)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file is new and it has all the KernelFunction methods. The code inside the methods is unchanged except for what I mentioned above.

Remove callUnboxedOnly() and instead use metaprogramming to figure out if an operator can use a boxed fallback or not.
This enables boxed fallback for ops in native_functions.yaml even if they don't have `use_c10_dispatcher: full` set, as long as they're in the range of supported types.

Differential Revision: [D18462653](https://our.internmc.facebook.com/intern/diff/D18462653/)

[ghstack-poisoned]
Remove callUnboxedOnly() and instead use metaprogramming to figure out if an operator can use a boxed fallback or not.
This enables boxed fallback for ops in native_functions.yaml even if they don't have `use_c10_dispatcher: full` set, as long as they're in the range of supported types.

Differential Revision: [D18462653](https://our.internmc.facebook.com/intern/diff/D18462653/)

[ghstack-poisoned]
@smessmer smessmer requested a review from ezyang November 14, 2019 23:29
Remove callUnboxedOnly() and instead use metaprogramming to figure out if an operator can use a boxed fallback or not.
This enables boxed fallback for ops in native_functions.yaml even if they don't have `use_c10_dispatcher: full` set, as long as they're in the range of supported types.

Differential Revision: [D18462653](https://our.internmc.facebook.com/intern/diff/D18462653/)

[ghstack-poisoned]
Remove callUnboxedOnly() and instead use metaprogramming to figure out if an operator can use a boxed fallback or not.
This enables boxed fallback for ops in native_functions.yaml even if they don't have `use_c10_dispatcher: full` set, as long as they're in the range of supported types.

Differential Revision: [D18462653](https://our.internmc.facebook.com/intern/diff/D18462653/)

[ghstack-poisoned]
Remove callUnboxedOnly() and instead use metaprogramming to figure out if an operator can use a boxed fallback or not.
This enables boxed fallback for ops in native_functions.yaml even if they don't have `use_c10_dispatcher: full` set, as long as they're in the range of supported types.

Differential Revision: [D18462653](https://our.internmc.facebook.com/intern/diff/D18462653/)

[ghstack-poisoned]
Remove callUnboxedOnly() and instead use metaprogramming to figure out if an operator can use a boxed fallback or not.
This enables boxed fallback for ops in native_functions.yaml even if they don't have `use_c10_dispatcher: full` set, as long as they're in the range of supported types.

Differential Revision: [D18462653](https://our.internmc.facebook.com/intern/diff/D18462653/)

[ghstack-poisoned]
Remove callUnboxedOnly() and instead use metaprogramming to figure out if an operator can use a boxed fallback or not.
This enables boxed fallback for ops in native_functions.yaml even if they don't have `use_c10_dispatcher: full` set, as long as they're in the range of supported types.

Differential Revision: [D18462653](https://our.internmc.facebook.com/intern/diff/D18462653/)

[ghstack-poisoned]
Remove callUnboxedOnly() and instead use metaprogramming to figure out if an operator can use a boxed fallback or not.
This enables boxed fallback for ops in native_functions.yaml even if they don't have `use_c10_dispatcher: full` set, as long as they're in the range of supported types.

Differential Revision: [D18462653](https://our.internmc.facebook.com/intern/diff/D18462653/)

[ghstack-poisoned]
Remove callUnboxedOnly() and instead use metaprogramming to figure out if an operator can use a boxed fallback or not.
This enables boxed fallback for ops in native_functions.yaml even if they don't have `use_c10_dispatcher: full` set, as long as they're in the range of supported types.

Differential Revision: [D18462653](https://our.internmc.facebook.com/intern/diff/D18462653/)

[ghstack-poisoned]
Remove callUnboxedOnly() and instead use metaprogramming to figure out if an operator can use a boxed fallback or not.
This enables boxed fallback for ops in native_functions.yaml even if they don't have `use_c10_dispatcher: full` set, as long as they're in the range of supported types.

Differential Revision: [D18462653](https://our.internmc.facebook.com/intern/diff/D18462653/)

[ghstack-poisoned]
Remove callUnboxedOnly() and instead use metaprogramming to figure out if an operator can use a boxed fallback or not.
This enables boxed fallback for ops in native_functions.yaml even if they don't have `use_c10_dispatcher: full` set, as long as they're in the range of supported types.

Differential Revision: [D18462653](https://our.internmc.facebook.com/intern/diff/D18462653/)

[ghstack-poisoned]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants