mirror of
https://github.com/ml-explore/mlx.git
synced 2025-09-01 04:24:36 +08:00
@@ -1840,6 +1840,15 @@ class TestOps(mlx_tests.MLXTestCase):
|
||||
self.assertTrue(np.array_equal(c_np, c_mx))
|
||||
self.assertEqual(b_mx.dtype, c_mx.dtype)
|
||||
|
||||
# Test very large array
|
||||
if mx.default_device() == mx.gpu:
|
||||
a_np = np.random.normal(20, 20, size=(2**22)).astype(np.float32)
|
||||
a_mx = mx.array(a_np)
|
||||
|
||||
b_np = np.sort(a_np)
|
||||
b_mx = mx.sort(a_mx)
|
||||
self.assertTrue(np.array_equal(b_np, b_mx))
|
||||
|
||||
def test_partition(self):
|
||||
shape = (3, 4, 5)
|
||||
for dtype in ("int32", "float32"):
|
||||
|
Reference in New Issue
Block a user