From 9a697ceabb2dce6885f6a1ab8993d9980ade86c1 Mon Sep 17 00:00:00 2001 From: akhilg-nv <165961486+akhilg-nv@users.noreply.github.com> Date: Tue, 17 Mar 2026 00:42:11 -0700 Subject: [PATCH] [Fix #20389] Illegal memory access in triton attention for large token counts (#20390) --- python/sglang/srt/layers/attention/triton_backend.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/sglang/srt/layers/attention/triton_backend.py b/python/sglang/srt/layers/attention/triton_backend.py index d5c47d2fa..18ed55572 100644 --- a/python/sglang/srt/layers/attention/triton_backend.py +++ b/python/sglang/srt/layers/attention/triton_backend.py @@ -169,7 +169,7 @@ class TritonAttnBackend(AttentionBackend): if not self.skip_prefill: self.qo_indptr = torch.zeros( - (max_bs + 1,), dtype=torch.int32, device=model_runner.device + (max_bs + 1,), dtype=torch.int64, device=model_runner.device ) self.mask_indptr = torch.zeros(