MCPcopy
hub / github.com/tinygrad/tinygrad / test_allreduce_naive

Method test_allreduce_naive

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

Source from the content-addressed store, hash-verified

220 np.testing.assert_equal(t.shard(devices_2, axis=axis).sum().item(), 10)
221
222 def test_allreduce_naive(self):
223 with Context(RING=0):
224 a,b = _test_allreduce(Tensor.rand(256, 256))
225 np.testing.assert_almost_equal(a.numpy(), b.numpy(), decimal=5)
226
227 def test_allreduce_ring(self):
228 with Context(RING=2):

Callers

nothing calls this directly

Calls 4

ContextClass · 0.90
_test_allreduceFunction · 0.85
randMethod · 0.80
numpyMethod · 0.45

Tested by

no test coverage detected