Add visibility to registry class to fix ubsan error (#16792)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/16792
fix
Reviewed By: ezyang
Differential Revision: D13970381
fbshipit-source-id: 763db24b8a98a2757a63b77c70c8c68ba47f31e6