[ROCm] Enable test_filtering_env_var (#84100)

The test "test_filtering_env_var" requires CPU device_type along with GPU.
Hence enable both device_types for ROCm, since the PYTORCH_TESTING_DEVICE_ONLY_FOR env var will have the same effect as the code being removed, making the latter redundant anyway:
9e81c0c3f4/.jenkins/pytorch/test.sh (L54-L59)
9e81c0c3f4/torch/testing/_internal/common_device_type.py (L626-L634)

Signed-off-by: Jagadish Krishnamoorthy <jagdish.krishna@gmail.com>

Enables the test disabled by #56178

Pull Request resolved: https://github.com/pytorch/pytorch/pull/84100
Approved by: https://github.com/jeffdaily, https://github.com/malfet
This commit is contained in:
Jagadish Krishnamoorthy
2023-04-04 21:49:49 +00:00
committed by PyTorch MergeBot
parent 51a978fe7b
commit ecf08a0f8b
2 changed files with 1 additions and 7 deletions

View File

@ -18,7 +18,7 @@ import torch
from torch.testing import make_tensor
from torch.testing._internal.common_utils import \
(IS_FBCODE, IS_JETSON, IS_MACOS, IS_SANDCASTLE, IS_WINDOWS, TestCase, run_tests, skipIfRocm, slowTest,
(IS_FBCODE, IS_JETSON, IS_MACOS, IS_SANDCASTLE, IS_WINDOWS, TestCase, run_tests, slowTest,
parametrize, subtest, instantiate_parametrized_tests, dtype_name, TEST_WITH_ROCM)
from torch.testing._internal.common_device_type import \
(PYTORCH_TESTING_DEVICE_EXCEPT_FOR_KEY, PYTORCH_TESTING_DEVICE_ONLY_FOR_KEY, dtypes,
@ -418,7 +418,6 @@ instantiate_device_type_tests(TestTesting, globals())
class TestFrameworkUtils(TestCase):
@skipIfRocm
@unittest.skipIf(IS_WINDOWS, "Skipping because doesn't work for windows")
@unittest.skipIf(IS_SANDCASTLE, "Skipping because doesn't work on sandcastle")
def test_filtering_env_var(self):