-
-
Notifications
You must be signed in to change notification settings - Fork 11.9k
[Doc] Add documents for multi-node distributed serving with MP backend #30509
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -124,9 +124,7 @@ def _init_executor(self) -> None: | |||||||||||||||||||||||
| # Set multiprocessing envs | ||||||||||||||||||||||||
| set_multiprocessing_worker_envs() | ||||||||||||||||||||||||
|
|
||||||||||||||||||||||||
| # Multiprocessing-based executor does not support multi-node setting. | ||||||||||||||||||||||||
| # Since it only works for single node, we can use the loopback address | ||||||||||||||||||||||||
| # get_loopback_ip() for communication. | ||||||||||||||||||||||||
| # use the loopback address get_loopback_ip() for communication. | ||||||||||||||||||||||||
| distributed_init_method = get_distributed_init_method( | ||||||||||||||||||||||||
| get_loopback_ip(), get_open_port() | ||||||||||||||||||||||||
| ) | ||||||||||||||||||||||||
|
Comment on lines
+127
to
130
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The Without this change, the multi-node feature with the
Suggested change
|
||||||||||||||||||||||||
|
|
||||||||||||||||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Multi-node serving with the multiprocessing executor still cannot work because the distributed process group is initialized with
get_distributed_init_method(get_loopback_ip(), get_open_port()), forcing every node to bind to 127.0.0.1 and a local port instead of the configuredmaster_addr. When following the new multi-node docs (nnodes>1, differing node_ranks), each node forms its own local group andtorch.distributed.init_process_groupnever connects across nodes, so startup will hang/fail. The init method needs to use the shared master address/port for multi-node runs.Useful? React with 👍 / 👎.