Skip to content

Commit df174f8

Browse files
TEST: enabled third_party cupy tests for distributions check (#347)
* TEST: enabled third_party cupy tests for distributions check
1 parent 41aa579 commit df174f8

File tree

3 files changed

+17
-56
lines changed

3 files changed

+17
-56
lines changed

tests/skipped_tests.tbl

Lines changed: 6 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1254,30 +1254,12 @@ tests/third_party/cupy/manipulation_tests/test_dims.py::TestInvalidBroadcast_par
12541254
tests/third_party/cupy/manipulation_tests/test_dims.py::TestInvalidBroadcast_param_2_{shapes=[(3, 2), (3, 4)]}::test_invalid_broadcast_arrays
12551255
tests/third_party/cupy/manipulation_tests/test_dims.py::TestInvalidBroadcast_param_3_{shapes=[(0,), (2,)]}::test_invalid_broadcast
12561256
tests/third_party/cupy/manipulation_tests/test_dims.py::TestInvalidBroadcast_param_3_{shapes=[(0,), (2,)]}::test_invalid_broadcast_arrays
1257-
tests/third_party/cupy/random_tests/test_distributions.py::TestDistributionsBeta_param_0_{a_shape=(), b_shape=(), dtype=float64, shape=(4, 3, 2)}::test_beta
1258-
tests/third_party/cupy/random_tests/test_distributions.py::TestDistributionsBeta_param_10_{a_shape=(), b_shape=(3, 2), dtype=float16, shape=(4, 3, 2)}::test_beta
1259-
tests/third_party/cupy/random_tests/test_distributions.py::TestDistributionsBeta_param_11_{a_shape=(), b_shape=(3, 2), dtype=float16, shape=(3, 2)}::test_beta
1260-
tests/third_party/cupy/random_tests/test_distributions.py::TestDistributionsBeta_param_12_{a_shape=(3, 2), b_shape=(), dtype=float64, shape=(4, 3, 2)}::test_beta
1261-
tests/third_party/cupy/random_tests/test_distributions.py::TestDistributionsBeta_param_13_{a_shape=(3, 2), b_shape=(), dtype=float64, shape=(3, 2)}::test_beta
1262-
tests/third_party/cupy/random_tests/test_distributions.py::TestDistributionsBeta_param_14_{a_shape=(3, 2), b_shape=(), dtype=float32, shape=(4, 3, 2)}::test_beta
1263-
tests/third_party/cupy/random_tests/test_distributions.py::TestDistributionsBeta_param_15_{a_shape=(3, 2), b_shape=(), dtype=float32, shape=(3, 2)}::test_beta
1264-
tests/third_party/cupy/random_tests/test_distributions.py::TestDistributionsBeta_param_16_{a_shape=(3, 2), b_shape=(), dtype=float16, shape=(4, 3, 2)}::test_beta
1265-
tests/third_party/cupy/random_tests/test_distributions.py::TestDistributionsBeta_param_17_{a_shape=(3, 2), b_shape=(), dtype=float16, shape=(3, 2)}::test_beta
1266-
tests/third_party/cupy/random_tests/test_distributions.py::TestDistributionsBeta_param_18_{a_shape=(3, 2), b_shape=(3, 2), dtype=float64, shape=(4, 3, 2)}::test_beta
1267-
tests/third_party/cupy/random_tests/test_distributions.py::TestDistributionsBeta_param_19_{a_shape=(3, 2), b_shape=(3, 2), dtype=float64, shape=(3, 2)}::test_beta
1268-
tests/third_party/cupy/random_tests/test_distributions.py::TestDistributionsBeta_param_1_{a_shape=(), b_shape=(), dtype=float64, shape=(3, 2)}::test_beta
1269-
tests/third_party/cupy/random_tests/test_distributions.py::TestDistributionsBeta_param_20_{a_shape=(3, 2), b_shape=(3, 2), dtype=float32, shape=(4, 3, 2)}::test_beta
1270-
tests/third_party/cupy/random_tests/test_distributions.py::TestDistributionsBeta_param_21_{a_shape=(3, 2), b_shape=(3, 2), dtype=float32, shape=(3, 2)}::test_beta
1271-
tests/third_party/cupy/random_tests/test_distributions.py::TestDistributionsBeta_param_22_{a_shape=(3, 2), b_shape=(3, 2), dtype=float16, shape=(4, 3, 2)}::test_beta
1272-
tests/third_party/cupy/random_tests/test_distributions.py::TestDistributionsBeta_param_23_{a_shape=(3, 2), b_shape=(3, 2), dtype=float16, shape=(3, 2)}::test_beta
1273-
tests/third_party/cupy/random_tests/test_distributions.py::TestDistributionsBeta_param_2_{a_shape=(), b_shape=(), dtype=float32, shape=(4, 3, 2)}::test_beta
1274-
tests/third_party/cupy/random_tests/test_distributions.py::TestDistributionsBeta_param_3_{a_shape=(), b_shape=(), dtype=float32, shape=(3, 2)}::test_beta
1275-
tests/third_party/cupy/random_tests/test_distributions.py::TestDistributionsBeta_param_4_{a_shape=(), b_shape=(), dtype=float16, shape=(4, 3, 2)}::test_beta
1276-
tests/third_party/cupy/random_tests/test_distributions.py::TestDistributionsBeta_param_5_{a_shape=(), b_shape=(), dtype=float16, shape=(3, 2)}::test_beta
1277-
tests/third_party/cupy/random_tests/test_distributions.py::TestDistributionsBeta_param_6_{a_shape=(), b_shape=(3, 2), dtype=float64, shape=(4, 3, 2)}::test_beta
1278-
tests/third_party/cupy/random_tests/test_distributions.py::TestDistributionsBeta_param_7_{a_shape=(), b_shape=(3, 2), dtype=float64, shape=(3, 2)}::test_beta
1279-
tests/third_party/cupy/random_tests/test_distributions.py::TestDistributionsBeta_param_8_{a_shape=(), b_shape=(3, 2), dtype=float32, shape=(4, 3, 2)}::test_beta
1280-
tests/third_party/cupy/random_tests/test_distributions.py::TestDistributionsBeta_param_9_{a_shape=(), b_shape=(3, 2), dtype=float32, shape=(3, 2)}::test_beta
1257+
tests/third_party/cupy/random_tests/test_distributions.py::TestDistributionsBeta_param_0_{a_shape=(), b_shape=(), shape=(4, 3, 2)}::test_beta
1258+
tests/third_party/cupy/random_tests/test_distributions.py::TestDistributionsBeta_param_1_{a_shape=(), b_shape=(), shape=(3, 2)}::test_beta
1259+
tests/third_party/cupy/random_tests/test_distributions.py::TestDistributionsBeta_param_2_{a_shape=(), b_shape=(3, 2), shape=(4, 3, 2)}::test_beta
1260+
tests/third_party/cupy/random_tests/test_distributions.py::TestDistributionsBeta_param_3_{a_shape=(), b_shape=(3, 2), shape=(3, 2)}::test_beta
1261+
tests/third_party/cupy/random_tests/test_distributions.py::TestDistributionsBeta_param_4_{a_shape=(3, 2), b_shape=(), shape=(4, 3, 2)}::test_beta
1262+
tests/third_party/cupy/random_tests/test_distributions.py::TestDistributionsBeta_param_5_{a_shape=(3, 2), b_shape=(), shape=(3, 2)}::test_beta
12811263
tests/third_party/cupy/random_tests/test_distributions.py::TestDistributionsChisquare_param_0_{df_shape=(), shape=(4, 3, 2)}::test_chisquare
12821264
tests/third_party/cupy/random_tests/test_distributions.py::TestDistributionsChisquare_param_1_{df_shape=(), shape=(3, 2)}::test_chisquare
12831265
tests/third_party/cupy/random_tests/test_distributions.py::TestDistributionsChisquare_param_2_{df_shape=(3, 2), shape=(4, 3, 2)}::test_chisquare

tests/skipped_tests_gpu.tbl

Lines changed: 6 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1499,30 +1499,12 @@ tests/third_party/cupy/math_tests/test_trigonometric.py::TestUnwrap::test_unwrap
14991499
tests/third_party/cupy/math_tests/test_trigonometric.py::TestUnwrap::test_unwrap_2dim_with_axis
15001500
tests/third_party/cupy/math_tests/test_trigonometric.py::TestUnwrap::test_unwrap_2dim_with_discont
15011501
tests/third_party/cupy/math_tests/test_trigonometric.py::TestUnwrap::test_unwrap_2dim_without_axis
1502-
tests/third_party/cupy/random_tests/test_distributions.py::TestDistributionsBeta_param_0_{a_shape=(), b_shape=(), dtype=float64, shape=(4, 3, 2)}::test_beta
1503-
tests/third_party/cupy/random_tests/test_distributions.py::TestDistributionsBeta_param_10_{a_shape=(), b_shape=(3, 2), dtype=float16, shape=(4, 3, 2)}::test_beta
1504-
tests/third_party/cupy/random_tests/test_distributions.py::TestDistributionsBeta_param_11_{a_shape=(), b_shape=(3, 2), dtype=float16, shape=(3, 2)}::test_beta
1505-
tests/third_party/cupy/random_tests/test_distributions.py::TestDistributionsBeta_param_12_{a_shape=(3, 2), b_shape=(), dtype=float64, shape=(4, 3, 2)}::test_beta
1506-
tests/third_party/cupy/random_tests/test_distributions.py::TestDistributionsBeta_param_13_{a_shape=(3, 2), b_shape=(), dtype=float64, shape=(3, 2)}::test_beta
1507-
tests/third_party/cupy/random_tests/test_distributions.py::TestDistributionsBeta_param_14_{a_shape=(3, 2), b_shape=(), dtype=float32, shape=(4, 3, 2)}::test_beta
1508-
tests/third_party/cupy/random_tests/test_distributions.py::TestDistributionsBeta_param_15_{a_shape=(3, 2), b_shape=(), dtype=float32, shape=(3, 2)}::test_beta
1509-
tests/third_party/cupy/random_tests/test_distributions.py::TestDistributionsBeta_param_16_{a_shape=(3, 2), b_shape=(), dtype=float16, shape=(4, 3, 2)}::test_beta
1510-
tests/third_party/cupy/random_tests/test_distributions.py::TestDistributionsBeta_param_17_{a_shape=(3, 2), b_shape=(), dtype=float16, shape=(3, 2)}::test_beta
1511-
tests/third_party/cupy/random_tests/test_distributions.py::TestDistributionsBeta_param_18_{a_shape=(3, 2), b_shape=(3, 2), dtype=float64, shape=(4, 3, 2)}::test_beta
1512-
tests/third_party/cupy/random_tests/test_distributions.py::TestDistributionsBeta_param_19_{a_shape=(3, 2), b_shape=(3, 2), dtype=float64, shape=(3, 2)}::test_beta
1513-
tests/third_party/cupy/random_tests/test_distributions.py::TestDistributionsBeta_param_1_{a_shape=(), b_shape=(), dtype=float64, shape=(3, 2)}::test_beta
1514-
tests/third_party/cupy/random_tests/test_distributions.py::TestDistributionsBeta_param_20_{a_shape=(3, 2), b_shape=(3, 2), dtype=float32, shape=(4, 3, 2)}::test_beta
1515-
tests/third_party/cupy/random_tests/test_distributions.py::TestDistributionsBeta_param_21_{a_shape=(3, 2), b_shape=(3, 2), dtype=float32, shape=(3, 2)}::test_beta
1516-
tests/third_party/cupy/random_tests/test_distributions.py::TestDistributionsBeta_param_22_{a_shape=(3, 2), b_shape=(3, 2), dtype=float16, shape=(4, 3, 2)}::test_beta
1517-
tests/third_party/cupy/random_tests/test_distributions.py::TestDistributionsBeta_param_23_{a_shape=(3, 2), b_shape=(3, 2), dtype=float16, shape=(3, 2)}::test_beta
1518-
tests/third_party/cupy/random_tests/test_distributions.py::TestDistributionsBeta_param_2_{a_shape=(), b_shape=(), dtype=float32, shape=(4, 3, 2)}::test_beta
1519-
tests/third_party/cupy/random_tests/test_distributions.py::TestDistributionsBeta_param_3_{a_shape=(), b_shape=(), dtype=float32, shape=(3, 2)}::test_beta
1520-
tests/third_party/cupy/random_tests/test_distributions.py::TestDistributionsBeta_param_4_{a_shape=(), b_shape=(), dtype=float16, shape=(4, 3, 2)}::test_beta
1521-
tests/third_party/cupy/random_tests/test_distributions.py::TestDistributionsBeta_param_5_{a_shape=(), b_shape=(), dtype=float16, shape=(3, 2)}::test_beta
1522-
tests/third_party/cupy/random_tests/test_distributions.py::TestDistributionsBeta_param_6_{a_shape=(), b_shape=(3, 2), dtype=float64, shape=(4, 3, 2)}::test_beta
1523-
tests/third_party/cupy/random_tests/test_distributions.py::TestDistributionsBeta_param_7_{a_shape=(), b_shape=(3, 2), dtype=float64, shape=(3, 2)}::test_beta
1524-
tests/third_party/cupy/random_tests/test_distributions.py::TestDistributionsBeta_param_8_{a_shape=(), b_shape=(3, 2), dtype=float32, shape=(4, 3, 2)}::test_beta
1525-
tests/third_party/cupy/random_tests/test_distributions.py::TestDistributionsBeta_param_9_{a_shape=(), b_shape=(3, 2), dtype=float32, shape=(3, 2)}::test_beta
1502+
tests/third_party/cupy/random_tests/test_distributions.py::TestDistributionsBeta_param_0_{a_shape=(), b_shape=(), shape=(4, 3, 2)}::test_beta
1503+
tests/third_party/cupy/random_tests/test_distributions.py::TestDistributionsBeta_param_1_{a_shape=(), b_shape=(), shape=(3, 2)}::test_beta
1504+
tests/third_party/cupy/random_tests/test_distributions.py::TestDistributionsBeta_param_2_{a_shape=(), b_shape=(3, 2), shape=(4, 3, 2)}::test_beta
1505+
tests/third_party/cupy/random_tests/test_distributions.py::TestDistributionsBeta_param_3_{a_shape=(), b_shape=(3, 2), shape=(3, 2)}::test_beta
1506+
tests/third_party/cupy/random_tests/test_distributions.py::TestDistributionsBeta_param_4_{a_shape=(3, 2), b_shape=(), shape=(4, 3, 2)}::test_beta
1507+
tests/third_party/cupy/random_tests/test_distributions.py::TestDistributionsBeta_param_5_{a_shape=(3, 2), b_shape=(), shape=(3, 2)}::test_beta
15261508
tests/third_party/cupy/random_tests/test_distributions.py::TestDistributionsChisquare_param_0_{df_shape=(), shape=(4, 3, 2)}::test_chisquare
15271509
tests/third_party/cupy/random_tests/test_distributions.py::TestDistributionsChisquare_param_1_{df_shape=(), shape=(3, 2)}::test_chisquare
15281510
tests/third_party/cupy/random_tests/test_distributions.py::TestDistributionsChisquare_param_2_{df_shape=(3, 2), shape=(4, 3, 2)}::test_chisquare

tests/third_party/cupy/random_tests/test_distributions.py

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -29,19 +29,17 @@ def check_distribution(self, dist_name, params):
2929
'shape': [(4, 3, 2), (3, 2)],
3030
'a_shape': [(), (3, 2)],
3131
'b_shape': [(), (3, 2)],
32-
'dtype': _float_dtypes, # to escape timeout
3332
})
3433
)
3534
@testing.gpu
3635
class TestDistributionsBeta(RandomDistributionsTestCase):
3736

