-
Notifications
You must be signed in to change notification settings - Fork 16
feat: upgrade vllm from 0.27.1 to 0.28.0 for CUDA and ROCm backends #261
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
base: main
Are you sure you want to change the base?
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 |
|---|---|---|
| @@ -1,33 +1,28 @@ | ||
| diff --git a/vllm/utils/network_utils.py b/vllm/utils/network_utils.py | ||
| --- a/vllm/utils/network_utils.py | ||
| +++ b/vllm/utils/network_utils.py | ||
| @@ -146,6 +146,8 @@ | ||
| def get_open_zmq_inproc_path() -> str: | ||
| return f"inproc://{uuid4()}" | ||
|
|
||
| @@ -171,6 +171,9 @@ | ||
| return range(dp_master_port, dp_master_port + 10) | ||
|
|
||
| +_next_port: int | None = None | ||
| + | ||
| + | ||
| def get_open_port() -> int: | ||
| """ | ||
| Get an open port for the vLLM process to listen on. | ||
| @@ -156,13 +158,17 @@ | ||
| @@ -180,10 +183,13 @@ | ||
| Right now we reserve 10 ports for the data parallel master | ||
| process. Currently it uses 2 ports. | ||
| """ | ||
| + global _next_port | ||
| if "VLLM_DP_MASTER_PORT" in os.environ: | ||
| dp_master_port = envs.VLLM_DP_MASTER_PORT | ||
| reserved_port_range = range(dp_master_port, dp_master_port + 10) | ||
| while True: | ||
| - candidate_port = _get_open_port() | ||
| + candidate_port = _get_open_port(_next_port) | ||
| + _next_port = candidate_port + 1 | ||
| if candidate_port not in reserved_port_range: | ||
| return candidate_port | ||
| - return _get_open_port() | ||
| + port = _get_open_port(_next_port) | ||
| reserved_port_range = _get_reserved_port_range() | ||
| - port = _get_open_port() | ||
| + port = _get_open_port(start_port=_next_port) | ||
| + _next_port = port + 1 | ||
| + return port | ||
|
|
||
|
|
||
| def get_open_ports_list(count: int = 5) -> list[int]: | ||
| if port in reserved_port_range: | ||
| port = _get_open_port(start_port=reserved_port_range.stop, max_attempts=1000) | ||
| + _next_port = port + 1 | ||
| return port | ||
|
|
||
|
|
||
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,33 +1,28 @@ | ||
| diff --git a/vllm/utils/network_utils.py b/vllm/utils/network_utils.py | ||
| --- a/vllm/utils/network_utils.py | ||
| +++ b/vllm/utils/network_utils.py | ||
| @@ -146,6 +146,8 @@ | ||
| def get_open_zmq_inproc_path() -> str: | ||
| return f"inproc://{uuid4()}" | ||
|
|
||
| @@ -171,6 +171,9 @@ | ||
| return range(dp_master_port, dp_master_port + 10) | ||
|
|
||
| +_next_port: int | None = None | ||
| + | ||
| + | ||
| def get_open_port() -> int: | ||
| """ | ||
| Get an open port for the vLLM process to listen on. | ||
| @@ -156,13 +158,17 @@ | ||
| @@ -180,10 +183,13 @@ | ||
| Right now we reserve 10 ports for the data parallel master | ||
| process. Currently it uses 2 ports. | ||
| """ | ||
| + global _next_port | ||
| if "VLLM_DP_MASTER_PORT" in os.environ: | ||
| dp_master_port = envs.VLLM_DP_MASTER_PORT | ||
| reserved_port_range = range(dp_master_port, dp_master_port + 10) | ||
| while True: | ||
| - candidate_port = _get_open_port() | ||
| + candidate_port = _get_open_port(_next_port) | ||
| + _next_port = candidate_port + 1 | ||
| if candidate_port not in reserved_port_range: | ||
| return candidate_port | ||
| - return _get_open_port() | ||
| + port = _get_open_port(_next_port) | ||
| reserved_port_range = _get_reserved_port_range() | ||
| - port = _get_open_port() | ||
| + port = _get_open_port(start_port=_next_port) | ||
| + _next_port = port + 1 | ||
| + return port | ||
|
|
||
|
|
||
| def get_open_ports_list(count: int = 5) -> list[int]: | ||
| if port in reserved_port_range: | ||
| port = _get_open_port(start_port=reserved_port_range.stop, max_attempts=1000) | ||
| + _next_port = port + 1 | ||
|
Comment on lines
+21
to
+25
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. If |
||
| return port | ||
|
|
||
|
|
||
This file was deleted.
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.
If
portis65535, then_next_portwill be set to65536. Since port numbers must be in the range[0, 65535], passing65536asstart_portto_get_open_porton the subsequent call will raise anOverflowErrororValueErrorduring socket binding. To prevent this, we should reset_next_porttoNone(or wrap it) if it exceeds65535.