Init attention backend for Intel XPU (#10656)
Co-authored-by: guangyey <guangye.yu@intel.com> Co-authored-by: DiweiSun <105627594+DiweiSun@users.noreply.github.com>
This commit is contained in:
@@ -114,6 +114,7 @@ ATTENTION_BACKEND_CHOICES = [
|
||||
# Other platforms
|
||||
"intel_amx",
|
||||
"ascend",
|
||||
"intel_xpu",
|
||||
]
|
||||
|
||||
LORA_BACKEND_CHOICES = ["triton", "csgmv"]
|
||||
@@ -1098,6 +1099,12 @@ class ServerArgs:
|
||||
self.enable_mixed_chunk = False
|
||||
self.disable_radix_cache = True
|
||||
|
||||
if self.attention_backend == "intel_xpu":
|
||||
if self.page_size not in [32, 64, 128]:
|
||||
logger.warning(
|
||||
f"Intel XPU attention backend only supports page_size of 32, 64 or 128, changing page_size from {self.page_size} to 128."
|
||||
)
|
||||
self.page_size = 128
|
||||
if self.attention_backend == "fa4" or self.decode_attention_backend == "fa4":
|
||||
raise ValueError(
|
||||
"FA4 backend is only supported for prefill. Please use `--prefill-attention-backend fa4` instead."
|
||||
|
||||
Reference in New Issue
Block a user