Skip to content

Delete TypeDefault.h and TypeDerived.h codegen entirely.#47002

Closed
ezyang wants to merge 2 commits intogh/ezyang/861/basefrom
gh/ezyang/861/head
Closed

Delete TypeDefault.h and TypeDerived.h codegen entirely.#47002
ezyang wants to merge 2 commits intogh/ezyang/861/basefrom
gh/ezyang/861/head

Conversation

@ezyang
Copy link
Copy Markdown
Contributor

@ezyang ezyang commented Oct 28, 2020

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

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]
@dr-ci
Copy link
Copy Markdown

dr-ci Bot commented Oct 28, 2020

💊 CI failures summary and remediations

As 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.

See how this bot performed.

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
Copy link
Copy Markdown
Contributor

@ailzhang ailzhang left a comment

Choose a reason for hiding this comment

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

Nice! I had questions why the header files exist :P I think the PR summary answers my question!

Comment thread tools/codegen/gen.py
# 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
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

"dispatch is None" can be removed?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I'll be nailing this in a later PR, probably not worth fixing here

@codecov
Copy link
Copy Markdown

codecov Bot commented Oct 28, 2020

Codecov Report

Merging #47002 into gh/ezyang/861/base will increase coverage by 0.00%.
The diff coverage is n/a.

@@                 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     

@facebook-github-bot
Copy link
Copy Markdown
Contributor

@ezyang merged this pull request in 843cab3.

@facebook-github-bot facebook-github-bot deleted the gh/ezyang/861/head branch November 2, 2020 15:17
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants