[XPU] enable XPU GRAPH by default (#51600)

Signed-off-by: zhenwei-intel <zhenwei.liu@intel.com>
This commit is contained in:
liuzhenwei
2026-09-24 19:17:25 +08:00
committed by GitHub
parent f5a78f2ad7
commit dcfc17e0b1
7 changed files with 38 additions and 29 deletions
+16 -1
View File
@@ -146,6 +146,21 @@ MODEL_RUNNER_KWARGS: dict[str, dict[str, Any]] = {
},
}
# These checkpoints fail during XPU graph capture, so run them eagerly there.
XPU_EAGER_ONLY_MODELS = {
"OPEA/Qwen2.5-0.5B-Instruct-int4-sym-inc",
"Intel/Qwen2-0.5B-Instruct-int4-sym-AutoRound",
"Intel/Qwen3-8B-w2g64-for-ut",
"INCModel/Qwen3-30B-A3B-12L-W4A16-test",
}
def _runner_kwargs(model: str) -> dict[str, Any]:
kwargs = dict(MODEL_RUNNER_KWARGS.get(model, {}))
if current_platform.is_xpu() and model in XPU_EAGER_ONLY_MODELS:
kwargs["enforce_eager"] = True
return kwargs
@pytest.mark.skipif(
not (
@@ -157,7 +172,7 @@ MODEL_RUNNER_KWARGS: dict[str, dict[str, Any]] = {
)
@pytest.mark.parametrize("model", MODELS + QWEN3_AUTOROUND_MODELS)
def test_auto_round_model(vllm_runner, model):
with vllm_runner(model, **MODEL_RUNNER_KWARGS.get(model, {})) as llm:
with vllm_runner(model, **_runner_kwargs(model)) as llm:
output = llm.generate_greedy(["The capital of France is"], max_tokens=8)
assert output