Allow for registration after GlobalInit (#15876)
authorOrion Reblitz-Richardson <orionr@fb.com>
Thu, 10 Jan 2019 17:32:41 +0000 (09:32 -0800)
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>
Thu, 10 Jan 2019 17:35:33 +0000 (09:35 -0800)
commit4edc8273eb223785929c0017caf15c101964d480
treea8ca119089c3657abcfe4cfb783c5c569d1fb6b1
parent9b5ec2a076982c57033f2e345cee3051b55de996
Allow for registration after GlobalInit (#15876)

Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/15876

Build changes made it so some .so libraries are now registered after GlobalInit is called. Although this shouldn't be common, it also shouldn't be explicitly excluded. These changes allow for late Caffe2 registration, but also warn in that case.

Reviewed By: kuttas

Differential Revision: D13608186

fbshipit-source-id: 0ca7bcd32516d374077db0c2548cf8c28ccdd5f6
caffe2/core/init.h
caffe2/core/init_test.cc