Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable mps unit testing #66

Merged
merged 1 commit into from
Jul 19, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 3 additions & 5 deletions torch/testing/_internal/common_device_type.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
skipCUDANonDefaultStreamIf, TEST_WITH_ASAN, TEST_WITH_UBSAN, TEST_WITH_TSAN, \
IS_SANDCASTLE, IS_FBCODE, IS_REMOTE_GPU, IS_WINDOWS, DeterministicGuard, \
_TestParametrizer, compose_parametrize_fns, dtype_name, \
TEST_WITH_MIOPEN_SUGGEST_NHWC, NATIVE_DEVICES
TEST_WITH_MIOPEN_SUGGEST_NHWC, NATIVE_DEVICES, TEST_WITH_MPS
from torch.testing._internal.common_cuda import _get_torch_cuda_version, TEST_CUSPARSE_GENERIC
from torch.testing._internal.common_dtype import get_all_dtypes

Expand Down Expand Up @@ -530,10 +530,8 @@ def get_device_type_test_bases():
test_bases.append(CPUTestBase)
if torch.cuda.is_available():
test_bases.append(CUDATestBase)
# Disable MPS testing in generic device testing temporarily while we're
# ramping up support.
# elif torch.backends.mps.is_available():
# test_bases.append(MPSTestBase)
elif torch.backends.mps.is_available():
test_bases.append(MPSTestBase)

return test_bases

Expand Down
1 change: 1 addition & 0 deletions torch/testing/_internal/common_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -787,6 +787,7 @@ def _check_module_exists(name: str) -> bool:
TEST_WITH_TSAN = os.getenv('PYTORCH_TEST_WITH_TSAN', '0') == '1'
TEST_WITH_UBSAN = os.getenv('PYTORCH_TEST_WITH_UBSAN', '0') == '1'
TEST_WITH_ROCM = os.getenv('PYTORCH_TEST_WITH_ROCM', '0') == '1'
TEST_WITH_MPS = os.getenv('PYTORCH_TEST_WITH_MPS', '0') == '1'

# TODO: Remove PYTORCH_MIOPEN_SUGGEST_NHWC once ROCm officially supports NHWC in MIOpen
# See #64427
Expand Down