Repository navigation
[BugFix] fix possible shape mismatch when using ROPE - #4655
Conversation
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
hsliuustc0106
left a comment
There was a problem hiding this comment.
Looks reasonable for review.
|
LGTM. Could you provide some regression test to prevent the same problem in the future And, please resolve the DCO errors. @Semmer2 |
|
@hsliuustc0106 @wtomin Thank you for review. Test results updated, test cases added. |
|
is there any other case? 4/5? |
|
@Semmer2 Please fix the following error in the CI: [2026-07-05T14:07:55Z] =========================== short test summary info ============================
--
| [2026-07-05T14:07:55Z] FAILED tests/diffusion/layers/test_rope_broadcast.py::TestRotaryEmbeddingNativeShapeRegression::test_wan_forward_native_unchanged - RuntimeError: The size of tensor a (8) must match the size of tensor b (16) at non-singleton dimension 2
|
Sure, fixed and tested again on the latest main code. |
Fix possible shape mismatch when using RotaryEmbedding.forward_native. Now code use the first sin and cos for ROPE and broadcast automatically, which also aligned with other forward func, like forward_cuda, forward_hip and forward_npu::apply_rotary_emb_mindiesd Signed-off-by: Semmer <semmer@live.cn>
Signed-off-by: Semmer <semmer@live.cn>
@wtomin Hi could you help to check the npu-ci failed case? I think it has nothing to do with this PR. Thank you. |
|
Signed-off-by: Semmer <semmer@live.cn> Signed-off-by: ZhengWG <zwg0606@gmail.com>
Signed-off-by: Semmer <semmer@live.cn> Signed-off-by: Wojciech Kutak <wkutak@nvidia.com>
Signed-off-by: Semmer <semmer@live.cn>


Fix possible shape mismatch when using RotaryEmbedding.forward_native. Now code use the first sin and cos for ROPE and broadcast automatically, which also aligned with other forward func, like forward_cuda, forward_hip and forward_npu::apply_rotary_emb_mindiesd
PLEASE FILL IN THE PR DESCRIPTION HERE.
Purpose
Test Plan
enable step_execution and set max_num_seqs = 4, then launch omni with HunyuanImage3.0.
curl with 2 request at same time to trigger step-wise batching.
vLLM Version:
vLLM-Omni Commit:
c6ee3f7 + this PR
Test Result
the results with and without this PR generated identical output:

BEFORE SUBMITTING: read CONTRIBUTING.md and run the precheck-pr skill with the code agent for a self-check against project conventions.
(anything written below this line will be removed by GitHub Actions)