[XPU] Fix dtype mismatch in MRotaryEmbedding.forward_xpu by calling _… (#31441)

This commit is contained in:
jiayisunx
2026-07-17 09:14:25 +08:00
committed by GitHub
parent dc0b3eb68f
commit 27ea5ed070
@@ -303,6 +303,7 @@ class MRotaryEmbedding(RotaryEmbedding):
fused_set_kv_buffer_arg=None,
) -> Tuple[torch.Tensor, torch.Tensor]:
assert positions.ndim in (1, 2)
self._match_cos_sin_cache_dtype(query)
if positions.ndim == 2 and self.mrope_section:
multimodal_rotary_embedding(
query,