MCPcopy Create free account
hub / github.com/SpatialVLA/SpatialVLA / init_dist

Function init_dist

train/dist_utils.py:29–39  ·  view source on GitHub ↗
(launcher, backend='nccl', **kwargs)

Source from the content-addressed store, hash-verified

27
28
29def init_dist(launcher, backend='nccl', **kwargs):
30 if mp.get_start_method(allow_none=True) is None:
31 mp.set_start_method('spawn')
32 if launcher == 'pytorch':
33 _init_dist_pytorch(backend, **kwargs)
34 elif launcher == 'mpi':
35 _init_dist_mpi(backend, **kwargs)
36 elif launcher == 'slurm':
37 _init_dist_slurm(backend, **kwargs)
38 else:
39 raise ValueError(f'Invalid launcher type: {launcher}')
40
41def _init_dist_pytorch(backend, **kwargs):
42 # TODO: use local_rank instead of rank % num_gpus

Callers 2

mainFunction · 0.90
mainFunction · 0.90

Calls 3

_init_dist_pytorchFunction · 0.85
_init_dist_mpiFunction · 0.85
_init_dist_slurmFunction · 0.85

Tested by

no test coverage detected