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.
| #define C10_DECLARE_TYPED_REGISTRY( \ | ||
| 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? |
facebook-github-bot
left a comment
There was a problem hiding this comment.
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.