[Frontend] Remap -O to -cc commandline flag (#29557)
Signed-off-by: Yanan Cao <gmagogsfm@gmail.com> Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -257,6 +257,17 @@ 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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user