explicitly error out in comparison ops when the types don't match (#46399)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/46399
Explicitly error out in comparison/logical ops when the dtypes of the various input/output tensors don't match. See [this comment](https://github.com/pytorch/pytorch/pull/46399#discussion_r505686406) for more details.
fixes #42660
Test Plan: Imported from OSS
Reviewed By: mruberry
Differential Revision: D24335982
Pulled By: bdhirsh
fbshipit-source-id: 3dfb02bcb403dda5bcbf5ed3eae543354ad698b2