[MPS] Add binary operations dtype precedence test case (#87545)
See https://github.com/pytorch/pytorch/pull/84742 and https://github.com/pytorch/pytorch/pull/78319.
The test case tests that
- for the binary operations (add, sub, mul, div),
- for all data types (dtypes),
- for a range of representative values and their combinations,
- for various shapes and ways of creating the test tensors,
the contents and dtype of the result tensor is identical for the MPS and CPU backends.
It adds about 15-18s runtime to `test_mps.py`.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/87545
Approved by: https://github.com/kit1980