diff --git a/rust/proto/control.proto b/rust/proto/control.proto index 1903405e27..45eac602ec 100644 --- a/rust/proto/control.proto +++ b/rust/proto/control.proto @@ -55,6 +55,7 @@ message ParallelismInfo { uint32 data_parallel_size = 3; uint32 data_parallel_rank = 4; uint32 decode_context_parallel_size = 5; + uint64 world_size = 6; } message GetModelInfoRequest {} diff --git a/rust/src/engine-core-client/src/protocol/handshake.rs b/rust/src/engine-core-client/src/protocol/handshake.rs index c7146abdbb..c14c19a503 100644 --- a/rust/src/engine-core-client/src/protocol/handshake.rs +++ b/rust/src/engine-core-client/src/protocol/handshake.rs @@ -61,7 +61,8 @@ pub struct EngineCoreReadyResponse { pub dtype: ModelDtype, /// Python vLLM version reported by the engine process. pub vllm_version: String, - /// World size (TP * PP) from the parallel config. + /// Per-DP-engine world size (TP * PP * PCP) from the parallel config. + /// Deployment-wide world size also multiplies by `data_parallel_size`. pub world_size: u64, /// Data-parallel size from this EngineCore's effective parallel config. /// Dense independent-DP ranks are reconfigured to report `1`; the client diff --git a/rust/src/server/src/grpc/control.rs b/rust/src/server/src/grpc/control.rs index 9637dcbf8e..ba4ee7b997 100644 --- a/rust/src/server/src/grpc/control.rs +++ b/rust/src/server/src/grpc/control.rs @@ -46,6 +46,7 @@ impl ControlServiceImpl { data_parallel_size: self.client().data_parallel_size().min(u32::MAX as usize) as u32, data_parallel_rank: ready.data_parallel_rank, decode_context_parallel_size: ready.decode_context_parallel_size, + world_size: ready.world_size, } } diff --git a/rust/src/server/src/grpc/tests.rs b/rust/src/server/src/grpc/tests.rs index 9c1ea33b6b..6a1074b524 100644 --- a/rust/src/server/src/grpc/tests.rs +++ b/rust/src/server/src/grpc/tests.rs @@ -1626,6 +1626,9 @@ async fn control_aggregates_multi_engine_capacity() { ready_0.max_model_len = 8_192; ready_0.num_gpu_blocks = 10; ready_0.effective_data_parallel_size = 2; + ready_0.tensor_parallel_size = 2; + ready_0.pipeline_parallel_size = 3; + ready_0.world_size = 12; ready_0.weight_transfer_backend = Some("nccl".to_string()); ready_0.enable_sleep_mode = true; ready_0.supports_draft_weight_updates = true; @@ -1634,6 +1637,9 @@ async fn control_aggregates_multi_engine_capacity() { ready_1.max_model_len = 4_096; ready_1.num_gpu_blocks = 20; ready_1.effective_data_parallel_size = 2; + ready_1.tensor_parallel_size = 2; + ready_1.pipeline_parallel_size = 3; + ready_1.world_size = 12; ready_1.data_parallel_rank = 1; let engine_tasks = [ready_0, ready_1].map(|ready| { @@ -1684,7 +1690,9 @@ async fn control_aggregates_multi_engine_capacity() { assert!(rl.weight_transfer_backend.is_empty()); assert!(!rl.sleep_mode_enabled); assert!(!rl.draft_weight_updates_enabled); - assert_eq!(server.parallelism.unwrap().data_parallel_size, 2); + let parallelism = server.parallelism.unwrap(); + assert_eq!(parallelism.data_parallel_size, 2); + assert_eq!(parallelism.world_size, 12); drop(engine_tasks); }