Commit 9ae8703
[ROCm][DSv4] Tighten KV-workspace zero comment + FP8 encoding notes (review #42893)
Replace the long rationale around ``kv.zero_()`` (in both prefill paths) with a brief TODO that names the proper fix: mask invalid rows in the indexer (score = -inf) or in the sparse-attention kernel (skip indices >= valid_len). The current zero is the minimal interim workaround; the underlying bug is arch-independent (uninitialized workspace + indexer that scores the entire M dim) so the call stays unchanged on every platform until the indexer/kernel fix lands. No behavior change.
Also condense the duplicate FNUZ-vs-OCP comments at the dequant call sites and in ``_sparse_attn_decode_ragged_kernel``: the wrapper docstring already explains the asymmetry, so per-call-site repetition was just noise.
Signed-off-by: Markus Hartikainen <markus.hartikainen@amd.com>
Co-authored-by: Cursor <cursoragent@cursor.com>1 parent f13e445 commit 9ae8703
2 files changed
Lines changed: 12 additions & 35 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
790 | 790 | | |
791 | 791 | | |
792 | 792 | | |
793 | | - | |
794 | | - | |
795 | | - | |
796 | | - | |
797 | | - | |
798 | | - | |
799 | | - | |
800 | | - | |
801 | | - | |
802 | | - | |
803 | | - | |
| 793 | + | |
| 794 | + | |
| 795 | + | |
| 796 | + | |
804 | 797 | | |
805 | 798 | | |
806 | 799 | | |
| |||
810 | 803 | | |
811 | 804 | | |
812 | 805 | | |
813 | | - | |
814 | | - | |
815 | | - | |
816 | | - | |
817 | | - | |
818 | | - | |
| 806 | + | |
819 | 807 | | |
820 | 808 | | |
821 | 809 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
565 | 565 | | |
566 | 566 | | |
567 | 567 | | |
568 | | - | |
569 | | - | |
570 | | - | |
571 | | - | |
572 | | - | |
573 | | - | |
574 | | - | |
575 | | - | |
576 | | - | |
577 | | - | |
| 568 | + | |
| 569 | + | |
| 570 | + | |
| 571 | + | |
| 572 | + | |
578 | 573 | | |
579 | 574 | | |
580 | 575 | | |
| |||
1193 | 1188 | | |
1194 | 1189 | | |
1195 | 1190 | | |
1196 | | - | |
1197 | | - | |
1198 | | - | |
1199 | | - | |
| 1191 | + | |
| 1192 | + | |
1200 | 1193 | | |
1201 | 1194 | | |
1202 | 1195 | | |
| |||
1601 | 1594 | | |
1602 | 1595 | | |
1603 | 1596 | | |
1604 | | - | |
1605 | | - | |
1606 | | - | |
1607 | | - | |
1608 | 1597 | | |
1609 | 1598 | | |
1610 | 1599 | | |
| |||
0 commit comments