Skip to content

Commit 9b44a7d

Browse files
robertgshaw2-redhatSageMoorerussellbNiuBlibingIsotr0py
authored
[P/D] NIXL Updates (vllm-project#25844)
Signed-off-by: Sage Moore <[email protected]> Signed-off-by: simon-mo <[email protected]> Signed-off-by: rentianyue-jk <[email protected]> Signed-off-by: Russell Bryant <[email protected]> Signed-off-by: Isotr0py <[email protected]> Signed-off-by: Chenheli Hua <[email protected]> Signed-off-by: mgoin <[email protected]> Signed-off-by: Tyler Michael Smith <[email protected]> Signed-off-by: NickLucche <[email protected]> Signed-off-by: Roger Wang <[email protected]> Signed-off-by: Robert Shaw <[email protected]> Co-authored-by: Sage Moore <[email protected]> Co-authored-by: Russell Bryant <[email protected]> Co-authored-by: rentianyue-jk <[email protected]> Co-authored-by: Isotr0py <[email protected]> Co-authored-by: Chenheli Hua <[email protected]> Co-authored-by: Wentao Ye <[email protected]> Co-authored-by: Michael Goin <[email protected]> Co-authored-by: Tyler Michael Smith <[email protected]> Co-authored-by: Nicolò Lucchesi <[email protected]> Co-authored-by: Roger Wang <[email protected]> Co-authored-by: Robert Shaw <[email protected]>
1 parent a3ae45a commit 9b44a7d

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

vllm/distributed/kv_transfer/kv_connector/v1/nixl_connector.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -474,8 +474,11 @@ def __init__(self, vllm_config: VllmConfig, engine_id: str):
474474
"backends", ["UCX"])
475475
# Agent.
476476
non_ucx_backends = [b for b in self.nixl_backends if b != "UCX"]
477-
config = nixl_agent_config(backends=self.nixl_backends) if len(
478-
non_ucx_backends) > 0 and nixl_agent_config is not None else None
477+
if nixl_agent_config is None:
478+
config = None
479+
else:
480+
config = nixl_agent_config(backends=self.nixl_backends) if len(
481+
non_ucx_backends) > 0 else nixl_agent_config(num_threads=8)
479482

480483
self.nixl_wrapper = NixlWrapper(str(uuid.uuid4()), config)
481484
# Map of engine_id -> {rank0: agent_name0, rank1: agent_name1..}.

vllm/v1/core/sched/scheduler.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1290,4 +1290,9 @@ def _update_from_kv_xfer_finished(self,
12901290
self.finished_recving_kv_req_ids.add(req_id)
12911291
for req_id in (kv_connector_output.finished_sending or ()):
12921292
logger.debug("Finished sending KV transfer for request %s", req_id)
1293-
self._free_blocks(self.requests[req_id])
1293+
if req_id not in self.requests:
1294+
logger.warning(
1295+
"Got finished sending KV transfer for request %s,"
1296+
"but the request is already freed.", req_id)
1297+
else:
1298+
self._free_blocks(self.requests[req_id])

0 commit comments

Comments
 (0)