MCPcopy
hub / github.com/tinygrad/tinygrad / test_data_float16

Method test_data_float16

test/unit/test_tensor_data.py:75–80  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

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")

Callers

nothing calls this directly

Calls 2

dataMethod · 0.95
TensorClass · 0.90

Tested by

no test coverage detected