pytorch/caffe2/python/pybind_state_registry.cc
Bram Wasti f2f6e6c0e8 Add registry to pybind_state (#10759)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/10759

Adding a basic registry pattern to pybindstate so that we can have separate 'cc' files register module updates.  This is substantially cleaner than using multiple pybind modules (which have been known to cause bugs)

Reviewed By: bddppq

Differential Revision: D9441878

fbshipit-source-id: af9e9e98385e92b58ca50e935678328c62684d8e
2018-08-24 17:25:02 -07:00

12 lines
236 B
C++

#include "caffe2/python/pybind_state_registry.h"
namespace caffe2 {
namespace python {
namespace py = pybind11;
CAFFE_DEFINE_REGISTRY(PybindAdditionRegistry, PybindAddition, py::module&);
} // namespace python
} // namespace caffe2