[Bugfix][SparseMLA] Fix piecewise cudagraph capture crash in index group (#56825)

Signed-off-by: Jared Wen <jaredwen@inferact.ai>
Co-authored-by: Kimi Code <noreply@moonshot.ai>
This commit is contained in:
Jared Wen
2026-09-15 06:51:35 +00:00
committed by GitHub
co-authored by Kimi Code
parent 79e205e8cd
commit 51918e252a
4 changed files with 100 additions and 6 deletions
+9
View File
@@ -209,6 +209,15 @@ def is_forward_context_available() -> bool:
return _forward_context is not None
def in_piecewise_cudagraph() -> bool:
"""Whether the current forward runs in piecewise cudagraph mode (graph
segments separated by eager breaks), at capture or replay time."""
return (
is_forward_context_available()
and get_forward_context().cudagraph_runtime_mode == CUDAGraphMode.PIECEWISE
)
def create_forward_context(
attn_metadata: Any,
vllm_config: VllmConfig,