Skip to content

Commit ed79351

Browse files
lcskrishnaiotamudelta
authored andcommitted
enabled min/max tests in test_cuda (#236)
1 parent cfe0c95 commit ed79351

File tree

1 file changed

+5
-9
lines changed

1 file changed

+5
-9
lines changed

test/test_cuda.py

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -340,8 +340,8 @@ def tmp(t):
340340
('kthvalue', small_3d_unique, lambda t: [3, -1], 'neg_dim'),
341341
('lerp', small_3d, lambda t: [small_3d(t), 0.3]),
342342
('max', small_3d_unique, lambda t: []),
343-
('max', small_3d_unique, lambda t: [1], 'dim', types, False, skipIfRocm),
344-
('max', small_3d_unique, lambda t: [-1], 'neg_dim', types, False, skipIfRocm),
343+
('max', small_3d_unique, lambda t: [1], 'dim'),
344+
('max', small_3d_unique, lambda t: [-1], 'neg_dim'),
345345
('max', medium_2d, lambda t: [medium_2d(t)], 'elementwise'),
346346
('min', small_3d_unique, lambda t: []),
347347
('min', small_3d_unique, lambda t: [1], 'dim', types, False, skipIfRocm),
@@ -350,9 +350,9 @@ def tmp(t):
350350
('mean', small_3d, lambda t: []),
351351
('mean', small_3d, lambda t: [-1], 'neg_dim'),
352352
('mean', small_3d, lambda t: [1], 'dim'),
353-
('mode', small_3d, lambda t: [], '', types, False, skipIfRocm),
354-
('mode', small_3d, lambda t: [1], 'dim', types, False, skipIfRocm),
355-
('mode', small_3d, lambda t: [-1], 'neg_dim', types, False, skipIfRocm),
353+
('mode', small_3d, lambda t: []),
354+
('mode', small_3d, lambda t: [1], 'dim'),
355+
('mode', small_3d, lambda t: [-1], 'neg_dim'),
356356
('mvlgamma', lambda t: tensor_clamp(small_2d(t), 0.1, 10), lambda t: [1], '2d_p=1', float_types_no_half),
357357
('mvlgamma', lambda t: tensor_clamp(small_2d(t), 0.6, 10), lambda t: [2], '2d_p=2', float_types_no_half),
358358
('remainder', small_3d, lambda t: [3], 'value', types, False, "skipIfRocm:HalfTensor"),
@@ -957,7 +957,6 @@ def test_broadcast_cpu(self):
957957
def test_broadcast_gpu(self):
958958
self._test_broadcast(torch.randn(5, 5).cuda())
959959

960-
@skipIfRocm
961960
def test_min_max_nan(self):
962961
tests = [(lambda x: x.min(), 'min'),
963962
(lambda x: x.max(), 'max'),
@@ -1723,7 +1722,6 @@ def test_tensor_scatterAdd(self):
17231722
def test_tensor_scatterFill(self):
17241723
TestTorch._test_scatter_base(self, lambda t: t.cuda(), 'scatter_', True, test_bounds=False)
17251724

1726-
@skipIfRocm
17271725
def test_min_max_inits(self):
17281726
# Testing if THC_reduceAll received the correct index initialization.
17291727
# This affects the result of THC_reduceAll operations at extreme values
@@ -1737,11 +1735,9 @@ def test_min_max_inits(self):
17371735
_, v = y.min(dim=0)
17381736
self.assertEqual(v, expected)
17391737

1740-
@skipIfRocm
17411738
def test_max_with_inf(self):
17421739
TestTorch._test_max_with_inf(self, (torch.half, torch.float, torch.double), 'cuda')
17431740

1744-
@skipIfRocm
17451741
def test_min_with_inf(self):
17461742
TestTorch._test_min_with_inf(self, (torch.half, torch.float, torch.double), 'cuda')
17471743

0 commit comments

Comments
 (0)