-
Notifications
You must be signed in to change notification settings - Fork 24.4k
Move registry fully to c10 #12077
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
Move registry fully to c10 #12077
Conversation
// TODO(jiayq): old versions of NVCC does not handle make_unique well | ||
// so we are forced to use a unique_ptr constructor here. Check if it is | ||
// fine to use make_unique in the future. | ||
// return make_unique<DerivedType>(args...); |
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
RegistryName, SrcType, ObjectType, PtrType, ...) \ | ||
CAFFE2_API Registry<SrcType, PtrType<ObjectType>, __VA_ARGS__>* \ | ||
C10_IMPORT ::c10::Registry<SrcType, PtrType<ObjectType>, ##__VA_ARGS__>* \ |
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
So... what's the directory structure plan for c10. Can we put all "public" headers at the top level? When does something go in "util"? |
re directory structure, here is what I am thinking (for now):
Does that make sense? |
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.
Yangqing has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
@pytorchbot retest this please - build seems to have timed out on windows. |
Summary: This does 6 things: - add c10/util/Registry.h as the unified registry util - cleaned up some APIs such as export condition - fully remove aten/core/registry.h - fully remove caffe2/core/registry.h - remove a bogus aten/registry.h - unifying all macros - set up registry testing in c10 Also, an important note that we used to mark the templated Registry class as EXPORT - this should not happen, because one should almost never export a template class. This PR fixes that. Pull Request resolved: pytorch/pytorch#12077 Reviewed By: ezyang Differential Revision: D10050771 Pulled By: Yangqing fbshipit-source-id: 417b249b49fed6a67956e7c6b6d22374bcee24cf
This does 6 things:
Also, an important note that we used to mark the templated Registry class as EXPORT - this should not happen, because one should almost never export a template class. This PR fixes that.