From d8669a2c7eca95dd1a9b7180a4d873fde40bbf9b Mon Sep 17 00:00:00 2001 From: Johannes M Dieterich Date: Fri, 12 Apr 2019 21:42:10 -0700 Subject: [PATCH] Enable working ROCm tests (#19169) Summary: Enable multi-GPU tests that work with ROCm 2.2. Have been run three times on CI to ensure stability. While there, remove skipIfRocm annotations for tests that depend on MAGMA. They still skip but now for the correct reason (no MAGMA) to improve our diagnostics. Pull Request resolved: https://github.com/pytorch/pytorch/pull/19169 Differential Revision: D14924812 Pulled By: bddppq fbshipit-source-id: 8b88f58bba58a08ddcd439e899a0abc6198fef64 --- test/test_cuda.py | 5 ----- test/test_nn.py | 5 ----- 2 files changed, 10 deletions(-) diff --git a/test/test_cuda.py b/test/test_cuda.py index 056652d..12c5d4e 100644 --- a/test/test_cuda.py +++ b/test/test_cuda.py @@ -2108,7 +2108,6 @@ class TestCuda(TestCase): def _select_broadcastable_dims(dims_full=None): return _TestTorchMixin._select_broadcastable_dims(dims_full) - @skipIfRocm @unittest.skipIf(not TEST_MAGMA, "no MAGMA library detected") def test_inverse(self): _TestTorchMixin._test_inverse(self, lambda t: t.cuda()) @@ -2355,17 +2354,14 @@ class TestCuda(TestCase): def test_kthvalue(self): _TestTorchMixin._test_kthvalue(self, device='cuda') - @skipIfRocm @unittest.skipIf(not TEST_MAGMA, "no MAGMA library detected") def test_lu(self): _TestTorchMixin._test_lu(self, lambda t: t.cuda()) - @skipIfRocm @unittest.skipIf(not TEST_MAGMA, "no MAGMA library detected") def test_lu_solve(self): _TestTorchMixin._test_lu_solve(self, lambda t: t.cuda()) - @skipIfRocm @unittest.skipIf(not TEST_MAGMA, "no MAGMA library detected") def test_lu_unpack(self): _TestTorchMixin._test_lu_unpack(self, lambda t: t.cuda()) @@ -2547,7 +2543,6 @@ class TestCuda(TestCase): @unittest.skipIf(not TEST_NUMPY, "NumPy not found") @unittest.skipIf(not TEST_MAGMA, "no MAGMA library detected") - @skipIfRocm def test_norm(self): _TestTorchMixin._test_norm(self, device='cuda') diff --git a/test/test_nn.py b/test/test_nn.py index df8e645..c093502 100644 --- a/test/test_nn.py +++ b/test/test_nn.py @@ -2068,7 +2068,6 @@ class TestNN(NNTestCase): self._test_embedding_dense_grad("cpu") @unittest.skipIf(not TEST_CUDA, "CUDA unavailable") - @skipIfRocm def test_embedding_dense_grad_cuda(self): self._test_embedding_dense_grad("cuda") @@ -2234,7 +2233,6 @@ class TestNN(NNTestCase): self._test_softmax_backward(torch.device('cpu')) @unittest.skipIf(not TEST_CUDA, "CUDA unavailable") - @skipIfRocm def test_softmax_backward_cuda(self): self._test_softmax_backward(torch.device('cuda')) @@ -3587,7 +3585,6 @@ class TestNN(NNTestCase): _assertGradAndGradgradChecks(self, lambda y: dp.scatter(y, (0, 1)), (x,)) @unittest.skipIf(not TEST_MULTIGPU, "multi-GPU not supported") - @skipIfRocm def test_scatter_cpu(self): self._test_scatter(torch.randn(4, 4)) @@ -3960,7 +3957,6 @@ class TestNN(NNTestCase): self.assertEqual(out, l(i)) @unittest.skipIf(not TEST_MULTIGPU, "multi-GPU not supported") - @skipIfRocm def test_data_parallel_model_device(self): r"""Test device[0] check at forward time. """ @@ -4101,7 +4097,6 @@ class TestNN(NNTestCase): out = dp.data_parallel(l, i) @unittest.skipIf(not TEST_MULTIGPU, "multi-GPU not supported") - @skipIfRocm def test_data_parallel_sparse(self): l = nn.Embedding(10, 5, sparse=True).to("cuda:1") i = torch.randint(10, (20, 5), device="cuda:1", dtype=torch.long) -- 2.7.4