(self)
| 59 | mx.set_wired_limit(max_size + 10) |
| 60 | |
| 61 | def test_active_memory_count(self): |
| 62 | mx.synchronize() |
| 63 | mx.clear_cache() |
| 64 | init_mem = mx.get_active_memory() |
| 65 | a = mx.zeros((128, 128)) |
| 66 | mx.eval(a) |
| 67 | mx.synchronize() |
| 68 | del a |
| 69 | a = mx.zeros((90, 128)) |
| 70 | mx.eval(a) |
| 71 | mx.synchronize() |
| 72 | del a |
| 73 | self.assertEqual(init_mem, mx.get_active_memory()) |
| 74 | |
| 75 | |
| 76 | if __name__ == "__main__": |
nothing calls this directly
no test coverage detected