[Intel]Add 'intel_xpu' attention backend for llama4 (#11051)
This commit is contained in:
@@ -1002,7 +1002,8 @@ class ServerArgs:
|
|||||||
"aiter",
|
"aiter",
|
||||||
"triton",
|
"triton",
|
||||||
"trtllm_mha",
|
"trtllm_mha",
|
||||||
}, "fa3, aiter, triton, or trtllm_mha is required for Llama4 model"
|
"intel_xpu",
|
||||||
|
}, "fa3, aiter, triton, trtllm_mha or intel_xpu is required for Llama4 model"
|
||||||
if is_sm100_supported() and self.attention_backend is None:
|
if is_sm100_supported() and self.attention_backend is None:
|
||||||
self.attention_backend = "trtllm_mha"
|
self.attention_backend = "trtllm_mha"
|
||||||
logger.warning(
|
logger.warning(
|
||||||
|
|||||||
@@ -1831,7 +1831,8 @@ def get_device_capability(device_id: int = 0) -> Tuple[int, int]:
|
|||||||
major, minor, *_ = torch.xpu.get_device_capability(device_id)["version"].split(
|
major, minor, *_ = torch.xpu.get_device_capability(device_id)["version"].split(
|
||||||
"."
|
"."
|
||||||
)
|
)
|
||||||
major, minor = int(major), int(minor)
|
# Currently XPU version does not contain capability information.
|
||||||
|
major, minor = None, None
|
||||||
|
|
||||||
if hasattr(torch, "hpu") and torch.hpu.is_available():
|
if hasattr(torch, "hpu") and torch.hpu.is_available():
|
||||||
try:
|
try:
|
||||||
|
|||||||
Reference in New Issue
Block a user