mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[PR #1535] [CLOSED] gfx906: add guarded register top-k for decode #3515
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#3515
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/1535
Author: @0FL01
Created: 10/8/2026
Status: ❌ Closed
Base:
main← Head:perf/gfx906-guarded-decode-topk📝 Commits (2)
fc23f47perf(gfx906): guard decode register top-k by live contextca35331test: record isolated gfx906 guarded top-k qualification📊 Changes
6 files changed (+1580 additions, -11 deletions)
View changed files
📝
CMakeLists.txt(+5 -0)➕
bench/results/2026-10-08-gfx906-guarded-topk/README.md(+84 -0)➕
bench/results/2026-10-08-gfx906-guarded-topk/component-checks.json(+1070 -0)➕
bench/results/2026-10-08-gfx906-guarded-topk/model-analysis.json(+318 -0)📝
src/kernels/cuda/qsa_select.cu(+35 -4)📝
src/kernels/qsa_topk_parity.cpp(+68 -7)📄 Description
Summary
Add an opt-in gfx906 decode route using the existing register-66 top-k kernel at larger configured capacities. Enable it with
STRATA_GFX906_TOPK_REG=2; defaults stay unchanged.The route reads current device steps during execution, so captured graphs can cross the context threshold and return to a shorter restored conversation.
What changed
STRATA_TOPK_OLDoverride, and counted/prompt behavior.Only three implementation/test/CMake files change. Q2 GPU/CPU work and the broader parity changes from #1187/#1320 are excluded.
Validation
Built the full engine and parity target on upstream
6674a006with the same pinned gfx906 HIP image and ggml revision for both arms.On both 16-GiB gfx906 cards:
Isolated fresh-process model ABBA, 1,024 generated tokens/run, identical settings and output IDs within every workload:
Prefill is effectively unchanged. These are two observations per arm on this hardware/model, not a broad performance guarantee. The small short-context cost is one reason to keep this opt-in.
Full results, test arguments, logs, build provenance and limits.
Extra notes
The base's full gfx906 build needs the one-line
cudaEventBlockingSyncalias already proposed in #1396. That same build-only prerequisite was applied to both measured arms and is not duplicated in this PR. Its separate Q6_K change was not needed.CUDA and non-gfx906 HIP builds/runtime were not run here. Static portability review changed the test's capture mode to the ThreadLocal constant already mapped by both HIP compatibility headers. No actual 200K model request is claimed for this isolated A/B; the component graph tests cover that context.
Draft for upstream review.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.