[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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user