mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[PR #1374] [CLOSED] experts: IQ1_S on GPU/AVX-2, IQ1_S+IQ1_M on AVX-512, and a measured PCIe share #3413
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#3413
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/1374
Author: @Yxmura
Created: 10/7/2026
Status: ❌ Closed
Base:
main← Head:pr-iq1s-v2📝 Commits (8)
e87b2eakernels: run IQ1_S (GGML type 19) on the GPU and on AVX-291ed24ekernels: run IQ1_S and IQ1_M on 512-bit lanes392bfc5experts: measure the PCIe share instead of trusting the link alonef368edfprefill: run IQ1_S experts through the MMQ prompt path96ad434Merge origin/main into the IQ1_S/AMD branchcbd3695Merge main (0.1.42) into the IQ1_S/AMD branchf0b09e1Merge main (0.1.44) into the IQ1_S/AMD branch5f5237dMerge remote-tracking branch 'origin/main' into pr-iq1s-v2📊 Changes
21 files changed (+450 additions, -27 deletions)
View changed files
📝
CMakeLists.txt(+1 -1)📝
README.md(+1 -1)📝
docs/AMD_HIP.md(+5 -0)📝
docs/DETAILS.md(+17 -0)📝
include/strata/artifact/gguf_reader.hpp(+4 -0)📝
include/strata/kernels/cpu/native_expert.hpp(+2 -2)📝
include/strata/kernels/iq_kernels.hpp(+1 -1)📝
src/kernels/cpu/iq_avx2.cpp(+1 -1)📝
src/kernels/cpu/iq_avx2_rows.inl(+112 -0)📝
src/kernels/cpu/iq_avx512.cpp(+146 -5)📝
src/kernels/cpu/native_expert.cpp(+2 -2)📝
src/kernels/cuda/dequant_bf16.cu(+1 -1)📝
src/kernels/cuda/iq_kernels.cu(+81 -4)📝
src/kernels/cuda/native_mmvq.cu(+3 -3)📝
src/kernels/iq_multi_parity.cpp(+4 -3)📝
src/kernels/iq_parity.cpp(+1 -1)📝
src/kernels/native_grouped_parity.cpp(+2 -1)📝
src/prefill/moe_mmq.cu(+2 -0)📝
tests/hip/prefill_mmq_parity.cpp(+30 -0)➕
tools/hip/gfx1100-hipblaslt-100300.txt(+32 -0)...and 1 more files
📄 Description
Round 2: IQ1_S made first-class across the pipeline, plus a PM-driven PCIe share.
What
dq_iq1_s,vec_dot_iq1_s_q8_1,Fmt<19>,Split<19>, the grouped kernels, the reader geometry, and the AVX-2row_dot_iq1s/row_dot_iq1m.iq512_supportedlisted neither, andnative_expert.cpponly takes the AVX-2 kernel off an AVX-512 CPU, so AVX-512 CPUs ran both through ggml-cpu single-token — slower than an AVX-2 CPU. No EVEXvpsignb, so the grid sign isvpabsb+ a masked subtract._strata_mmq_types,mmq::supported()and the dispatch switch, so UD-IQ1_S prefill fell back to per-expert dequant→FP16. Added; themmq-instance-iq1_s.cualready exists in the pinned ggml.--pcie-fracwas the link probe alone (capped 0.55); the best share also depends on the CPU/GPU and runs both ways. A--servesweeps the probed share, 0 and 1.0 over its first verify windows, keeps the lowest (CPU pool + GPU wait) per routed expert entry, and holds it.--pcie-frac <value>pins;--pcie-frac autofor the CLI.Measured
Radeon PRO W7800 (gfx1100, ROCm 7.13), Ryzen 7 3800X, 30 GiB RAM; UD-IQ1_S (67.5 GiB); 600-token prompt, MTP.
The share runs both ways, which is why it is measured: here the GPU taking every miss is fastest, while in the RDNA2 x8 bench
--pcie-frac 0beat the probed 0.39.Validation
strata;iq_parity(IQ1_S/IQ1_M dequant rel 0.00e+00),iq_multi_parity,native_expert_parity(IQ1_S 3.1e-08, IQ1_M 4.1e-08 vs ggml-cpu),native_grouped_parity— 0 failures.-spr(this Zen 2 cannot run it): rel ~1e-07 vs ggml-cpu, width-invariant, 0 failures.hip_prefill_mmq_parityextended with a synthetic IQ1_S case: rel_l2 0.0038 (limit 0.04), max_abs/ref_rms 0.0145, 0 zero rows.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.