mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[PR #1019] [CLOSED] kv_q8: the gather decodes 8 int8 per thread (V100 experimental build, +11%) #2968
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#2968
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/1019
Author: @ATIVX928
Created: 10/6/2026
Status: ❌ Closed
Base:
main← Head:v100/kv-q8-gather📝 Commits (10+)
749d957setup (--backend hip): a system ROCm without the HIP development files falls back to the wheels (#446)5a30024calibrate: the engine's arguments come from the server's engine_args; a failed tuning says why (#447)9f60d13serve, setup: name the small split card that caps the prompt chunk; setup recommends the big card alone (#448)eb8da1d/metrics: each request's speculative draft counts, and their sums in the totals (#457)6a09387setup (--gguf-dir): GGUFs Strata cannot run are named as such, with the --family/--model to use (#444)d6a91e2docs: the Coder is weaker outside code, Chinese/CJK text included; the unpruned sizes for that (#438)d8d4ad3Merge branch 'f-135-eng' into rel-0.1.357b600d5Merge branch 'f-135-small' into rel-0.1.35d9ab843Engine 0.1.35: Windows AMD uses its bundled HIP runtime (#468 #461), the low-RAM resident mode on Windows 32 GB PCs (#467), fixes #460 #459 #446 #447 #457 #448 #444; setup requires it57bd713sycl: pipeline the expert cache's profile fill (model load 3-4x faster)📊 Changes
3 files changed (+153 additions, -3 deletions)
View changed files
📝
bench/results/2026-10-03-v100-kv-int8-read/README.md(+20 -1)📝
src/kernels/cuda/kv_q8.cu(+83 -1)📝
src/kernels/kv_q8_parity.cpp(+50 -1)📄 Description
What
The int8 KV gather (
kv_gather_q8_kernel, used by the 32K prompt path) decodes four int8 codes per thread. This decodes eight, withuint2/uint4loads and stores, and falls back to the four-wide path when the alignment does not allow the wider access. It is the int8-gather piece of the V100 work in #627, split out on its own.Gating
The wide kernel is compiled only under
-DSTRATA_EXPERIMENTAL_SM60=ONand only launched on a device below cc 7.5 (pre75_q8_gather()), withSTRATA_Q8_GATHER_WIDE=0as the A/B arm. The ready-made engine compiles the original kernel; as a check, the non-experimental object's SASS sha256 is identical to main's (a4af40d8…, 54376 bytes).Measured
V100-SXM2-16GB, CUDA 12.8,
kv_q8_parity --bench, 2,051 selected cells at 32K:+11.3% on the gather kernel.
32K end-to-end
2x V100-SXM2-16GB, 32,504-token prompt, int8 KV, MTP spec 4, expert-cache auto, prompt cache off; median of 5 rounds after a warm-up. Single-card prefill 1550.4 tok/s and dual-card 2203.0 vs main's 1557.1 / 2207.0 - within the +-1% session noise. The gather is a few tens of microseconds of a 21-second prefill, so the +11.3% stays a kernel-level gain.
Tests
kv_q8_parityPASS (worst INT8-vs-FP16 error 0.59 quantization steps), both the wide default andSTRATA_Q8_GATHER_WIDE=0.Notes
bench/results/2026-10-03-v100-kv-int8-read/README.mdrecords the measurement and the footprint/bandwidth comparison of int8 vs q4_0 vs k8v4.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.