MCPcopy Create free account
hub / github.com/ml-explore/mlx / test_wired_memory

Method test_wired_memory

python/tests/test_memory.py:52–59  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

50
51 @unittest.skipIf(not mx.metal.is_available(), "Metal is not available")
52 def test_wired_memory(self):
53 old_limit = mx.set_wired_limit(1000)
54 old_limit = mx.set_wired_limit(0)
55 self.assertEqual(old_limit, 1000)
56
57 max_size = mx.device_info(mx.gpu)["max_recommended_working_set_size"]
58 with self.assertRaises(ValueError):
59 mx.set_wired_limit(max_size + 10)
60
61 def test_active_memory_count(self):
62 mx.synchronize()

Callers

nothing calls this directly

Calls 1

set_wired_limitMethod · 0.80

Tested by

no test coverage detected