(self)
| 48 | |
| 49 | @unittest.skip("no longer supported") |
| 50 | def test_both_expanded(self): |
| 51 | # TODO: this probably should be a full write |
| 52 | a = Tensor.empty(1024, 1, dtype=dtypes.uint8).expand(1024, 1024) |
| 53 | b = Tensor.empty(1024, 1, dtype=dtypes.uint8).expand(1024, 1024) |
| 54 | _, mem = get_stats(a+b) |
| 55 | # rangeify is smart! |
| 56 | self.assertEqual(mem, 1024 + 2*1024) # 2 lil reads + 1 lil write |
| 57 | |
| 58 | def test_self_add(self): |
| 59 | a = Tensor.empty(1024, 1024, dtype=dtypes.uint8) |