Fix torch.tensor dtype inference (#38030)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/38030
Resolves: https://github.com/pytorch/pytorch/issues/36834
Test Plan: Imported from OSS
Differential Revision: D21462729
Pulled By: anjali411
fbshipit-source-id: 456b01e96fc3eac0ddf572703636459e05649316