Turn default kernels into Meyer singletons (#60568)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/60568
https://github.com/pytorch/pytorch/pull/58661 induced a static
initialization order fiasco as flagged by ASAN strict_init_order=true.
On further inspection, it became clear that it was not necessary for
these to actually be globals initialized at module load time; so
I converted them into Meyer singletons which ensures they get loaded
immediately when another compilation unit requests them.
Signed-off-by: Edward Z. Yang <ezyang@fb.com>
Test Plan: Imported from OSS
Reviewed By: bdhirsh
Differential Revision: D29338019
Pulled By: ezyang
fbshipit-source-id: 282846118df6867277404a1830d0ce39fccaa769