Unverified Commit c215f5c8 authored by Wentao Ye's avatar Wentao Ye Committed by GitHub
Browse files

[Bug] Fix `has_flashinfer_moe` Import Error when it is not installed (#21634)


Signed-off-by: default avataryewentao256 <zhyanwentao@126.com>
parent 1cd6eaba
...@@ -82,7 +82,8 @@ autotune = _lazy_import_wrapper( ...@@ -82,7 +82,8 @@ autotune = _lazy_import_wrapper(
@functools.cache @functools.cache
def has_flashinfer_moe() -> bool: def has_flashinfer_moe() -> bool:
"""Return ``True`` if FlashInfer MoE module is available.""" """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 @functools.cache
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment