diff --git a/imperative/python/test/unit/functional/test_functional.py b/imperative/python/test/unit/functional/test_functional.py index e38c10ebe4ae8e354fe9063de740ae17fc569f62..2a96c1d0955f8be7467d93845bbbe5504f52949e 100644 --- a/imperative/python/test/unit/functional/test_functional.py +++ b/imperative/python/test/unit/functional/test_functional.py @@ -507,7 +507,7 @@ def test_interpolate_fastpath(): [(1, 1, 10, 10), (5, 5)], [(1, 3, 10, 10), (20, 20)], [(10, 1, 10, 10), (1, 1)], - # [(10, 10, 1, 1), (10, 10)], # FIXME, it causes random CI failure + [(10, 10, 1, 1), (10, 10)], ] for inp_shape, target_shape in test_cases: x = tensor(np.random.randn(*inp_shape), dtype=np.float32) diff --git a/imperative/python/test/unit/random/test_rng.py b/imperative/python/test/unit/random/test_rng.py index 59ec355f2bfa9540ea5bbbe2a87c2cc0c64ec5f0..3dd89b20d49ff0fae7d2eb30618a4296c403e6e9 100644 --- a/imperative/python/test/unit/random/test_rng.py +++ b/imperative/python/test/unit/random/test_rng.py @@ -39,6 +39,8 @@ from megengine.random import uniform get_device_count("xpu") <= 2, reason="xpu counts need > 2", ) def test_gaussian_op(): + # FIXME: remove this sync + mge.core.set_option("async_level", 0) set_global_seed(1024) shape = ( 8, @@ -210,12 +212,9 @@ def test_permutation_op(): assert str(output.device) == str(cn) assert output.dtype == dtype - # FIXME: remove this sync - mge.core.set_option("async_level", 0) test_permutation_op_dtype(np.float32) test_permutation_op_dtype(np.int32) test_permutation_op_dtype(np.int16) - mge.core.set_option("async_level", 2) @pytest.mark.skipif( @@ -517,3 +516,4 @@ def test_rng_empty_tensor(is_symbolic): np.testing.assert_equal(out.numpy().shape, (0,)) if is_symbolic is None: break + mge.core.set_option("async_level", 2)