Expose function to clear memory cache (#1032)

* expose function to clear memory cache

* fix linux build

* fix metal tests
This commit is contained in:
Awni Hannun
2024-04-24 16:48:51 -07:00
committed by GitHub
parent 20a01bbd9f
commit 771575d27b
9 changed files with 31 additions and 2 deletions

View File

@@ -42,6 +42,9 @@ class TestMetal(mlx_tests.MLXTestCase):
cache_mem = mx.metal.get_cache_memory()
self.assertTrue(cache_mem >= 4096 * 4)
mx.metal.clear_cache()
self.assertEqual(mx.metal.get_cache_memory(), 0)
if __name__ == "__main__":
unittest.main()