@tduncan / Nvidia-Optimization-Stack-VLLM Mirror · read-only / commits / 4d7c1d531b
Fork 0

A high-throughput and memory-efficient inference and serving engine for LLMs

Mirrored from https://github.com/tduncan-lum/Nvidia-Optimization-Stack---VLLM.git

Synced Nov 14, 05:30 UTC

[Bugfix] Fix MRoPE dispatch on XPU (#24724)

Signed-off-by: Yan Ma <yan.ma@intel.com>

Yan Ma committed Sep 12, 2025 at 21:43 UTC 4d7c1d531b89b400b31c9d2e369299d8205980e5
1 file changed +9
vllm/model_executor/layers/rotary_embedding/mrope.py
+9
@@ -300,6 +300,15 @@ class MRotaryEmbedding(RotaryEmbedding):
300 key = torch.cat((key_rot, key_pass), dim=-1).reshape(key_shape)
301 return query, key
302
303 + def forward_xpu(
304 + self,
305 + positions: torch.Tensor,
306 + query: torch.Tensor,
307 + key: Optional[torch.Tensor] = None,
308 + offsets: Optional[torch.Tensor] = None,
309 + ) -> tuple[torch.Tensor, Optional[torch.Tensor]]:
310 + return self.forward_native(positions, query, key, offsets)
311 +
312 def forward_cpu(
313 self,
314 positions: torch.Tensor,