From c41a47e678ff3d40968b1bf6db9423cd1fb4f12b Mon Sep 17 00:00:00 2001 From: Manolis Papadakis Date: Fri, 4 Aug 2023 09:08:11 -0700 Subject: [PATCH] More RNG test fixes for MacOS (#1019) --- tests/integration/test_random_creation.py | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/tests/integration/test_random_creation.py b/tests/integration/test_random_creation.py index 15bf70ec1..60653e585 100644 --- a/tests/integration/test_random_creation.py +++ b/tests/integration/test_random_creation.py @@ -72,7 +72,16 @@ def gen_random_from_both( # cuNumeric: keeps generating different arrays. # seed is respected in Eager mode. ), - None, + pytest.param( + None, + marks=pytest.mark.xfail( + not num.runtime.has_curand, + reason="legacy RNG fallback treats seed(None) as seed(0)", + ), + # https://github.com/nv-legate/cunumeric/issues/1018 + # NumPy: seed(None) is equivalent to seed(()) + # cuNumeric non-cuRAND fallback: seed(None) equivalent to seed(0) + ), pytest.param( (4, 6, 8), marks=pytest.mark.xfail( @@ -125,6 +134,10 @@ def test_default_rng_seed(seed): EAGER_TEST, reason="cuNumeric does not respect seed in Eager mode", ) +@pytest.mark.xfail( + not num.runtime.has_curand, + reason="XORWOW not available without cuRAND", +) def test_default_rng_bitgenerator(): seed = 12345 rng_np_1 = np.random.default_rng(np.random.PCG64(seed))