-
Notifications
You must be signed in to change notification settings - Fork 26.3k
Remove Type dispatch #21964
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
Remove Type dispatch #21964
Conversation
Remove Type dispatch gh-metadata: pytorch pytorch 21964 gh/li-roy/32/head
Remove Type dispatch gh-metadata: pytorch pytorch 21964 gh/li-roy/32/head
Remove Type dispatch gh-metadata: pytorch pytorch 21964 gh/li-roy/32/head
Remove Type dispatch gh-metadata: pytorch pytorch 21964 gh/li-roy/32/head
Remove Type dispatch gh-metadata: pytorch pytorch 21964 gh/li-roy/32/head
Remove Type dispatch gh-metadata: pytorch pytorch 21964 gh/li-roy/32/head
| virtual const char * toString() const override; | ||
| virtual TypeID ID() const override; | ||
|
|
||
| struct CAFFE2_API ${Type} { |
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.
we still need this?
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.
did you answer this?
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.
Going to get rid of it.
gchanan
left a comment
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.
looks like there's an XLA problem, but I'm guessing you are working through that already.
Remove Type dispatch gh-metadata: pytorch pytorch 21964 gh/li-roy/32/head
Remove Type dispatch gh-metadata: pytorch pytorch 21964 gh/li-roy/32/head
Remove Type dispatch gh-metadata: pytorch pytorch 21964 gh/li-roy/32/head
Remove Type dispatch gh-metadata: pytorch pytorch 21964 gh/li-roy/32/head
Remove Type dispatch gh-metadata: pytorch pytorch 21964 gh/li-roy/32/head
Remove Type dispatch gh-metadata: pytorch pytorch 21964 gh/li-roy/32/head
Remove Type dispatch gh-metadata: pytorch pytorch 21964 gh/li-roy/32/head
Remove Type dispatch gh-metadata: pytorch pytorch 21964 gh/li-roy/32/head
Remove Type dispatch gh-metadata: pytorch pytorch 21964 gh/li-roy/32/head
Remove Type dispatch gh-metadata: pytorch pytorch 21964 gh/li-roy/32/head
Remove Type dispatch gh-metadata: pytorch pytorch 21964 gh/li-roy/32/head
Remove Type dispatch gh-metadata: pytorch pytorch 21964 gh/li-roy/32/head
Remove Type dispatch gh-metadata: pytorch pytorch 21964 gh/li-roy/32/head
Remove Type dispatch gh-metadata: pytorch pytorch 21964 gh/li-roy/32/head
Remove Type dispatch gh-metadata: pytorch pytorch 21964 gh/li-roy/32/head
Remove Type dispatch gh-metadata: pytorch pytorch 21964 gh/li-roy/32/head
Remove Type dispatch gh-metadata: pytorch pytorch 21964 gh/li-roy/32/head
Remove Type dispatch gh-metadata: pytorch pytorch 21964 gh/li-roy/32/head
| #pragma once | ||
|
|
||
| // ${generated_comment} | ||
| #include <ATen/ATen.h> |
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.
why do we still need TypeDefault? Is it because you don't want to break extension mechanisms or you still want a place to have all the dispatch code? (i.e. done want to inline them in the methods or whatever?)
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.
All the Type classes are basically just acting as namespaces for now. TypeDefault is for the wrappers and registrations for non backend specific native functions.
gchanan
left a comment
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.
lgtm, I have a couple of outstanding questions.
Remove Type dispatch gh-metadata: pytorch pytorch 21964 gh/li-roy/32/head
Summary: Pull Request resolved: pytorch/pytorch#21964 ghimport-source-id: fdfb555ac4efbf31ae7d2c700a5aa44ad0cc4d7f Test Plan: Imported from OSS Differential Revision: D15897424 Pulled By: li-roy fbshipit-source-id: 3cd6744254e34d70e6875ffde749b5cf959b663c
Summary: Pull Request resolved: pytorch#21964 ghimport-source-id: fdfb555 Test Plan: Imported from OSS Differential Revision: D15897424 Pulled By: li-roy fbshipit-source-id: 3cd6744254e34d70e6875ffde749b5cf959b663c
Stack from ghstack:
Remove Type dispatch and related things that aren't needed anymore. The derived type classes still exist for now, but basically act just as namespaces.
Removed:
Differential Revision: D15897424