(self)
| 2220 | |
| 2221 | @unittest.skipIf(platform.system() == "Windows", "Memory info not accurate") |
| 2222 | def test_siblings_without_eval(self): |
| 2223 | def get_mem(): |
| 2224 | process = psutil.Process(os.getpid()) |
| 2225 | return process.memory_info().rss |
| 2226 | |
| 2227 | key = mx.array([1, 2]) |
| 2228 | |
| 2229 | def t(): |
| 2230 | a, b = mx.split(key, 2) |
| 2231 | a = mx.reshape(a, []) |
| 2232 | b = mx.reshape(b, []) |
| 2233 | return b |
| 2234 | |
| 2235 | mx.synchronize() |
| 2236 | t() |
| 2237 | gc.collect() |
| 2238 | expected = get_mem() |
| 2239 | for _ in range(100): |
| 2240 | t() |
| 2241 | used = get_mem() |
| 2242 | self.assertEqual(expected, used) |
| 2243 | |
| 2244 | def test_scalar_integer_conversion_overflow(self): |
| 2245 | y = mx.array(2000000000, dtype=mx.int32) |
nothing calls this directly
no test coverage detected