diff --git a/python/sglang/srt/speculative/eagle_worker_v2.py b/python/sglang/srt/speculative/eagle_worker_v2.py index a91fca4691..dc73ee46d6 100644 --- a/python/sglang/srt/speculative/eagle_worker_v2.py +++ b/python/sglang/srt/speculative/eagle_worker_v2.py @@ -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