Delete TypeDefault.h and TypeDerived.h codegen entirely.#47002
Closed
ezyang wants to merge 2 commits intogh/ezyang/861/basefrom
Closed
Delete TypeDefault.h and TypeDerived.h codegen entirely.#47002ezyang wants to merge 2 commits intogh/ezyang/861/basefrom
ezyang wants to merge 2 commits intogh/ezyang/861/basefrom
Conversation
There was no good reason for TypeDerived.h (CPUType.h) codegen to exist after static dispatch was deleted, and now that we have Math alias key TypeDefault.h header is not needed either. Sorry to anyone who was using these out of tree. I didn't entirely delete TypeDefault.h as it has a use in a file that I can't conveniently compile test locally. Will kill it entirely in a follow up. Signed-off-by: Edward Z. Yang <ezyang@fb.com> [ghstack-poisoned]
This was referenced Oct 28, 2020
💊 CI failures summary and remediationsAs of commit e42b21b (more details on the Dr. CI page): 💚 💚 Looks good so far! There are no failures yet. 💚 💚 This comment was automatically generated by Dr. CI (expand for details).Follow this link to opt-out of these comments for your Pull Requests.Please report bugs/suggestions on the GitHub issue tracker or post in the (internal) Dr. CI Users group. This comment has been revised 6 times. |
There was no good reason for TypeDerived.h (CPUType.h) codegen to exist after static dispatch was deleted, and now that we have Math alias key TypeDefault.h header is not needed either. Sorry to anyone who was using these out of tree. I didn't entirely delete TypeDefault.h as it has a use in a file that I can't conveniently compile test locally. Will kill it entirely in a follow up. Signed-off-by: Edward Z. Yang <ezyang@fb.com> Differential Revision: [D24596583](https://our.internmc.facebook.com/intern/diff/D24596583) [ghstack-poisoned]
ezyang
added a commit
that referenced
this pull request
Oct 28, 2020
There was no good reason for TypeDerived.h (CPUType.h) codegen to exist after static dispatch was deleted, and now that we have Math alias key TypeDefault.h header is not needed either. Sorry to anyone who was using these out of tree. I didn't entirely delete TypeDefault.h as it has a use in a file that I can't conveniently compile test locally. Will kill it entirely in a follow up. Signed-off-by: Edward Z. Yang <ezyang@fb.com> ghstack-source-id: d72ea48 Pull Request resolved: #47002
ailzhang
approved these changes
Oct 28, 2020
Contributor
ailzhang
left a comment
There was a problem hiding this comment.
Nice! I had questions why the header files exist :P I think the PR summary answers my question!
| # KEYWORD_ALL_BACKENDS). | ||
| # Generates {dispatch}Type.cpp (e.g., CPUType.cpp). This function is also | ||
| # reused to implement per-operator registration. It also generates | ||
| # TypeDefault.cpp when dispatch target is for all backends (dispatch is None or |
Contributor
There was a problem hiding this comment.
"dispatch is None" can be removed?
Contributor
Author
There was a problem hiding this comment.
I'll be nailing this in a later PR, probably not worth fixing here
bhosmer
approved these changes
Oct 28, 2020
Codecov Report
@@ Coverage Diff @@
## gh/ezyang/861/base #47002 +/- ##
===================================================
Coverage 68.95% 68.95%
===================================================
Files 434 434
Lines 56248 56248
===================================================
+ Hits 38785 38786 +1
+ Misses 17463 17462 -1 |
Contributor
laurentdupin
pushed a commit
to laurentdupin/pytorch
that referenced
this pull request
Apr 24, 2026
Summary: Pull Request resolved: pytorch#47002 There was no good reason for TypeDerived.h (CPUType.h) codegen to exist after static dispatch was deleted, and now that we have Math alias key TypeDefault.h header is not needed either. Sorry to anyone who was using these out of tree. I didn't entirely delete TypeDefault.h as it has a use in a file that I can't conveniently compile test locally. Will kill it entirely in a follow up. Signed-off-by: Edward Z. Yang <ezyang@fb.com> Test Plan: Imported from OSS Reviewed By: albanD Differential Revision: D24596583 Pulled By: ezyang fbshipit-source-id: b5095d3509098ff74f836c5d0c272db0b2d226aa
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 was no good reason for TypeDerived.h (CPUType.h) codegen
to exist after static dispatch was deleted, and now that we
have Math alias key TypeDefault.h header is not needed either.
Sorry to anyone who was using these out of tree.
I didn't entirely delete TypeDefault.h as it has a use in
a file that I can't conveniently compile test locally. Will
kill it entirely in a follow up.
Signed-off-by: Edward Z. Yang ezyang@fb.com
Differential Revision: D24596583