Skip to content

Commit

Permalink
More RNG test fixes for MacOS
Browse files Browse the repository at this point in the history
  • Loading branch information
manopapad committed Aug 4, 2023
1 parent daf31c2 commit d2421b5
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion tests/integration/test_random_creation.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(<get_system_random>())
# cuNumeric non-cuRAND fallback: seed(None) equivalent to seed(0)
),
pytest.param(
(4, 6, 8),
marks=pytest.mark.xfail(
Expand Down Expand Up @@ -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))
Expand Down

0 comments on commit d2421b5

Please sign in to comment.