Added check for torch.where on CPU that both arguments have same dtype (#30662)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/30662
Cherry picked from: https://github.com/pytorch/pytorch/pull/29081
Test Plan: Imported from OSS
Differential Revision: D18782295
Pulled By: nairbv
fbshipit-source-id: 897ab25ddf8819ca34f5e86c5d3f41debb56cb04
Co-authored-by: ifedan