Add torch.promote_types function
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/26655
Test Plan: Imported from OSS
Differential Revision: D17556196
Pulled By: nairbv
fbshipit-source-id: eeebce8968bfb2ffd25c066595bc19e5dee6ea6f