[Perf][Qwen3-TTS] Enable event-driven orchestration by default (#7088)

Signed-off-by: Sy03 <1370724210@qq.com>
This commit is contained in:
Sy03 authored and GitHub committed 2026-09-21 12:09:19 -07:00
1 parent 60a933b9ab
commit 473da2cf82
13 files changed
+231 -27

No files matched your search

+23
View File
@@ -1,3 +1,6 @@
# SPDX-License-Identifier: Apache-2.0
# SPDX-FileCopyrightText: Copyright contributors to the vLLM-Omni project
"""Optional orchestrator window monitor (diagnostic only).
Enable with:
@@ -56,6 +59,8 @@ class OrchestratorMonitorBase(Protocol):
def note_loop(self, *, idle: bool) -> None: ...
def set_dispatch_queue_size(self, size: int) -> None: ...
def flush(self) -> None: ...
@@ -66,6 +71,9 @@ class _NullOrchestratorMonitor:
def note_loop(self, *, idle: bool) -> None:
return
def set_dispatch_queue_size(self, size: int) -> None:
return
def flush(self) -> None:
return
@@ -94,6 +102,10 @@ class OrchestratorMonitor:
self._duration_s: list[float] = []
self._loop_idle_buf: list[int] = []
self._loop_active_buf: list[int] = []
self._dispatch_queue_size = 0
self._dispatch_queue_size_buf: list[int] = []
self._dispatch_queue_high_water = 0
self._dispatch_queue_high_water_buf: list[int] = []
self._replicas: dict[str, _ReplicaSeries] = {}
def register_replica(self, stage_id: int, replica_id: int) -> None:
@@ -107,6 +119,11 @@ class OrchestratorMonitor:
else:
self._loop_active += 1
def set_dispatch_queue_size(self, size: int) -> None:
size = max(int(size), 0)
self._dispatch_queue_size = size
self._dispatch_queue_high_water = max(self._dispatch_queue_high_water, size)
def flush(self) -> None:
if self._flushed:
return
@@ -118,6 +135,8 @@ class OrchestratorMonitor:
"duration_s": self._duration_s,
"loop_idle": self._loop_idle_buf,
"loop_active": self._loop_active_buf,
"dispatch_queue_size": self._dispatch_queue_size_buf,
"dispatch_queue_high_water": self._dispatch_queue_high_water_buf,
},
"replicas": dict(sorted(self._replicas.items())),
}
@@ -154,6 +173,8 @@ class OrchestratorMonitor:
self._duration_s.append(max(now_mono - self._window_start_mono, 1e-9))
self._loop_idle_buf.append(self._loop_idle)
self._loop_active_buf.append(self._loop_active)
self._dispatch_queue_size_buf.append(self._dispatch_queue_size)
self._dispatch_queue_high_water_buf.append(self._dispatch_queue_high_water)
for key, series in self._replicas.items():
outputs_qsize, inflight = sampled.get(key, (0, 0))
series["outputs_queue_size"].append(outputs_qsize)
@@ -161,6 +182,8 @@ class OrchestratorMonitor:
self._loop_idle = 0
self._loop_active = 0
# Queued work carries into the next window even without new arrivals.
self._dispatch_queue_high_water = self._dispatch_queue_size
self._window_start_mono = now_mono
def _log_summary(self, output_path: str) -> None: