(self)
| 73 | |
| 74 | @unittest.skip("requires python 3.12") |
| 75 | def test_data_float16(self): |
| 76 | a = Tensor([[1,2.5],[3,4]], dtype=dtypes.float16) |
| 77 | dat = a.data() |
| 78 | assert dat.format == "e" |
| 79 | assert dat.shape == (2,2) |
| 80 | # NOTE: python can't deref float16 |
| 81 | |
| 82 | def test_data_uop_device(self): |
| 83 | uop = UOp.const(dtypes.float, 1.0, "DEVICE") |