(self)
| 238 | Tensor.empty(100, 100, device=f"disk:{self.tmp('dt_empty')}") |
| 239 | |
| 240 | def test_simple_read(self): |
| 241 | fn = pathlib.Path(self.tmp("dt_simple_read")) |
| 242 | fn.write_bytes(bytes(range(256))) |
| 243 | t = Tensor.empty(16, 16, device=f"disk:{self.tmp('dt_simple_read')}", dtype=dtypes.uint8) |
| 244 | out = t[1].to(Device.DEFAULT).tolist() |
| 245 | assert out == list(range(16, 32)) |
| 246 | |
| 247 | def test_simple_read_bitcast(self): |
| 248 | fn = pathlib.Path(self.tmp("dt_simple_read_bitcast")) |