[Hardware][TPU] Add supports_async_scheduling() method to Executor interface so that it can be extended for Executor implementations. (#36924)
Signed-off-by: Guangxiang Du <gxd@google.com>
This commit is contained in:
@@ -353,6 +353,13 @@ class Executor(ABC):
|
||||
) -> None:
|
||||
raise NotImplementedError
|
||||
|
||||
@classmethod
|
||||
def supports_async_scheduling(cls) -> bool:
|
||||
"""
|
||||
Whether the executor supports async scheduling.
|
||||
"""
|
||||
return False
|
||||
|
||||
|
||||
from vllm.v1.executor.uniproc_executor import ( # noqa: E402
|
||||
ExecutorWithExternalLauncher as _ExecutorWithExternalLauncher,
|
||||
|
||||
@@ -487,6 +487,10 @@ class MultiprocExecutor(Executor):
|
||||
* self.parallel_config.prefill_context_parallel_size
|
||||
)
|
||||
|
||||
@classmethod
|
||||
def supports_async_scheduling(cls) -> bool:
|
||||
return True
|
||||
|
||||
|
||||
@dataclass
|
||||
class UnreadyWorkerProcHandle:
|
||||
|
||||
@@ -134,6 +134,10 @@ class UniProcExecutor(Executor):
|
||||
if worker := self.driver_worker:
|
||||
worker.shutdown()
|
||||
|
||||
@classmethod
|
||||
def supports_async_scheduling(cls) -> bool:
|
||||
return True
|
||||
|
||||
|
||||
class ExecutorWithExternalLauncher(UniProcExecutor):
|
||||
"""An executor that uses external launchers to launch engines,
|
||||
|
||||
Reference in New Issue
Block a user