MCPcopy Index your code
hub / github.com/pytorch/pytorch / allreduce

Function allreduce

caffe2/python/data_parallel_model.py:1382–1393  ·  view source on GitHub ↗
(blobs, **kwargs)

Source from the content-addressed store, hash-verified

1380 reduced_blob = str(master_blob) + "_red"
1381
1382 def allreduce(blobs, **kwargs):
1383 with core.DeviceScope(reducing_device_opt):
1384 comm_world, control_input = \
1385 context.get_control_and_context(blobs[0])
1386 net.Allreduce(
1387 inputs=[comm_world] + blobs,
1388 outputs=blobs,
1389 name=blob_name,
1390 engine=all_reduce_engine,
1391 control_input=control_input,
1392 **kwargs
1393 )
1394
1395 if rendezvous['engine'] == 'GLOO':
1396 # With Gloo cross GPU and cross machine allreduce

Callers 1

Calls 1

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…