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
62b33334
Unverified
Commit
62b33334
authored
Dec 05, 2025
by
Yanan Cao
Committed by
GitHub
Dec 05, 2025
Browse files
[Frontend] Remove deprecated -O.xx flag (#29991)
Signed-off-by:
Yanan Cao
<
gmagogsfm@gmail.com
>
parent
feecba09
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
29 deletions
+21
-29
docs/design/debug_vllm_compile.md
docs/design/debug_vllm_compile.md
+1
-1
tests/utils_/test_argparse_utils.py
tests/utils_/test_argparse_utils.py
+12
-15
vllm/utils/argparse_utils.py
vllm/utils/argparse_utils.py
+8
-13
No files found.
docs/design/debug_vllm_compile.md
View file @
62b33334
...
...
@@ -86,7 +86,7 @@ LLM(model, enforce_eager=True)
```
To turn off just torch.compile, pass
`mode = NONE`
to the compilation config.
(
`-cc`
is short for
`--compilation_config`
;
`-O.*`
dotted syntax is deprecated
):
(
`-cc`
is short for
`--compilation_config`
):
```
sh
# Online
...
...
tests/utils_/test_argparse_utils.py
View file @
62b33334
...
...
@@ -460,23 +460,20 @@ def test_flat_product():
]
def
test_o_
legacy
_syntax_
deprecation
(
caplog_vllm
):
"""Test that -O.* dotted syntax
emits warnings and converts correctly to -cc syntax
."""
def
test_o_
dotted
_syntax_
error
(
):
"""Test that -O.* dotted syntax
raises a clear error message
."""
parser
=
FlexibleArgumentParser
()
parser
.
add_argument
(
"-cc"
,
"--compilation-config"
,
type
=
json
.
loads
)
# Test that -O.
backend gets converted correctly AND emits warning
args
=
parser
.
parse_args
([
"-O.backend=eager"
])
assert
args
.
compilation_config
==
{
"
backend
"
:
"
eager"
}
# Test that -O.
* syntax raises a clear ValueError
with
pytest
.
raises
(
ValueError
,
match
=
r
"The -O\.\* syntax is no longer supported"
):
parser
.
parse_args
([
"-O.
backend
=
eager"
])
# Check that deprecation warning was logged
assert
len
(
caplog_vllm
.
records
)
>=
1
assert
(
"The -O.* dotted syntax for --compilation-config is deprecated"
in
caplog_vllm
.
text
)
with
pytest
.
raises
(
ValueError
,
match
=
r
"Please use -cc\.\* instead"
):
parser
.
parse_args
([
"-O.mode=2"
])
# Test that -O.mode gets converted correctly
# Note: warning_once won't emit again in same session
args
=
parser
.
parse_args
([
"-O.mode=2"
])
assert
args
.
compilation_config
==
{
"mode"
:
2
}
with
pytest
.
raises
(
ValueError
,
match
=
r
"replace '-O\.cudagraph_mode=NONE' with '-cc\.cudagraph_mode=NONE'"
,
):
parser
.
parse_args
([
"-O.cudagraph_mode=NONE"
])
vllm/utils/argparse_utils.py
View file @
62b33334
...
...
@@ -244,9 +244,15 @@ class FlexibleArgumentParser(ArgumentParser):
else
:
key
=
pattern
.
sub
(
repl
,
arg
,
count
=
1
)
processed_args
.
append
(
key
)
elif
arg
.
startswith
(
"-O"
)
and
arg
!=
"-O"
and
arg
[
2
]
!=
"."
:
elif
arg
.
startswith
(
"-O."
):
# Provide clear error for deprecated -O.* syntax
raise
ValueError
(
f
"The -O.* syntax is no longer supported. "
f
"Please use -cc.* instead. "
f
"For example, replace '
{
arg
}
' with '
{
arg
.
replace
(
'-O'
,
'-cc'
,
1
)
}
'"
)
elif
arg
.
startswith
(
"-O"
)
and
arg
!=
"-O"
:
# allow -O flag to be used without space, e.g. -O3 or -Odecode
# -O.<...> handled later
# also handle -O=<optimization_level> here
optimization_level
=
arg
[
3
:]
if
arg
[
2
]
==
"="
else
arg
[
2
:]
processed_args
+=
[
"--optimization-level"
,
optimization_level
]
...
...
@@ -257,17 +263,6 @@ class FlexibleArgumentParser(ArgumentParser):
):
# Convert -O <n> to --optimization-level <n>
processed_args
.
append
(
"--optimization-level"
)
elif
arg
.
startswith
(
"-O."
):
# Handle -O.* dotted syntax - ALL dotted syntax is deprecated
logger
.
warning_once
(
"The -O.* dotted syntax for --compilation-config is "
"deprecated and will be removed in v0.13.0 or v1.0.0"
", whichever is earlier. Please use -cc.* instead. "
"Example: -cc.backend=eager instead of "
"-O.backend=eager."
)
converted_arg
=
arg
.
replace
(
"-O"
,
"-cc"
,
1
)
processed_args
.
append
(
converted_arg
)
else
:
processed_args
.
append
(
arg
)
...
...
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