MCPcopy Create free account
hub / github.com/apache/singa / all_reduce

Method all_reduce

python/singa/opt.py:748–754  ·  view source on GitHub ↗

Performs all reduce of a tensor for distributed training. Args: tensor(Tensor): a tensor to be all-reduced

(self, tensor)

Source from the content-addressed store, hash-verified

746 self.opt.update(param, grad)
747
748 def all_reduce(self, tensor):
749 """Performs all reduce of a tensor for distributed training.
750
751 Args:
752 tensor(Tensor): a tensor to be all-reduced
753 """
754 self.communicator.synch(tensor)
755
756 def fused_all_reduce(self, tensor, send=True):
757 """Performs all reduce of the tensors after fusing them in a buffer.

Callers 15

backward_and_updateMethod · 0.95
test_dist_opt_fp32Method · 0.80
reduce_variableFunction · 0.80
reduce_variableFunction · 0.80
reduce_variableFunction · 0.80
reduce_variableFunction · 0.80
synchronizeFunction · 0.80
reduce_variableFunction · 0.80
synchronizeFunction · 0.80
reduce_variableFunction · 0.80
reduce_variableFunction · 0.80

Calls 1

synchMethod · 0.80

Tested by 1

test_dist_opt_fp32Method · 0.64