Add temporary impl_UNBOXED syntax sugar for unboxed-only defs.#35714
Closed
ezyang wants to merge 3 commits intogh/ezyang/698/basefrom
Closed
Add temporary impl_UNBOXED syntax sugar for unboxed-only defs.#35714ezyang wants to merge 3 commits intogh/ezyang/698/basefrom
ezyang wants to merge 3 commits intogh/ezyang/698/basefrom
Conversation
There are a lot of unboxed only defs. We're committed to removing them at the end of the half but as I am about to do a lot of porting to the new API, let's get them into a form where they're easy to remove. This is a new overload impl_UNBOXED that will pass the function pointer straight to CppFunction::makeUnboxedOnly I don't attempt to make the _UNBOXED API complete; in particular, catchall declarations don't get this sugar (as there are very few of them). Signed-off-by: Edward Z. Yang <ezyang@fb.com> [ghstack-poisoned]
This was referenced Mar 30, 2020
ezyang
added a commit
that referenced
this pull request
Mar 30, 2020
There are a lot of unboxed only defs. We're committed to removing them at the end of the half but as I am about to do a lot of porting to the new API, let's get them into a form where they're easy to remove. This is a new overload impl_UNBOXED that will pass the function pointer straight to CppFunction::makeUnboxedOnly I don't attempt to make the _UNBOXED API complete; in particular, catchall declarations don't get this sugar (as there are very few of them). Signed-off-by: Edward Z. Yang <ezyang@fb.com> ghstack-source-id: a315082 Pull Request resolved: #35714
💊 CircleCI build failures summary and remediationsAs of commit 633ac27 (more details on the Dr. CI page):
🕵️ 1 new failure recognized by patternsThe following build failures do not appear to be due to upstream breakages:
|
bhosmer
approved these changes
Mar 30, 2020
smessmer
approved these changes
Mar 31, 2020
| // CppFunction::makeUnboxedOnly factory directly (the API is compositional; | ||
| // it's just that we have a LOT of impl calls that are unboxed, so there is | ||
| // just a little syntax sugar for this case.) | ||
| template <typename Dispatch, typename Func> |
Contributor
There was a problem hiding this comment.
Can we add a TODO here saying we intend to remove these?
…efs." There are a lot of unboxed only defs. We're committed to removing them at the end of the half but as I am about to do a lot of porting to the new API, let's get them into a form where they're easy to remove. This is a new overload impl_UNBOXED that will pass the function pointer straight to CppFunction::makeUnboxedOnly I don't attempt to make the _UNBOXED API complete; in particular, catchall declarations don't get this sugar (as there are very few of them). Signed-off-by: Edward Z. Yang <ezyang@fb.com> [ghstack-poisoned]
ezyang
added a commit
that referenced
this pull request
Mar 31, 2020
There are a lot of unboxed only defs. We're committed to removing them at the end of the half but as I am about to do a lot of porting to the new API, let's get them into a form where they're easy to remove. This is a new overload impl_UNBOXED that will pass the function pointer straight to CppFunction::makeUnboxedOnly I don't attempt to make the _UNBOXED API complete; in particular, catchall declarations don't get this sugar (as there are very few of them). Signed-off-by: Edward Z. Yang <ezyang@fb.com> ghstack-source-id: 1912dd1 Pull Request resolved: #35714
…efs." There are a lot of unboxed only defs. We're committed to removing them at the end of the half but as I am about to do a lot of porting to the new API, let's get them into a form where they're easy to remove. This is a new overload impl_UNBOXED that will pass the function pointer straight to CppFunction::makeUnboxedOnly I don't attempt to make the _UNBOXED API complete; in particular, catchall declarations don't get this sugar (as there are very few of them). Signed-off-by: Edward Z. Yang <ezyang@fb.com> Differential Revision: [D20775782](https://our.internmc.facebook.com/intern/diff/D20775782) [ghstack-poisoned]
ezyang
added a commit
that referenced
this pull request
Apr 1, 2020
There are a lot of unboxed only defs. We're committed to removing them at the end of the half but as I am about to do a lot of porting to the new API, let's get them into a form where they're easy to remove. This is a new overload impl_UNBOXED that will pass the function pointer straight to CppFunction::makeUnboxedOnly I don't attempt to make the _UNBOXED API complete; in particular, catchall declarations don't get this sugar (as there are very few of them). Signed-off-by: Edward Z. Yang <ezyang@fb.com> ghstack-source-id: c9e0507 Pull Request resolved: #35714
Contributor
ezyang
added a commit
that referenced
this pull request
Apr 8, 2020
…ed-only defs." Previously #35714 There are a lot of unboxed only defs. We're committed to removing them at the end of the half but as I am about to do a lot of porting to the new API, let's get them into a form where they're easy to remove. This is a new overload impl_UNBOXED that will pass the function pointer straight to CppFunction::makeUnboxedOnly I don't attempt to make the _UNBOXED API complete; in particular, catchall declarations don't get this sugar (as there are very few of them). To get some coverage of _UNBOXED API for code analysis, I switched one of our unboxed tests to be an impl rather than a def. This shouldn't materially affect coverage. Signed-off-by: Edward Z. Yang <ezyang@fb.com> [ghstack-poisoned]
ezyang
added a commit
that referenced
this pull request
Apr 9, 2020
…ed-only defs." Previously #35714 There are a lot of unboxed only defs. We're committed to removing them at the end of the half but as I am about to do a lot of porting to the new API, let's get them into a form where they're easy to remove. This is a new overload impl_UNBOXED that will pass the function pointer straight to CppFunction::makeUnboxedOnly I don't attempt to make the _UNBOXED API complete; in particular, catchall declarations don't get this sugar (as there are very few of them). To get some coverage of _UNBOXED API for code analysis, I switched one of our unboxed tests to be an impl rather than a def. This shouldn't materially affect coverage. Signed-off-by: Edward Z. Yang <ezyang@fb.com> Differential Revision: [D20929259](https://our.internmc.facebook.com/intern/diff/D20929259) [ghstack-poisoned]
ezyang
added a commit
that referenced
this pull request
Apr 9, 2020
…ed-only defs." Previously #35714 There are a lot of unboxed only defs. We're committed to removing them at the end of the half but as I am about to do a lot of porting to the new API, let's get them into a form where they're easy to remove. This is a new overload impl_UNBOXED that will pass the function pointer straight to CppFunction::makeUnboxedOnly I don't attempt to make the _UNBOXED API complete; in particular, catchall declarations don't get this sugar (as there are very few of them). To get some coverage of _UNBOXED API for code analysis, I switched one of our unboxed tests to be an impl rather than a def. This shouldn't materially affect coverage. Signed-off-by: Edward Z. Yang <ezyang@fb.com> Differential Revision: [D20929259](https://our.internmc.facebook.com/intern/diff/D20929259) [ghstack-poisoned]
facebook-github-bot
pushed a commit
that referenced
this pull request
Apr 9, 2020
…s. (#36223) Summary: Pull Request resolved: #36223 Previously #35714 There are a lot of unboxed only defs. We're committed to removing them at the end of the half but as I am about to do a lot of porting to the new API, let's get them into a form where they're easy to remove. This is a new overload impl_UNBOXED that will pass the function pointer straight to CppFunction::makeUnboxedOnly I don't attempt to make the _UNBOXED API complete; in particular, catchall declarations don't get this sugar (as there are very few of them). To get some coverage of _UNBOXED API for code analysis, I switched one of our unboxed tests to be an impl rather than a def. This shouldn't materially affect coverage. Signed-off-by: Edward Z. Yang <ezyang@fb.com> Test Plan: Imported from OSS Differential Revision: D20929259 Pulled By: ezyang fbshipit-source-id: 72d2061b6c8a6afbcd392b47f53ade18de2f9184
ashishfarmer
pushed a commit
to ashishfarmer/pytorch
that referenced
this pull request
Apr 13, 2020
…s. (pytorch#36223) Summary: Pull Request resolved: pytorch#36223 Previously pytorch#35714 There are a lot of unboxed only defs. We're committed to removing them at the end of the half but as I am about to do a lot of porting to the new API, let's get them into a form where they're easy to remove. This is a new overload impl_UNBOXED that will pass the function pointer straight to CppFunction::makeUnboxedOnly I don't attempt to make the _UNBOXED API complete; in particular, catchall declarations don't get this sugar (as there are very few of them). To get some coverage of _UNBOXED API for code analysis, I switched one of our unboxed tests to be an impl rather than a def. This shouldn't materially affect coverage. Signed-off-by: Edward Z. Yang <ezyang@fb.com> Test Plan: Imported from OSS Differential Revision: D20929259 Pulled By: ezyang fbshipit-source-id: 72d2061b6c8a6afbcd392b47f53ade18de2f9184
laurentdupin
pushed a commit
to laurentdupin/pytorch
that referenced
this pull request
Apr 24, 2026
…ch#35714) Summary: Pull Request resolved: pytorch#35714 There are a lot of unboxed only defs. We're committed to removing them at the end of the half but as I am about to do a lot of porting to the new API, let's get them into a form where they're easy to remove. This is a new overload impl_UNBOXED that will pass the function pointer straight to CppFunction::makeUnboxedOnly I don't attempt to make the _UNBOXED API complete; in particular, catchall declarations don't get this sugar (as there are very few of them). Signed-off-by: Edward Z. Yang <ezyang@fb.com> Test Plan: Imported from OSS Differential Revision: D20775782 Pulled By: ezyang fbshipit-source-id: c5e804c69f5961c9d4862f6c5dbbe4c524cc32cc
laurentdupin
pushed a commit
to laurentdupin/pytorch
that referenced
this pull request
Apr 24, 2026
…s. (pytorch#36223) Summary: Pull Request resolved: pytorch#36223 Previously pytorch#35714 There are a lot of unboxed only defs. We're committed to removing them at the end of the half but as I am about to do a lot of porting to the new API, let's get them into a form where they're easy to remove. This is a new overload impl_UNBOXED that will pass the function pointer straight to CppFunction::makeUnboxedOnly I don't attempt to make the _UNBOXED API complete; in particular, catchall declarations don't get this sugar (as there are very few of them). To get some coverage of _UNBOXED API for code analysis, I switched one of our unboxed tests to be an impl rather than a def. This shouldn't materially affect coverage. Signed-off-by: Edward Z. Yang <ezyang@fb.com> Test Plan: Imported from OSS Differential Revision: D20929259 Pulled By: ezyang fbshipit-source-id: 72d2061b6c8a6afbcd392b47f53ade18de2f9184
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stack from ghstack:
There are a lot of unboxed only defs. We're committed to removing
them at the end of the half but as I am about to do a lot of porting
to the new API, let's get them into a form where they're easy to
remove. This is a new overload impl_UNBOXED that will pass
the function pointer straight to CppFunction::makeUnboxedOnly
I don't attempt to make the _UNBOXED API complete; in particular,
catchall declarations don't get this sugar (as there are very few
of them).
Signed-off-by: Edward Z. Yang ezyang@fb.com
Differential Revision: D20775782