From 790156c98f5dfc8574fd0a601f2271601abc7c8f Mon Sep 17 00:00:00 2001 From: Polisetty V R K Jyothendra Varma Date: Thu, 2 Jul 2026 10:52:20 +0530 Subject: [PATCH] [Intel GPU] DeepSeek V4 7/N: Support fused_rope_inplace on XPU using triton (#27915) Signed-off-by: P V R K Jyothendra Varma Co-authored-by: Rahul Vijayaraghavan Co-authored-by: Ma Mingfei --- python/sglang/jit_kernel/dsv4/elementwise.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/python/sglang/jit_kernel/dsv4/elementwise.py b/python/sglang/jit_kernel/dsv4/elementwise.py index e8c743595..8d17917b6 100644 --- a/python/sglang/jit_kernel/dsv4/elementwise.py +++ b/python/sglang/jit_kernel/dsv4/elementwise.py @@ -8,11 +8,12 @@ from sglang.jit_kernel.utils import ( load_jit, make_cpp_args, ) -from sglang.srt.utils import is_hip +from sglang.srt.utils import is_hip, is_xpu from .utils import make_name _is_hip = is_hip() +_is_xpu = is_xpu() @cache_once @@ -121,7 +122,7 @@ def fused_rope_inplace( positions: [batch_size] int32 or int64, indices into freqs_cis inverse: if True, apply inverse rotation (conjugate freqs) """ - if _is_hip: + if _is_hip or _is_xpu: from sglang.srt.layers.deepseek_v4_rope import apply_rotary_emb_triton apply_rotary_emb_triton(q, freqs_cis, positions=positions, inverse=inverse)