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
a57c877f
Unverified
Commit
a57c877f
authored
Mar 05, 2026
by
Frank Wang
Committed by
GitHub
Mar 05, 2026
Browse files
[BugFix] Fallback from FA4->FA2 for Batch Invariance (#36059)
Signed-off-by:
frankwang28
<
frank.wbb@hotmail.com
>
parent
f9170209
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
0 deletions
+11
-0
vllm/v1/attention/backends/fa_utils.py
vllm/v1/attention/backends/fa_utils.py
+11
-0
No files found.
vllm/v1/attention/backends/fa_utils.py
View file @
a57c877f
...
@@ -4,6 +4,7 @@
...
@@ -4,6 +4,7 @@
from
typing
import
Any
from
typing
import
Any
from
vllm.logger
import
init_logger
from
vllm.logger
import
init_logger
from
vllm.model_executor.layers.batch_invariant
import
vllm_is_batch_invariant
from
vllm.platforms
import
current_platform
from
vllm.platforms
import
current_platform
logger
=
init_logger
(
__name__
)
logger
=
init_logger
(
__name__
)
...
@@ -111,6 +112,16 @@ def get_flash_attn_version(
...
@@ -111,6 +112,16 @@ def get_flash_attn_version(
)
)
fa_version
=
2
fa_version
=
2
# FA4 currently uses batch-shape-dependent scheduling
# heuristics on SM100+, which breaks batch invariance.
if
vllm_is_batch_invariant
()
and
fa_version
==
4
:
logger
.
warning_once
(
"Cannot use FA version 4 with batch invariance, "
"defaulting to FA version 2."
,
scope
=
"local"
,
)
fa_version
=
2
# FA4 on SM100 (Blackwell) has TMEM capacity limits that restrict
# FA4 on SM100 (Blackwell) has TMEM capacity limits that restrict
# supported head dimensions.
# supported head dimensions.
# See: https://github.com/Dao-AILab/flash-attention/issues/1959
# See: https://github.com/Dao-AILab/flash-attention/issues/1959
...
...
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