[MPS] Handle MPS failures of test_modules.py in common_modules.py (#95334)

- Also cleaned up `test_modules.py` from skipMPS code.
- Added `skipMPS` for unsupported or failing tests on MPS backend in common_modules.py.
   (We'll remove `skipMPS` from those tests once a fix is available for them.)

Pull Request resolved: https://github.com/pytorch/pytorch/pull/95334
Approved by: https://github.com/kulinseth, https://github.com/albanD
This commit is contained in:
Ramin Azarmehr
2023-05-09 03:55:16 +00:00
committed by PyTorch MergeBot
parent 97bb4c2538
commit cecfcf1e17
7 changed files with 127 additions and 54 deletions

View File

@ -1265,7 +1265,7 @@ def get_selected_tests(options) -> List[ShardedTest]:
options.exclude.extend(CPP_TESTS)
if options.mps:
selected_tests = ["test_mps", "test_metal"]
selected_tests = ["test_mps", "test_metal", "test_modules"]
else:
# Exclude all mps tests otherwise
options.exclude.extend(["test_mps", "test_metal"])