move memory APIs into top level mlx.core (#1982)

This commit is contained in:
Awni Hannun
2025-03-21 07:25:12 -07:00
committed by GitHub
parent 65a38c452b
commit 4e1994e9d7
25 changed files with 418 additions and 323 deletions

View File

@@ -1813,10 +1813,10 @@ class TestArray(mlx_tests.MLXTestCase):
fun()
mx.synchronize()
peak_1 = mx.metal.get_peak_memory()
peak_1 = mx.get_peak_memory()
fun()
mx.synchronize()
peak_2 = mx.metal.get_peak_memory()
peak_2 = mx.get_peak_memory()
self.assertEqual(peak_1, peak_2)
def fun():
@@ -1826,10 +1826,10 @@ class TestArray(mlx_tests.MLXTestCase):
fun()
mx.synchronize()
peak_1 = mx.metal.get_peak_memory()
peak_1 = mx.get_peak_memory()
fun()
mx.synchronize()
peak_2 = mx.metal.get_peak_memory()
peak_2 = mx.get_peak_memory()
self.assertEqual(peak_1, peak_2)
def test_add_numpy(self):