3837
@helper.for_dtypes_combination(
39-
_float_dtypes, names=['a_dtype', 'b_dtype'])
38+
_regular_float_dtypes, names=['a_dtype', 'b_dtype'])
4039
def test_beta(self, a_dtype, b_dtype):
4140
a = numpy.full(self.a_shape, 3, dtype=a_dtype)
4241
b = numpy.full(self.b_shape, 3, dtype=b_dtype)
43-
self.check_distribution('beta',
44-
{'a': a, 'b': b}, self.dtype)
42+
self.check_distribution('beta', {'a': a, 'b': b})
4543

4644

4745
@testing.parameterize(*testing.product({
@@ -94,11 +92,10 @@ def test_chisquare(self, df_dtype, dtype):
9492
class TestDistributionsDirichlet(RandomDistributionsTestCase):
9593

9694
@helper.for_dtypes_combination(
97-
_float_dtypes, names=['alpha_dtype', 'dtype'])
98-
def test_dirichlet(self, alpha_dtype, dtype):
95+
_regular_float_dtypes, names=['alpha_dtype'])
96+
def test_dirichlet(self, alpha_dtype):
9997
alpha = numpy.ones(self.alpha_shape, dtype=alpha_dtype)
100-
self.check_distribution('dirichlet',
101-
{'alpha': alpha}, dtype)
98+
self.check_distribution('dirichlet', {'alpha': alpha})
10299

103100

104101
@testing.parameterize(*testing.product({

0 commit comments

Comments
 (0)