Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
OpenDAS
vllm_cscc
Commits
61e20828
Unverified
Commit
61e20828
authored
Jul 14, 2025
by
Yong Hoon Shin
Committed by
GitHub
Jul 14, 2025
Browse files
Fall back if flashinfer comm module not found (#20936)
Signed-off-by:
Yong Hoon Shin
<
yhshin@meta.com
>
parent
55e1c66d
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
5 deletions
+8
-5
vllm/compilation/collective_fusion.py
vllm/compilation/collective_fusion.py
+8
-5
No files found.
vllm/compilation/collective_fusion.py
View file @
61e20828
...
@@ -20,10 +20,12 @@ from vllm.utils import direct_register_custom_op
...
@@ -20,10 +20,12 @@ from vllm.utils import direct_register_custom_op
from
.vllm_inductor_pass
import
VllmInductorPass
from
.vllm_inductor_pass
import
VllmInductorPass
if
find_spec
(
"flashinfer"
):
if
find_spec
(
"flashinfer"
):
try
:
import
flashinfer.comm
as
flashinfer_comm
import
flashinfer.comm
as
flashinfer_comm
flashinfer_comm
=
(
flashinfer_comm
if
hasattr
(
flashinfer_comm
=
(
flashinfer_comm
if
hasattr
(
flashinfer_comm
,
"trtllm_allreduce_fusion"
)
else
None
)
flashinfer_comm
,
"trtllm_allreduce_fusion"
)
else
None
)
except
ImportError
:
flashinfer_comm
=
None
else
:
else
:
flashinfer_comm
=
None
flashinfer_comm
=
None
from
vllm.platforms
import
current_platform
from
vllm.platforms
import
current_platform
...
@@ -411,7 +413,8 @@ class AllReduceFusionPass(VllmInductorPass):
...
@@ -411,7 +413,8 @@ class AllReduceFusionPass(VllmInductorPass):
use_fp32_lamport
=
self
.
model_dtype
==
torch
.
float32
use_fp32_lamport
=
self
.
model_dtype
==
torch
.
float32
if
flashinfer_comm
is
None
:
if
flashinfer_comm
is
None
:
logger
.
warning
(
logger
.
warning
(
"Flashinfer is not installed, skipping allreduce fusion pass"
)
"Flashinfer is not installed or comm module not found, "
"skipping allreduce fusion pass"
)
return
return
# Check if the world size is supported
# Check if the world size is supported
if
self
.
tp_size
not
in
_FI_MAX_SIZES
:
if
self
.
tp_size
not
in
_FI_MAX_SIZES
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment