(self)
| 36 | |
| 37 | @unittest.skip("depends on subbuffer working") |
| 38 | def test_add_slice(self): |
| 39 | a = Tensor.empty(1024, 1024, dtype=dtypes.uint8)[:512] |
| 40 | _, mem = get_stats(a+3) |
| 41 | self.assertEqual(mem, 512*1024*2) # 1 read + 1 write |
| 42 | |
| 43 | def test_expanded(self): |
| 44 | a = Tensor.empty(1024, 1, dtype=dtypes.uint8).expand(1024, 1024) |