[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
+5
View File
@@ -590,6 +590,8 @@ STABLE_TORCH_LIBRARY_FRAGMENT(_C, ops) {
ops.def(
"persistent_topk_exact_counters(Tensor! out, int reset, int sync) -> ()");
ops.def("persistent_topk_exact_counters_slots() -> int");
// v2.2 -- the switches as this process cached them (topk.cu for the layout).
ops.def("persistent_topk_toggle_state() -> int");
#ifdef VLLM_ENABLE_COOPERATIVE_TOPK
ops.def(
@@ -947,6 +949,9 @@ STABLE_TORCH_LIBRARY_IMPL(_C, CompositeExplicitAutograd, ops) {
// NotImplementedError "no fallback function is registered").
ops.impl("persistent_topk_exact_counters_slots",
TORCH_BOX(&persistent_topk_exact_counters_slots));
// Tensor-free for the same reason as the slot count above.
ops.impl("persistent_topk_toggle_state",
TORCH_BOX(&persistent_topk_toggle_state));
}
// Cache ops