mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[PR #2207] [CLOSED] sycl/A770: wide MMVQ kernels at 2-8 columns in large-GRF mode on Arc A-series (bit-identical; 1.3-7.4x kernel, decode +10-17%) #3923
Labels
No labels
needs-format
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Niko1221/Strata#3923
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/Niko1221/Strata/pull/2207
Author: @aslater3
Created: 10/13/2026
Status: ❌ Closed
Base:
main← Head:a770/up-mmvq-grf📝 Commits (2)
1eda07asycl/A770: wide MMVQ kernels at 2-8 columns in large-GRF mode on Arc A-seriesa89d4e7sycl/A770: 1-column MMVQ in large GRF for rows up to 4096 wide (STRATA_MMVQ_GRF1; bitwise)📊 Changes
2 files changed (+51 additions, -1 deletions)
View changed files
📝
sycl/src/kernels/cuda/native_mmvq.dp.cpp(+45 -0)📝
sycl/src/kernels/mmvq_bench.cpp(+6 -1)📄 Description
Title
Issue: #1545, #1606 (Arc A-series decode)
Summary
The wide MMVQ kernels (Q6_K
a2and the genericnative_mmvq_wide) spill registers at 2-8 columns with the default 128 GRFs on an Arc A770, and their bandwidth collapses as the column count grows (Q6_K 2560x10240: 248 GB/s at 1 column, 74 GB/s at 4, 8 GB/s at 8). On Alchemist they now launch in large-GRF mode (256) at 2-8 columns: 1.3-7.4x faster at 2-8 columns, bit-identical, decode +10-17% on an A770 (the verify window runs these at 2-6 columns every round).Large GRF halves the threads resident per Xe core, so it is the default on Alchemist only (
strata::intel_gpu_gen). Battlemage and every other device, and 1 column everywhere, launch the same kernels as today.STRATA_MMVQ_LARGE_GRF=1forces it on,=0off.What changed
sycl/src/kernels/cuda/native_mmvq.dp.cpp:mmvq_large_grf(queue)(once per process, Alchemist by default, env override); inlaunch_q6k_wide(a2 path) andlaunch_wide,if constexpr (NCOLS > 1)+ the runtime switch launch agrf_size<256>copy of the same kernel, else the existing launch, unchanged.sycl/src/kernels/mmvq_bench.cpp: prints a checksum of the output (FNV-1a over the float bits), so the modes can be compared bit for bit.How it was checked
Arc A770 16 GB,
xe, Linux 7.0, oneAPI 2026.1 (JIT), Ryzen 7 3800X, 30 GB RAM, same day.mmvq_bench <n_in> <n_out> <cols>, Q6_K,mainvs this PR (us; checksums identical withSTRATA_MMVQ_LARGE_GRF=0and=1in all 15 cases):End to end,
a0116b27+ #2190 + #2193 + #2203 with and without this PR, Coder IQ1_M, 8K-token prompt, 256 tokens, greedy,--resident-experts --max-context 131072 --kv int8 --kv-resident 20480 --spec 4 --mtp,STRATA_VERIFY_STEPPED=1:72b762d5b2a3) in every run with the same expert placement; one run had a different cache placement (hits 0.7605 vs 0.7457-0.7468) and different ids, the CPU-vs-GPU expert rounding seen onmaintoo.Not built or run on Battlemage or i915. SYCL-only files.
Extra Notes
Several other runs did not finish because of the decode hang in #2194 (both builds); they are left out.
🤖 Generated with Claude Code
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.