Repository navigation
CUDA: faster MMVQ for low-bit types - #30517
Conversation
|
R9700 (gtx1201) on Windows:
llama-bench, Qwen3.5-4B (
|
| model | ub | test | master t/s | PR t/s | speedup |
|---|---|---|---|---|---|
| Q2_K | 1 | pp256 | 158.4 ± 0.6 | 168.8 ± 0.7 | 1.066 |
| Q2_K | 1 | tg128 | 129.6 ± 1.1 | 138.0 ± 1.1 | 1.065 |
| Q2_K | 2 | pp256 | 298.6 ± 0.8 | 303.7 ± 4.3 | 1.017 |
| Q2_K | 2 | tg128 | 129.3 ± 1.0 | 138.7 ± 1.5 | 1.073 |
| Q2_K | 4 | pp256 | 454.9 ± 2.1 | 496.2 ± 3.6 | 1.091 |
| Q2_K | 4 | tg128 | 129.1 ± 1.0 | 136.6 ± 0.7 | 1.058 |
| Q3_K_S | 1 | pp256 | 166.3 ± 0.3 | 173.7 ± 0.6 | 1.044 |
| Q3_K_S | 1 | tg128 | 135.2 ± 0.8 | 142.1 ± 0.8 | 1.051 |
| Q3_K_S | 2 | pp256 | 293.5 ± 1.4 | 301.3 ± 5.1 | 1.027 |
| Q3_K_S | 2 | tg128 | 135.3 ± 0.8 | 141.5 ± 2.3 | 1.046 |
| Q3_K_S | 4 | pp256 | 478.6 ± 1.5 | 512.4 ± 5.0 | 1.071 |
| Q3_K_S | 4 | tg128 | 135.5 ± 0.6 | 141.6 ± 0.9 | 1.045 |
|
I've got good improvement but also some regressions on Mi50 with Q3_k and Q6_K. ROCm 7.2.4
|
|
@thelittlefireman thanks for testing! I would still consider this acceptable in the interest of keeping things simple. |
Sure. I Will try to see if there is a quick fix for regressions. More bench :
|
|
@am17an
|
|
@thelittlefireman feel free to push this change to this branch (you should have access) |
|
Done more test on others AMD arch CDNA and RDNA2 | AMD Instinct MI100
I will try to suggest a fix for regressions tomorrow. |
|
Any slowdown less than 5% seems like noise to me. At this point it is bike-shedding. |
|
@am17an I agree. For RX 6800 the main issue is that there is no specific config for RDNA2 on We could add this fix (Specially for Q2_K with n ==8) for the PR But it like put a band-aid on a bullet wound and will need futher bench/fix/PR for other quants. Also Mi100/CDNA use the same tableid => @IMbackK we could merge the PR as if and then make others PR for thoses specific issues, what do you think ? |
IMbackK
left a comment
There was a problem hiding this comment.
Fine with me.
FYI the "GCN" tables where tuned by me on CDNA, i dont expect mutch movement between the two on this kernel but i did tune them a long time ago so things may have shifted for other reasons.
JohannesGaessler
left a comment
There was a problem hiding this comment.
Thank you, longer-term we should look to refactor the MMVQ kernel with explicit re-use of data more generally.
Port the upstream low-bit dot products, two-row MMVQ launches, and GCN warp adjustments while preserving the fork's fusion and MoE launch paths. The upstream DGX-prefetch distance hunk is inapplicable: this branch does not have that prefetch path. Pass the true output row count to generic MMVQ and guard odd tail rows before loads and writes. Using the output token stride as the row bound could write into another expert when two rows share a block. Guard the specialized MoE tail loads as well. Validated on Ada and Ampere: 1764 exact-Q8-input operator checks, 432 fusion checks, and 72 memcheck cases with no CUDA memory errors. Existing numerical tolerances are unchanged. Full-model speed was not measured. (cherry picked from commit 2744e48) Co-authored-by: thelittlefireman <[email protected]> Assisted-by: Codex
…pstream ggml-org#29435: prefer whole tiles over stream-K on DGX Spark when async KV preload + mask scan with >=75% tile efficiency. ggml-org#30517: Q2_K/Q3_K/Q6_K VDR 1->2, two rows per block (low-bit, GB10 IQ2_S/IQ3_S, per-type GCN nwarps, Q3_K/Q6_K prefetch distance 1. Cherry-pick conflicts resolved manually: local master already has later upstream commits on these files (HIP calc_max_nwarps rename, need_f16_KV), so hunks were adapted to the local state. EOF )
* CUDA: faster MMVQ for low-bit types * ggml-cuda: hip: small nwarps GCN fix on Q3_K(ncols=2,3), Q6_K(ncols=4) --------- Co-authored-by: thelittlefireman <[email protected]>
… pad) - old-10: per-type mmvq VDR/nwarps for Q4_K/Q5_K/Q6_K/Q8_0, dense Q6_K VDR=2 and the MoE-expert VDR split. - old-04 MMQ: GGML_CUDA_MMQ_J_MAX and the mmq-vec-dot x_scale/x_df hoist. - old-15: the Q1_0 ggml_cuda_byte_perm port (vecdotq.cuh + mmq-load-tiles.cuh), the gfx1201 grid-stall pad (common.cuh + mmvf.cu), the mmvf multi-token cross-warp reduction and the mmq-vec-dot #pragma unroll 1 for gfx12. - old-04's MUL_MAT Q6_K/Q8_0 test shapes. - r169: dense Q6_K keeps upstream ggml-org#30517's VDR=2 on every arch (measured on gfx1151: within noise of VDR=1 at B=1/B=4 and d16384, +1.2 % at batched B=8, width-pure against draft-mtp). -DGGML_HIP_Q6K_DENSE_VDR1 restores the pre-ggml-org#30517 VDR=1 association order for a consumer that gates on output identity; the MoE-expert VDR is per kernel and unaffected. NOTE: the mmvq multi-row/row-loop decode hunks (old-15 PR ggml-org#57) are NOT here -- they are interleaved with the fused-MoE item-split in the same function and are deferred to 09 (see PHASE1-STATUS.md).
… pad) - old-10: per-type mmvq VDR/nwarps for Q4_K/Q5_K/Q6_K/Q8_0, dense Q6_K VDR=2 and the MoE-expert VDR split. - old-04 MMQ: GGML_CUDA_MMQ_J_MAX and the mmq-vec-dot x_scale/x_df hoist. - old-15: the Q1_0 ggml_cuda_byte_perm port (vecdotq.cuh + mmq-load-tiles.cuh), the gfx1201 grid-stall pad (common.cuh + mmvf.cu), the mmvf multi-token cross-warp reduction and the mmq-vec-dot #pragma unroll 1 for gfx12. - old-04's MUL_MAT Q6_K/Q8_0 test shapes. - r169: dense Q6_K keeps upstream ggml-org#30517's VDR=2 on every arch (measured on gfx1151: within noise of VDR=1 at B=1/B=4 and d16384, +1.2 % at batched B=8, width-pure against draft-mtp). -DGGML_HIP_Q6K_DENSE_VDR1 restores the pre-ggml-org#30517 VDR=1 association order for a consumer that gates on output identity; the MoE-expert VDR is per kernel and unaffected. NOTE: the mmvq multi-row/row-loop decode hunks (old-15 PR ggml-org#57) are NOT here -- they are interleaved with the fused-MoE item-split in the same function and are deferred to 09 (see PHASE1-STATUS.md).
… pad) - old-10: per-type mmvq VDR/nwarps for Q4_K/Q5_K/Q6_K/Q8_0, dense Q6_K VDR=2 and the MoE-expert VDR split. - old-04 MMQ: GGML_CUDA_MMQ_J_MAX and the mmq-vec-dot x_scale/x_df hoist. - old-15: the Q1_0 ggml_cuda_byte_perm port (vecdotq.cuh + mmq-load-tiles.cuh), the gfx1201 grid-stall pad (common.cuh + mmvf.cu), the mmvf multi-token cross-warp reduction and the mmq-vec-dot #pragma unroll 1 for gfx12. - old-04's MUL_MAT Q6_K/Q8_0 test shapes. - r169: dense Q6_K keeps upstream ggml-org#30517's VDR=2 on every arch (measured on gfx1151: within noise of VDR=1 at B=1/B=4 and d16384, +1.2 % at batched B=8, width-pure against draft-mtp). -DGGML_HIP_Q6K_DENSE_VDR1 restores the pre-ggml-org#30517 VDR=1 association order for a consumer that gates on output identity; the MoE-expert VDR is per kernel and unaffected. NOTE: the mmvq multi-row/row-loop decode hunks (old-15 PR ggml-org#57) are NOT here -- they are interleaved with the fused-MoE item-split in the same function and are deferred to 09 (see PHASE1-STATUS.md).
… pad) - old-10: per-type mmvq VDR/nwarps for Q4_K/Q5_K/Q6_K/Q8_0, dense Q6_K VDR=2 and the MoE-expert VDR split. - old-04 MMQ: GGML_CUDA_MMQ_J_MAX and the mmq-vec-dot x_scale/x_df hoist. - old-15: the Q1_0 ggml_cuda_byte_perm port (vecdotq.cuh + mmq-load-tiles.cuh), the gfx1201 grid-stall pad (common.cuh + mmvf.cu), the mmvf multi-token cross-warp reduction and the mmq-vec-dot #pragma unroll 1 for gfx12. - old-04's MUL_MAT Q6_K/Q8_0 test shapes. - r169: dense Q6_K keeps upstream ggml-org#30517's VDR=2 on every arch (measured on gfx1151: within noise of VDR=1 at B=1/B=4 and d16384, +1.2 % at batched B=8, width-pure against draft-mtp). -DGGML_HIP_Q6K_DENSE_VDR1 restores the pre-ggml-org#30517 VDR=1 association order for a consumer that gates on output identity; the MoE-expert VDR is per kernel and unaffected. NOTE: the mmvq multi-row/row-loop decode hunks (old-15 PR ggml-org#57) are NOT here -- they are interleaved with the fused-MoE item-split in the same function and are deferred to 09 (see PHASE1-STATUS.md).
… pad) - old-10: per-type mmvq VDR/nwarps for Q4_K/Q5_K/Q6_K/Q8_0, dense Q6_K VDR=2 and the MoE-expert VDR split. - old-04 MMQ: GGML_CUDA_MMQ_J_MAX and the mmq-vec-dot x_scale/x_df hoist. - old-15: the Q1_0 ggml_cuda_byte_perm port (vecdotq.cuh + mmq-load-tiles.cuh), the gfx1201 grid-stall pad (common.cuh + mmvf.cu), the mmvf multi-token cross-warp reduction and the mmq-vec-dot #pragma unroll 1 for gfx12. - old-04's MUL_MAT Q6_K/Q8_0 test shapes. - r169: dense Q6_K keeps upstream ggml-org#30517's VDR=2 on every arch (measured on gfx1151: within noise of VDR=1 at B=1/B=4 and d16384, +1.2 % at batched B=8, width-pure against draft-mtp). -DGGML_HIP_Q6K_DENSE_VDR1 restores the pre-ggml-org#30517 VDR=1 association order for a consumer that gates on output identity; the MoE-expert VDR is per kernel and unaffected. NOTE: the mmvq multi-row/row-loop decode hunks (old-15 PR ggml-org#57) are NOT here -- they are interleaved with the fused-MoE item-split in the same function and are deferred to 09 (see PHASE1-STATUS.md). Re-based onto a691b23 (mmvq.cu conflicted, 2 hunks: the per-architecture MMVQ table id). The block splits the old combined mapping -- RDNA3_5 (gfx1151) gets its own table (nwarps swept), real RDNA2 (gfx103x) gets the Navi21 table -- where upstream maps all of RDNA2 || RDNA3_5 to the RDNA2 table. The delivery's split is kept and upstream's new RDNA4_M family is folded into it (RDNA4_M -> the RDNA2 table) on both the device and the host table-id paths. Build green; same-seed greedy text byte-identical with MMVQ on/off (33 chars, sha 3de206c8878b) on Qwen3-Coder-30B-A3B.
… pad) - old-10: per-type mmvq VDR/nwarps for Q4_K/Q5_K/Q6_K/Q8_0, dense Q6_K VDR=2 and the MoE-expert VDR split. - old-04 MMQ: GGML_CUDA_MMQ_J_MAX and the mmq-vec-dot x_scale/x_df hoist. - old-15: the Q1_0 ggml_cuda_byte_perm port (vecdotq.cuh + mmq-load-tiles.cuh), the gfx1201 grid-stall pad (common.cuh + mmvf.cu), the mmvf multi-token cross-warp reduction and the mmq-vec-dot #pragma unroll 1 for gfx12. - old-04's MUL_MAT Q6_K/Q8_0 test shapes. - r169: dense Q6_K keeps upstream ggml-org#30517's VDR=2 on every arch (measured on gfx1151: within noise of VDR=1 at B=1/B=4 and d16384, +1.2 % at batched B=8, width-pure against draft-mtp). -DGGML_HIP_Q6K_DENSE_VDR1 restores the pre-ggml-org#30517 VDR=1 association order for a consumer that gates on output identity; the MoE-expert VDR is per kernel and unaffected. NOTE: the mmvq multi-row/row-loop decode hunks (old-15 PR ggml-org#57) are NOT here -- they are interleaved with the fused-MoE item-split in the same function and are deferred to 09 (see PHASE1-STATUS.md). Re-based onto a691b23 (mmvq.cu conflicted, 2 hunks: the per-architecture MMVQ table id). The block splits the old combined mapping -- RDNA3_5 (gfx1151) gets its own table (nwarps swept), real RDNA2 (gfx103x) gets the Navi21 table -- where upstream maps all of RDNA2 || RDNA3_5 to the RDNA2 table. The delivery's split is kept and upstream's new RDNA4_M family is folded into it (RDNA4_M -> the RDNA2 table) on both the device and the host table-id paths. Build green; same-seed greedy text byte-identical with MMVQ on/off (33 chars, sha 3de206c8878b) on Qwen3-Coder-30B-A3B.
… pad) - old-10: per-type mmvq VDR/nwarps for Q4_K/Q5_K/Q6_K/Q8_0, dense Q6_K VDR=2 and the MoE-expert VDR split. - old-04 MMQ: GGML_CUDA_MMQ_J_MAX and the mmq-vec-dot x_scale/x_df hoist. - old-15: the Q1_0 ggml_cuda_byte_perm port (vecdotq.cuh + mmq-load-tiles.cuh), the gfx1201 grid-stall pad (common.cuh + mmvf.cu), the mmvf multi-token cross-warp reduction and the mmq-vec-dot #pragma unroll 1 for gfx12. - old-04's MUL_MAT Q6_K/Q8_0 test shapes. - r169: dense Q6_K keeps upstream ggml-org#30517's VDR=2 on every arch (measured on gfx1151: within noise of VDR=1 at B=1/B=4 and d16384, +1.2 % at batched B=8, width-pure against draft-mtp). -DGGML_HIP_Q6K_DENSE_VDR1 restores the pre-ggml-org#30517 VDR=1 association order for a consumer that gates on output identity; the MoE-expert VDR is per kernel and unaffected. NOTE: the mmvq multi-row/row-loop decode hunks (old-15 PR ggml-org#57) are NOT here -- they are interleaved with the fused-MoE item-split in the same function and are deferred to 09 (see PHASE1-STATUS.md). Re-based onto a691b23 (mmvq.cu conflicted, 2 hunks: the per-architecture MMVQ table id). The block splits the old combined mapping -- RDNA3_5 (gfx1151) gets its own table (nwarps swept), real RDNA2 (gfx103x) gets the Navi21 table -- where upstream maps all of RDNA2 || RDNA3_5 to the RDNA2 table. The delivery's split is kept and upstream's new RDNA4_M family is folded into it (RDNA4_M -> the RDNA2 table) on both the device and the host table-id paths. Build green; same-seed greedy text byte-identical with MMVQ on/off (33 chars, sha 3de206c8878b) on Qwen3-Coder-30B-A3B.
… pad) - old-10: per-type mmvq VDR/nwarps for Q4_K/Q5_K/Q6_K/Q8_0, dense Q6_K VDR=2 and the MoE-expert VDR split. - old-04 MMQ: GGML_CUDA_MMQ_J_MAX and the mmq-vec-dot x_scale/x_df hoist. - old-15: the Q1_0 ggml_cuda_byte_perm port (vecdotq.cuh + mmq-load-tiles.cuh), the gfx1201 grid-stall pad (common.cuh + mmvf.cu), the mmvf multi-token cross-warp reduction and the mmq-vec-dot #pragma unroll 1 for gfx12. - old-04's MUL_MAT Q6_K/Q8_0 test shapes. - r169: dense Q6_K keeps upstream ggml-org#30517's VDR=2 on every arch (measured on gfx1151: within noise of VDR=1 at B=1/B=4 and d16384, +1.2 % at batched B=8, width-pure against draft-mtp). -DGGML_HIP_Q6K_DENSE_VDR1 restores the pre-ggml-org#30517 VDR=1 association order for a consumer that gates on output identity; the MoE-expert VDR is per kernel and unaffected. NOTE: the mmvq multi-row/row-loop decode hunks (old-15 PR ggml-org#57) are NOT here -- they are interleaved with the fused-MoE item-split in the same function and are deferred to 09 (see PHASE1-STATUS.md). Re-based onto a691b23 (mmvq.cu conflicted, 2 hunks: the per-architecture MMVQ table id). The block splits the old combined mapping -- RDNA3_5 (gfx1151) gets its own table (nwarps swept), real RDNA2 (gfx103x) gets the Navi21 table -- where upstream maps all of RDNA2 || RDNA3_5 to the RDNA2 table. The delivery's split is kept and upstream's new RDNA4_M family is folded into it (RDNA4_M -> the RDNA2 table) on both the device and the host table-id paths. Build green; same-seed greedy text byte-identical with MMVQ on/off (33 chars, sha 3de206c8878b) on Qwen3-Coder-30B-A3B.
… pad) - old-10: per-type mmvq VDR/nwarps for Q4_K/Q5_K/Q6_K/Q8_0, dense Q6_K VDR=2 and the MoE-expert VDR split. - old-04 MMQ: GGML_CUDA_MMQ_J_MAX and the mmq-vec-dot x_scale/x_df hoist. - old-15: the Q1_0 ggml_cuda_byte_perm port (vecdotq.cuh + mmq-load-tiles.cuh), the gfx1201 grid-stall pad (common.cuh + mmvf.cu), the mmvf multi-token cross-warp reduction and the mmq-vec-dot #pragma unroll 1 for gfx12. - old-04's MUL_MAT Q6_K/Q8_0 test shapes. - r169: dense Q6_K keeps upstream ggml-org#30517's VDR=2 on every arch (measured on gfx1151: within noise of VDR=1 at B=1/B=4 and d16384, +1.2 % at batched B=8, width-pure against draft-mtp). -DGGML_HIP_Q6K_DENSE_VDR1 restores the pre-ggml-org#30517 VDR=1 association order for a consumer that gates on output identity; the MoE-expert VDR is per kernel and unaffected. NOTE: the mmvq multi-row/row-loop decode hunks (old-15 PR ggml-org#57) are NOT here -- they are interleaved with the fused-MoE item-split in the same function and are deferred to 09 (see PHASE1-STATUS.md). Re-based onto a691b23 (mmvq.cu conflicted, 2 hunks: the per-architecture MMVQ table id). The block splits the old combined mapping -- RDNA3_5 (gfx1151) gets its own table (nwarps swept), real RDNA2 (gfx103x) gets the Navi21 table -- where upstream maps all of RDNA2 || RDNA3_5 to the RDNA2 table. The delivery's split is kept and upstream's new RDNA4_M family is folded into it (RDNA4_M -> the RDNA2 table) on both the device and the host table-id paths. Build green; same-seed greedy text byte-identical with MMVQ on/off (33 chars, sha 3de206c8878b) on Qwen3-Coder-30B-A3B.
… pad) - old-10: per-type mmvq VDR/nwarps for Q4_K/Q5_K/Q6_K/Q8_0, dense Q6_K VDR=2 and the MoE-expert VDR split. - old-04 MMQ: GGML_CUDA_MMQ_J_MAX and the mmq-vec-dot x_scale/x_df hoist. - old-15: the Q1_0 ggml_cuda_byte_perm port (vecdotq.cuh + mmq-load-tiles.cuh), the gfx1201 grid-stall pad (common.cuh + mmvf.cu), the mmvf multi-token cross-warp reduction and the mmq-vec-dot #pragma unroll 1 for gfx12. - old-04's MUL_MAT Q6_K/Q8_0 test shapes. - r169: dense Q6_K keeps upstream ggml-org#30517's VDR=2 on every arch (measured on gfx1151: within noise of VDR=1 at B=1/B=4 and d16384, +1.2 % at batched B=8, width-pure against draft-mtp). -DGGML_HIP_Q6K_DENSE_VDR1 restores the pre-ggml-org#30517 VDR=1 association order for a consumer that gates on output identity; the MoE-expert VDR is per kernel and unaffected. NOTE: the mmvq multi-row/row-loop decode hunks (old-15 PR ggml-org#57) are NOT here -- they are interleaved with the fused-MoE item-split in the same function and are deferred to 09 (see PHASE1-STATUS.md). Re-based onto a691b23 (mmvq.cu conflicted, 2 hunks: the per-architecture MMVQ table id). The block splits the old combined mapping -- RDNA3_5 (gfx1151) gets its own table (nwarps swept), real RDNA2 (gfx103x) gets the Navi21 table -- where upstream maps all of RDNA2 || RDNA3_5 to the RDNA2 table. The delivery's split is kept and upstream's new RDNA4_M family is folded into it (RDNA4_M -> the RDNA2 table) on both the device and the host table-id paths. Build green; same-seed greedy text byte-identical with MMVQ on/off (33 chars, sha 3de206c8878b) on Qwen3-Coder-30B-A3B.
… pad) - old-10: per-type mmvq VDR/nwarps for Q4_K/Q5_K/Q6_K/Q8_0, dense Q6_K VDR=2 and the MoE-expert VDR split. - old-04 MMQ: GGML_CUDA_MMQ_J_MAX and the mmq-vec-dot x_scale/x_df hoist. - old-15: the Q1_0 ggml_cuda_byte_perm port (vecdotq.cuh + mmq-load-tiles.cuh), the gfx1201 grid-stall pad (common.cuh + mmvf.cu), the mmvf multi-token cross-warp reduction and the mmq-vec-dot #pragma unroll 1 for gfx12. - old-04's MUL_MAT Q6_K/Q8_0 test shapes. - r169: dense Q6_K keeps upstream ggml-org#30517's VDR=2 on every arch (measured on gfx1151: within noise of VDR=1 at B=1/B=4 and d16384, +1.2 % at batched B=8, width-pure against draft-mtp). -DGGML_HIP_Q6K_DENSE_VDR1 restores the pre-ggml-org#30517 VDR=1 association order for a consumer that gates on output identity; the MoE-expert VDR is per kernel and unaffected. NOTE: the mmvq multi-row/row-loop decode hunks (old-15 PR ggml-org#57) are NOT here -- they are interleaved with the fused-MoE item-split in the same function and are deferred to 09 (see PHASE1-STATUS.md). Re-based onto a691b23 (mmvq.cu conflicted, 2 hunks: the per-architecture MMVQ table id). The block splits the old combined mapping -- RDNA3_5 (gfx1151) gets its own table (nwarps swept), real RDNA2 (gfx103x) gets the Navi21 table -- where upstream maps all of RDNA2 || RDNA3_5 to the RDNA2 table. The delivery's split is kept and upstream's new RDNA4_M family is folded into it (RDNA4_M -> the RDNA2 table) on both the device and the host table-id paths. Build green; same-seed greedy text byte-identical with MMVQ on/off (33 chars, sha 3de206c8878b) on Qwen3-Coder-30B-A3B.
… pad) - old-10: per-type mmvq VDR/nwarps for Q4_K/Q5_K/Q6_K/Q8_0, dense Q6_K VDR=2 and the MoE-expert VDR split. - old-04 MMQ: GGML_CUDA_MMQ_J_MAX and the mmq-vec-dot x_scale/x_df hoist. - old-15: the Q1_0 ggml_cuda_byte_perm port (vecdotq.cuh + mmq-load-tiles.cuh), the gfx1201 grid-stall pad (common.cuh + mmvf.cu), the mmvf multi-token cross-warp reduction and the mmq-vec-dot #pragma unroll 1 for gfx12. - old-04's MUL_MAT Q6_K/Q8_0 test shapes. - r169: dense Q6_K keeps upstream ggml-org#30517's VDR=2 on every arch (measured on gfx1151: within noise of VDR=1 at B=1/B=4 and d16384, +1.2 % at batched B=8, width-pure against draft-mtp). -DGGML_HIP_Q6K_DENSE_VDR1 restores the pre-ggml-org#30517 VDR=1 association order for a consumer that gates on output identity; the MoE-expert VDR is per kernel and unaffected. NOTE: the mmvq multi-row/row-loop decode hunks (old-15 PR ggml-org#57) are NOT here -- they are interleaved with the fused-MoE item-split in the same function and are deferred to 09 (see PHASE1-STATUS.md). Re-based onto a691b23 (mmvq.cu conflicted, 2 hunks: the per-architecture MMVQ table id). The block splits the old combined mapping -- RDNA3_5 (gfx1151) gets its own table (nwarps swept), real RDNA2 (gfx103x) gets the Navi21 table -- where upstream maps all of RDNA2 || RDNA3_5 to the RDNA2 table. The delivery's split is kept and upstream's new RDNA4_M family is folded into it (RDNA4_M -> the RDNA2 table) on both the device and the host table-id paths. Build green; same-seed greedy text byte-identical with MMVQ on/off (33 chars, sha 3de206c8878b) on Qwen3-Coder-30B-A3B.
… pad) - old-10: per-type mmvq VDR/nwarps for Q4_K/Q5_K/Q6_K/Q8_0, dense Q6_K VDR=2 and the MoE-expert VDR split. - old-04 MMQ: GGML_CUDA_MMQ_J_MAX and the mmq-vec-dot x_scale/x_df hoist. - old-15: the Q1_0 ggml_cuda_byte_perm port (vecdotq.cuh + mmq-load-tiles.cuh), the gfx1201 grid-stall pad (common.cuh + mmvf.cu), the mmvf multi-token cross-warp reduction and the mmq-vec-dot #pragma unroll 1 for gfx12. - old-04's MUL_MAT Q6_K/Q8_0 test shapes. - r169: dense Q6_K keeps upstream ggml-org#30517's VDR=2 on every arch (measured on gfx1151: within noise of VDR=1 at B=1/B=4 and d16384, +1.2 % at batched B=8, width-pure against draft-mtp). -DGGML_HIP_Q6K_DENSE_VDR1 restores the pre-ggml-org#30517 VDR=1 association order for a consumer that gates on output identity; the MoE-expert VDR is per kernel and unaffected. NOTE: the mmvq multi-row/row-loop decode hunks (old-15 PR ggml-org#57) are NOT here -- they are interleaved with the fused-MoE item-split in the same function and are deferred to 09 (see PHASE1-STATUS.md). Re-based onto a691b23 (mmvq.cu conflicted, 2 hunks: the per-architecture MMVQ table id). The block splits the old combined mapping -- RDNA3_5 (gfx1151) gets its own table (nwarps swept), real RDNA2 (gfx103x) gets the Navi21 table -- where upstream maps all of RDNA2 || RDNA3_5 to the RDNA2 table. The delivery's split is kept and upstream's new RDNA4_M family is folded into it (RDNA4_M -> the RDNA2 table) on both the device and the host table-id paths. Build green; same-seed greedy text byte-identical with MMVQ on/off (33 chars, sha 3de206c8878b) on Qwen3-Coder-30B-A3B.
… pad) - old-10: per-type mmvq VDR/nwarps for Q4_K/Q5_K/Q6_K/Q8_0, dense Q6_K VDR=2 and the MoE-expert VDR split. - old-04 MMQ: GGML_CUDA_MMQ_J_MAX and the mmq-vec-dot x_scale/x_df hoist. - old-15: the Q1_0 ggml_cuda_byte_perm port (vecdotq.cuh + mmq-load-tiles.cuh), the gfx1201 grid-stall pad (common.cuh + mmvf.cu), the mmvf multi-token cross-warp reduction and the mmq-vec-dot #pragma unroll 1 for gfx12. - old-04's MUL_MAT Q6_K/Q8_0 test shapes. - r169: dense Q6_K keeps upstream ggml-org#30517's VDR=2 on every arch (measured on gfx1151: within noise of VDR=1 at B=1/B=4 and d16384, +1.2 % at batched B=8, width-pure against draft-mtp). -DGGML_HIP_Q6K_DENSE_VDR1 restores the pre-ggml-org#30517 VDR=1 association order for a consumer that gates on output identity; the MoE-expert VDR is per kernel and unaffected. NOTE: the mmvq multi-row/row-loop decode hunks (old-15 PR ggml-org#57) are NOT here -- they are interleaved with the fused-MoE item-split in the same function and are deferred to 09 (see PHASE1-STATUS.md). Re-based onto a691b23 (mmvq.cu conflicted, 2 hunks: the per-architecture MMVQ table id). The block splits the old combined mapping -- RDNA3_5 (gfx1151) gets its own table (nwarps swept), real RDNA2 (gfx103x) gets the Navi21 table -- where upstream maps all of RDNA2 || RDNA3_5 to the RDNA2 table. The delivery's split is kept and upstream's new RDNA4_M family is folded into it (RDNA4_M -> the RDNA2 table) on both the device and the host table-id paths. Build green; same-seed greedy text byte-identical with MMVQ on/off (33 chars, sha 3de206c8878b) on Qwen3-Coder-30B-A3B. r290 amendment -- the VERIFY-band WMMA iu8 matvec family (contributor burnoutIA, PR ggml-org#317; folded here because this block is the delivery's decode-numerics block: it owns vecdotq.cuh's vec_dot_* family and the mmvq K-split loop, and its contract is already "same real-number result, different addition order"). * mmvq-wmma.cu/.cuh (new) + a fall-through in ggml_cuda_mul_mat_vec_q: for a dense, unfused MUL_MAT at N..8 columns on RDNA4, compute the product with wmma_i32_16x16x16_iu8, dequantizing each weight ONCE for all the verified columns. Q4_K, Q5_K, Q6_K and IQ4_XS in their GGUF layout on the existing q8_1 activations, plus Q8_0 (r290, ours: no dequantization, no min term, no table -- and its own per-format stride unit, because a Q8_0 block is 32 elements where the K-quants' is 256). Q5_K's min term is d.SUM(q) through a ones matrix, as vec_dot_q5_K_q8_1 does (ds.y moves the outputs ~1 % and drops the DFlash2 acceptance). Numerics against the K-split kernel: ~3.2e-7 relative (max 4.2e-5 on a 130 scale) at widths 2..8 for every covered type, i.e. rounding order only. * --wmma-verify off|auto|N (common), alias GGML_CUDA_WMMA_MMVQ=N, applied per device through the backend registry's proc-address table (no new cross-backend interface member in this block). * OPT-IN and WIDTH-SPLIT BY DESIGN: 1 column always keeps the K-split kernel, so while the option is ON the byte-identical greedy/verify contract (GREEDY-PURITY.md invariant 1) does NOT hold. Default is OFF, and with it off nothing on the default path is reached -- this block's own contract is unchanged. * Measured (r289, 27B UD-Q4_K_M and Q8_0, 1 and 2 GPUs, finite work): width 8 +9.0 % (1 GPU) / +10.6 % (2 GPU tensor split) for the K-quants and +4.2 % for Q8_0; width 7 +2..7.1 %; width 6 -4.4..+1.9 % (split-dependent); widths 2..5 -0.5..-5.7 %. Hence `auto` = 7, the first width it wins. End to end (DFlash2 n=7, recall): cycle 37.0 -> 33.5 ms on the 2-GPU Q4_K_M split (+10.4 % tokens/s at identical acceptance), 43.6 -> 41.8 ms on Q8_0 (+4.2 %). Not where the width is >8: those rounds are MMQ, so adaptive MTP n12 is neutral. Gate: coherence (off == the r289 build, byte for byte) plus the four-axis A/B and llama-batched-bench with it on; ENVIRONMENT.md, GREEDY-PURITY.md and patches/README.md carry the numbers. Co-authored-by: burnoutIA <[email protected]>
… pad) - old-10: per-type mmvq VDR/nwarps for Q4_K/Q5_K/Q6_K/Q8_0, dense Q6_K VDR=2 and the MoE-expert VDR split. - old-04 MMQ: GGML_CUDA_MMQ_J_MAX and the mmq-vec-dot x_scale/x_df hoist. - old-15: the Q1_0 ggml_cuda_byte_perm port (vecdotq.cuh + mmq-load-tiles.cuh), the gfx1201 grid-stall pad (common.cuh + mmvf.cu), the mmvf multi-token cross-warp reduction and the mmq-vec-dot #pragma unroll 1 for gfx12. - old-04's MUL_MAT Q6_K/Q8_0 test shapes. - r169: dense Q6_K keeps upstream ggml-org#30517's VDR=2 on every arch (measured on gfx1151: within noise of VDR=1 at B=1/B=4 and d16384, +1.2 % at batched B=8, width-pure against draft-mtp). -DGGML_HIP_Q6K_DENSE_VDR1 restores the pre-ggml-org#30517 VDR=1 association order for a consumer that gates on output identity; the MoE-expert VDR is per kernel and unaffected. NOTE: the mmvq multi-row/row-loop decode hunks (old-15 PR ggml-org#57) are NOT here -- they are interleaved with the fused-MoE item-split in the same function and are deferred to 09 (see PHASE1-STATUS.md). Re-based onto a691b23 (mmvq.cu conflicted, 2 hunks: the per-architecture MMVQ table id). The block splits the old combined mapping -- RDNA3_5 (gfx1151) gets its own table (nwarps swept), real RDNA2 (gfx103x) gets the Navi21 table -- where upstream maps all of RDNA2 || RDNA3_5 to the RDNA2 table. The delivery's split is kept and upstream's new RDNA4_M family is folded into it (RDNA4_M -> the RDNA2 table) on both the device and the host table-id paths. Build green; same-seed greedy text byte-identical with MMVQ on/off (33 chars, sha 3de206c8878b) on Qwen3-Coder-30B-A3B. r290 amendment -- the VERIFY-band WMMA iu8 matvec family (contributor burnoutIA, PR ggml-org#317; folded here because this block is the delivery's decode-numerics block: it owns vecdotq.cuh's vec_dot_* family and the mmvq K-split loop, and its contract is already "same real-number result, different addition order"). * mmvq-wmma.cu/.cuh (new) + a fall-through in ggml_cuda_mul_mat_vec_q: for a dense, unfused MUL_MAT at N..8 columns on RDNA4, compute the product with wmma_i32_16x16x16_iu8, dequantizing each weight ONCE for all the verified columns. Q4_K, Q5_K, Q6_K and IQ4_XS in their GGUF layout on the existing q8_1 activations, plus Q8_0 (r290, ours: no dequantization, no min term, no table -- and its own per-format stride unit, because a Q8_0 block is 32 elements where the K-quants' is 256). Q5_K's min term is d.SUM(q) through a ones matrix, as vec_dot_q5_K_q8_1 does (ds.y moves the outputs ~1 % and drops the DFlash2 acceptance). Numerics against the K-split kernel: ~3.2e-7 relative (max 4.2e-5 on a 130 scale) at widths 2..8 for every covered type, i.e. rounding order only. * --wmma-verify off|auto|N (common), alias GGML_CUDA_WMMA_MMVQ=N, applied per device through the backend registry's proc-address table (no new cross-backend interface member in this block). * OPT-IN and WIDTH-SPLIT BY DESIGN: 1 column always keeps the K-split kernel, so while the option is ON the byte-identical greedy/verify contract (GREEDY-PURITY.md invariant 1) does NOT hold. Default is OFF, and with it off nothing on the default path is reached -- this block's own contract is unchanged. * Measured (r289, 27B UD-Q4_K_M and Q8_0, 1 and 2 GPUs, finite work): width 8 +9.0 % (1 GPU) / +10.6 % (2 GPU tensor split) for the K-quants and +4.2 % for Q8_0; width 7 +2..7.1 %; width 6 -4.4..+1.9 % (split-dependent); widths 2..5 -0.5..-5.7 %. Hence `auto` = 7, the first width it wins. End to end (DFlash2 n=7, recall): cycle 37.0 -> 33.5 ms on the 2-GPU Q4_K_M split (+10.4 % tokens/s at identical acceptance), 43.6 -> 41.8 ms on Q8_0 (+4.2 %). Not where the width is >8: those rounds are MMQ, so adaptive MTP n12 is neutral. Gate: coherence (off == the r289 build, byte for byte) plus the four-axis A/B and llama-batched-bench with it on; ENVIRONMENT.md, GREEDY-PURITY.md and patches/README.md carry the numbers. Co-authored-by: burnoutIA <[email protected]>
… pad) - old-10: per-type mmvq VDR/nwarps for Q4_K/Q5_K/Q6_K/Q8_0, dense Q6_K VDR=2 and the MoE-expert VDR split. - old-04 MMQ: GGML_CUDA_MMQ_J_MAX and the mmq-vec-dot x_scale/x_df hoist. - old-15: the Q1_0 ggml_cuda_byte_perm port (vecdotq.cuh + mmq-load-tiles.cuh), the gfx1201 grid-stall pad (common.cuh + mmvf.cu), the mmvf multi-token cross-warp reduction and the mmq-vec-dot #pragma unroll 1 for gfx12. - old-04's MUL_MAT Q6_K/Q8_0 test shapes. - r169: dense Q6_K keeps upstream ggml-org#30517's VDR=2 on every arch (measured on gfx1151: within noise of VDR=1 at B=1/B=4 and d16384, +1.2 % at batched B=8, width-pure against draft-mtp). -DGGML_HIP_Q6K_DENSE_VDR1 restores the pre-ggml-org#30517 VDR=1 association order for a consumer that gates on output identity; the MoE-expert VDR is per kernel and unaffected. NOTE: the mmvq multi-row/row-loop decode hunks (old-15 PR ggml-org#57) are NOT here -- they are interleaved with the fused-MoE item-split in the same function and are deferred to 09 (see PHASE1-STATUS.md). Re-based onto a691b23 (mmvq.cu conflicted, 2 hunks: the per-architecture MMVQ table id). The block splits the old combined mapping -- RDNA3_5 (gfx1151) gets its own table (nwarps swept), real RDNA2 (gfx103x) gets the Navi21 table -- where upstream maps all of RDNA2 || RDNA3_5 to the RDNA2 table. The delivery's split is kept and upstream's new RDNA4_M family is folded into it (RDNA4_M -> the RDNA2 table) on both the device and the host table-id paths. Build green; same-seed greedy text byte-identical with MMVQ on/off (33 chars, sha 3de206c8878b) on Qwen3-Coder-30B-A3B. r290 amendment -- the VERIFY-band WMMA iu8 matvec family (contributor burnoutIA, PR ggml-org#317; folded here because this block is the delivery's decode-numerics block: it owns vecdotq.cuh's vec_dot_* family and the mmvq K-split loop, and its contract is already "same real-number result, different addition order"). * mmvq-wmma.cu/.cuh (new) + a fall-through in ggml_cuda_mul_mat_vec_q: for a dense, unfused MUL_MAT at N..8 columns on RDNA4, compute the product with wmma_i32_16x16x16_iu8, dequantizing each weight ONCE for all the verified columns. Q4_K, Q5_K, Q6_K and IQ4_XS in their GGUF layout on the existing q8_1 activations, plus Q8_0 (r290, ours: no dequantization, no min term, no table -- and its own per-format stride unit, because a Q8_0 block is 32 elements where the K-quants' is 256). Q5_K's min term is d.SUM(q) through a ones matrix, as vec_dot_q5_K_q8_1 does (ds.y moves the outputs ~1 % and drops the DFlash2 acceptance). Numerics against the K-split kernel: ~3.2e-7 relative (max 4.2e-5 on a 130 scale) at widths 2..8 for every covered type, i.e. rounding order only. * --wmma-verify off|auto|N (common), alias GGML_CUDA_WMMA_MMVQ=N, applied per device through the backend registry's proc-address table (no new cross-backend interface member in this block). * OPT-IN and WIDTH-SPLIT BY DESIGN: 1 column always keeps the K-split kernel, so while the option is ON the byte-identical greedy/verify contract (GREEDY-PURITY.md invariant 1) does NOT hold. Default is OFF, and with it off nothing on the default path is reached -- this block's own contract is unchanged. * Measured (r289, 27B UD-Q4_K_M and Q8_0, 1 and 2 GPUs, finite work): width 8 +9.0 % (1 GPU) / +10.6 % (2 GPU tensor split) for the K-quants and +4.2 % for Q8_0; width 7 +2..7.1 %; width 6 -4.4..+1.9 % (split-dependent); widths 2..5 -0.5..-5.7 %. Hence `auto` = 7, the first width it wins. End to end (DFlash2 n=7, recall): cycle 37.0 -> 33.5 ms on the 2-GPU Q4_K_M split (+10.4 % tokens/s at identical acceptance), 43.6 -> 41.8 ms on Q8_0 (+4.2 %). Not where the width is >8: those rounds are MMQ, so adaptive MTP n12 is neutral. Gate: coherence (off == the r289 build, byte for byte) plus the four-axis A/B and llama-batched-bench with it on; ENVIRONMENT.md, GREEDY-PURITY.md and patches/README.md carry the numbers. Co-authored-by: burnoutIA <[email protected]>
Step 10 (ggml-org#30517): Q6_K MMVQ now reads VDR_Q6_K_Q8_1_MMVQ = 2 ints per thread and the impl takes arrays; the fork's 4-column RDNA3.5 kernel steps kqs by get_vdr_mmvq() and now loads both ints, as upstream's vec_dot_q6_K_q8_1 does (it read only the first of the two before this fix, which would drop half of each block). Step 100 (ggml-org#32018): quantize_row_q8_1_cuda lost its unused ids and type_src0 arguments. Assisted-by: Claude Opus 5.5 Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01YKmjzcT1LTvKtbw9EzBVGE
… pad) - old-10: per-type mmvq VDR/nwarps for Q4_K/Q5_K/Q6_K/Q8_0, dense Q6_K VDR=2 and the MoE-expert VDR split. - old-04 MMQ: GGML_CUDA_MMQ_J_MAX and the mmq-vec-dot x_scale/x_df hoist. - old-15: the Q1_0 ggml_cuda_byte_perm port (vecdotq.cuh + mmq-load-tiles.cuh), the gfx1201 grid-stall pad (common.cuh + mmvf.cu), the mmvf multi-token cross-warp reduction and the mmq-vec-dot #pragma unroll 1 for gfx12. - old-04's MUL_MAT Q6_K/Q8_0 test shapes. - r169: dense Q6_K keeps upstream ggml-org#30517's VDR=2 on every arch (measured on gfx1151: within noise of VDR=1 at B=1/B=4 and d16384, +1.2 % at batched B=8, width-pure against draft-mtp). -DGGML_HIP_Q6K_DENSE_VDR1 restores the pre-ggml-org#30517 VDR=1 association order for a consumer that gates on output identity; the MoE-expert VDR is per kernel and unaffected. NOTE: the mmvq multi-row/row-loop decode hunks (old-15 PR ggml-org#57) are NOT here -- they are interleaved with the fused-MoE item-split in the same function and are deferred to 09 (see PHASE1-STATUS.md). Re-based onto a691b23 (mmvq.cu conflicted, 2 hunks: the per-architecture MMVQ table id). The block splits the old combined mapping -- RDNA3_5 (gfx1151) gets its own table (nwarps swept), real RDNA2 (gfx103x) gets the Navi21 table -- where upstream maps all of RDNA2 || RDNA3_5 to the RDNA2 table. The delivery's split is kept and upstream's new RDNA4_M family is folded into it (RDNA4_M -> the RDNA2 table) on both the device and the host table-id paths. Build green; same-seed greedy text byte-identical with MMVQ on/off (33 chars, sha 3de206c8878b) on Qwen3-Coder-30B-A3B. r290 amendment -- the VERIFY-band WMMA iu8 matvec family (contributor burnoutIA, PR ggml-org#317; folded here because this block is the delivery's decode-numerics block: it owns vecdotq.cuh's vec_dot_* family and the mmvq K-split loop, and its contract is already "same real-number result, different addition order"). * mmvq-wmma.cu/.cuh (new) + a fall-through in ggml_cuda_mul_mat_vec_q: for a dense, unfused MUL_MAT at N..8 columns on RDNA4, compute the product with wmma_i32_16x16x16_iu8, dequantizing each weight ONCE for all the verified columns. Q4_K, Q5_K, Q6_K and IQ4_XS in their GGUF layout on the existing q8_1 activations, plus Q8_0 (r290, ours: no dequantization, no min term, no table -- and its own per-format stride unit, because a Q8_0 block is 32 elements where the K-quants' is 256). Q5_K's min term is d.SUM(q) through a ones matrix, as vec_dot_q5_K_q8_1 does (ds.y moves the outputs ~1 % and drops the DFlash2 acceptance). Numerics against the K-split kernel: ~3.2e-7 relative (max 4.2e-5 on a 130 scale) at widths 2..8 for every covered type, i.e. rounding order only. * --wmma-verify off|auto|N (common), alias GGML_CUDA_WMMA_MMVQ=N, applied per device through the backend registry's proc-address table (no new cross-backend interface member in this block). * OPT-IN and WIDTH-SPLIT BY DESIGN: 1 column always keeps the K-split kernel, so while the option is ON the byte-identical greedy/verify contract (GREEDY-PURITY.md invariant 1) does NOT hold. Default is OFF, and with it off nothing on the default path is reached -- this block's own contract is unchanged. * Measured (r289, 27B UD-Q4_K_M and Q8_0, 1 and 2 GPUs, finite work): width 8 +9.0 % (1 GPU) / +10.6 % (2 GPU tensor split) for the K-quants and +4.2 % for Q8_0; width 7 +2..7.1 %; width 6 -4.4..+1.9 % (split-dependent); widths 2..5 -0.5..-5.7 %. Hence `auto` = 7, the first width it wins. End to end (DFlash2 n=7, recall): cycle 37.0 -> 33.5 ms on the 2-GPU Q4_K_M split (+10.4 % tokens/s at identical acceptance), 43.6 -> 41.8 ms on Q8_0 (+4.2 %). Not where the width is >8: those rounds are MMQ, so adaptive MTP n12 is neutral. Gate: coherence (off == the r289 build, byte for byte) plus the four-axis A/B and llama-batched-bench with it on; ENVIRONMENT.md, GREEDY-PURITY.md and patches/README.md carry the numbers. Co-authored-by: burnoutIA <[email protected]>
… pad) - old-10: per-type mmvq VDR/nwarps for Q4_K/Q5_K/Q6_K/Q8_0, dense Q6_K VDR=2 and the MoE-expert VDR split. - old-04 MMQ: GGML_CUDA_MMQ_J_MAX and the mmq-vec-dot x_scale/x_df hoist. - old-15: the Q1_0 ggml_cuda_byte_perm port (vecdotq.cuh + mmq-load-tiles.cuh), the gfx1201 grid-stall pad (common.cuh + mmvf.cu), the mmvf multi-token cross-warp reduction and the mmq-vec-dot #pragma unroll 1 for gfx12. - old-04's MUL_MAT Q6_K/Q8_0 test shapes. - r169: dense Q6_K keeps upstream ggml-org#30517's VDR=2 on every arch (measured on gfx1151: within noise of VDR=1 at B=1/B=4 and d16384, +1.2 % at batched B=8, width-pure against draft-mtp). -DGGML_HIP_Q6K_DENSE_VDR1 restores the pre-ggml-org#30517 VDR=1 association order for a consumer that gates on output identity; the MoE-expert VDR is per kernel and unaffected. NOTE: the mmvq multi-row/row-loop decode hunks (old-15 PR ggml-org#57) are NOT here -- they are interleaved with the fused-MoE item-split in the same function and are deferred to 09 (see PHASE1-STATUS.md). Re-based onto a691b23 (mmvq.cu conflicted, 2 hunks: the per-architecture MMVQ table id). The block splits the old combined mapping -- RDNA3_5 (gfx1151) gets its own table (nwarps swept), real RDNA2 (gfx103x) gets the Navi21 table -- where upstream maps all of RDNA2 || RDNA3_5 to the RDNA2 table. The delivery's split is kept and upstream's new RDNA4_M family is folded into it (RDNA4_M -> the RDNA2 table) on both the device and the host table-id paths. Build green; same-seed greedy text byte-identical with MMVQ on/off (33 chars, sha 3de206c8878b) on Qwen3-Coder-30B-A3B. r290 amendment -- the VERIFY-band WMMA iu8 matvec family (contributor burnoutIA, PR ggml-org#317; folded here because this block is the delivery's decode-numerics block: it owns vecdotq.cuh's vec_dot_* family and the mmvq K-split loop, and its contract is already "same real-number result, different addition order"). * mmvq-wmma.cu/.cuh (new) + a fall-through in ggml_cuda_mul_mat_vec_q: for a dense, unfused MUL_MAT at N..8 columns on RDNA4, compute the product with wmma_i32_16x16x16_iu8, dequantizing each weight ONCE for all the verified columns. Q4_K, Q5_K, Q6_K and IQ4_XS in their GGUF layout on the existing q8_1 activations, plus Q8_0 (r290, ours: no dequantization, no min term, no table -- and its own per-format stride unit, because a Q8_0 block is 32 elements where the K-quants' is 256). Q5_K's min term is d.SUM(q) through a ones matrix, as vec_dot_q5_K_q8_1 does (ds.y moves the outputs ~1 % and drops the DFlash2 acceptance). Numerics against the K-split kernel: ~3.2e-7 relative (max 4.2e-5 on a 130 scale) at widths 2..8 for every covered type, i.e. rounding order only. * --wmma-verify off|auto|N (common), alias GGML_CUDA_WMMA_MMVQ=N, applied per device through the backend registry's proc-address table (no new cross-backend interface member in this block). * OPT-IN and WIDTH-SPLIT BY DESIGN: 1 column always keeps the K-split kernel, so while the option is ON the byte-identical greedy/verify contract (GREEDY-PURITY.md invariant 1) does NOT hold. Default is OFF, and with it off nothing on the default path is reached -- this block's own contract is unchanged. * Measured (r289, 27B UD-Q4_K_M and Q8_0, 1 and 2 GPUs, finite work): width 8 +9.0 % (1 GPU) / +10.6 % (2 GPU tensor split) for the K-quants and +4.2 % for Q8_0; width 7 +2..7.1 %; width 6 -4.4..+1.9 % (split-dependent); widths 2..5 -0.5..-5.7 %. Hence `auto` = 7, the first width it wins. End to end (DFlash2 n=7, recall): cycle 37.0 -> 33.5 ms on the 2-GPU Q4_K_M split (+10.4 % tokens/s at identical acceptance), 43.6 -> 41.8 ms on Q8_0 (+4.2 %). Not where the width is >8: those rounds are MMQ, so adaptive MTP n12 is neutral. Gate: coherence (off == the r289 build, byte for byte) plus the four-axis A/B and llama-batched-bench with it on; ENVIRONMENT.md, GREEDY-PURITY.md and patches/README.md carry the numbers. Co-authored-by: burnoutIA <[email protected]>
… pad) - old-10: per-type mmvq VDR/nwarps for Q4_K/Q5_K/Q6_K/Q8_0, dense Q6_K VDR=2 and the MoE-expert VDR split. - old-04 MMQ: GGML_CUDA_MMQ_J_MAX and the mmq-vec-dot x_scale/x_df hoist. - old-15: the Q1_0 ggml_cuda_byte_perm port (vecdotq.cuh + mmq-load-tiles.cuh), the gfx1201 grid-stall pad (common.cuh + mmvf.cu), the mmvf multi-token cross-warp reduction and the mmq-vec-dot #pragma unroll 1 for gfx12. - old-04's MUL_MAT Q6_K/Q8_0 test shapes. - r169: dense Q6_K keeps upstream ggml-org#30517's VDR=2 on every arch (measured on gfx1151: within noise of VDR=1 at B=1/B=4 and d16384, +1.2 % at batched B=8, width-pure against draft-mtp). -DGGML_HIP_Q6K_DENSE_VDR1 restores the pre-ggml-org#30517 VDR=1 association order for a consumer that gates on output identity; the MoE-expert VDR is per kernel and unaffected. NOTE: the mmvq multi-row/row-loop decode hunks (old-15 PR ggml-org#57) are NOT here -- they are interleaved with the fused-MoE item-split in the same function and are deferred to 09 (see PHASE1-STATUS.md). Re-based onto a691b23 (mmvq.cu conflicted, 2 hunks: the per-architecture MMVQ table id). The block splits the old combined mapping -- RDNA3_5 (gfx1151) gets its own table (nwarps swept), real RDNA2 (gfx103x) gets the Navi21 table -- where upstream maps all of RDNA2 || RDNA3_5 to the RDNA2 table. The delivery's split is kept and upstream's new RDNA4_M family is folded into it (RDNA4_M -> the RDNA2 table) on both the device and the host table-id paths. Build green; same-seed greedy text byte-identical with MMVQ on/off (33 chars, sha 3de206c8878b) on Qwen3-Coder-30B-A3B. r290 amendment -- the VERIFY-band WMMA iu8 matvec family (contributor burnoutIA, PR ggml-org#317; folded here because this block is the delivery's decode-numerics block: it owns vecdotq.cuh's vec_dot_* family and the mmvq K-split loop, and its contract is already "same real-number result, different addition order"). * mmvq-wmma.cu/.cuh (new) + a fall-through in ggml_cuda_mul_mat_vec_q: for a dense, unfused MUL_MAT at N..8 columns on RDNA4, compute the product with wmma_i32_16x16x16_iu8, dequantizing each weight ONCE for all the verified columns. Q4_K, Q5_K, Q6_K and IQ4_XS in their GGUF layout on the existing q8_1 activations, plus Q8_0 (r290, ours: no dequantization, no min term, no table -- and its own per-format stride unit, because a Q8_0 block is 32 elements where the K-quants' is 256). Q5_K's min term is d.SUM(q) through a ones matrix, as vec_dot_q5_K_q8_1 does (ds.y moves the outputs ~1 % and drops the DFlash2 acceptance). Numerics against the K-split kernel: ~3.2e-7 relative (max 4.2e-5 on a 130 scale) at widths 2..8 for every covered type, i.e. rounding order only. * --wmma-verify off|auto|N (common), alias GGML_CUDA_WMMA_MMVQ=N, applied per device through the backend registry's proc-address table (no new cross-backend interface member in this block). * OPT-IN and WIDTH-SPLIT BY DESIGN: 1 column always keeps the K-split kernel, so while the option is ON the byte-identical greedy/verify contract (GREEDY-PURITY.md invariant 1) does NOT hold. Default is OFF, and with it off nothing on the default path is reached -- this block's own contract is unchanged. * Measured (r289, 27B UD-Q4_K_M and Q8_0, 1 and 2 GPUs, finite work): width 8 +9.0 % (1 GPU) / +10.6 % (2 GPU tensor split) for the K-quants and +4.2 % for Q8_0; width 7 +2..7.1 %; width 6 -4.4..+1.9 % (split-dependent); widths 2..5 -0.5..-5.7 %. Hence `auto` = 7, the first width it wins. End to end (DFlash2 n=7, recall): cycle 37.0 -> 33.5 ms on the 2-GPU Q4_K_M split (+10.4 % tokens/s at identical acceptance), 43.6 -> 41.8 ms on Q8_0 (+4.2 %). Not where the width is >8: those rounds are MMQ, so adaptive MTP n12 is neutral. Gate: coherence (off == the r289 build, byte for byte) plus the four-axis A/B and llama-batched-bench with it on; ENVIRONMENT.md, GREEDY-PURITY.md and patches/README.md carry the numbers. Co-authored-by: burnoutIA <[email protected]>
… pad) - old-10: per-type mmvq VDR/nwarps for Q4_K/Q5_K/Q6_K/Q8_0, dense Q6_K VDR=2 and the MoE-expert VDR split. - old-04 MMQ: GGML_CUDA_MMQ_J_MAX and the mmq-vec-dot x_scale/x_df hoist. - old-15: the Q1_0 ggml_cuda_byte_perm port (vecdotq.cuh + mmq-load-tiles.cuh), the gfx1201 grid-stall pad (common.cuh + mmvf.cu), the mmvf multi-token cross-warp reduction and the mmq-vec-dot #pragma unroll 1 for gfx12. - old-04's MUL_MAT Q6_K/Q8_0 test shapes. - r169: dense Q6_K keeps upstream ggml-org#30517's VDR=2 on every arch (measured on gfx1151: within noise of VDR=1 at B=1/B=4 and d16384, +1.2 % at batched B=8, width-pure against draft-mtp). -DGGML_HIP_Q6K_DENSE_VDR1 restores the pre-ggml-org#30517 VDR=1 association order for a consumer that gates on output identity; the MoE-expert VDR is per kernel and unaffected. NOTE: the mmvq multi-row/row-loop decode hunks (old-15 PR ggml-org#57) are NOT here -- they are interleaved with the fused-MoE item-split in the same function and are deferred to 09 (see PHASE1-STATUS.md). Re-based onto a691b23 (mmvq.cu conflicted, 2 hunks: the per-architecture MMVQ table id). The block splits the old combined mapping -- RDNA3_5 (gfx1151) gets its own table (nwarps swept), real RDNA2 (gfx103x) gets the Navi21 table -- where upstream maps all of RDNA2 || RDNA3_5 to the RDNA2 table. The delivery's split is kept and upstream's new RDNA4_M family is folded into it (RDNA4_M -> the RDNA2 table) on both the device and the host table-id paths. Build green; same-seed greedy text byte-identical with MMVQ on/off (33 chars, sha 3de206c8878b) on Qwen3-Coder-30B-A3B. r290 amendment -- the VERIFY-band WMMA iu8 matvec family (contributor burnoutIA, PR ggml-org#317; folded here because this block is the delivery's decode-numerics block: it owns vecdotq.cuh's vec_dot_* family and the mmvq K-split loop, and its contract is already "same real-number result, different addition order"). * mmvq-wmma.cu/.cuh (new) + a fall-through in ggml_cuda_mul_mat_vec_q: for a dense, unfused MUL_MAT at N..8 columns on RDNA4, compute the product with wmma_i32_16x16x16_iu8, dequantizing each weight ONCE for all the verified columns. Q4_K, Q5_K, Q6_K and IQ4_XS in their GGUF layout on the existing q8_1 activations, plus Q8_0 (r290, ours: no dequantization, no min term, no table -- and its own per-format stride unit, because a Q8_0 block is 32 elements where the K-quants' is 256). Q5_K's min term is d.SUM(q) through a ones matrix, as vec_dot_q5_K_q8_1 does (ds.y moves the outputs ~1 % and drops the DFlash2 acceptance). Numerics against the K-split kernel: ~3.2e-7 relative (max 4.2e-5 on a 130 scale) at widths 2..8 for every covered type, i.e. rounding order only. * --wmma-verify off|auto|N (common), alias GGML_CUDA_WMMA_MMVQ=N, applied per device through the backend registry's proc-address table (no new cross-backend interface member in this block). * OPT-IN and WIDTH-SPLIT BY DESIGN: 1 column always keeps the K-split kernel, so while the option is ON the byte-identical greedy/verify contract (GREEDY-PURITY.md invariant 1) does NOT hold. Default is OFF, and with it off nothing on the default path is reached -- this block's own contract is unchanged. * Measured (r289, 27B UD-Q4_K_M and Q8_0, 1 and 2 GPUs, finite work): width 8 +9.0 % (1 GPU) / +10.6 % (2 GPU tensor split) for the K-quants and +4.2 % for Q8_0; width 7 +2..7.1 %; width 6 -4.4..+1.9 % (split-dependent); widths 2..5 -0.5..-5.7 %. Hence `auto` = 7, the first width it wins. End to end (DFlash2 n=7, recall): cycle 37.0 -> 33.5 ms on the 2-GPU Q4_K_M split (+10.4 % tokens/s at identical acceptance), 43.6 -> 41.8 ms on Q8_0 (+4.2 %). Not where the width is >8: those rounds are MMQ, so adaptive MTP n12 is neutral. Gate: coherence (off == the r289 build, byte for byte) plus the four-axis A/B and llama-batched-bench with it on; ENVIRONMENT.md, GREEDY-PURITY.md and patches/README.md carry the numbers. Co-authored-by: burnoutIA <[email protected]>
… pad) - old-10: per-type mmvq VDR/nwarps for Q4_K/Q5_K/Q6_K/Q8_0, dense Q6_K VDR=2 and the MoE-expert VDR split. - old-04 MMQ: GGML_CUDA_MMQ_J_MAX and the mmq-vec-dot x_scale/x_df hoist. - old-15: the Q1_0 ggml_cuda_byte_perm port (vecdotq.cuh + mmq-load-tiles.cuh), the gfx1201 grid-stall pad (common.cuh + mmvf.cu), the mmvf multi-token cross-warp reduction and the mmq-vec-dot #pragma unroll 1 for gfx12. - old-04's MUL_MAT Q6_K/Q8_0 test shapes. - r169: dense Q6_K keeps upstream ggml-org#30517's VDR=2 on every arch (measured on gfx1151: within noise of VDR=1 at B=1/B=4 and d16384, +1.2 % at batched B=8, width-pure against draft-mtp). -DGGML_HIP_Q6K_DENSE_VDR1 restores the pre-ggml-org#30517 VDR=1 association order for a consumer that gates on output identity; the MoE-expert VDR is per kernel and unaffected. NOTE: the mmvq multi-row/row-loop decode hunks (old-15 PR ggml-org#57) are NOT here -- they are interleaved with the fused-MoE item-split in the same function and are deferred to 09 (see PHASE1-STATUS.md). Re-based onto a691b23 (mmvq.cu conflicted, 2 hunks: the per-architecture MMVQ table id). The block splits the old combined mapping -- RDNA3_5 (gfx1151) gets its own table (nwarps swept), real RDNA2 (gfx103x) gets the Navi21 table -- where upstream maps all of RDNA2 || RDNA3_5 to the RDNA2 table. The delivery's split is kept and upstream's new RDNA4_M family is folded into it (RDNA4_M -> the RDNA2 table) on both the device and the host table-id paths. Build green; same-seed greedy text byte-identical with MMVQ on/off (33 chars, sha 3de206c8878b) on Qwen3-Coder-30B-A3B. r290 amendment -- the VERIFY-band WMMA iu8 matvec family (contributor burnoutIA, PR ggml-org#317; folded here because this block is the delivery's decode-numerics block: it owns vecdotq.cuh's vec_dot_* family and the mmvq K-split loop, and its contract is already "same real-number result, different addition order"). * mmvq-wmma.cu/.cuh (new) + a fall-through in ggml_cuda_mul_mat_vec_q: for a dense, unfused MUL_MAT at N..8 columns on RDNA4, compute the product with wmma_i32_16x16x16_iu8, dequantizing each weight ONCE for all the verified columns. Q4_K, Q5_K, Q6_K and IQ4_XS in their GGUF layout on the existing q8_1 activations, plus Q8_0 (r290, ours: no dequantization, no min term, no table -- and its own per-format stride unit, because a Q8_0 block is 32 elements where the K-quants' is 256). Q5_K's min term is d.SUM(q) through a ones matrix, as vec_dot_q5_K_q8_1 does (ds.y moves the outputs ~1 % and drops the DFlash2 acceptance). Numerics against the K-split kernel: ~3.2e-7 relative (max 4.2e-5 on a 130 scale) at widths 2..8 for every covered type, i.e. rounding order only. * --wmma-verify off|auto|N (common), alias GGML_CUDA_WMMA_MMVQ=N, applied per device through the backend registry's proc-address table (no new cross-backend interface member in this block). * OPT-IN and WIDTH-SPLIT BY DESIGN: 1 column always keeps the K-split kernel, so while the option is ON the byte-identical greedy/verify contract (GREEDY-PURITY.md invariant 1) does NOT hold. Default is OFF, and with it off nothing on the default path is reached -- this block's own contract is unchanged. * Measured (r289, 27B UD-Q4_K_M and Q8_0, 1 and 2 GPUs, finite work): width 8 +9.0 % (1 GPU) / +10.6 % (2 GPU tensor split) for the K-quants and +4.2 % for Q8_0; width 7 +2..7.1 %; width 6 -4.4..+1.9 % (split-dependent); widths 2..5 -0.5..-5.7 %. Hence `auto` = 7, the first width it wins. End to end (DFlash2 n=7, recall): cycle 37.0 -> 33.5 ms on the 2-GPU Q4_K_M split (+10.4 % tokens/s at identical acceptance), 43.6 -> 41.8 ms on Q8_0 (+4.2 %). Not where the width is >8: those rounds are MMQ, so adaptive MTP n12 is neutral. Gate: coherence (off == the r289 build, byte for byte) plus the four-axis A/B and llama-batched-bench with it on; ENVIRONMENT.md, GREEDY-PURITY.md and patches/README.md carry the numbers. Co-authored-by: burnoutIA <[email protected]>
… pad) - old-10: per-type mmvq VDR/nwarps for Q4_K/Q5_K/Q6_K/Q8_0, dense Q6_K VDR=2 and the MoE-expert VDR split. - old-04 MMQ: GGML_CUDA_MMQ_J_MAX and the mmq-vec-dot x_scale/x_df hoist. - old-15: the Q1_0 ggml_cuda_byte_perm port (vecdotq.cuh + mmq-load-tiles.cuh), the gfx1201 grid-stall pad (common.cuh + mmvf.cu), the mmvf multi-token cross-warp reduction and the mmq-vec-dot #pragma unroll 1 for gfx12. - old-04's MUL_MAT Q6_K/Q8_0 test shapes. - r169: dense Q6_K keeps upstream ggml-org#30517's VDR=2 on every arch (measured on gfx1151: within noise of VDR=1 at B=1/B=4 and d16384, +1.2 % at batched B=8, width-pure against draft-mtp). -DGGML_HIP_Q6K_DENSE_VDR1 restores the pre-ggml-org#30517 VDR=1 association order for a consumer that gates on output identity; the MoE-expert VDR is per kernel and unaffected. NOTE: the mmvq multi-row/row-loop decode hunks (old-15 PR ggml-org#57) are NOT here -- they are interleaved with the fused-MoE item-split in the same function and are deferred to 09 (see PHASE1-STATUS.md). Re-based onto a691b23 (mmvq.cu conflicted, 2 hunks: the per-architecture MMVQ table id). The block splits the old combined mapping -- RDNA3_5 (gfx1151) gets its own table (nwarps swept), real RDNA2 (gfx103x) gets the Navi21 table -- where upstream maps all of RDNA2 || RDNA3_5 to the RDNA2 table. The delivery's split is kept and upstream's new RDNA4_M family is folded into it (RDNA4_M -> the RDNA2 table) on both the device and the host table-id paths. Build green; same-seed greedy text byte-identical with MMVQ on/off (33 chars, sha 3de206c8878b) on Qwen3-Coder-30B-A3B. r290 amendment -- the VERIFY-band WMMA iu8 matvec family (contributor burnoutIA, PR ggml-org#317; folded here because this block is the delivery's decode-numerics block: it owns vecdotq.cuh's vec_dot_* family and the mmvq K-split loop, and its contract is already "same real-number result, different addition order"). * mmvq-wmma.cu/.cuh (new) + a fall-through in ggml_cuda_mul_mat_vec_q: for a dense, unfused MUL_MAT at N..8 columns on RDNA4, compute the product with wmma_i32_16x16x16_iu8, dequantizing each weight ONCE for all the verified columns. Q4_K, Q5_K, Q6_K and IQ4_XS in their GGUF layout on the existing q8_1 activations, plus Q8_0 (r290, ours: no dequantization, no min term, no table -- and its own per-format stride unit, because a Q8_0 block is 32 elements where the K-quants' is 256). Q5_K's min term is d.SUM(q) through a ones matrix, as vec_dot_q5_K_q8_1 does (ds.y moves the outputs ~1 % and drops the DFlash2 acceptance). Numerics against the K-split kernel: ~3.2e-7 relative (max 4.2e-5 on a 130 scale) at widths 2..8 for every covered type, i.e. rounding order only. * --wmma-verify off|auto|N (common), alias GGML_CUDA_WMMA_MMVQ=N, applied per device through the backend registry's proc-address table (no new cross-backend interface member in this block). * OPT-IN and WIDTH-SPLIT BY DESIGN: 1 column always keeps the K-split kernel, so while the option is ON the byte-identical greedy/verify contract (GREEDY-PURITY.md invariant 1) does NOT hold. Default is OFF, and with it off nothing on the default path is reached -- this block's own contract is unchanged. * Measured (r289, 27B UD-Q4_K_M and Q8_0, 1 and 2 GPUs, finite work): width 8 +9.0 % (1 GPU) / +10.6 % (2 GPU tensor split) for the K-quants and +4.2 % for Q8_0; width 7 +2..7.1 %; width 6 -4.4..+1.9 % (split-dependent); widths 2..5 -0.5..-5.7 %. Hence `auto` = 7, the first width it wins. End to end (DFlash2 n=7, recall): cycle 37.0 -> 33.5 ms on the 2-GPU Q4_K_M split (+10.4 % tokens/s at identical acceptance), 43.6 -> 41.8 ms on Q8_0 (+4.2 %). Not where the width is >8: those rounds are MMQ, so adaptive MTP n12 is neutral. Gate: coherence (off == the r289 build, byte for byte) plus the four-axis A/B and llama-batched-bench with it on; ENVIRONMENT.md, GREEDY-PURITY.md and patches/README.md carry the numbers. Co-authored-by: burnoutIA <[email protected]>
… pad) - old-10: per-type mmvq VDR/nwarps for Q4_K/Q5_K/Q6_K/Q8_0, dense Q6_K VDR=2 and the MoE-expert VDR split. - old-04 MMQ: GGML_CUDA_MMQ_J_MAX and the mmq-vec-dot x_scale/x_df hoist. - old-15: the Q1_0 ggml_cuda_byte_perm port (vecdotq.cuh + mmq-load-tiles.cuh), the gfx1201 grid-stall pad (common.cuh + mmvf.cu), the mmvf multi-token cross-warp reduction and the mmq-vec-dot #pragma unroll 1 for gfx12. - old-04's MUL_MAT Q6_K/Q8_0 test shapes. - r169: dense Q6_K keeps upstream ggml-org#30517's VDR=2 on every arch (measured on gfx1151: within noise of VDR=1 at B=1/B=4 and d16384, +1.2 % at batched B=8, width-pure against draft-mtp). -DGGML_HIP_Q6K_DENSE_VDR1 restores the pre-ggml-org#30517 VDR=1 association order for a consumer that gates on output identity; the MoE-expert VDR is per kernel and unaffected. NOTE: the mmvq multi-row/row-loop decode hunks (old-15 PR ggml-org#57) are NOT here -- they are interleaved with the fused-MoE item-split in the same function and are deferred to 09 (see PHASE1-STATUS.md). Re-based onto a691b23 (mmvq.cu conflicted, 2 hunks: the per-architecture MMVQ table id). The block splits the old combined mapping -- RDNA3_5 (gfx1151) gets its own table (nwarps swept), real RDNA2 (gfx103x) gets the Navi21 table -- where upstream maps all of RDNA2 || RDNA3_5 to the RDNA2 table. The delivery's split is kept and upstream's new RDNA4_M family is folded into it (RDNA4_M -> the RDNA2 table) on both the device and the host table-id paths. Build green; same-seed greedy text byte-identical with MMVQ on/off (33 chars, sha 3de206c8878b) on Qwen3-Coder-30B-A3B. r290 amendment -- the VERIFY-band WMMA iu8 matvec family (contributor burnoutIA, PR ggml-org#317; folded here because this block is the delivery's decode-numerics block: it owns vecdotq.cuh's vec_dot_* family and the mmvq K-split loop, and its contract is already "same real-number result, different addition order"). * mmvq-wmma.cu/.cuh (new) + a fall-through in ggml_cuda_mul_mat_vec_q: for a dense, unfused MUL_MAT at N..8 columns on RDNA4, compute the product with wmma_i32_16x16x16_iu8, dequantizing each weight ONCE for all the verified columns. Q4_K, Q5_K, Q6_K and IQ4_XS in their GGUF layout on the existing q8_1 activations, plus Q8_0 (r290, ours: no dequantization, no min term, no table -- and its own per-format stride unit, because a Q8_0 block is 32 elements where the K-quants' is 256). Q5_K's min term is d.SUM(q) through a ones matrix, as vec_dot_q5_K_q8_1 does (ds.y moves the outputs ~1 % and drops the DFlash2 acceptance). Numerics against the K-split kernel: ~3.2e-7 relative (max 4.2e-5 on a 130 scale) at widths 2..8 for every covered type, i.e. rounding order only. * --wmma-verify off|auto|N (common), alias GGML_CUDA_WMMA_MMVQ=N, applied per device through the backend registry's proc-address table (no new cross-backend interface member in this block). * OPT-IN and WIDTH-SPLIT BY DESIGN: 1 column always keeps the K-split kernel, so while the option is ON the byte-identical greedy/verify contract (GREEDY-PURITY.md invariant 1) does NOT hold. Default is OFF, and with it off nothing on the default path is reached -- this block's own contract is unchanged. * Measured (r289, 27B UD-Q4_K_M and Q8_0, 1 and 2 GPUs, finite work): width 8 +9.0 % (1 GPU) / +10.6 % (2 GPU tensor split) for the K-quants and +4.2 % for Q8_0; width 7 +2..7.1 %; width 6 -4.4..+1.9 % (split-dependent); widths 2..5 -0.5..-5.7 %. Hence `auto` = 7, the first width it wins. End to end (DFlash2 n=7, recall): cycle 37.0 -> 33.5 ms on the 2-GPU Q4_K_M split (+10.4 % tokens/s at identical acceptance), 43.6 -> 41.8 ms on Q8_0 (+4.2 %). Not where the width is >8: those rounds are MMQ, so adaptive MTP n12 is neutral. Gate: coherence (off == the r289 build, byte for byte) plus the four-axis A/B and llama-batched-bench with it on; ENVIRONMENT.md, GREEDY-PURITY.md and patches/README.md carry the numbers. Co-authored-by: burnoutIA <[email protected]>
… pad) - old-10: per-type mmvq VDR/nwarps for Q4_K/Q5_K/Q6_K/Q8_0, dense Q6_K VDR=2 and the MoE-expert VDR split. - old-04 MMQ: GGML_CUDA_MMQ_J_MAX and the mmq-vec-dot x_scale/x_df hoist. - old-15: the Q1_0 ggml_cuda_byte_perm port (vecdotq.cuh + mmq-load-tiles.cuh), the gfx1201 grid-stall pad (common.cuh + mmvf.cu), the mmvf multi-token cross-warp reduction and the mmq-vec-dot #pragma unroll 1 for gfx12. - old-04's MUL_MAT Q6_K/Q8_0 test shapes. - r169: dense Q6_K keeps upstream ggml-org#30517's VDR=2 on every arch (measured on gfx1151: within noise of VDR=1 at B=1/B=4 and d16384, +1.2 % at batched B=8, width-pure against draft-mtp). -DGGML_HIP_Q6K_DENSE_VDR1 restores the pre-ggml-org#30517 VDR=1 association order for a consumer that gates on output identity; the MoE-expert VDR is per kernel and unaffected. NOTE: the mmvq multi-row/row-loop decode hunks (old-15 PR ggml-org#57) are NOT here -- they are interleaved with the fused-MoE item-split in the same function and are deferred to 09 (see PHASE1-STATUS.md). Re-based onto a691b23 (mmvq.cu conflicted, 2 hunks: the per-architecture MMVQ table id). The block splits the old combined mapping -- RDNA3_5 (gfx1151) gets its own table (nwarps swept), real RDNA2 (gfx103x) gets the Navi21 table -- where upstream maps all of RDNA2 || RDNA3_5 to the RDNA2 table. The delivery's split is kept and upstream's new RDNA4_M family is folded into it (RDNA4_M -> the RDNA2 table) on both the device and the host table-id paths. Build green; same-seed greedy text byte-identical with MMVQ on/off (33 chars, sha 3de206c8878b) on Qwen3-Coder-30B-A3B. r290 amendment -- the VERIFY-band WMMA iu8 matvec family (contributor burnoutIA, PR ggml-org#317; folded here because this block is the delivery's decode-numerics block: it owns vecdotq.cuh's vec_dot_* family and the mmvq K-split loop, and its contract is already "same real-number result, different addition order"). * mmvq-wmma.cu/.cuh (new) + a fall-through in ggml_cuda_mul_mat_vec_q: for a dense, unfused MUL_MAT at N..8 columns on RDNA4, compute the product with wmma_i32_16x16x16_iu8, dequantizing each weight ONCE for all the verified columns. Q4_K, Q5_K, Q6_K and IQ4_XS in their GGUF layout on the existing q8_1 activations, plus Q8_0 (r290, ours: no dequantization, no min term, no table -- and its own per-format stride unit, because a Q8_0 block is 32 elements where the K-quants' is 256). Q5_K's min term is d.SUM(q) through a ones matrix, as vec_dot_q5_K_q8_1 does (ds.y moves the outputs ~1 % and drops the DFlash2 acceptance). Numerics against the K-split kernel: ~3.2e-7 relative (max 4.2e-5 on a 130 scale) at widths 2..8 for every covered type, i.e. rounding order only. * --wmma-verify off|auto|N (common), alias GGML_CUDA_WMMA_MMVQ=N, applied per device through the backend registry's proc-address table (no new cross-backend interface member in this block). * OPT-IN and WIDTH-SPLIT BY DESIGN: 1 column always keeps the K-split kernel, so while the option is ON the byte-identical greedy/verify contract (GREEDY-PURITY.md invariant 1) does NOT hold. Default is OFF, and with it off nothing on the default path is reached -- this block's own contract is unchanged. * Measured (r289, 27B UD-Q4_K_M and Q8_0, 1 and 2 GPUs, finite work): width 8 +9.0 % (1 GPU) / +10.6 % (2 GPU tensor split) for the K-quants and +4.2 % for Q8_0; width 7 +2..7.1 %; width 6 -4.4..+1.9 % (split-dependent); widths 2..5 -0.5..-5.7 %. Hence `auto` = 7, the first width it wins. End to end (DFlash2 n=7, recall): cycle 37.0 -> 33.5 ms on the 2-GPU Q4_K_M split (+10.4 % tokens/s at identical acceptance), 43.6 -> 41.8 ms on Q8_0 (+4.2 %). Not where the width is >8: those rounds are MMQ, so adaptive MTP n12 is neutral. Gate: coherence (off == the r289 build, byte for byte) plus the four-axis A/B and llama-batched-bench with it on; ENVIRONMENT.md, GREEDY-PURITY.md and patches/README.md carry the numbers. Co-authored-by: burnoutIA <[email protected]>
… pad) - old-10: per-type mmvq VDR/nwarps for Q4_K/Q5_K/Q6_K/Q8_0, dense Q6_K VDR=2 and the MoE-expert VDR split. - old-04 MMQ: GGML_CUDA_MMQ_J_MAX and the mmq-vec-dot x_scale/x_df hoist. - old-15: the Q1_0 ggml_cuda_byte_perm port (vecdotq.cuh + mmq-load-tiles.cuh), the gfx1201 grid-stall pad (common.cuh + mmvf.cu), the mmvf multi-token cross-warp reduction and the mmq-vec-dot #pragma unroll 1 for gfx12. - old-04's MUL_MAT Q6_K/Q8_0 test shapes. - r169: dense Q6_K keeps upstream ggml-org#30517's VDR=2 on every arch (measured on gfx1151: within noise of VDR=1 at B=1/B=4 and d16384, +1.2 % at batched B=8, width-pure against draft-mtp). -DGGML_HIP_Q6K_DENSE_VDR1 restores the pre-ggml-org#30517 VDR=1 association order for a consumer that gates on output identity; the MoE-expert VDR is per kernel and unaffected. NOTE: the mmvq multi-row/row-loop decode hunks (old-15 PR ggml-org#57) are NOT here -- they are interleaved with the fused-MoE item-split in the same function and are deferred to 09 (see PHASE1-STATUS.md). Re-based onto a691b23 (mmvq.cu conflicted, 2 hunks: the per-architecture MMVQ table id). The block splits the old combined mapping -- RDNA3_5 (gfx1151) gets its own table (nwarps swept), real RDNA2 (gfx103x) gets the Navi21 table -- where upstream maps all of RDNA2 || RDNA3_5 to the RDNA2 table. The delivery's split is kept and upstream's new RDNA4_M family is folded into it (RDNA4_M -> the RDNA2 table) on both the device and the host table-id paths. Build green; same-seed greedy text byte-identical with MMVQ on/off (33 chars, sha 3de206c8878b) on Qwen3-Coder-30B-A3B. r290 amendment -- the VERIFY-band WMMA iu8 matvec family (contributor burnoutIA, PR ggml-org#317; folded here because this block is the delivery's decode-numerics block: it owns vecdotq.cuh's vec_dot_* family and the mmvq K-split loop, and its contract is already "same real-number result, different addition order"). * mmvq-wmma.cu/.cuh (new) + a fall-through in ggml_cuda_mul_mat_vec_q: for a dense, unfused MUL_MAT at N..8 columns on RDNA4, compute the product with wmma_i32_16x16x16_iu8, dequantizing each weight ONCE for all the verified columns. Q4_K, Q5_K, Q6_K and IQ4_XS in their GGUF layout on the existing q8_1 activations, plus Q8_0 (r290, ours: no dequantization, no min term, no table -- and its own per-format stride unit, because a Q8_0 block is 32 elements where the K-quants' is 256). Q5_K's min term is d.SUM(q) through a ones matrix, as vec_dot_q5_K_q8_1 does (ds.y moves the outputs ~1 % and drops the DFlash2 acceptance). Numerics against the K-split kernel: ~3.2e-7 relative (max 4.2e-5 on a 130 scale) at widths 2..8 for every covered type, i.e. rounding order only. * --wmma-verify off|auto|N (common), alias GGML_CUDA_WMMA_MMVQ=N, applied per device through the backend registry's proc-address table (no new cross-backend interface member in this block). * OPT-IN and WIDTH-SPLIT BY DESIGN: 1 column always keeps the K-split kernel, so while the option is ON the byte-identical greedy/verify contract (GREEDY-PURITY.md invariant 1) does NOT hold. Default is OFF, and with it off nothing on the default path is reached -- this block's own contract is unchanged. * Measured (r289, 27B UD-Q4_K_M and Q8_0, 1 and 2 GPUs, finite work): width 8 +9.0 % (1 GPU) / +10.6 % (2 GPU tensor split) for the K-quants and +4.2 % for Q8_0; width 7 +2..7.1 %; width 6 -4.4..+1.9 % (split-dependent); widths 2..5 -0.5..-5.7 %. Hence `auto` = 7, the first width it wins. End to end (DFlash2 n=7, recall): cycle 37.0 -> 33.5 ms on the 2-GPU Q4_K_M split (+10.4 % tokens/s at identical acceptance), 43.6 -> 41.8 ms on Q8_0 (+4.2 %). Not where the width is >8: those rounds are MMQ, so adaptive MTP n12 is neutral. Gate: coherence (off == the r289 build, byte for byte) plus the four-axis A/B and llama-batched-bench with it on; ENVIRONMENT.md, GREEDY-PURITY.md and patches/README.md carry the numbers. Co-authored-by: burnoutIA <[email protected]>
… pad) - old-10: per-type mmvq VDR/nwarps for Q4_K/Q5_K/Q6_K/Q8_0, dense Q6_K VDR=2 and the MoE-expert VDR split. - old-04 MMQ: GGML_CUDA_MMQ_J_MAX and the mmq-vec-dot x_scale/x_df hoist. - old-15: the Q1_0 ggml_cuda_byte_perm port (vecdotq.cuh + mmq-load-tiles.cuh), the gfx1201 grid-stall pad (common.cuh + mmvf.cu), the mmvf multi-token cross-warp reduction and the mmq-vec-dot #pragma unroll 1 for gfx12. - old-04's MUL_MAT Q6_K/Q8_0 test shapes. - r169: dense Q6_K keeps upstream ggml-org#30517's VDR=2 on every arch (measured on gfx1151: within noise of VDR=1 at B=1/B=4 and d16384, +1.2 % at batched B=8, width-pure against draft-mtp). -DGGML_HIP_Q6K_DENSE_VDR1 restores the pre-ggml-org#30517 VDR=1 association order for a consumer that gates on output identity; the MoE-expert VDR is per kernel and unaffected. NOTE: the mmvq multi-row/row-loop decode hunks (old-15 PR ggml-org#57) are NOT here -- they are interleaved with the fused-MoE item-split in the same function and are deferred to 09 (see PHASE1-STATUS.md). Re-based onto a691b23 (mmvq.cu conflicted, 2 hunks: the per-architecture MMVQ table id). The block splits the old combined mapping -- RDNA3_5 (gfx1151) gets its own table (nwarps swept), real RDNA2 (gfx103x) gets the Navi21 table -- where upstream maps all of RDNA2 || RDNA3_5 to the RDNA2 table. The delivery's split is kept and upstream's new RDNA4_M family is folded into it (RDNA4_M -> the RDNA2 table) on both the device and the host table-id paths. Build green; same-seed greedy text byte-identical with MMVQ on/off (33 chars, sha 3de206c8878b) on Qwen3-Coder-30B-A3B. r290 amendment -- the VERIFY-band WMMA iu8 matvec family (contributor burnoutIA, PR ggml-org#317; folded here because this block is the delivery's decode-numerics block: it owns vecdotq.cuh's vec_dot_* family and the mmvq K-split loop, and its contract is already "same real-number result, different addition order"). * mmvq-wmma.cu/.cuh (new) + a fall-through in ggml_cuda_mul_mat_vec_q: for a dense, unfused MUL_MAT at N..8 columns on RDNA4, compute the product with wmma_i32_16x16x16_iu8, dequantizing each weight ONCE for all the verified columns. Q4_K, Q5_K, Q6_K and IQ4_XS in their GGUF layout on the existing q8_1 activations, plus Q8_0 (r290, ours: no dequantization, no min term, no table -- and its own per-format stride unit, because a Q8_0 block is 32 elements where the K-quants' is 256). Q5_K's min term is d.SUM(q) through a ones matrix, as vec_dot_q5_K_q8_1 does (ds.y moves the outputs ~1 % and drops the DFlash2 acceptance). Numerics against the K-split kernel: ~3.2e-7 relative (max 4.2e-5 on a 130 scale) at widths 2..8 for every covered type, i.e. rounding order only. * --wmma-verify off|auto|N (common), alias GGML_CUDA_WMMA_MMVQ=N, applied per device through the backend registry's proc-address table (no new cross-backend interface member in this block). * OPT-IN and WIDTH-SPLIT BY DESIGN: 1 column always keeps the K-split kernel, so while the option is ON the byte-identical greedy/verify contract (GREEDY-PURITY.md invariant 1) does NOT hold. Default is OFF, and with it off nothing on the default path is reached -- this block's own contract is unchanged. * Measured (r289, 27B UD-Q4_K_M and Q8_0, 1 and 2 GPUs, finite work): width 8 +9.0 % (1 GPU) / +10.6 % (2 GPU tensor split) for the K-quants and +4.2 % for Q8_0; width 7 +2..7.1 %; width 6 -4.4..+1.9 % (split-dependent); widths 2..5 -0.5..-5.7 %. Hence `auto` = 7, the first width it wins. End to end (DFlash2 n=7, recall): cycle 37.0 -> 33.5 ms on the 2-GPU Q4_K_M split (+10.4 % tokens/s at identical acceptance), 43.6 -> 41.8 ms on Q8_0 (+4.2 %). Not where the width is >8: those rounds are MMQ, so adaptive MTP n12 is neutral. Gate: coherence (off == the r289 build, byte for byte) plus the four-axis A/B and llama-batched-bench with it on; ENVIRONMENT.md, GREEDY-PURITY.md and patches/README.md carry the numbers. Co-authored-by: burnoutIA <[email protected]>
… pad) - old-10: per-type mmvq VDR/nwarps for Q4_K/Q5_K/Q6_K/Q8_0, dense Q6_K VDR=2 and the MoE-expert VDR split. - old-04 MMQ: GGML_CUDA_MMQ_J_MAX and the mmq-vec-dot x_scale/x_df hoist. - old-15: the Q1_0 ggml_cuda_byte_perm port (vecdotq.cuh + mmq-load-tiles.cuh), the gfx1201 grid-stall pad (common.cuh + mmvf.cu), the mmvf multi-token cross-warp reduction and the mmq-vec-dot #pragma unroll 1 for gfx12. - old-04's MUL_MAT Q6_K/Q8_0 test shapes. - r169: dense Q6_K keeps upstream ggml-org#30517's VDR=2 on every arch (measured on gfx1151: within noise of VDR=1 at B=1/B=4 and d16384, +1.2 % at batched B=8, width-pure against draft-mtp). -DGGML_HIP_Q6K_DENSE_VDR1 restores the pre-ggml-org#30517 VDR=1 association order for a consumer that gates on output identity; the MoE-expert VDR is per kernel and unaffected. NOTE: the mmvq multi-row/row-loop decode hunks (old-15 PR ggml-org#57) are NOT here -- they are interleaved with the fused-MoE item-split in the same function and are deferred to 09 (see PHASE1-STATUS.md). Re-based onto a691b23 (mmvq.cu conflicted, 2 hunks: the per-architecture MMVQ table id). The block splits the old combined mapping -- RDNA3_5 (gfx1151) gets its own table (nwarps swept), real RDNA2 (gfx103x) gets the Navi21 table -- where upstream maps all of RDNA2 || RDNA3_5 to the RDNA2 table. The delivery's split is kept and upstream's new RDNA4_M family is folded into it (RDNA4_M -> the RDNA2 table) on both the device and the host table-id paths. Build green; same-seed greedy text byte-identical with MMVQ on/off (33 chars, sha 3de206c8878b) on Qwen3-Coder-30B-A3B. r290 amendment -- the VERIFY-band WMMA iu8 matvec family (contributor burnoutIA, PR ggml-org#317; folded here because this block is the delivery's decode-numerics block: it owns vecdotq.cuh's vec_dot_* family and the mmvq K-split loop, and its contract is already "same real-number result, different addition order"). * mmvq-wmma.cu/.cuh (new) + a fall-through in ggml_cuda_mul_mat_vec_q: for a dense, unfused MUL_MAT at N..8 columns on RDNA4, compute the product with wmma_i32_16x16x16_iu8, dequantizing each weight ONCE for all the verified columns. Q4_K, Q5_K, Q6_K and IQ4_XS in their GGUF layout on the existing q8_1 activations, plus Q8_0 (r290, ours: no dequantization, no min term, no table -- and its own per-format stride unit, because a Q8_0 block is 32 elements where the K-quants' is 256). Q5_K's min term is d.SUM(q) through a ones matrix, as vec_dot_q5_K_q8_1 does (ds.y moves the outputs ~1 % and drops the DFlash2 acceptance). Numerics against the K-split kernel: ~3.2e-7 relative (max 4.2e-5 on a 130 scale) at widths 2..8 for every covered type, i.e. rounding order only. * --wmma-verify off|auto|N (common), alias GGML_CUDA_WMMA_MMVQ=N, applied per device through the backend registry's proc-address table (no new cross-backend interface member in this block). * OPT-IN and WIDTH-SPLIT BY DESIGN: 1 column always keeps the K-split kernel, so while the option is ON the byte-identical greedy/verify contract (GREEDY-PURITY.md invariant 1) does NOT hold. Default is OFF, and with it off nothing on the default path is reached -- this block's own contract is unchanged. * Measured (r289, 27B UD-Q4_K_M and Q8_0, 1 and 2 GPUs, finite work): width 8 +9.0 % (1 GPU) / +10.6 % (2 GPU tensor split) for the K-quants and +4.2 % for Q8_0; width 7 +2..7.1 %; width 6 -4.4..+1.9 % (split-dependent); widths 2..5 -0.5..-5.7 %. Hence `auto` = 7, the first width it wins. End to end (DFlash2 n=7, recall): cycle 37.0 -> 33.5 ms on the 2-GPU Q4_K_M split (+10.4 % tokens/s at identical acceptance), 43.6 -> 41.8 ms on Q8_0 (+4.2 %). Not where the width is >8: those rounds are MMQ, so adaptive MTP n12 is neutral. Gate: coherence (off == the r289 build, byte for byte) plus the four-axis A/B and llama-batched-bench with it on; ENVIRONMENT.md, GREEDY-PURITY.md and patches/README.md carry the numbers. Co-authored-by: burnoutIA <[email protected]>
… pad) - old-10: per-type mmvq VDR/nwarps for Q4_K/Q5_K/Q6_K/Q8_0, dense Q6_K VDR=2 and the MoE-expert VDR split. - old-04 MMQ: GGML_CUDA_MMQ_J_MAX and the mmq-vec-dot x_scale/x_df hoist. - old-15: the Q1_0 ggml_cuda_byte_perm port (vecdotq.cuh + mmq-load-tiles.cuh), the gfx1201 grid-stall pad (common.cuh + mmvf.cu), the mmvf multi-token cross-warp reduction and the mmq-vec-dot #pragma unroll 1 for gfx12. - old-04's MUL_MAT Q6_K/Q8_0 test shapes. - r169: dense Q6_K keeps upstream ggml-org#30517's VDR=2 on every arch (measured on gfx1151: within noise of VDR=1 at B=1/B=4 and d16384, +1.2 % at batched B=8, width-pure against draft-mtp). -DGGML_HIP_Q6K_DENSE_VDR1 restores the pre-ggml-org#30517 VDR=1 association order for a consumer that gates on output identity; the MoE-expert VDR is per kernel and unaffected. NOTE: the mmvq multi-row/row-loop decode hunks (old-15 PR ggml-org#57) are NOT here -- they are interleaved with the fused-MoE item-split in the same function and are deferred to 09 (see PHASE1-STATUS.md). Re-based onto a691b23 (mmvq.cu conflicted, 2 hunks: the per-architecture MMVQ table id). The block splits the old combined mapping -- RDNA3_5 (gfx1151) gets its own table (nwarps swept), real RDNA2 (gfx103x) gets the Navi21 table -- where upstream maps all of RDNA2 || RDNA3_5 to the RDNA2 table. The delivery's split is kept and upstream's new RDNA4_M family is folded into it (RDNA4_M -> the RDNA2 table) on both the device and the host table-id paths. Build green; same-seed greedy text byte-identical with MMVQ on/off (33 chars, sha 3de206c8878b) on Qwen3-Coder-30B-A3B. r290 amendment -- the VERIFY-band WMMA iu8 matvec family (contributor burnoutIA, PR ggml-org#317; folded here because this block is the delivery's decode-numerics block: it owns vecdotq.cuh's vec_dot_* family and the mmvq K-split loop, and its contract is already "same real-number result, different addition order"). * mmvq-wmma.cu/.cuh (new) + a fall-through in ggml_cuda_mul_mat_vec_q: for a dense, unfused MUL_MAT at N..8 columns on RDNA4, compute the product with wmma_i32_16x16x16_iu8, dequantizing each weight ONCE for all the verified columns. Q4_K, Q5_K, Q6_K and IQ4_XS in their GGUF layout on the existing q8_1 activations, plus Q8_0 (r290, ours: no dequantization, no min term, no table -- and its own per-format stride unit, because a Q8_0 block is 32 elements where the K-quants' is 256). Q5_K's min term is d.SUM(q) through a ones matrix, as vec_dot_q5_K_q8_1 does (ds.y moves the outputs ~1 % and drops the DFlash2 acceptance). Numerics against the K-split kernel: ~3.2e-7 relative (max 4.2e-5 on a 130 scale) at widths 2..8 for every covered type, i.e. rounding order only. * --wmma-verify off|auto|N (common), alias GGML_CUDA_WMMA_MMVQ=N, applied per device through the backend registry's proc-address table (no new cross-backend interface member in this block). * OPT-IN and WIDTH-SPLIT BY DESIGN: 1 column always keeps the K-split kernel, so while the option is ON the byte-identical greedy/verify contract (GREEDY-PURITY.md invariant 1) does NOT hold. Default is OFF, and with it off nothing on the default path is reached -- this block's own contract is unchanged. * Measured (r289, 27B UD-Q4_K_M and Q8_0, 1 and 2 GPUs, finite work): width 8 +9.0 % (1 GPU) / +10.6 % (2 GPU tensor split) for the K-quants and +4.2 % for Q8_0; width 7 +2..7.1 %; width 6 -4.4..+1.9 % (split-dependent); widths 2..5 -0.5..-5.7 %. Hence `auto` = 7, the first width it wins. End to end (DFlash2 n=7, recall): cycle 37.0 -> 33.5 ms on the 2-GPU Q4_K_M split (+10.4 % tokens/s at identical acceptance), 43.6 -> 41.8 ms on Q8_0 (+4.2 %). Not where the width is >8: those rounds are MMQ, so adaptive MTP n12 is neutral. Gate: coherence (off == the r289 build, byte for byte) plus the four-axis A/B and llama-batched-bench with it on; ENVIRONMENT.md, GREEDY-PURITY.md and patches/README.md carry the numbers. Co-authored-by: burnoutIA <[email protected]>
… pad) - old-10: per-type mmvq VDR/nwarps for Q4_K/Q5_K/Q6_K/Q8_0, dense Q6_K VDR=2 and the MoE-expert VDR split. - old-04 MMQ: GGML_CUDA_MMQ_J_MAX and the mmq-vec-dot x_scale/x_df hoist. - old-15: the Q1_0 ggml_cuda_byte_perm port (vecdotq.cuh + mmq-load-tiles.cuh), the gfx1201 grid-stall pad (common.cuh + mmvf.cu), the mmvf multi-token cross-warp reduction and the mmq-vec-dot #pragma unroll 1 for gfx12. - old-04's MUL_MAT Q6_K/Q8_0 test shapes. - r169: dense Q6_K keeps upstream ggml-org#30517's VDR=2 on every arch (measured on gfx1151: within noise of VDR=1 at B=1/B=4 and d16384, +1.2 % at batched B=8, width-pure against draft-mtp). -DGGML_HIP_Q6K_DENSE_VDR1 restores the pre-ggml-org#30517 VDR=1 association order for a consumer that gates on output identity; the MoE-expert VDR is per kernel and unaffected. NOTE: the mmvq multi-row/row-loop decode hunks (old-15 PR ggml-org#57) are NOT here -- they are interleaved with the fused-MoE item-split in the same function and are deferred to 09 (see PHASE1-STATUS.md). Re-based onto a691b23 (mmvq.cu conflicted, 2 hunks: the per-architecture MMVQ table id). The block splits the old combined mapping -- RDNA3_5 (gfx1151) gets its own table (nwarps swept), real RDNA2 (gfx103x) gets the Navi21 table -- where upstream maps all of RDNA2 || RDNA3_5 to the RDNA2 table. The delivery's split is kept and upstream's new RDNA4_M family is folded into it (RDNA4_M -> the RDNA2 table) on both the device and the host table-id paths. Build green; same-seed greedy text byte-identical with MMVQ on/off (33 chars, sha 3de206c8878b) on Qwen3-Coder-30B-A3B. r290 amendment -- the VERIFY-band WMMA iu8 matvec family (contributor burnoutIA, PR ggml-org#317; folded here because this block is the delivery's decode-numerics block: it owns vecdotq.cuh's vec_dot_* family and the mmvq K-split loop, and its contract is already "same real-number result, different addition order"). * mmvq-wmma.cu/.cuh (new) + a fall-through in ggml_cuda_mul_mat_vec_q: for a dense, unfused MUL_MAT at N..8 columns on RDNA4, compute the product with wmma_i32_16x16x16_iu8, dequantizing each weight ONCE for all the verified columns. Q4_K, Q5_K, Q6_K and IQ4_XS in their GGUF layout on the existing q8_1 activations, plus Q8_0 (r290, ours: no dequantization, no min term, no table -- and its own per-format stride unit, because a Q8_0 block is 32 elements where the K-quants' is 256). Q5_K's min term is d.SUM(q) through a ones matrix, as vec_dot_q5_K_q8_1 does (ds.y moves the outputs ~1 % and drops the DFlash2 acceptance). Numerics against the K-split kernel: ~3.2e-7 relative (max 4.2e-5 on a 130 scale) at widths 2..8 for every covered type, i.e. rounding order only. * --wmma-verify off|auto|N (common), alias GGML_CUDA_WMMA_MMVQ=N, applied per device through the backend registry's proc-address table (no new cross-backend interface member in this block). * OPT-IN and WIDTH-SPLIT BY DESIGN: 1 column always keeps the K-split kernel, so while the option is ON the byte-identical greedy/verify contract (GREEDY-PURITY.md invariant 1) does NOT hold. Default is OFF, and with it off nothing on the default path is reached -- this block's own contract is unchanged. * Measured (r289, 27B UD-Q4_K_M and Q8_0, 1 and 2 GPUs, finite work): width 8 +9.0 % (1 GPU) / +10.6 % (2 GPU tensor split) for the K-quants and +4.2 % for Q8_0; width 7 +2..7.1 %; width 6 -4.4..+1.9 % (split-dependent); widths 2..5 -0.5..-5.7 %. Hence `auto` = 7, the first width it wins. End to end (DFlash2 n=7, recall): cycle 37.0 -> 33.5 ms on the 2-GPU Q4_K_M split (+10.4 % tokens/s at identical acceptance), 43.6 -> 41.8 ms on Q8_0 (+4.2 %). Not where the width is >8: those rounds are MMQ, so adaptive MTP n12 is neutral. Gate: coherence (off == the r289 build, byte for byte) plus the four-axis A/B and llama-batched-bench with it on; ENVIRONMENT.md, GREEDY-PURITY.md and patches/README.md carry the numbers. Co-authored-by: burnoutIA <[email protected]>
… pad) - old-10: per-type mmvq VDR/nwarps for Q4_K/Q5_K/Q6_K/Q8_0, dense Q6_K VDR=2 and the MoE-expert VDR split. - old-04 MMQ: GGML_CUDA_MMQ_J_MAX and the mmq-vec-dot x_scale/x_df hoist. - old-15: the Q1_0 ggml_cuda_byte_perm port (vecdotq.cuh + mmq-load-tiles.cuh), the gfx1201 grid-stall pad (common.cuh + mmvf.cu), the mmvf multi-token cross-warp reduction and the mmq-vec-dot #pragma unroll 1 for gfx12. - old-04's MUL_MAT Q6_K/Q8_0 test shapes. - r169: dense Q6_K keeps upstream ggml-org#30517's VDR=2 on every arch (measured on gfx1151: within noise of VDR=1 at B=1/B=4 and d16384, +1.2 % at batched B=8, width-pure against draft-mtp). -DGGML_HIP_Q6K_DENSE_VDR1 restores the pre-ggml-org#30517 VDR=1 association order for a consumer that gates on output identity; the MoE-expert VDR is per kernel and unaffected. NOTE: the mmvq multi-row/row-loop decode hunks (old-15 PR ggml-org#57) are NOT here -- they are interleaved with the fused-MoE item-split in the same function and are deferred to 09 (see PHASE1-STATUS.md). Re-based onto a691b23 (mmvq.cu conflicted, 2 hunks: the per-architecture MMVQ table id). The block splits the old combined mapping -- RDNA3_5 (gfx1151) gets its own table (nwarps swept), real RDNA2 (gfx103x) gets the Navi21 table -- where upstream maps all of RDNA2 || RDNA3_5 to the RDNA2 table. The delivery's split is kept and upstream's new RDNA4_M family is folded into it (RDNA4_M -> the RDNA2 table) on both the device and the host table-id paths. Build green; same-seed greedy text byte-identical with MMVQ on/off (33 chars, sha 3de206c8878b) on Qwen3-Coder-30B-A3B. r290 amendment -- the VERIFY-band WMMA iu8 matvec family (contributor burnoutIA, PR ggml-org#317; folded here because this block is the delivery's decode-numerics block: it owns vecdotq.cuh's vec_dot_* family and the mmvq K-split loop, and its contract is already "same real-number result, different addition order"). * mmvq-wmma.cu/.cuh (new) + a fall-through in ggml_cuda_mul_mat_vec_q: for a dense, unfused MUL_MAT at N..8 columns on RDNA4, compute the product with wmma_i32_16x16x16_iu8, dequantizing each weight ONCE for all the verified columns. Q4_K, Q5_K, Q6_K and IQ4_XS in their GGUF layout on the existing q8_1 activations, plus Q8_0 (r290, ours: no dequantization, no min term, no table -- and its own per-format stride unit, because a Q8_0 block is 32 elements where the K-quants' is 256). Q5_K's min term is d.SUM(q) through a ones matrix, as vec_dot_q5_K_q8_1 does (ds.y moves the outputs ~1 % and drops the DFlash2 acceptance). Numerics against the K-split kernel: ~3.2e-7 relative (max 4.2e-5 on a 130 scale) at widths 2..8 for every covered type, i.e. rounding order only. * --wmma-verify off|auto|N (common), alias GGML_CUDA_WMMA_MMVQ=N, applied per device through the backend registry's proc-address table (no new cross-backend interface member in this block). * OPT-IN and WIDTH-SPLIT BY DESIGN: 1 column always keeps the K-split kernel, so while the option is ON the byte-identical greedy/verify contract (GREEDY-PURITY.md invariant 1) does NOT hold. Default is OFF, and with it off nothing on the default path is reached -- this block's own contract is unchanged. * Measured (r289, 27B UD-Q4_K_M and Q8_0, 1 and 2 GPUs, finite work): width 8 +9.0 % (1 GPU) / +10.6 % (2 GPU tensor split) for the K-quants and +4.2 % for Q8_0; width 7 +2..7.1 %; width 6 -4.4..+1.9 % (split-dependent); widths 2..5 -0.5..-5.7 %. Hence `auto` = 7, the first width it wins. End to end (DFlash2 n=7, recall): cycle 37.0 -> 33.5 ms on the 2-GPU Q4_K_M split (+10.4 % tokens/s at identical acceptance), 43.6 -> 41.8 ms on Q8_0 (+4.2 %). Not where the width is >8: those rounds are MMQ, so adaptive MTP n12 is neutral. Gate: coherence (off == the r289 build, byte for byte) plus the four-axis A/B and llama-batched-bench with it on; ENVIRONMENT.md, GREEDY-PURITY.md and patches/README.md carry the numbers. Co-authored-by: burnoutIA <[email protected]>
… pad) - old-10: per-type mmvq VDR/nwarps for Q4_K/Q5_K/Q6_K/Q8_0, dense Q6_K VDR=2 and the MoE-expert VDR split. - old-04 MMQ: GGML_CUDA_MMQ_J_MAX and the mmq-vec-dot x_scale/x_df hoist. - old-15: the Q1_0 ggml_cuda_byte_perm port (vecdotq.cuh + mmq-load-tiles.cuh), the gfx1201 grid-stall pad (common.cuh + mmvf.cu), the mmvf multi-token cross-warp reduction and the mmq-vec-dot #pragma unroll 1 for gfx12. - old-04's MUL_MAT Q6_K/Q8_0 test shapes. - r169: dense Q6_K keeps upstream ggml-org#30517's VDR=2 on every arch (measured on gfx1151: within noise of VDR=1 at B=1/B=4 and d16384, +1.2 % at batched B=8, width-pure against draft-mtp). -DGGML_HIP_Q6K_DENSE_VDR1 restores the pre-ggml-org#30517 VDR=1 association order for a consumer that gates on output identity; the MoE-expert VDR is per kernel and unaffected. NOTE: the mmvq multi-row/row-loop decode hunks (old-15 PR ggml-org#57) are NOT here -- they are interleaved with the fused-MoE item-split in the same function and are deferred to 09 (see PHASE1-STATUS.md). Re-based onto a691b23 (mmvq.cu conflicted, 2 hunks: the per-architecture MMVQ table id). The block splits the old combined mapping -- RDNA3_5 (gfx1151) gets its own table (nwarps swept), real RDNA2 (gfx103x) gets the Navi21 table -- where upstream maps all of RDNA2 || RDNA3_5 to the RDNA2 table. The delivery's split is kept and upstream's new RDNA4_M family is folded into it (RDNA4_M -> the RDNA2 table) on both the device and the host table-id paths. Build green; same-seed greedy text byte-identical with MMVQ on/off (33 chars, sha 3de206c8878b) on Qwen3-Coder-30B-A3B. r290 amendment -- the VERIFY-band WMMA iu8 matvec family (contributor burnoutIA, PR ggml-org#317; folded here because this block is the delivery's decode-numerics block: it owns vecdotq.cuh's vec_dot_* family and the mmvq K-split loop, and its contract is already "same real-number result, different addition order"). * mmvq-wmma.cu/.cuh (new) + a fall-through in ggml_cuda_mul_mat_vec_q: for a dense, unfused MUL_MAT at N..8 columns on RDNA4, compute the product with wmma_i32_16x16x16_iu8, dequantizing each weight ONCE for all the verified columns. Q4_K, Q5_K, Q6_K and IQ4_XS in their GGUF layout on the existing q8_1 activations, plus Q8_0 (r290, ours: no dequantization, no min term, no table -- and its own per-format stride unit, because a Q8_0 block is 32 elements where the K-quants' is 256). Q5_K's min term is d.SUM(q) through a ones matrix, as vec_dot_q5_K_q8_1 does (ds.y moves the outputs ~1 % and drops the DFlash2 acceptance). Numerics against the K-split kernel: ~3.2e-7 relative (max 4.2e-5 on a 130 scale) at widths 2..8 for every covered type, i.e. rounding order only. * --wmma-verify off|auto|N (common), alias GGML_CUDA_WMMA_MMVQ=N, applied per device through the backend registry's proc-address table (no new cross-backend interface member in this block). * OPT-IN and WIDTH-SPLIT BY DESIGN: 1 column always keeps the K-split kernel, so while the option is ON the byte-identical greedy/verify contract (GREEDY-PURITY.md invariant 1) does NOT hold. Default is OFF, and with it off nothing on the default path is reached -- this block's own contract is unchanged. * Measured (r289, 27B UD-Q4_K_M and Q8_0, 1 and 2 GPUs, finite work): width 8 +9.0 % (1 GPU) / +10.6 % (2 GPU tensor split) for the K-quants and +4.2 % for Q8_0; width 7 +2..7.1 %; width 6 -4.4..+1.9 % (split-dependent); widths 2..5 -0.5..-5.7 %. Hence `auto` = 7, the first width it wins. End to end (DFlash2 n=7, recall): cycle 37.0 -> 33.5 ms on the 2-GPU Q4_K_M split (+10.4 % tokens/s at identical acceptance), 43.6 -> 41.8 ms on Q8_0 (+4.2 %). Not where the width is >8: those rounds are MMQ, so adaptive MTP n12 is neutral. Gate: coherence (off == the r289 build, byte for byte) plus the four-axis A/B and llama-batched-bench with it on; ENVIRONMENT.md, GREEDY-PURITY.md and patches/README.md carry the numbers. Co-authored-by: burnoutIA <[email protected]>
… pad) - old-10: per-type mmvq VDR/nwarps for Q4_K/Q5_K/Q6_K/Q8_0, dense Q6_K VDR=2 and the MoE-expert VDR split. - old-04 MMQ: GGML_CUDA_MMQ_J_MAX and the mmq-vec-dot x_scale/x_df hoist. - old-15: the Q1_0 ggml_cuda_byte_perm port (vecdotq.cuh + mmq-load-tiles.cuh), the gfx1201 grid-stall pad (common.cuh + mmvf.cu), the mmvf multi-token cross-warp reduction and the mmq-vec-dot #pragma unroll 1 for gfx12. - old-04's MUL_MAT Q6_K/Q8_0 test shapes. - r169: dense Q6_K keeps upstream ggml-org#30517's VDR=2 on every arch (measured on gfx1151: within noise of VDR=1 at B=1/B=4 and d16384, +1.2 % at batched B=8, width-pure against draft-mtp). -DGGML_HIP_Q6K_DENSE_VDR1 restores the pre-ggml-org#30517 VDR=1 association order for a consumer that gates on output identity; the MoE-expert VDR is per kernel and unaffected. NOTE: the mmvq multi-row/row-loop decode hunks (old-15 PR ggml-org#57) are NOT here -- they are interleaved with the fused-MoE item-split in the same function and are deferred to 09 (see PHASE1-STATUS.md). Re-based onto a691b23 (mmvq.cu conflicted, 2 hunks: the per-architecture MMVQ table id). The block splits the old combined mapping -- RDNA3_5 (gfx1151) gets its own table (nwarps swept), real RDNA2 (gfx103x) gets the Navi21 table -- where upstream maps all of RDNA2 || RDNA3_5 to the RDNA2 table. The delivery's split is kept and upstream's new RDNA4_M family is folded into it (RDNA4_M -> the RDNA2 table) on both the device and the host table-id paths. Build green; same-seed greedy text byte-identical with MMVQ on/off (33 chars, sha 3de206c8878b) on Qwen3-Coder-30B-A3B. r290 amendment -- the VERIFY-band WMMA iu8 matvec family (contributor burnoutIA, PR ggml-org#317; folded here because this block is the delivery's decode-numerics block: it owns vecdotq.cuh's vec_dot_* family and the mmvq K-split loop, and its contract is already "same real-number result, different addition order"). * mmvq-wmma.cu/.cuh (new) + a fall-through in ggml_cuda_mul_mat_vec_q: for a dense, unfused MUL_MAT at N..8 columns on RDNA4, compute the product with wmma_i32_16x16x16_iu8, dequantizing each weight ONCE for all the verified columns. Q4_K, Q5_K, Q6_K and IQ4_XS in their GGUF layout on the existing q8_1 activations, plus Q8_0 (r290, ours: no dequantization, no min term, no table -- and its own per-format stride unit, because a Q8_0 block is 32 elements where the K-quants' is 256). Q5_K's min term is d.SUM(q) through a ones matrix, as vec_dot_q5_K_q8_1 does (ds.y moves the outputs ~1 % and drops the DFlash2 acceptance). Numerics against the K-split kernel: ~3.2e-7 relative (max 4.2e-5 on a 130 scale) at widths 2..8 for every covered type, i.e. rounding order only. * --wmma-verify off|auto|N (common), alias GGML_CUDA_WMMA_MMVQ=N, applied per device through the backend registry's proc-address table (no new cross-backend interface member in this block). * OPT-IN and WIDTH-SPLIT BY DESIGN: 1 column always keeps the K-split kernel, so while the option is ON the byte-identical greedy/verify contract (GREEDY-PURITY.md invariant 1) does NOT hold. Default is OFF, and with it off nothing on the default path is reached -- this block's own contract is unchanged. * Measured (r289, 27B UD-Q4_K_M and Q8_0, 1 and 2 GPUs, finite work): width 8 +9.0 % (1 GPU) / +10.6 % (2 GPU tensor split) for the K-quants and +4.2 % for Q8_0; width 7 +2..7.1 %; width 6 -4.4..+1.9 % (split-dependent); widths 2..5 -0.5..-5.7 %. Hence `auto` = 7, the first width it wins. End to end (DFlash2 n=7, recall): cycle 37.0 -> 33.5 ms on the 2-GPU Q4_K_M split (+10.4 % tokens/s at identical acceptance), 43.6 -> 41.8 ms on Q8_0 (+4.2 %). Not where the width is >8: those rounds are MMQ, so adaptive MTP n12 is neutral. Gate: coherence (off == the r289 build, byte for byte) plus the four-axis A/B and llama-batched-bench with it on; ENVIRONMENT.md, GREEDY-PURITY.md and patches/README.md carry the numbers. Co-authored-by: burnoutIA <[email protected]>
Overview
Additional information
Kernel speedup,
test-backend-opsperf on a chain of 60 distinct 4096x14336 matrices (weights not in L2), base vs PR interleaved, 2-3 rounds. q4_K and q8_0 are unchanged and show the noise floor.ne11 = 1
ne11 = 2
ne11 = 4
ne11 = 8
llama-bench,
-fa 1 -ngl 99 -p 256 -n 128 -ub 1,2,4, base vs PR interleaved, 2 rounds x 3 reps (GB10 and A16: 1 round).Requirements