(self)
| 1045 | self.assertEqual(mem_pre, mem_post) |
| 1046 | |
| 1047 | def test_double_constant(self): |
| 1048 | with mx.stream(mx.cpu): |
| 1049 | x = mx.array(1.0, dtype=mx.float64) |
| 1050 | |
| 1051 | def fun(x): |
| 1052 | return (x + math.pi) * 2.0 |
| 1053 | |
| 1054 | y = fun(x).item() |
| 1055 | y_compiled = mx.compile(fun)(x).item() |
| 1056 | self.assertEqual(y, y_compiled) |
| 1057 | |
| 1058 | def test_shared_broadcast(self): |
| 1059 | def fun(x, y, z): |