MCPcopy Create free account
hub / github.com/OpenGVLab/HumanBench / vreduce

Function vreduce

PATH/core/distributed_utils.py:1121–1127  ·  view source on GitHub ↗
(x, tensor, group=None)

Source from the content-addressed store, hash-verified

1119 return group_info
1120
1121def vreduce(x, tensor, group=None):
1122 y = tensor.clone()
1123 if group is not None:
1124 allreduce(y, group=group)
1125 else:
1126 allreduce(y)
1127 x.update(y.item())
1128
1129def vgather(x_list, x):
1130 allgather(x_list, torch.Tensor([x]).cuda())

Callers 2

gather_resultMethod · 0.90
gather_resultMethod · 0.90

Calls 2

cloneMethod · 0.80
updateMethod · 0.45

Tested by

no test coverage detected