[Bugfix][RecoverSSM] Correct aligned state indices at exact block boundaries (#59962)

Signed-off-by: apex-mochen <2756823972@qq.com>
Co-authored-by: Codex <noreply@openai.com>
This commit is contained in:
dingdangmao
2026-10-12 02:08:14 +00:00
committed by GitHub
co-authored by Codex
parent 03091e28b8
commit 124b89d5b7
4 changed files with 21 additions and 9 deletions
@@ -94,7 +94,7 @@ def _postprocess_recoverssm_align_kernel(
tl.store(
state_idx_ptr + req_state_idx,
tl.minimum(
(num_computed + num_sampled) // MAMBA_BLOCK_SIZE,
tl.maximum(num_computed + num_sampled - 1, 0) // MAMBA_BLOCK_SIZE,
BLOCK_TABLE_WIDTH - 1,
),
)