@tduncan / Nvidia-Optimization-Stack-VLLM Mirror · read-only / commits / 24d1dffbeb
Fork 0

A high-throughput and memory-efficient inference and serving engine for LLMs

Mirrored from https://github.com/tduncan-lum/Nvidia-Optimization-Stack---VLLM.git

Synced Nov 14, 22:35 UTC

[executor] feat: add supports_pp attr to executors (#21786)

Signed-off-by: Haibin Lin <haibin.lin@bytedance.com>

H committed Aug 3, 2025 at 03:04 UTC 24d1dffbeb0d27cf42904153f56e919fb01b5a07
4 files changed +17 -8
vllm/engine/arg_utils.py
+12 -8
@@ -1490,14 +1490,18 @@ class EngineArgs:
1490 and _warn_or_fallback("Engine in background thread")):
1491 return False
1492
1493 - if (self.pipeline_parallel_size > 1
1494 - and self.distributed_executor_backend
1495 - not in (ParallelConfig.distributed_executor_backend, "ray",
1496 - "mp", "external_launcher")):
1497 - name = "Pipeline Parallelism without Ray distributed executor " \
1498 - "or multiprocessing executor or external launcher"
1499 - _raise_or_fallback(feature_name=name, recommend_to_remove=False)
1500 - return False
1493 + if self.pipeline_parallel_size > 1:
1494 + supports_pp = getattr(self.distributed_executor_backend,
1495 + 'supports_pp', False)
1496 + if not supports_pp and self.distributed_executor_backend not in (
1497 + ParallelConfig.distributed_executor_backend, "ray", "mp",
1498 + "external_launcher"):
1499 + name = "Pipeline Parallelism without Ray distributed " \
1500 + "executor or multiprocessing executor or external " \
1501 + "launcher"
1502 + _raise_or_fallback(feature_name=name,
1503 + recommend_to_remove=False)
1504 + return False
1505
1506 # The platform may be supported on V1, but off by default for now.
1507 if not current_platform.default_v1( # noqa: SIM103
vllm/executor/executor_base.py
+1
@@ -35,6 +35,7 @@ class ExecutorBase(ABC):
35 """
36
37 uses_ray: bool # whether the executor uses Ray for orchestration.
38 + supports_pp: bool = False # whether the executor supports PP
39
40 def __init__(
41 self,
vllm/v1/executor/multiproc_executor.py
+2
@@ -41,6 +41,8 @@ logger = init_logger(__name__)
41
42 class MultiprocExecutor(Executor):
43
44 + supports_pp: bool = True
45 +
46 def _init_executor(self) -> None:
47 # Call self.shutdown at exit to clean up
48 # and ensure workers will be terminated.
vllm/v1/executor/ray_distributed_executor.py
+2
@@ -43,6 +43,8 @@ class FutureWrapper(Future):
43 class RayDistributedExecutor(RayDistributedExecutorV0, Executor):
44 """Ray distributed executor using Ray Compiled Graphs."""
45
46 + supports_pp: bool = True
47 +
48 def _init_executor(self) -> None:
49 super()._init_executor()
50