[XPU] Enable fused GDN QKV split Triton kernel on XPU (#30144)
Co-authored-by: Ma Mingfei <mingfei.ma@intel.com>
This commit is contained in:
@@ -29,7 +29,7 @@ if not is_cpu():
|
|||||||
CHUNK_SIZE as FLA_CHUNK_SIZE,
|
CHUNK_SIZE as FLA_CHUNK_SIZE,
|
||||||
)
|
)
|
||||||
|
|
||||||
if is_cuda() or is_hip():
|
if is_cuda() or is_hip() or is_xpu():
|
||||||
from sglang.kernels.ops.attention.triton_gdn_fused_proj import (
|
from sglang.kernels.ops.attention.triton_gdn_fused_proj import (
|
||||||
fused_qkv_split_gdn_prefill,
|
fused_qkv_split_gdn_prefill,
|
||||||
)
|
)
|
||||||
@@ -595,7 +595,7 @@ class GDNAttnBackend(MambaAttnBackendBase):
|
|||||||
|
|
||||||
actual_seq_len = mixed_qkv.shape[0]
|
actual_seq_len = mixed_qkv.shape[0]
|
||||||
qkv_dim = layer.q_dim + layer.k_dim + layer.v_dim
|
qkv_dim = layer.q_dim + layer.k_dim + layer.v_dim
|
||||||
if (is_cuda() or is_hip()) and qkv_dim <= MAX_FUSED_QKV_SPLIT_DIM:
|
if (is_cuda() or is_hip() or is_xpu()) and qkv_dim <= MAX_FUSED_QKV_SPLIT_DIM:
|
||||||
query, key, value = fused_qkv_split_gdn_prefill(
|
query, key, value = fused_qkv_split_gdn_prefill(
|
||||||
mixed_qkv,
|
mixed_qkv,
|
||||||
layer.num_q_heads,
|
layer.num_q_heads,
|
||||||
|
|||||||
Reference in New Issue
Block a user