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
748f86f3
Unverified
Commit
748f86f3
authored
Oct 06, 2025
by
Lifu Huang
Committed by
GitHub
Oct 06, 2025
Browse files
[Bug] Fix incorrect assertion in FA4 and add UT. (#11182)
parent
73ea484a
Changes
2
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
576 additions
and
5 deletions
+576
-5
sgl-kernel/python/sgl_kernel/flash_attn.py
sgl-kernel/python/sgl_kernel/flash_attn.py
+1
-4
sgl-kernel/tests/test_flash_attention_4.py
sgl-kernel/tests/test_flash_attention_4.py
+575
-1
No files found.
sgl-kernel/python/sgl_kernel/flash_attn.py
View file @
748f86f3
...
@@ -161,10 +161,7 @@ def flash_attn_with_kvcache(
...
@@ -161,10 +161,7 @@ def flash_attn_with_kvcache(
k
is
None
and
v
is
None
k
is
None
and
v
is
None
),
"FA4 does not support updating KV cache in-place."
),
"FA4 does not support updating KV cache in-place."
assert
(
assert
(
rotary_cos
is
None
rotary_cos
is
None
and
rotary_sin
is
None
and
rotary_seqlens
is
None
and
rotary_sin
is
None
and
rotary_interleaved
is
None
and
rotary_seqlens
is
None
),
"FA4 does not support rotary embedding."
),
"FA4 does not support rotary embedding."
assert
(
assert
(
cache_batch_idx
is
None
and
cache_leftpad
is
None
cache_batch_idx
is
None
and
cache_leftpad
is
None
...
...
sgl-kernel/tests/test_flash_attention_4.py
View file @
748f86f3
This diff is collapsed.
Click to expand it.
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