[XPU] Fix dtype mismatch in MRotaryEmbedding.forward_xpu by calling _… (#31441)
This commit is contained in:
@@ -303,6 +303,7 @@ class MRotaryEmbedding(RotaryEmbedding):
|
|||||||
fused_set_kv_buffer_arg=None,
|
fused_set_kv_buffer_arg=None,
|
||||||
) -> Tuple[torch.Tensor, torch.Tensor]:
|
) -> Tuple[torch.Tensor, torch.Tensor]:
|
||||||
assert positions.ndim in (1, 2)
|
assert positions.ndim in (1, 2)
|
||||||
|
self._match_cos_sin_cache_dtype(query)
|
||||||
if positions.ndim == 2 and self.mrope_section:
|
if positions.ndim == 2 and self.mrope_section:
|
||||||
multimodal_rotary_embedding(
|
multimodal_rotary_embedding(
|
||||||
query,
|
query,
|
||||||
|
|||||||
Reference in New Issue
Block a user