Skip to content

[BugFix][XPU] fix lora ops bgmv_expand size not match#39989

Merged
jikunshang merged 6 commits intovllm-project:mainfrom
Liangliang-Ma:mll_fix_1077
Apr 20, 2026
Merged

[BugFix][XPU] fix lora ops bgmv_expand size not match#39989
jikunshang merged 6 commits intovllm-project:mainfrom
Liangliang-Ma:mll_fix_1077

Conversation

@Liangliang-Ma
Copy link
Copy Markdown
Contributor

Issued found with tests/entrypoints/openai/speech_to_text/test_translation_validation.py::test_basic_audio_with_lora.
error msg:
(EngineCore pid=25878) ERROR 04-07 16:03:25 [core.py:1108] bgmv_expand(buffer, lora_b_stacked, y, sampler_indices, add_inputs=True) (EngineCore pid=25878) ERROR 04-07 16:03:25 [core.py:1108] File "/opt/venv/lib/python3.12/site-packages/vllm/lora/ops/xpu_ops/lora_ops.py", line 30, in bgmv_expand (EngineCore pid=25878) ERROR 04-07 16:03:25 [core.py:1108] torch.ops._xpu_C.bgmv_expand( (EngineCore pid=25878) ERROR 04-07 16:03:25 [core.py:1108] File "/opt/venv/lib/python3.12/site-packages/torch/ops.py", line 1209, in __call_ (EngineCore pid=25878) ERROR 04-07 16:03:25 [core.py:1108] return self._op(*args, **kwargs) (EngineCore pid=25878) ERROR 04-07 16:03:25 [core.py:1108] ^^^^^^^^^^^^^^^^^^^^^^^^^ (EngineCore pid=25878) ERROR 04-07 16:03:25 [core.py:1108] RuntimeError: lora_b_weights.size(-2) must match slice_size

This pr would fix the size issue.

Signed-off-by: Ma, Liangliang <liangliang.ma@intel.com>
@Liangliang-Ma Liangliang-Ma changed the title [BugFix][XPU] fix lora ops bgmv_expand dim not match [BugFix][XPU] fix lora ops bgmv_expand size not match Apr 16, 2026
@mergify mergify Bot added intel-gpu Related to Intel GPU bug Something isn't working labels Apr 16, 2026
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates the bgmv_expand function in the XPU LoRA operations to handle dimension mismatches between LoRA weights and output tensors. The implementation now correctly handles cases where the weight output dimension is smaller than the output tensor by using bgmv_expand_slice, and truncates weights when the dimension is larger, ensuring robust behavior for scenarios like padded logits. I have no feedback to provide as there were no review comments.

@jeejeelee jeejeelee requested a review from jikunshang April 16, 2026 11:06
Copy link
Copy Markdown
Collaborator

@jikunshang jikunshang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. cc @chaojun-zhang

@jikunshang jikunshang added the ready ONLY add when PR is ready to merge/full CI is needed label Apr 19, 2026
@jikunshang jikunshang merged commit 898beca into vllm-project:main Apr 20, 2026
53 checks passed
bnellnm pushed a commit to neuralmagic/vllm that referenced this pull request Apr 20, 2026
…9989)

Signed-off-by: Ma, Liangliang <liangliang.ma@intel.com>
Co-authored-by: Kunshang Ji <kunshang.ji@intel.com>
baonudesifeizhai pushed a commit to baonudesifeizhai/vllm that referenced this pull request Apr 23, 2026
…9989)

Signed-off-by: Ma, Liangliang <liangliang.ma@intel.com>
Co-authored-by: Kunshang Ji <kunshang.ji@intel.com>
avinashsingh77 pushed a commit to avinashsingh77/vllm that referenced this pull request Apr 27, 2026
…9989)

Signed-off-by: Ma, Liangliang <liangliang.ma@intel.com>
Co-authored-by: Kunshang Ji <kunshang.ji@intel.com>
Signed-off-by: Avinash Singh <avinashsingh.rcoem@gmail.com>
Lafunamor pushed a commit to Lafunamor/vllm that referenced this pull request May 1, 2026
…9989)

Signed-off-by: Ma, Liangliang <liangliang.ma@intel.com>
Co-authored-by: Kunshang Ji <kunshang.ji@intel.com>
Signed-off-by: Adrian <info@zzit.ch>
mystous pushed a commit to mystous/vllm_hybrid that referenced this pull request May 10, 2026
…9989)

Signed-off-by: Ma, Liangliang <liangliang.ma@intel.com>
Co-authored-by: Kunshang Ji <kunshang.ji@intel.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working intel-gpu Related to Intel GPU ready ONLY add when PR is ready to merge/full CI is needed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants