[Worker] E2-identity and rank-tagged e2-toggles startup lines

Each worker logs its launch identity and, after warm-up and capture, one
e2-toggles line with the effective toggle state read back from the C++
extensions through two new tensor-free query ops. Both extensions must be
rebuilt.

Co-Authored-By: Hinata <hinata@idihore.id>
Signed-off-by: MOVZX <movzx@yahoo.com>
This commit is contained in:
2026-10-09 19:56:00 +07:00
co-authored by Hinata
parent bef464a69d
commit 281491646d
8 changed files with 734 additions and 7 deletions
+6 -1
View File
@@ -85,7 +85,7 @@ from vllm.v1.watermarking.spec_decode import (
create_speculative_target_watermarker,
speculative_target_watermark_key,
)
from vllm.v1.worker import guard_telemetry
from vllm.v1.worker import e2_toggles, guard_telemetry
from vllm.v1.worker.block_table import get_block_table_width
from vllm.v1.worker.cp_utils import check_attention_cp_compatibility
from vllm.v1.worker.gpu import pcp_manager as pcp
@@ -1863,6 +1863,9 @@ class GPUModelRunner(LoRAModelRunnerMixin):
# never fire on them. Outside any capture: this is the engine
# thread between steps (read() re-checks).
topk_counters.maybe_log()
# v2.2: the e2-toggles line if arm() had to defer it (a C++ static
# still uninitialised). One bool check once it has been emitted.
e2_toggles.maybe_emit()
# Update the request states.
self.update_pp_decode_requests()
self.finish_requests(scheduler_output)
@@ -2580,6 +2583,8 @@ class GPUModelRunner(LoRAModelRunnerMixin):
# The last window of a run is the one a cadence log always
# misses; emit it before the device state goes away.
topk_counters.maybe_log(force=True)
# v2.2: a still-deferred e2-toggles line goes out now, 'uninit' and all.
e2_toggles.maybe_emit(force=True)
if self._ple_offload_connector is not None:
self._ple_offload_connector.close()
self._ple_offload_connector = None