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

Function get_rank

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

Source from the content-addressed store, hash-verified

148
149
150def get_rank():
151 if not dist.is_available():
152 return 0
153 if not dist.is_initialized():
154 return 0
155 return dist.get_rank()
156
157
158def get_world_size():

Callers 3

__init__Method · 0.90
__init__Method · 0.90
_serialize_to_tensorFunction · 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…