Revert "Revert D24335982: explicitly error out in comparison ops when the types don't match" (#47288)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/47288
This reverts commit b3eb0c86cf21d8dad5744a917c70d846a8715e69.
Test Plan: Imported from OSS
Reviewed By: mruberry
Differential Revision: D24706531
Pulled By: bdhirsh
fbshipit-source-id: f3bf34ddba7882932155819251b6c7dcb5c6b56c