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

Function get_local_rank

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

Source from the content-addressed store, hash-verified

161 return int(os.environ.get('SLURM_PROCID', 0))
162
163def get_local_rank():
164 return get_rank() % torch.cuda.device_count()
165
166def get_world_size():
167 return int(os.environ.get('SLURM_NTASKS', 1))

Callers

nothing calls this directly

Calls 1

get_rankFunction · 0.85

Tested by

no test coverage detected