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
zhaoyu6
sglang
Commits
3a77c80b
"vscode:/vscode.git/clone" did not exist on "f39a0197fdc39aeb468f8b51f7b9e7631a02bf98"
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
Show 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:
...
@@ -9,11 +9,6 @@ try:
except
:
except
:
raise
ImportError
(
"Can not import sgl_kernel. Please check your installation."
)
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
)
@
lru_cache
(
maxsize
=
1
)
def
is_fa3_supported
(
device
=
None
)
->
bool
:
def
is_fa3_supported
(
device
=
None
)
->
bool
:
...
@@ -249,9 +244,8 @@ def flash_attn_varlen_func(
...
@@ -249,9 +244,8 @@ def flash_attn_varlen_func(
ver
=
3
,
ver
=
3
,
):
):
if
ver
==
4
:
if
ver
==
4
:
assert
(
from
._fa4_interface
import
flash_attn_varlen_func
as
flash_attn_varlen_func_v4
flash_attn_varlen_func_v4
is
not
None
),
"FA4 is not available, please check your installation."
# Using `(-1, -1)` as no sliding window causes correctness issues for FA4.
# Using `(-1, -1)` as no sliding window causes correctness issues for FA4.
if
window_size
==
(
-
1
,
-
1
):
if
window_size
==
(
-
1
,
-
1
):
window_size
=
(
None
,
None
)
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