pytorch
fd8367a7 - [MPS][BE] Introduce xfail (#95045)

Commit
2 years ago
[MPS][BE] Introduce xfail (#95045) Add `mps_ops_modifier` function that adds `unittest.expectedFailure` decorators to the operators that supposed to fail on MPS. This allows one to know whether or not operation will fail, rather than skip it. For example: ``` % python test_mps.py -v -k test_output_match_dot test_output_match_dot_cpu_float32 (__main__.TestConsistencyCPU) ... ok test_output_match_dot_cpu_int16 (__main__.TestConsistencyCPU) ... ok test_output_match_dot_cpu_int32 (__main__.TestConsistencyCPU) ... ok test_output_match_dot_cpu_int64 (__main__.TestConsistencyCPU) ... expected failure test_output_match_dot_cpu_uint8 (__main__.TestConsistencyCPU) ... ok ---------------------------------------------------------------------- Ran 5 tests in 0.175s OK (expected failures=1) ``` Moved a few functions from blocklist to xfail, and find out that some of the functions in the list actually work, for example `torch.long`. Also, allow `None` to be used in `ALLOWLIST` instead of specifying all types explicitly (which aligns with `DecorateInfo` semantic) Eventually, we should get rid of `ALLOWLIST` (i.e. all ops are allowed), keep small `BLOCKLIST` and move the rest to `XFAILLIST` Add step to print HW/SW info before running MPS tests. Fix type promotion in `trace_mps_out` Introduce `MACOS_12_X_XFAILLIST` and skip almost every function for `torch.uint8`, although some of those doesn't make much sense and feels like a regression from PyTorch-1.13 Re-enabled MPS testing on MacOS 12, as runners seems to be available again Pull Request resolved: https://github.com/pytorch/pytorch/pull/95045 Approved by: https://github.com/albanD
Author
Committer
Parents
Loading