Commit 2f91701
committed
[fix] remove incorrect V-row permutation in scaled_fp4_quant_trans_kernel
The Edenzzzz causal fix (PR #1455) applied a seq_k row permutation to V
in scaled_fp4_quant_trans_kernel before the transpose step. This scrambles
V rows after the transpose, causing the PV MMA to read values from wrong
tokens and producing broken output for non-causal attention.
The permutation is unnecessary: unlike K's N-dimension in the QK MMA,
V's seq_k dimension is the K-dimension (reduction axis) of the PV MMA
and is read sequentially. The transpose in scaled_fp4_quant_trans_kernel
already produces the correct layout without any row reordering.1 parent 7cebf5f commit 2f91701
1 file changed
Lines changed: 6 additions & 11 deletions
Lines changed: 6 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
286 | 286 | | |
287 | 287 | | |
288 | 288 | | |
289 | | - | |
290 | | - | |
291 | | - | |
292 | | - | |
293 | | - | |
294 | | - | |
| 289 | + | |
295 | 290 | | |
296 | | - | |
| 291 | + | |
297 | 292 | | |
298 | 293 | | |
299 | 294 | | |
300 | 295 | | |
301 | | - | |
302 | | - | |
303 | | - | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
304 | 299 | | |
305 | 300 | | |
306 | | - | |
| 301 | + | |
307 | 302 | | |
308 | 303 | | |
309 | 304 | | |
| |||
0 commit comments