[Perf][DSV4] Optimize global top-k index kernel with compile-time constants (#51967)
Signed-off-by: chaunceyjiang <chaunceyjiang@gmail.com> Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Chauncey committed
Aug 16, 2026 at 23:24 UTC
83f591d7f694a3ca3ae3bf22d646e818a1421872
1 file changed
+5
-5
vllm/models/deepseek_v4/common/ops/cache_utils.py
+5
-5
@@ -477,15 +477,15 @@ def compute_global_topk_indices_and_lens(
477
@triton.jit
478
def _compute_global_topk_indices_and_lens_kernel(
479
global_topk_indices_ptr,
480
- global_topk_indices_stride,
480
+ global_topk_indices_stride: tl.constexpr,
481
topk_lens_ptr,
482
topk_indices_ptr,
483
- topk_indices_stride,
484
- topk,
483
+ topk_indices_stride: tl.constexpr,
484
+ topk: tl.constexpr,
485
token_to_req_indices_ptr,
486
block_table_ptr,
487
- block_table_stride,
488
- block_size,
487
+ block_table_stride: tl.constexpr,
488
+ block_size: tl.constexpr,
489
is_valid_token_ptr,
490
TRITON_BLOCK_SIZE: tl.constexpr,
491
):