Skip to content

Port of Caffe2 registry to ATen.#7139

Closed
ezyang wants to merge 1 commit intopytorch:masterfrom
ezyang:pr/caffe2-registry
Closed

Port of Caffe2 registry to ATen.#7139
ezyang wants to merge 1 commit intopytorch:masterfrom
ezyang:pr/caffe2-registry

Conversation

@ezyang
Copy link
Contributor

@ezyang ezyang commented May 1, 2018

One thing C10 needs is the ability for separate compilation units (a.k.a. dynamic libraries) to register, at static initialization time, some data which we can subsequently look up in a map. This is what Registry provides. I'm personally using this to help split apart CPU/CUDA (but make it so that functions available from the CPU interface "grow" more functionality when you dlopen the CUDA library).

It needs more docs; right now it's a straight copy paste from Caffe2. It does NOT handle namespaces correctly; @pietern has a patch to fix this stacked on top of this.

Signed-off-by: Edward Z. Yang ezyang@fb.com

Signed-off-by: Edward Z. Yang <ezyang@fb.com>
@ezyang
Copy link
Contributor Author

ezyang commented May 1, 2018

Requested by @pietern

Copy link
Contributor

@gchanan gchanan left a comment

Choose a reason for hiding this comment

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

Should we merge this with the context?

@pietern
Copy link
Contributor

pietern commented May 1, 2018

Thanks @ezyang!

@ezyang
Copy link
Contributor Author

ezyang commented May 1, 2018

@gchanan and I had offline conversation, and ATen/Context.h is doing something different than the Registry. (This header needs more docs but we'll put it in afterwards.)

@pietern
Copy link
Contributor

pietern commented May 4, 2018

@ezyang @gchanan Is this ready to go?

@ezyang
Copy link
Contributor Author

ezyang commented May 7, 2018

I'm OK with this but I can't approve my own PR.

@ezyang
Copy link
Contributor Author

ezyang commented May 13, 2018

Obsoleted by cpu/gpu split

@ezyang ezyang closed this May 13, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants