From e0e176efbc10b82d50d724b0bf2c566c8aa9410d Mon Sep 17 00:00:00 2001 From: chenyu Date: Fri, 24 Jan 2025 13:56:51 -0500 Subject: [PATCH] failed test case for multi rand_like [pr] (#8740) new multi broke multi device dropout --- test/test_multitensor.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/test/test_multitensor.py b/test/test_multitensor.py index 25f863568d..c1e257aea0 100644 --- a/test/test_multitensor.py +++ b/test/test_multitensor.py @@ -651,6 +651,12 @@ class TestMultiTensor(unittest.TestCase): self.assertEqual(t.dtype, t2.dtype) self.assertEqual(t.lazydata.axis, t2.lazydata.axis) + def test_rand_like_from_alu(self): + a = Tensor.ones(4, 4).shard(devices_2, axis=0) + # TODO: fix this, which will also fix multi device dropout + with self.assertRaises(AssertionError): + (a + a).rand_like() + @unittest.skip("no longer supports uneven shard") def test_rand_like_uneven_shard(self): t = Tensor.empty((4, 42, 15)).shard(devices_3, axis=1)