fix failed threefry (#10646)

This commit is contained in:
wozeparrot
2025-06-05 17:17:42 -07:00
committed by GitHub
parent e67642d430
commit 0d86f8d375
6 changed files with 7 additions and 8 deletions

View File

@@ -136,9 +136,7 @@ class TestRandomness(unittest.TestCase):
jr = np.array([0.9614430665969849, 0.059279561042785645, 0.01909029483795166, 0.47882091999053955, 0.9677121639251709,
0.36863112449645996, 0.3102607727050781, 0.06608951091766357, 0.35329878330230713, 0.26518797874450684], dtype=np.float32)
r = Tensor.rand(10).numpy()
# TODO: this failed because increment happened before _threefry_random_bits
with self.assertRaises(AssertionError):
np.testing.assert_allclose(r, jr, atol=1e-5, rtol=1e-5)
np.testing.assert_allclose(r, jr, atol=1e-5, rtol=1e-5)
@unittest.skipIf(not_support_multi_device(), "no multi")
def test_threefry_tensors_cnt(self):