Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
OpenDAS
vllm_cscc
Commits
59fe6f29
Unverified
Commit
59fe6f29
authored
Jan 07, 2026
by
sihao_li
Committed by
GitHub
Jan 07, 2026
Browse files
[XPU]fallback to TRITON_ATTN on xpu when use float32 dtype (#31762)
Signed-off-by:
sihao.li
<
sihao.li@intel.com
>
parent
e7596371
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
0 deletions
+7
-0
vllm/platforms/xpu.py
vllm/platforms/xpu.py
+7
-0
No files found.
vllm/platforms/xpu.py
View file @
59fe6f29
...
@@ -52,11 +52,18 @@ class XPUPlatform(Platform):
...
@@ -52,11 +52,18 @@ class XPUPlatform(Platform):
"only NHD layout is supported by XPU attention kernels."
"only NHD layout is supported by XPU attention kernels."
)
)
dtype
=
attn_selector_config
.
dtype
if
attn_selector_config
.
use_sparse
:
if
attn_selector_config
.
use_sparse
:
raise
NotImplementedError
(
"Sparse Attention is not supported on XPU."
)
raise
NotImplementedError
(
"Sparse Attention is not supported on XPU."
)
if
selected_backend
==
AttentionBackendEnum
.
TRITON_ATTN
:
if
selected_backend
==
AttentionBackendEnum
.
TRITON_ATTN
:
logger
.
info_once
(
"Using Triton backend."
)
logger
.
info_once
(
"Using Triton backend."
)
return
AttentionBackendEnum
.
TRITON_ATTN
.
get_path
()
return
AttentionBackendEnum
.
TRITON_ATTN
.
get_path
()
elif
dtype
==
torch
.
float32
:
logger
.
warning_once
(
"Flash Attention on XPU does not support float32 dtype. "
"Falling back to Triton Attention backend."
)
return
AttentionBackendEnum
.
TRITON_ATTN
.
get_path
()
elif
selected_backend
==
AttentionBackendEnum
.
FLASH_ATTN
:
elif
selected_backend
==
AttentionBackendEnum
.
FLASH_ATTN
:
logger
.
info_once
(
"Using Flash Attention backend."
)
logger
.
info_once
(
"Using Flash Attention backend."
)
return
AttentionBackendEnum
.
FLASH_ATTN
.
get_path
()
return
AttentionBackendEnum
.
FLASH_ATTN
.
get_path
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment