diff --git a/vllm/utils/flashinfer.py b/vllm/utils/flashinfer.py index b25e3a49f1812..ebc54fd029da6 100644 --- a/vllm/utils/flashinfer.py +++ b/vllm/utils/flashinfer.py @@ -82,7 +82,8 @@ autotune = _lazy_import_wrapper( @functools.cache def has_flashinfer_moe() -> bool: """Return ``True`` if FlashInfer MoE module is available.""" - return importlib.util.find_spec("flashinfer.fused_moe") is not None + return has_flashinfer() and importlib.util.find_spec( + "flashinfer.fused_moe") is not None @functools.cache