[Bugfix][Model Runner V2][Spec Decode] Fix int32 offset overflow in sampler kernels (#46560)

Signed-off-by: xiaojun.wei <jessiewei747@gmail.com>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
Co-authored-by: Robert Shaw <114415538+robertgshaw2-redhat@users.noreply.github.com>
This commit is contained in:
JessieWei
2026-06-24 11:00:57 -07:00
committed by GitHub
co-authored by Claude Opus 4.8 Robert Shaw
parent 56ca5997ea
commit 3c43237233
10 changed files with 90 additions and 16 deletions
+1 -1
View File
@@ -111,7 +111,7 @@ def _topk_topp_kernel(
pid = tl.program_id(0)
num_programs = tl.num_programs(0)
for row_id in tl.range(pid, BATCH_SIZE, num_programs):
LOGITS_ROW = LOGITS + row_id * LOGITS_STRIDE_0
LOGITS_ROW = LOGITS + row_id.to(tl.int64) * LOGITS_STRIDE_0
BUFFER_ROW = BUFFER + pid * VOCAB_SIZE
final_pivot = -float("inf")