-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Core][Distributed] add same-node detection (#5369)
- Loading branch information
1 parent
dcbf428
commit c4bd03c
Showing
4 changed files
with
87 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import os | ||
|
||
import torch | ||
|
||
from vllm.distributed.parallel_state import is_in_the_same_node | ||
|
||
torch.distributed.init_process_group(backend="gloo") | ||
test_result = is_in_the_same_node(torch.distributed.group.WORLD) | ||
|
||
expected = os.environ.get("VLLM_TEST_SAME_HOST", "1") == "1" | ||
assert test_result == expected, f"Expected {expected}, got {test_result}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters