[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>
This commit is contained in:
Chauncey
2026-08-16 23:24:14 +08:00
committed by GitHub
co-authored by mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
parent 9409f59e09
commit 83f591d7f6
@@ -477,15 +477,15 @@ def compute_global_topk_indices_and_lens(
@triton.jit
def _compute_global_topk_indices_and_lens_kernel(
global_topk_indices_ptr,
global_topk_indices_stride,
global_topk_indices_stride: tl.constexpr,
topk_lens_ptr,
topk_indices_ptr,
topk_indices_stride,
topk,
topk_indices_stride: tl.constexpr,
topk: tl.constexpr,
token_to_req_indices_ptr,
block_table_ptr,
block_table_stride,
block_size,
block_table_stride: tl.constexpr,
block_size: tl.constexpr,
is_valid_token_ptr,
TRITON_BLOCK_SIZE: tl.constexpr,
):