[P/D]kv_output_aggregator support P TP > D TP (#23917)

Signed-off-by: LCAIZJ <leichao139636@163.com>
Co-authored-by: leichao.lc <leichao.lc@antgroup.com>
This commit is contained in:
Chao Lei
2025-09-15 17:36:06 +08:00
committed by GitHub
parent a0d8b9738d
commit 8de261b04a
5 changed files with 21 additions and 5 deletions

View File

@@ -13,6 +13,7 @@ from typing_extensions import TypeVar
import vllm.platforms
from vllm.config import VllmConfig
from vllm.distributed.kv_transfer.kv_connector.utils import KVOutputAggregator
from vllm.logger import init_logger
from vllm.lora.request import LoRARequest
from vllm.model_executor.layers.sampler import SamplerOutput
@@ -54,6 +55,7 @@ class ExecutorBase(ABC):
self._init_executor()
self.is_sleeping = False
self.sleeping_tags: set[str] = set()
self.kv_output_aggregator = None
@abstractmethod
def _init_executor(self) -> None:
@@ -252,6 +254,11 @@ class ExecutorBase(ABC):
exception."""
self.check_health()
def init_kv_output_aggregator(self, finished_count: Optional[int]) -> None:
"""Init KVOutputAggregator"""
self.kv_output_aggregator = KVOutputAggregator(
finished_count or self.parallel_config.world_size)
class DistributedExecutorBase(ExecutorBase):
"""Abstract superclass of distributed executor implementations."""