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

Function get_rank

PATH/core/distributed_utils.py:160–161  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

158 raise RuntimeError('buffer {} does not have task_specific'.format(name, id(b)))
159
160def get_rank():
161 return int(os.environ.get('SLURM_PROCID', 0))
162
163def get_local_rank():
164 return get_rank() % torch.cuda.device_count()

Callers 8

get_local_rankFunction · 0.85
dist_initFunction · 0.85
__init__Method · 0.85
__init__Method · 0.85
__init__Method · 0.85
__init__Method · 0.85
__init__Method · 0.85
__init__Method · 0.85

Calls 1

getMethod · 0.80

Tested by

no test coverage detected