A high-throughput and memory-efficient inference and serving engine for LLMs
Mirrored from https://github.com/tduncan-lum/Nvidia-Optimization-Stack---VLLM.git
Synced Nov 14, 05:30 UTC
[Bugfix] Skip dead and non-GPU nodes for Ray DP engine allocation (#22275)
Signed-off-by: Rui Qiao <ruisearch42@gmail.com>
Rui Qiao committed
Aug 5, 2025 at 20:35 UTC
302962e806e9820643ae25987e8e38ed035e05d3
1 file changed
+11
-2
vllm/v1/engine/utils.py
+11
-2
@@ -297,10 +297,10 @@ class CoreEngineActorManager:
297
local_engine_count = \
298
vllm_config.parallel_config.data_parallel_size_local
299
300
- nodes = sorted(list_nodes(),
300
+ nodes = sorted(list_nodes(filters=[("state", "=", "ALIVE")]),
301
key=lambda node: node.node_ip != dp_master_ip)
302
assert nodes[0].node_ip == dp_master_ip, (
303
- "The first node must be the head node")
303
+ "The head node is missing or dead")
304
assert len(nodes) == 1 or nodes[1].node_ip != dp_master_ip, (
305
"There can only be one head node")
306
@@ -312,6 +312,8 @@ class CoreEngineActorManager:
312
for node in nodes:
313
node_ip = node.node_ip
314
node_resources = available_resources[node.node_id]
315
+ if "GPU" not in node_resources:
316
+ continue
317
# For now, each DP rank can only be assigned to one node
318
# TODO(rui): support allocating a single DP rank
319
# to multiple nodes
@@ -346,6 +348,13 @@ class CoreEngineActorManager:
348
)
349
placement_groups.append(pg)
350
local_dp_ranks.append(i)
351
+ if len(placement_groups) < num_pg_to_create:
352
+ raise ValueError(
353
+ f"Not enough resources to allocate {num_pg_to_create} "
354
+ "placement groups, only created "
355
+ f"{len(placement_groups)} placement groups. "
356
+ "Available resources: "
357
+ f"{available_resources}")
358
return placement_groups, local_dp_ranks
359
360
@staticmethod