MCPcopy
hub / github.com/tinygrad/tinygrad / test_shard

Method test_shard

test/backend/test_multitensor.py:52–57  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

50 grad.realize()
51
52 def test_shard(self):
53 X = Tensor.ones(256).contiguous().realize()
54 X.shard_(devices_2, 0)
55 for lb in X.uop.src:
56 assert lb.shape == (128,)
57 (X + X).realize()
58
59 @unittest.expectedFailure # TODO: fix
60 def test_shard_empty(self):

Callers

nothing calls this directly

Calls 4

realizeMethod · 0.80
shard_Method · 0.80
contiguousMethod · 0.45
onesMethod · 0.45

Tested by

no test coverage detected