Add stats and limit to common allocator and enable tests (#1988)

* add stats to common allocator and enable tests

* linux memory and default

* fix
This commit is contained in:
Awni Hannun
2025-03-21 12:28:36 -07:00
committed by GitHub
parent d343782c8b
commit 2a980a76ce
13 changed files with 151 additions and 68 deletions

View File

@@ -1901,12 +1901,12 @@ class TestOps(mlx_tests.MLXTestCase):
x = mx.cumsum(x)
return x
mx.synchronize(mx.default_stream(mx.default_device()))
mx.synchronize()
mx.eval(fn(2))
mx.synchronize(mx.default_stream(mx.default_device()))
mx.synchronize()
mem2 = mx.get_peak_memory()
mx.eval(fn(4))
mx.synchronize(mx.default_stream(mx.default_device()))
mx.synchronize()
mem4 = mx.get_peak_memory()
self.assertEqual(mem2, mem4)