(self)
| 66 | self.assertEqual(mem, 1024*1024*2) # 1 read + 1 write |
| 67 | |
| 68 | def test_self_add_assign(self): |
| 69 | a = Tensor.empty(1024, 1024, dtype=dtypes.uint8).realize() |
| 70 | _, mem = get_stats(a.assign(a+a)) |
| 71 | self.assertEqual(mem, 1024*1024*2) # 1 read + 1 write |
| 72 | |
| 73 | @unittest.skipIf(Device.DEFAULT == "CPU", "test copy to CPU from other device") |
| 74 | def test_copyout(self): |