[Bugfix] Account for PCP in multi-node world size validation (#55111)

Signed-off-by: DebugSy <532151398@qq.com>
Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com>
Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Harry Mellor <19981378+hmellor@users.noreply.github.com>
This commit is contained in:
Simon
2026-09-03 10:52:42 +00:00
committed by GitHub
co-authored by Claude Harry Mellor
parent facd9a74a1
commit ee0a4c46ae
2 changed files with 25 additions and 8 deletions
+19
View File
@@ -464,6 +464,25 @@ def test_attention_config():
engine_args.create_engine_config()
def test_multi_node_world_size_includes_pcp(monkeypatch):
"""PCP expands the process world size, so the --nnodes divisibility check
must include it. Without this, TP=1/PCP=2 over 2 nodes computes a world
size of 1 and the launch is rejected before the engine starts."""
import vllm.config.vllm
# PCP requires the V2 model runner, which is gated on Triton.
monkeypatch.setattr(vllm.config.vllm, "HAS_TRITON", True)
engine_args = EngineArgs(
model="facebook/opt-125m",
tensor_parallel_size=1,
prefill_context_parallel_size=2,
nnodes=2,
)
vllm_config = engine_args.create_engine_config()
assert vllm_config.parallel_config.world_size == 2
def test_prefix_cache_default():
parser = EngineArgs.add_cli_args(FlexibleArgumentParser())
args = parser.parse_args([])