File tree Expand file tree Collapse file tree 2 files changed +2
-11
lines changed
vllm/model_executor/layers/fused_moe Expand file tree Collapse file tree 2 files changed +2
-11
lines changed Original file line number Diff line number Diff line change 14
14
spawn ) # pyright: ignore[reportPrivateImportUsage]
15
15
from typing_extensions import Concatenate , ParamSpec
16
16
17
- from vllm .model_executor . layers . fused_moe . utils import find_free_port
17
+ from vllm .utils import get_open_port
18
18
19
19
has_deep_ep = importlib .util .find_spec ("deep_ep" ) is not None
20
20
if has_deep_ep :
@@ -95,7 +95,7 @@ def parallel_launch(
95
95
world_size ,
96
96
world_size ,
97
97
0 ,
98
- f"tcp://{ os .getenv ('LOCALHOST' , 'localhost' )} :{ find_free_port ()} " ,
98
+ f"tcp://{ os .getenv ('LOCALHOST' , 'localhost' )} :{ get_open_port ()} " ,
99
99
worker ,
100
100
) + args ,
101
101
nprocs = world_size ,
Original file line number Diff line number Diff line change 1
1
# SPDX-License-Identifier: Apache-2.0
2
2
# SPDX-FileCopyrightText: Copyright contributors to the vLLM project
3
- import socket
4
- from contextlib import closing
5
3
from math import prod
6
4
from typing import Optional
7
5
@@ -98,10 +96,3 @@ def _fp8_perm(m: torch.Tensor, idx: torch.Tensor) -> torch.Tensor:
98
96
return m .view (dtype = torch .uint8 )[idx , ...].view (dtype = m .dtype )
99
97
else :
100
98
return m [idx , ...]
101
-
102
-
103
- def find_free_port ():
104
- with closing (socket .socket (socket .AF_INET , socket .SOCK_STREAM )) as s :
105
- s .bind (('' , 0 ))
106
- s .setsockopt (socket .SOL_SOCKET , socket .SO_REUSEADDR , 1 )
107
- return s .getsockname ()[1 ]
You can’t perform that action at this time.
0 commit comments