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

Function get_world_size

modelscope/utils/torch_utils.py:158–163  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

156
157
158def get_world_size():
159 if not dist.is_available():
160 return 1
161 if not dist.is_initialized():
162 return 1
163 return dist.get_world_size()
164
165
166def synchronize():

Callers 3

build_dataloaderFunction · 0.90
inferenceFunction · 0.90
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…