More scaffolding for LegacyTHDispatch. (#14852)
Summary:
1) at::functions are now also exposed in the at::legacy::th namespace and we move relevant calls over to use them (to avoid merge conflicts)
2) LegacyTHDispatch now handles device-type initialization
3) We generate derived LegacyTHDispatchers, e.g. THLegacyCPULongDispatcher, although they are currently empty.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/14852
Reviewed By: ezyang
Differential Revision:
D13360852
Pulled By: gchanan
fbshipit-source-id:
af6705aeba3593ea5dba9bfc62890e5257bc81f8