Compute correct strides after type promotion (#28253)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/28253
Instead of trying to fix strides after changing dtypes, wait until after
promotion to set them.
fixes: https://github.com/pytorch/pytorch/issues/27824
fixes: https://github.com/pytorch/pytorch/issues/28502
Test Plan: Imported from OSS
Differential Revision: D18124950
Pulled By: nairbv
fbshipit-source-id: e4db90b2a6bb0f5d49cb388e0cd1971303c6badd