[CPU] Add support for Gemma4 on Xeon (#22498)

Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com>
Co-authored-by: jianan-gu <jianan.gu@intel.com>
Co-authored-by: Haotong Zou <haotong.zou@intel.com>
This commit is contained in:
blzheng
2026-08-17 10:52:26 +08:00
committed by GitHub
co-authored by Copilot jianan-gu Haotong Zou
parent 3adc70bb5e
commit b6d7602914
27 changed files with 514 additions and 106 deletions
+9 -3
View File
@@ -5635,13 +5635,19 @@ class ServerArgs:
# Default attention backend selection moved to the override registry
# (arg_groups/overrides.py: _gemma4_overrides).
prefill_backend, decode_backend = self._resolved_attention_backends()
accepted_backends = ("trtllm_mha", "triton", "ascend", "intel_xpu")
accepted_backends = (
"trtllm_mha",
"triton",
"ascend",
"intel_xpu",
"intel_amx",
)
assert (
prefill_backend in accepted_backends
and decode_backend in accepted_backends
), (
"Gemma4 only supports trtllm_mha, triton, or intel_xpu attention backend, "
f"got prefill={prefill_backend}, decode={decode_backend}"
"Gemma4 only supports trtllm_mha, triton, ascend, intel_xpu, or intel_amx "
f"attention backend, got prefill={prefill_backend}, decode={decode_backend}"
)
# The quantization/moe_runner_backend resolution moved to the override