MCPcopy Create free account
hub / github.com/modelscope/modelscope / _get_global_gloo_group

Function _get_global_gloo_group

modelscope/utils/torch_utils.py:264–272  ·  view source on GitHub ↗

Return a process group based on gloo backend, containing all the ranks The result is cached.

()

Source from the content-addressed store, hash-verified

262
263@functools.lru_cache()
264def _get_global_gloo_group():
265 """
266 Return a process group based on gloo backend, containing all the ranks
267 The result is cached.
268 """
269 if dist.get_backend() == 'nccl':
270 return dist.new_group(backend='gloo')
271 else:
272 return dist.group.WORLD
273
274
275def _serialize_to_tensor(data, group):

Callers 1

all_gatherFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…