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
699bca76
Unverified
Commit
699bca76
authored
Nov 24, 2025
by
Wentao Ye
Committed by
GitHub
Nov 24, 2025
Browse files
[UX] Raise error for attn backend of batch invariant (#29348)
Signed-off-by:
yewentao256
<
zhyanwentao@126.com
>
parent
c17610e2
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
7 deletions
+7
-7
vllm/model_executor/layers/batch_invariant.py
vllm/model_executor/layers/batch_invariant.py
+7
-7
No files found.
vllm/model_executor/layers/batch_invariant.py
View file @
699bca76
...
...
@@ -812,19 +812,19 @@ def override_envs_for_invariance():
# "TRITON_MLA",
]
if
curr_attn_backend
not
in
supported_backends
:
warning
=
(
"Forcibly updating attention backend to"
f
"
{
supported_backends
[
0
]
}
for batch_invariant. "
f
" Supported backends:
{
supported_backends
}
."
error
=
(
"VLLM batch_invariant mode requires an attention backend in "
f
"
{
supported_backends
}
, but got '
{
curr_attn_backend
}
'. "
"Please set the 'VLLM_ATTENTION_BACKEND' environment variable "
"to one of the supported backends before enabling batch_invariant."
)
logger
.
warning_once
(
warning
)
os
.
environ
[
"VLLM_ATTENTION_BACKEND"
]
=
supported_backends
[
0
]
raise
RuntimeError
(
error
)
if
os
.
environ
[
"VLLM_ATTENTION_BACKEND"
]
!=
supported_backends
[
0
]:
warning
=
(
"You are using a decode-invariant form of batch invariance. "
"This will not be invariant between prefill and decode."
)
logger
.
warning_once
(
warning
)
logger
.
warning_once
(
warning
,
scope
=
"local"
)
os
.
environ
[
"VLLM_ALLREDUCE_USE_SYMM_MEM"
]
=
"0"
os
.
environ
[
"CUBLAS_WORKSPACE_CONFIG"
]
=
":4096:8"
...
...
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