MCPcopy Index your code
hub / github.com/OpenGVLab/HumanBench / get_world_size

Function get_world_size

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

Source from the content-addressed store, hash-verified

164 return get_rank() % torch.cuda.device_count()
165
166def get_world_size():
167 return int(os.environ.get('SLURM_NTASKS', 1))
168
169def dist_init(method='slurm', port='5671'):
170 assert method == 'slurm'

Callers 7

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