From 1d25fe946266affc7a7a34fa6426a345a681058c Mon Sep 17 00:00:00 2001 From: jithunnair-amd Date: Mon, 15 Oct 2018 12:17:30 -0500 Subject: [PATCH 1/3] Enable more test_sparse tests passing with whiterabbit --- test/test_sparse.py | 8 -------- test/test_torch.py | 1 - 2 files changed, 9 deletions(-) diff --git a/test/test_sparse.py b/test/test_sparse.py index 30796466026b5..31c568b4ed28b 100644 --- a/test/test_sparse.py +++ b/test/test_sparse.py @@ -213,7 +213,6 @@ def test_ctor_size_checks(self): RuntimeError, lambda: self.SparseTensor(indices, values, torch.Size([2, 4, 2, 1]))) - @skipIfRocm def test_to_dense(self): def test_tensor(x, res): x.to_dense() # Tests triple to_dense for memory corruption @@ -255,7 +254,6 @@ def test_tensor(x, res): res = self.ValueTensor(3, 4, 5, 0) test_tensor(x, res) - @skipIfRocm def test_shared(self): i = self.IndexTensor([[2]]) v = self.ValueTensor([5]) @@ -271,7 +269,6 @@ def test_shared(self): i[0][0] = 0 self.assertEqual(self.ValueTensor(3, 0), self.safeToDense(x)) - @skipIfRocm def test_to_dense_hybrid(self): def test_tensor(x, res): x.to_dense() # Tests double to_dense for memory corruption @@ -1167,7 +1164,6 @@ def test_log1p(self): device=self.device) self._test_log1p_tensor(input, torch.zeros([5, 6, 0])) - @skipIfRocm def test_sparse_add_coalesce(self): i = self.IndexTensor([[1, 2, 1]]) v = self.ValueTensor([3, 4, 5]) @@ -1263,7 +1259,6 @@ def test_shape(sparse_dims, nnz, with_size): test_shape(3, 0, [100, 100, 0]) @cpu_only # not really, but we only really want to run this once - @skipIfRocm def test_factory(self): for test_empty_tensor in [True, False]: if test_empty_tensor: @@ -1500,7 +1495,6 @@ def test_tensor(indices, values, indices_equal, values_equal): test_tensor(indices, values, False, True) # An empty tensor's data_ptr is always equal to 0 @cpu_only # just run once, we test both cpu and cuda - @skipIfRocm def test_constructor_device_legacy(self): i = torch.tensor([[0, 1, 1], [2, 0, 2]]) v = torch.tensor([3., 4., 5.]) @@ -1557,7 +1551,6 @@ def test_is_sparse(self): x = self.SparseTensor(1, 0) self.assertTrue(x.is_sparse) - @skipIfRocm def test_resize_as(self): def do_test(t): y = t.new().resize_as_(t).zero_() @@ -1645,7 +1638,6 @@ def test_resize(self): self._test_resize_shape([1, 1], [1, 2, 3], [2, 2, 3], [1, 1], [1, 2, 0], [2, 2, 0]) - @skipIfRocm def test_is_nonzero(self): self.assertTrue(torch.sparse_coo_tensor(([0],), 1., (1,)).is_nonzero()) self.assertFalse(torch.sparse_coo_tensor(([0],), 0., (1,)).is_nonzero()) diff --git a/test/test_torch.py b/test/test_torch.py index 1aeda1768e0d5..2378afd3f7c03 100644 --- a/test/test_torch.py +++ b/test/test_torch.py @@ -4305,7 +4305,6 @@ def _test_trtrs(self, cast): self.assertEqual(res1, tb, 0) @skipIfNoLapack - @skipIfRocm def test_trtrs(self): self._test_trtrs(self, lambda t: t) From 3a1ec6fe3a853374cadb4916de4437a016ab6bc1 Mon Sep 17 00:00:00 2001 From: jithunnair-amd Date: Mon, 15 Oct 2018 15:11:00 -0500 Subject: [PATCH 2/3] Skip test_resize_as but not test_resize --- test/test_sparse.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/test_sparse.py b/test/test_sparse.py index 31c568b4ed28b..e54b0f0088e29 100644 --- a/test/test_sparse.py +++ b/test/test_sparse.py @@ -1551,6 +1551,7 @@ def test_is_sparse(self): x = self.SparseTensor(1, 0) self.assertTrue(x.is_sparse) + @skipIfRocm def test_resize_as(self): def do_test(t): y = t.new().resize_as_(t).zero_() @@ -1563,7 +1564,6 @@ def do_test(t): do_test(self.SparseTensor(3, 0)) do_test(self.SparseTensor(3, 3)) - @skipIfRocm def _test_resize_shape(self, x_i, x_v, x_size, y_i, y_v, y_size): x_v_numel = torch.zeros(x_v).numel() y_v_numel = torch.zeros(y_v).numel() From 7dec6a413209a9ddff0cb46eee55aa28c56da6fc Mon Sep 17 00:00:00 2001 From: jithunnair-amd Date: Mon, 15 Oct 2018 16:58:35 -0500 Subject: [PATCH 3/3] Skip test_sparse_add_coalesce because it causes CI to hang(?) --- test/test_sparse.py | 1 + 1 file changed, 1 insertion(+) diff --git a/test/test_sparse.py b/test/test_sparse.py index e54b0f0088e29..808f1f36d7f65 100644 --- a/test/test_sparse.py +++ b/test/test_sparse.py @@ -1164,6 +1164,7 @@ def test_log1p(self): device=self.device) self._test_log1p_tensor(input, torch.zeros([5, 6, 0])) + @skipIfRocm def test_sparse_add_coalesce(self): i = self.IndexTensor([[1, 2, 1]]) v = self.ValueTensor([3, 4, 5])