Skip to content

Conversation

lxww302
Copy link
Contributor

@lxww302 lxww302 commented Feb 4, 2025

Motivation

ADD support for ipv6 dist_init_addr in multi node setting, fix #2892

Modifications

compat with ipv6 in server_args.py

Checklist

@shuaills
Copy link
Collaborator

shuaills commented Feb 4, 2025

Please apply pre-commit run --all-files
https://docs.sglang.ai/references/contribution_guide.html

@zhaochenyang20 zhaochenyang20 added good first issue Good for newcomers help wanted Extra attention is needed amd labels Feb 5, 2025
@DarkSharpness
Copy link
Collaborator

Maybe we should consider adding unit tests for IPv6 to ensure correctness? (it seems that we don't have any yet)

@vincent-4 vincent-4 mentioned this pull request Feb 28, 2025
@shuaills
Copy link
Collaborator

shuaills commented Mar 1, 2025

Thanks for the pr, it seems the problem is on pytorch side pytorch/pytorch#52040

@@ -1006,6 +1006,18 @@ def init_new(server_args, dp_rank: Optional[int] = None) -> "PortArgs":
# DP attention. Use TCP + port to handle both single-node and multi-node.
if server_args.nnodes == 1 and server_args.dist_init_addr is None:
dist_init_addr = ("127.0.0.1", server_args.port + ZMQ_TCP_PORT_DELTA)
elif server_args.dist_init_addr.startswith("["): # ipv6 address
# extract host and port from ipv6 address
addr = server_args.dist_init_addr
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wrap this into a unity function in python/sglang/srt/utils.py

@b8zhong
Copy link
Collaborator

b8zhong commented May 21, 2025

Completed in #3949

@b8zhong b8zhong closed this May 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
amd good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug] ipv6 dist_init_addr doesn't connect when running multi-node inference
6 participants