[Bugfix][CPU] Fix MRoPE dispatch on the CPU backend (#27800)

Signed-off-by: jiang1.li <jiang1.li@intel.com>
This commit is contained in:
Li, Jiang 2025-10-30 23:12:05 +08:00 committed by GitHub
parent 9956aae4ea
commit eebf00cb0c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -357,6 +357,15 @@ class MRotaryEmbedding(RotaryEmbeddingBase):
key = torch.cat((key_rot, key_pass), dim=-1).reshape(key_shape)
return query, key
def forward_cpu(
self,
positions: torch.Tensor,
query: torch.Tensor,
key: torch.Tensor | None = None,
offsets: torch.Tensor | None = None,
) -> tuple[torch.Tensor, torch.Tensor | None]:
return self.forward_native(positions, query, key, offsets)
@staticmethod
def get_next_input_positions(
mrope_position_delta: int,