mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[PR #1437] [CLOSED] perf(cuda): add opt-in shape-tuned sm75 interleaved verify #3455
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#3455
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/1437
Author: @agorevski
Created: 10/7/2026
Status: ❌ Closed
Base:
main← Head:perf/sm75-interleaved-verify📝 Commits (3)
680b7f6perf(cuda): opt in to measured sm75 interleaved verify projections556f82dtest(cuda): validate rebased sm75 policy and attribute community ports43c2c36fix(test): emit row choices against their own paired baseline📊 Changes
7 files changed (+355 additions, -78 deletions)
View changed files
📝
CMakeLists.txt(+9 -0)📝
docs/MMVQ_IL_TABLE.md(+18 -4)📝
docs/OLDER_GPUS.md(+54 -0)📝
include/strata/kernels/native_mmvq.hpp(+11 -4)📝
src/core/verify.cpp(+3 -2)📝
src/kernels/cuda/native_mmvq.cu(+74 -17)📝
src/kernels/mmvq_il_parity.cpp(+186 -51)📄 Description
Title
Opt in to measured sm_75 interleaved dense verify projections
Issue: No closing reference. Related context: #1349, #2007, #1842; this PR does not establish a fix for those reports.
Summary
Allow Turing (sm_75) to reuse interleaved Q8_1 activations for measured IQ4_XS/Q4_K/Q5_K/Q6_K dense projections in 2–4-token verify windows. Require exactly
STRATA_MMVQ_IL=1and exact input/output dimensions; unset,0,true, unspecified reduction width and unlisted shapes retain the native fallback.The branch has been rebased onto fetched
origin/mainata0116b2782a5b82622358c04a06496485d12b2d6, notmaster. Original headd0067686ac537ec0f12617e7ce6458d95b913ad1is preserved bybackup/pr1437-d0067686-rebase-20261012-1152. Rebased implementation:680b7f6846de07255ee5a20a0e852ba080b38bf6; follow-up tests/documentation:556f82d2e639f2a4292e752bc21dfd8a95b8552b; final paired-emission correction/head:43c2c361c0f965931380b6467f49602af7e952c3.What changed
kIlArchandnative_mmvq_il_rows_for, extending the lookup with reduction width. Preserve upstream Pascal/Volta/Ampere/shared tables, Q3_K kernels, one-column handling andSTRATA_MMVQ_IL_ROWSon the other eligible architectures. Class overrides cannot broaden sm_75's measured exact-shape policy. The sm_75 table entries are unchanged from the original PR.n_inat both dense-projection and output-head eligibility call sites inverify.cpp. Keep upstream'sn >= 2/T >= 2guards so one-column calls do not interleave.MMVQ_IL_ONLY,--bench --emit-table, output-row-class table emission and its one-column entries; retain--sm75-benchfor the original 2–4-column paired sweep including pack cost.docs/OLDER_GPUS.mdanddocs/MMVQ_IL_TABLE.mdwith architecture selection, the override boundary, CPU checks and clearly attributed community reports.No old conflicted file was restored wholesale. No upstream architecture tables, one-column or Q3_K support were removed. No community class table or
STRATA_EXP_MODEchange is adopted.Extra Notes
Comment follow-up and independent reports
main, retaining its new APIs/features rather than reverting them. Their measurements were a port of the unchanged table onto 0.1.42 (61b3fb5d), with the strict opt-in and actual input widths, not the exact PR head. They did not port this PR's extended harness or last-launch observer. On two RTX 2080 Ti cards (22 GB main / 11 GB peer, 250 W, i9-9820X, CUDA 12.4/GCC 15.2), IQ3_S + MTP, spec 4, INT8 KV, BF16_TC and SELECT_SIMT enabled, they reported bitwise parity using 0.1.42's harness and mean decode 68.3 → 71.3 tok/s (+4.4%, five workloads, four-run medians with reversed arm order). Their ~8K measurements were noisy; baseline greedy replies already varied, so text equality was not their correctness evidence. These are their results, not our new tests or measurements of the rebased head.STRATA_EXP_MODE=8expert-layout results are outside this PR.The PR discussion comments and reviews, plus
GET repos/Niko1221/Strata/pulls/1437/comments, were read. There were no formal reviews or inline review comments returned; the two discussion reports above are addressed in the code/docs and follow-up reply.Historical author measurements, not a rebased whole-model retest
Original Quadro RTX 8000 tuning retained 46/69 measured shape/window cells: every paired trial in both seven-pair sweeps saved at least 3%, charging the full interleave launch. The retained entries remain unchanged.
Previously recorded controlled whole-model decode medians (three runs per prompt, 128 outputs):
STRATA_MMVQ_IL=1(tok/s)Quadro RTX 8000, 260 W, Xeon W-2295, CUDA 12.4/GCC 13, IQ3_S + MTP, spec 4, fixed 19,000 expert slots, automatic prefill 8,192, INT8 KV, maximum context 262,144 / resident 32,768, PCIe fraction 0.20. Prompt caching and adaptation were disabled; BF16_TC was already enabled in both arms, with BF16 cache, SIMT scorer and CPU prefill sharing off. These are historical results, not fresh server runs after this rebase.
Fresh local build and exact validation outcomes
All commands ran in the independent worktree:
/home/algore/.copilot/session-state/a7c2bcbb-4264-4eb2-879d-c71a90285b0b/files/pr-worktrees/sm75-verify.The original dirty checkout was not modified; only its requested llama.cpp vendor source was shared read-only.
Results: fresh configure passed, exit 0; both targets built, exit 0, with CUDA 12.4.131 and system GCC/G++ 13.3.0. Final-source rebuild also passed, exit 0. Compiler warnings were emitted, but no build/tool incompatibility was encountered. Focused CPU tests passed 3/3, exit 0.
The host was reported to have an NVML driver/library mismatch (
nvidia-smi, NVML 580.178). We did not reboot, replace drivers/libraries or change the user environment. The actual CUDA runtime worked: the first bounded attempt below passed, and only then were full parity and bounded benchmark-interface checks run. This does not assert NVML was repaired.Result: passed, exit 0, Quadro RTX 8000 logical 0 / physical 3, bitwise T=1–4; 24 forced interleaved, 6 automatic interleaved / 2 fallback launches.
Final-source full validation command (the exclusive lock covers the entire loop and both smoke commands):
Results:
=1: passed, exit 0, bitwise T=1–4; 720 forced interleaved, 86 automatic interleaved / 154 fallback launches.=0,=true, unset: each passed, exit 0, bitwise T=1–4; each 720 forced interleaved, 0 automatic interleaved / 240 fallback launches. Strict opt-in and exact-shape assertions passed.--bench --emit-table, filtered Q3_K shape: passed, exit 0, including actual forced Q3_K one-column launches and class/one-column emission; 12 forced interleaved, 0 automatic / 4 fallback.--sm75-bench, filtered IQ4_XS shape: passed, exit 0, T=2–4, seven alternating pairs per forced-row choice with pack cost; 9 forced interleaved, 3 automatic / 0 fallback. These bounded smoke checks are not a new full tuning sweep or grounds for replacing the measured table.Logs remain in the worktree as
build-rebase1437-*.log(untracked build artifacts are ignored). No servers, power-limit changes or other GPUs were used. Other architectures were host-table-tested, not hardware-tested or compiled for their architectures. No new whole-model measurements were taken.Related issues found through repository issue search
No
Resolves/Fixesclaim is made.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.
STRATA_MTP_Q8_SM60=1, opt-in) #4766STRATA_MMQ_WS=1, opt-in) #4767--pipeline-windows 3, opt-in): a host-side scheduler, a slot pool, per-stage undo, an 11-output draft chain #4771STRATA_SPLIT_COMMIT_ASYNC=1, opt-in) #4791STRATA_SELECT_LONG=1, opt-in, GP100 builds) #4793STRATA_PREFILL_PIPE_FLOOR, the smallest pipelined prompt chunk (default 512, as before) #4794STRATA_PIPELINE_SNAP_RING=1) #4843STRATA_PATTN_SM60=1) #4844