Benchmark and Bugfix for GLM-Image (#3024)

Signed-off-by: JaredforReal <w13431838023@gmail.com>
Signed-off-by: Hongsheng Liu <liuhongsheng4@huawei.com>
Co-authored-by: Hongsheng Liu <liuhongsheng4@huawei.com>
This commit is contained in:
Jared WenandHongsheng Liu authored and GitHub committed 2026-04-25 20:49:19 +08:00
1 parent 6b52db9e2b
commit 6e35bfbbae
18 files changed
+1836 -381

No files matched your search

+14
View File
@@ -114,6 +114,9 @@ class OrchestratorRequestState:
streaming: StreamingInputState = field(default_factory=lambda: StreamingInputState())
# Per-request pipeline timing accumulator (milliseconds)
pipeline_timings: dict[str, float] = field(default_factory=dict)
@dataclass
class StreamingInputState:
@@ -625,6 +628,7 @@ class Orchestrator:
total_token=self._agg_total_tokens[stage_id],
total_gen_time_ms=self._agg_total_gen_time_ms[stage_id],
),
pipeline_timings=dict(req_state.pipeline_timings),
)
def _build_kv_sender_info(self, sender_stage_ids: list[int]) -> dict[int, dict[str, Any]] | None:
@@ -682,6 +686,7 @@ class Orchestrator:
False,
)
_dt_ar2d = (_time.perf_counter() - _t_ar2d) * 1000
req_state.pipeline_timings["ar2diffusion_ms"] = _dt_ar2d
logger.info(
"[Orchestrator] ar2diffusion req=%s wall_time=%.3fms stage=%d->%d",
req_id,
@@ -911,6 +916,15 @@ class Orchestrator:
)
req_state.streaming.enabled = is_streaming
req_state.stage_submit_ts[stage_id] = _time.time()
# Per-request pipeline timings from caller thread
_enqueue_ts = msg.get("enqueue_ts", 0.0)
if _enqueue_ts > 0:
req_state.pipeline_timings["queue_wait_ms"] = (_time.perf_counter() - _enqueue_ts) * 1000.0
_preprocess_ms = msg.get("preprocess_ms", 0.0)
if _preprocess_ms > 0:
req_state.pipeline_timings["preprocess_ms"] = _preprocess_ms
self.request_states[request_id] = req_state
# Stage-0 prompt is already a fully-formed OmniEngineCoreRequest