[PCP][DCP] Support DCP target model with non-DCP Dspark (#56723)

Signed-off-by: Lucas Wilkinson <lwilkins@redhat.com>
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-authored-by: Codex <noreply@openai.com>
This commit is contained in:
Lucas Wilkinson
2026-09-26 18:12:35 -04:00
committed by GitHub
co-authored by Claude Opus 5 Codex
parent 77871126f9
commit 927c87b347
32 changed files with 606 additions and 201 deletions
+8
View File
@@ -1583,6 +1583,14 @@ def get_dcp_group() -> GroupCoordinator:
return _DCP
def get_dcp_world_size_and_rank(enabled: bool = True) -> tuple[int, int]:
"""Return ``(world_size, rank)`` in the DCP group, or ``(1, 0)`` when disabled
(e.g. a replicated draft cache) or the group is uninitialized (unit tests)."""
if not enabled or _DCP is None:
return 1, 0
return _DCP.world_size, _DCP.rank_in_group
_PP: GroupCoordinator | None = None