[v0.11.0] [P/D] force with_prefill true after allreduce in kv producer (#3835)

### What this PR does / why we need it?
force with_prefill true after allreduce in kv producer. This is a backport of #3768 and #3849

---------

Signed-off-by: liziyu <liziyu16@huawei.com>
This commit is contained in:
liziyu
2025-10-29 23:14:00 +08:00
committed by GitHub
parent b323be9fe4
commit e5b938c5fe
2 changed files with 6 additions and 5 deletions

View File

@@ -1145,7 +1145,8 @@ class MooncakeLayerwiseConnectorWorker:
connector_metadata: MooncakeLayerwiseConnectorMetadata,
**kwargs) -> None:
"""MooncakeLayerwiseConnector does not save explicitly."""
if self.kv_role == 'kv_producer':
if self.kv_role == 'kv_producer' and connector_metadata.requests.keys(
):
if self.pd_head_ratio != 1:
if self.current_layer != 0:
self.completion_event.wait()