mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[PR #1943] [CLOSED] hip: opt-in exact gfx1100 QSA scorer for long prefill #3769
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#3769
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/1943
Author: @2jztricks
Created: 10/11/2026
Status: ❌ Closed
Base:
main← Head:hip-gfx1100-exact-qsa-scores📝 Commits (1)
3eb31bchip: add opt-in exact gfx1100 QSA prefill scorer📊 Changes
12 files changed (+2030 additions, -0 deletions)
View changed files
📝
CMakeLists.txt(+15 -0)➕
bench/results/2026-10-11-gfx1100-qsa-scores/README.md(+216 -0)➕
bench/results/2026-10-11-gfx1100-qsa-scores/benchmark.py(+137 -0)➕
bench/results/2026-10-11-gfx1100-qsa-scores/correctness.json(+19 -0)➕
bench/results/2026-10-11-gfx1100-qsa-scores/hipblaslt-gfx1100-100401.txt(+34 -0)➕
bench/results/2026-10-11-gfx1100-qsa-scores/measurements.json(+1091 -0)➕
bench/results/2026-10-11-gfx1100-qsa-scores/prompt-source.txt.gz(+0 -0)➕
bench/results/2026-10-11-gfx1100-qsa-scores/provenance.json(+168 -0)📝
docs/AMD_HIP.md(+11 -0)➕
src/kernels/cuda/qsa_scores_gfx1100_test.cu(+32 -0)📝
src/kernels/cuda/qsa_select.cu(+122 -0)➕
src/kernels/qsa_scores_gfx1100_parity.cpp(+185 -0)📄 Description
Large fresh prompts on gfx1100 spend substantial time in QSA block scoring. This adds an opt-in, HIP-only exact scorer that reduces fresh request latency by about 10–23% on an RX 7900 XTX in the measurements below, while keeping the default scorer selected.
This ports the four-lanes-per-query method and original FP32 reduction tree from xrip's #1825, pinned to
14bf32150490bb9f5fc4d9c7c5dcfdc96dd98797. That PR currently excludes HIP. Credit for the algorithm belongs there; this contribution adds the guarded gfx1100 implementation, hardware validation, and reproducible measurement evidence.Scope
STRATA_SCORES_THREAD=1at process startup; off by default.tests/. CUDA does not compile the new HIP kernel.Before/after on the RX 7900 XTX
RX 7900 XTX 24 GiB, Ryzen 9 7950X3D, 64 GiB installed RAM, Nobara 44, ROCm 10.0.0, observed PCIe 4.0 x16, fixed 272 W cap. OrcaRouter Flash Next IQ3_S; logical context 262,144; int8 KV / 32,768 resident cells; 15 CPU expert workers; prefill 16,384; MTP6/floor0.70; same balanced profile and 8,144 GPU expert slots in every arm. PLE stayed on ext4 SSD with direct I/O. Experiment swap limit zero.
Fresh numerical-source prompts, zero reused prefix tokens, greedy sampling, reasoning disabled, one generated token. Values are non-streaming request latency, excluding model loading; this is not a sustained decode or streaming-TTFT benchmark. New private worker for each fresh case; OS file cache not flushed.
The repeated family used off/on, on/off, off/on and includes the same local prefix-reuse/budget-loan changes in both arms. The separate current-main engine was built from
61b3fb5dd3f1e8ec09cf7e4e05208bc6d3c46406plus this patch. Its only arm difference is the scorer flag. These families are not pooled. All fresh input/output hashes and output counts matched.At the actual 256-query batch size, the submitted CMake microbenchmark measured the scorer stage:
Warmed GPU-event timing, interleaved ABBA, four trials / ten calls per trial. The stage speedup is not presented as whole-task speedup.
Correctness and build validation
Limits: no default or general agent-speed recommendation
Cached follow-ups processing 2,085 new tokens had only a modest/flat repeated gain: 2.829→2.658 s at 128K; 3.418→3.417 s near240K (two pairs each). The single current-main continuation results are included in the report but do not establish a repeatable large gain.
A separate correction-inclusive 192K-source-archive pilot used xhigh/8,192 reasoning tokens, T0.3, matched seeds and automatic full-suite checks:
One pair per task, not an official Aider leaderboard score. The Go repair-path divergence remains unexplained. An earlier 240K archive attempt exceeded the context limit during Rust repairs and is preserved separately as a protocol failure. The general promotion gate failed; no full24 run, no production promotion, and no Luna/frontier/overall quality superiority claim.
Only gfx1100 was validated on hardware. The model comparison used the same locally patched prefix-cache frontend in both arms; the stock latest Python frontend was not benchmarked. The one-token screen cannot establish generation quality. Broader task qualification is needed before any default change.
Reproduction and artifacts
Full report, medians/ranges, per-request JSON, exact prompt fixture, configuration/provenance and benchmark script.
The report provides request-screen commands and all tested settings. The script reproduces the frozen fresh/follow request hashes, refuses to overwrite attempts, and rejects accidentally reused prefixes in a fresh case. No credentials, private conversation history, model weights or large profiling traces are included.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.