[Spec] Fix wrong tokens from compact-verify CUDA graphs when a token tier is captured more than once (#42709)

Co-authored-by: kpham-sgl <khoa.pham@radixark.ai>
This commit is contained in:
ormandj
2026-10-08 19:49:23 -07:00
committed by GitHub
co-authored by kpham-sgl
parent 8e19db19b0
commit 438df9a2a4
2 changed files with 40 additions and 0 deletions
@@ -655,6 +655,9 @@ class DecodeCudaGraphRunner(BaseCudaGraphRunner):
return None
if envs.SGLANG_TEST_RAGGED_VERIFY_FORCE_UNIFORM_CAPTURE.get():
return None
layout = self._captured_ragged_layouts.get(num_tokens)
if layout is not None:
return layout
from sglang.srt.speculative.ragged_verify import (
RaggedVerifyLayout,
build_capture_verify_lens,