diff --git a/python/sglang/srt/model_executor/runner/prefill_cuda_graph_runner.py b/python/sglang/srt/model_executor/runner/prefill_cuda_graph_runner.py index d87e54353..96b211ad0 100644 --- a/python/sglang/srt/model_executor/runner/prefill_cuda_graph_runner.py +++ b/python/sglang/srt/model_executor/runner/prefill_cuda_graph_runner.py @@ -1608,6 +1608,13 @@ class PrefillCudaGraphRunner(BaseCudaGraphRunner): s["extend_start_loc"][bs:r].fill_(self.raw_num_tokens) s["req_pool_indices"][bs:r].zero_() s["orig_seq_lens"][bs:r].zero_() + # The captured track scatter reads these rows too, and a stale + # mask row still carries a live destination slot: it would land + # this replay's window in an earlier request's checkpoint. + registry = self.buffer_registry + for name in ("mamba_track_mask", "mamba_track_indices"): + if registry.has_slot(name): + registry.get_slot(name).buffer[bs:r].zero_() # Refresh the static buffer the captured graph reads from. if ( diff --git a/test/registered/models_e2e/test_inkling_small_nvfp4.py b/test/registered/models_e2e/test_inkling_small_nvfp4.py index e11f0f550..40998b8a6 100644 --- a/test/registered/models_e2e/test_inkling_small_nvfp4.py +++ b/test/registered/models_e2e/test_inkling_small_nvfp4.py @@ -163,7 +163,6 @@ class TestInklingSmallNvfp4Deterministic(CustomTestCase): "--mem-fraction-static", "0.85", "--enable-deterministic-inference", - "--disable-prefill-cuda-graph", ], env={**os.environ, "SGLANG_ENABLE_UNIFIED_RADIX_TREE": "1"}, )