[XPU][GDN] add XPU path for causal_conv1d_fn and causal_conv1d_update (#31250)
Co-authored-by: Ma Mingfei <mingfei.ma@intel.com>
This commit is contained in:
@@ -19,7 +19,7 @@ from sglang.srt.layers.radix_linear_attention import RadixLinearAttention
|
||||
from sglang.srt.mem_cache.memory_pool import MambaPool
|
||||
from sglang.srt.model_executor.forward_batch_info import ForwardBatch
|
||||
from sglang.srt.model_executor.model_runner import ModelRunner
|
||||
from sglang.srt.utils import is_cpu, is_cuda, is_hip, is_npu
|
||||
from sglang.srt.utils import is_cpu, is_cuda, is_hip, is_npu, is_xpu
|
||||
from sglang.srt.utils.common import rank0_log
|
||||
|
||||
if not is_cpu():
|
||||
@@ -40,6 +40,11 @@ if is_cuda():
|
||||
)
|
||||
|
||||
causal_conv1d_fn = causal_conv1d_fn_cuda
|
||||
elif is_xpu():
|
||||
from sgl_kernel import causal_conv1d_fn_xpu, causal_conv1d_update_xpu
|
||||
|
||||
causal_conv1d_fn = causal_conv1d_fn_xpu
|
||||
causal_conv1d_update = causal_conv1d_update_xpu
|
||||
elif is_npu():
|
||||
from sgl_kernel_npu.fla.fused_gdn_gating import fused_gdn_gating_npu
|
||||
from sgl_kernel_npu.mamba.causal_conv1d import (
|
||||
|
||||
Reference in New Issue
Block a user