"tests/vscode:/vscode.git/clone" did not exist on "c68c7b403dce632dbbbb6d2482ea86fe7bf53d51"
Unverified Commit 61e20828 authored by Yong Hoon Shin's avatar Yong Hoon Shin Committed by GitHub
Browse files

Fall back if flashinfer comm module not found (#20936)


Signed-off-by: default avatarYong Hoon Shin <yhshin@meta.com>
parent 55e1c66d
......@@ -20,10 +20,12 @@ from vllm.utils import direct_register_custom_op
from .vllm_inductor_pass import VllmInductorPass
if find_spec("flashinfer"):
try:
import flashinfer.comm as flashinfer_comm
flashinfer_comm = (flashinfer_comm if hasattr(
flashinfer_comm, "trtllm_allreduce_fusion") else None)
except ImportError:
flashinfer_comm = None
else:
flashinfer_comm = None
from vllm.platforms import current_platform
......@@ -411,7 +413,8 @@ class AllReduceFusionPass(VllmInductorPass):
use_fp32_lamport = self.model_dtype == torch.float32
if flashinfer_comm is None:
logger.warning(
"Flashinfer is not installed, skipping allreduce fusion pass")
"Flashinfer is not installed or comm module not found, "
"skipping allreduce fusion pass")
return
# Check if the world size is supported
if self.tp_size not in _FI_MAX_SIZES:
......
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