Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
change
sglang
Commits
3a77c80b
Unverified
Commit
3a77c80b
authored
Sep 12, 2025
by
fzyzcjy
Committed by
GitHub
Sep 12, 2025
Browse files
Fix FA4 import cause moe_fused_gate output be illegal memory (#10368)
parent
36acd2ff
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
8 deletions
+2
-8
sgl-kernel/python/sgl_kernel/flash_attn.py
sgl-kernel/python/sgl_kernel/flash_attn.py
+2
-8
No files found.
sgl-kernel/python/sgl_kernel/flash_attn.py
View file @
3a77c80b
...
...
@@ -9,11 +9,6 @@ try:
except
:
raise
ImportError
(
"Can not import sgl_kernel. Please check your installation."
)
try
:
from
._fa4_interface
import
flash_attn_varlen_func
as
flash_attn_varlen_func_v4
except
ImportError
:
flash_attn_varlen_func_v4
=
None
@
lru_cache
(
maxsize
=
1
)
def
is_fa3_supported
(
device
=
None
)
->
bool
:
...
...
@@ -249,9 +244,8 @@ def flash_attn_varlen_func(
ver
=
3
,
):
if
ver
==
4
:
assert
(
flash_attn_varlen_func_v4
is
not
None
),
"FA4 is not available, please check your installation."
from
._fa4_interface
import
flash_attn_varlen_func
as
flash_attn_varlen_func_v4
# Using `(-1, -1)` as no sliding window causes correctness issues for FA4.
if
window_size
==
(
-
1
,
-
1
):
window_size
=
(
None
,
None
)
...
...
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