[Rust Frontend][RL]: report engine world size over gRPC (#53204)
Signed-off-by: Biswa Panda <biswa.panda@gmail.com>
Biswa Panda committed
Aug 22, 2026 at 19:31 UTC
9dba2c9b374af3a47c1cef952195ee114bab94c7
4 files changed
+13
-2
rust/proto/control.proto
+1
@@ -55,6 +55,7 @@ message ParallelismInfo {
55
uint32 data_parallel_size = 3;
56
uint32 data_parallel_rank = 4;
57
uint32 decode_context_parallel_size = 5;
58
+ uint64 world_size = 6;
59
}
60
61
message GetModelInfoRequest {}
rust/src/engine-core-client/src/protocol/handshake.rs
+2
-1
@@ -61,7 +61,8 @@ pub struct EngineCoreReadyResponse {
61
pub dtype: ModelDtype,
62
/// Python vLLM version reported by the engine process.
63
pub vllm_version: String,
64
- /// World size (TP * PP) from the parallel config.
64
+ /// Per-DP-engine world size (TP * PP * PCP) from the parallel config.
65
+ /// Deployment-wide world size also multiplies by `data_parallel_size`.
66
pub world_size: u64,
67
/// Data-parallel size from this EngineCore's effective parallel config.
68
/// Dense independent-DP ranks are reconfigured to report `1`; the client
rust/src/server/src/grpc/control.rs
+1
@@ -46,6 +46,7 @@ impl ControlServiceImpl {
46
data_parallel_size: self.client().data_parallel_size().min(u32::MAX as usize) as u32,
47
data_parallel_rank: ready.data_parallel_rank,
48
decode_context_parallel_size: ready.decode_context_parallel_size,
49
+ world_size: ready.world_size,
50
}
51
}
52
rust/src/server/src/grpc/tests.rs
+9
-1
@@ -1626,6 +1626,9 @@ async fn control_aggregates_multi_engine_capacity() {
1626
ready_0.max_model_len = 8_192;
1627
ready_0.num_gpu_blocks = 10;
1628
ready_0.effective_data_parallel_size = 2;
1629
+ ready_0.tensor_parallel_size = 2;
1630
+ ready_0.pipeline_parallel_size = 3;
1631
+ ready_0.world_size = 12;
1632
ready_0.weight_transfer_backend = Some("nccl".to_string());
1633
ready_0.enable_sleep_mode = true;
1634
ready_0.supports_draft_weight_updates = true;
@@ -1634,6 +1637,9 @@ async fn control_aggregates_multi_engine_capacity() {
1637
ready_1.max_model_len = 4_096;
1638
ready_1.num_gpu_blocks = 20;
1639
ready_1.effective_data_parallel_size = 2;
1640
+ ready_1.tensor_parallel_size = 2;
1641
+ ready_1.pipeline_parallel_size = 3;
1642
+ ready_1.world_size = 12;
1643
ready_1.data_parallel_rank = 1;
1644
1645
let engine_tasks = [ready_0, ready_1].map(|ready| {
@@ -1684,7 +1690,9 @@ async fn control_aggregates_multi_engine_capacity() {
1690
assert!(rl.weight_transfer_backend.is_empty());
1691
assert!(!rl.sleep_mode_enabled);
1692
assert!(!rl.draft_weight_updates_enabled);
1687
- assert_eq!(server.parallelism.unwrap().data_parallel_size, 2);
1693
+ let parallelism = server.parallelism.unwrap();
1694
+ assert_eq!(parallelism.data_parallel_size, 2);
1695
+ assert_eq!(parallelism.world_size, 12);
1696
1697
drop(engine_tasks);
1698
}