[Feat] Support PP with PCP in GPU Model Runner V2 (#59139)

Signed-off-by: QiuChunshuo <qiuchunshuo@huawei.com>
Co-authored-by: Lucas Wilkinson <LucasWilkinson@users.noreply.github.com>
This commit is contained in:
Qiu Chunshuo
2026-09-30 10:21:56 -04:00
committed by GitHub
co-authored by Lucas Wilkinson
parent 2e52a558f0
commit 98b45c1a94
4 changed files with 46 additions and 3 deletions
+2
View File
@@ -2064,6 +2064,8 @@ class GPUModelRunner(LoRAModelRunnerMixin):
# Non-last PP rank: hidden_states is None because this rank produced
# IntermediateTensors instead of final hidden states. Receive the
# sampled tokens broadcast from the last rank and update local state.
if self.pcp_manager is not None:
input_batch = self.pcp_manager.global_batch
assert self.pp_handler is not None
all_decode_next = self.pp_handler.receive(input_batch)
# Optimistically update num_computed_tokens for entire batch here.
+5 -2
View File
@@ -131,8 +131,6 @@ class PCPManager:
if not model_config.use_mla:
raise NotImplementedError("MRV2 PCP currently supports MLA models only.")
if parallel_config.pipeline_parallel_size > 1:
raise NotImplementedError("MRV2 PCP does not support PP yet.")
if model_config.is_encoder_decoder:
raise NotImplementedError(
"MRV2 PCP does not support encoder-decoder models yet."
@@ -406,6 +404,11 @@ class PCPManager:
assert self._input_buffers is not None
return self._input_buffers
@property
def global_batch(self) -> InputBatch:
assert self._global_batch is not None
return self._global_batch
def partition_batch(
self, input_batch: InputBatch, batch_desc: "BatchExecutionDescriptor"
) -> InputBatch: