[XPU] Fix the bug of LoRA logits on the XPU platform (#24081)

Signed-off-by: chzhang <chaojun.zhang@intel.com>
This commit is contained in:
Chaojun Zhang
2025-09-03 08:21:18 +08:00
committed by GitHub
parent 2fd1a40a54
commit 862f2ef893
3 changed files with 15 additions and 5 deletions
+1 -1
View File
@@ -1151,7 +1151,7 @@ class LogitsProcessorWithLoRA(BaseLayerWithLoRA):
lora_logits = lora_logits.mT
indices_padded = self.punica_wrapper.sampler_indices_padded
if current_platform.is_tpu():
if current_platform.is_tpu() or current_platform.is_xpu():
indices_padded = indices_padded[:logits.size(0)]
lora_logits = (lora_logits.reshape(