[Perf] spec: Let the FlashAttention backend capture the draft-extend CUDA graph (#40762)

This commit is contained in:
Yuxuan Zhou
2026-10-20 03:05:42 -07:00
committed by GitHub
parent 9db58ab547
commit 306ccf6f57
@@ -554,6 +554,13 @@ class EagleDraftWorker(EagleDraftWorkerBase):
graph_supported_backend_types.append(DeepseekV4AttnBackend)
if _is_cuda:
# FlashAttention is CUDA-only here; import lazily so MUSA and NPU
# builds don't pull sgl_kernel in at import time.
from sglang.srt.layers.attention.flashattention_backend import (
FlashAttentionBackend,
)
graph_supported_backend_types.append(FlashAttentionBackend)
# FlashMLA is CUDA-only; import lazily so CPU builds don't pull
# sgl_kernel.flash_mla at import time.
from sglang.srt.layers.attention.flashmla_backend import FlashMLABackend