Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
OpenDAS
vllm_cscc
Commits
5522fb27
Unverified
Commit
5522fb27
authored
Oct 29, 2025
by
Wentao Ye
Committed by
GitHub
Oct 30, 2025
Browse files
[Chore] Optimize P2PNCCLEngine `http_address` (#27488)
Signed-off-by:
yewentao256
<
zhyanwentao@126.com
>
parent
0f95a1c3
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
5 deletions
+17
-5
vllm/distributed/kv_transfer/kv_connector/v1/p2p/p2p_nccl_engine.py
...ibuted/kv_transfer/kv_connector/v1/p2p/p2p_nccl_engine.py
+17
-5
No files found.
vllm/distributed/kv_transfer/kv_connector/v1/p2p/p2p_nccl_engine.py
View file @
5522fb27
# SPDX-License-Identifier: Apache-2.0
# SPDX-License-Identifier: Apache-2.0
# SPDX-FileCopyrightText: Copyright contributors to the vLLM project
# SPDX-FileCopyrightText: Copyright contributors to the vLLM project
import
json
import
logging
import
logging
import
os
import
os
import
threading
import
threading
...
@@ -96,19 +97,30 @@ class P2pNcclEngine:
...
@@ -96,19 +97,30 @@ class P2pNcclEngine:
# Each card corresponds to a ZMQ address.
# Each card corresponds to a ZMQ address.
self
.
zmq_address
=
f
"
{
self
.
_hostname
}
:
{
self
.
_port
}
"
self
.
zmq_address
=
f
"
{
self
.
_hostname
}
:
{
self
.
_port
}
"
# The `http_port` must be consistent with the port of OpenAI.
self
.
http_address
=
(
f
"
{
self
.
_hostname
}
:
{
self
.
config
.
kv_connector_extra_config
[
'http_port'
]
}
"
)
# If `proxy_ip` or `proxy_port` is `""`,
# If `proxy_ip` or `proxy_port` is `""`,
# then the ping thread will not be enabled.
# then the ping thread will not be enabled.
proxy_ip
=
self
.
config
.
get_from_extra_config
(
"proxy_ip"
,
""
)
proxy_ip
=
self
.
config
.
get_from_extra_config
(
"proxy_ip"
,
""
)
proxy_port
=
self
.
config
.
get_from_extra_config
(
"proxy_port"
,
""
)
proxy_port
=
self
.
config
.
get_from_extra_config
(
"proxy_port"
,
""
)
if
proxy_ip
==
""
or
proxy_port
==
""
:
if
proxy_ip
==
""
or
proxy_port
==
""
:
self
.
proxy_address
=
""
self
.
proxy_address
=
""
self
.
http_address
=
""
else
:
else
:
self
.
proxy_address
=
proxy_ip
+
":"
+
proxy_port
self
.
proxy_address
=
proxy_ip
+
":"
+
proxy_port
# the `http_port` must be consistent with the port of OpenAI.
http_port
=
self
.
config
.
get_from_extra_config
(
"http_port"
,
None
)
if
http_port
is
None
:
example_cfg
=
{
"kv_connector"
:
"P2pNcclConnector"
,
"kv_connector_extra_config"
:
{
"http_port"
:
8000
},
}
example
=
(
f
"--port=8000 --kv-transfer-config='
{
json
.
dumps
(
example_cfg
)
}
'"
)
raise
ValueError
(
"kv_connector_extra_config.http_port is required. "
f
"Example:
{
example
}
"
)
self
.
http_address
=
f
"
{
self
.
_hostname
}
:
{
http_port
}
"
self
.
context
=
zmq
.
Context
()
self
.
context
=
zmq
.
Context
()
self
.
router_socket
=
self
.
context
.
socket
(
zmq
.
ROUTER
)
self
.
router_socket
=
self
.
context
.
socket
(
zmq
.
ROUTER
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment