[Frontend][torch.compile] CompilationConfig Overhaul (#20283): name change compilation level to compilation mode, deprecation compilation level (#26355)
Signed-off-by: morrison-turnansky <mturnans@redhat.com> Signed-off-by: Morrison Turnansky <mturnans@redhat.com> Co-authored-by: Luka Govedič <ProExpertProg@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
e66d787bce
commit
96b9aa5aa0
@@ -299,7 +299,7 @@ def test_dict_args(parser):
|
||||
"val2",
|
||||
"--hf-overrides.key2.key4",
|
||||
"val3",
|
||||
# Test compile config and compilation level
|
||||
# Test compile config and compilation mode
|
||||
"-O.use_inductor=true",
|
||||
"-O.backend",
|
||||
"custom",
|
||||
@@ -352,7 +352,7 @@ def test_dict_args(parser):
|
||||
},
|
||||
}
|
||||
assert parsed_args.compilation_config == {
|
||||
"level": 1,
|
||||
"mode": 1,
|
||||
"use_inductor": True,
|
||||
"backend": "custom",
|
||||
"custom_ops": ["-quant_fp8", "+silu_mul", "-rms_norm"],
|
||||
@@ -367,7 +367,7 @@ def test_duplicate_dict_args(caplog_vllm, parser):
|
||||
"--hf-overrides.key1",
|
||||
"val2",
|
||||
"-O1",
|
||||
"-O.level",
|
||||
"-O.mode",
|
||||
"2",
|
||||
"-O3",
|
||||
]
|
||||
@@ -375,12 +375,12 @@ def test_duplicate_dict_args(caplog_vllm, parser):
|
||||
parsed_args = parser.parse_args(args)
|
||||
# Should be the last value
|
||||
assert parsed_args.hf_overrides == {"key1": "val2"}
|
||||
assert parsed_args.compilation_config == {"level": 3}
|
||||
assert parsed_args.compilation_config == {"mode": 3}
|
||||
|
||||
assert len(caplog_vllm.records) == 1
|
||||
assert "duplicate" in caplog_vllm.text
|
||||
assert "--hf-overrides.key1" in caplog_vllm.text
|
||||
assert "-O.level" in caplog_vllm.text
|
||||
assert "-O.mode" in caplog_vllm.text
|
||||
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
|
||||
Reference in New Issue
Block a user