MCPcopy Index your code
hub / github.com/tinygrad/tinygrad / test_to

Method test_to

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

Source from the content-addressed store, hash-verified

38 def setUp(self): pass
39
40 def test_to(self):
41 X = Tensor.ones(256).contiguous().realize()
42 X.to_(devices_2)
43 assert X.shape == (256,)
44 (X + X).realize()
45
46 def test_gradient(self):
47 X = Tensor.ones(256).contiguous().realize()

Callers

nothing calls this directly

Calls 4

realizeMethod · 0.80
to_Method · 0.80
contiguousMethod · 0.45
onesMethod · 0.45

Tested by

no test coverage detected