Commit b7f7654
[BugFix][310p] Qwen3.5 shared-experts linear failuer when out_dim=1 (vllm-project#11714)
### What this PR does / why we need it?
This PR fixes a failure in Qwen3.5 shared-experts linear layer on 310P
devices when `out_dim=1`.
On 310P, `torch_npu` rejects `FRACTAL_NZ` matmul when the weight-side
matrix has $N=1$ or $K=1$.
To resolve this, we introduce `_should_keep_nd_for_310p_weight` to
detect if the weight has a dimension of 1 on 310P, and if so, keep the
weight in ND format instead of converting it to `FRACTAL_NZ`.
### Does this PR introduce _any_ user-facing change?
No.
### How was this patch tested?
Tested on 310P Ascend NPU.
- vLLM version: v0.23.0
- vLLM main:
vllm-project/vllm@1f486d9
Signed-off-by: Tflowers-0129 <2906339855@qq.com>
Co-authored-by: Yizhou <136800916+yiz-liu@users.noreply.github.com>1 parent c062a7e commit b7f7654
1 file changed
Lines changed: 13 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
| 48 | + | |
48 | 49 | | |
49 | 50 | | |
50 | 51 | | |
| |||
75 | 76 | | |
76 | 77 | | |
77 | 78 | | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
78 | 83 | | |
79 | 84 | | |
80 | 85 | | |
81 | 86 | | |
82 | 87 | | |
| 88 | + | |
83 | 89 | | |
84 | 90 | | |
85 | | - | |
| 91 | + | |
| 92 | + | |
86 | 93 | | |
87 | | - | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
88 | 99 | | |
89 | 100 | | |
90 | 101 | | |
| |||
0 commit comments