mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[PR #1771] [CLOSED] prefill: Volta FP16 tensor-core prompt experts, with an IQ4_NL (type 20) down lane #3660
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#3660
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/1771
Author: @G0-0000
Created: 10/9/2026
Status: ❌ Closed
Base:
main← Head:prefill-fp16-iq4nl📝 Commits (5)
b56d75fprefill: Volta runs the prompt experts on FP16 tensor-core tiles, a group per launch (STRATA_PF_WMMA)d5b5aa7pf_wmma_parity: gemm_iq_f16_grouped against a double reference over the FP16 path's weights628fef4bench/results: V100 prompt experts on FP16 tensor cores (+9.6% / +10.3% prompt speed); docs/NVIDIA_V100.mdea2ecc6pf_wmma: IQ4_NL (type 20) WK=128 lane for the down product (K=640); parity cases0742b98pf_wmma: take the FP16 prompt path for IQ4_NL down too (mmq_dt == 20)📊 Changes
10 files changed (+566 additions, -6 deletions)
View changed files
📝
CMakeLists.txt(+8 -0)➕
bench/results/2026-10-07-v100-prompt-experts/README.md(+70 -0)➕
bench/results/2026-10-07-v100-prompt-experts/ab-runs.jsonl(+72 -0)📝
docs/NVIDIA_V100.md(+1 -1)📝
include/strata/kernels/iq_kernels.hpp(+5 -0)📝
include/strata/prefill/kernels.hpp(+2 -0)📝
src/kernels/cuda/iq_kernels.cu(+181 -0)➕
src/kernels/pf_wmma_parity.cpp(+153 -0)📝
src/prefill/kernels.cu(+16 -0)📝
src/prefill/prefill.cpp(+58 -5)📄 Description
Volta (sm_70) runs the prompt experts on FP16 tensor-core tiles, a group per launch (
STRATA_PF_WMMA), and this carries an IQ4_NL down lane so UD-IQ4_XS packs can use it.This also carries #1401's three FP16 commits unchanged (
b0a127e,167cc4c,4bc57c9— authorship preserved), since they are unmerged.The three #1401 commits (NoxestNoz / rewin123):
prefill: Volta runs the prompt experts on FP16 tensor-core tiles, a group per launch (STRATA_PF_WMMA).pf_wmma_parity:gemm_iq_f16_groupedagainst a double reference over the FP16 path's weights.bench/results+docs/NVIDIA_V100.md: V100 prompt experts on FP16 tensor cores (+9.6% / +10.3% prompt speed).The two commits on top (this pack's contribution):
src/kernels/cuda/iq_kernels.cu: a WK=128 IQ4_NL (type 20) dequant lane ingemm_iq_f16_grouped(one thread per row × 64-value half, fourblock_iq4_nlper 128-value window), plus the host dispatch. The down product has K=640, which the generic WK=256 path cannot tile (640 % 256 != 0); widening the gate alone therefore fails at launch, so the lane is required.src/prefill/prefill.cpp: two gates widened frommmq_dt == 42to(mmq_dt == 42 || mmq_dt == 20).src/kernels/pf_wmma_parity.cpp: parity cases — IQ4_NL 2560×640 down (the new lane), and IQ4_NL / IQ3_S / IQ4_XS 1280×2560 gate/up.Motive. UD-IQ4_XS packs (down = IQ4_NL) never take the FP16 prompt path today; their down product falls back to MMQ.
Evidence (V100-SXM2-32GB, UD-IQ4_XS):
pf_wmma_parityreports 0 failures, including the new lane. An env-gated trace confirms the 43 IQ4_NL-down layers take the tiles (43 layers × 4 chunks per round). Phasegemm down−24.9% (5/5 rounds), but the expert-weight copy wait grows +17.8% on our streamed setup, so end-to-end is ~flat there. Stated honestly: the win is in the phase, not the total, on a streamed configuration.Caveats. FP16 activations, not bit-identical to q8_1 — same class as the rest of that path. The sm_60 multi-arch issue discussed in #1401 is not addressed here (we build sm_70).
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.