mirror of
https://github.com/hpcaitech/ColossalAI.git
synced 2025-09-15 06:00:07 +00:00
[launch] Support IPv4 host initialization in launch (#5822)
This commit is contained in:
@@ -45,7 +45,10 @@ def launch(
|
||||
backend = cur_accelerator.communication_backend
|
||||
|
||||
# init default process group
|
||||
init_method = f"tcp://[{host}]:{port}"
|
||||
if ":" in host: # IPv6
|
||||
init_method = f"tcp://[{host}]:{port}"
|
||||
else: # IPv4
|
||||
init_method = f"tcp://{host}:{port}"
|
||||
dist.init_process_group(rank=rank, world_size=world_size, backend=backend, init_method=init_method)
|
||||
|
||||
# set cuda device
|
||||
|
Reference in New Issue
Block a user