mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[PR #312] [CLOSED] QSA select: ROCWMMA block-scores arm (opt-in STRATA_SELECT_WMMA=1, gfx1100) #2566
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#2566
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/312
Author: @xyzzing
Created: 9/30/2026
Status: ❌ Closed
Base:
main← Head:feature/qsa-select-rocwmma-optin📝 Commits (3)
8849753QSA select: ROCWMMA block-scores arm (opt-in STRATA_SELECT_WMMA=1, gfx1100)8ec2d6eQSA select: WMMA parity harness (two independent references, PORTING 18 bound)d02abdeQSA select: the scorer bench and adversarial parity fixtures📊 Changes
6 files changed (+617 additions, -46 deletions)
View changed files
📝
CMakeLists.txt(+37 -0)📝
include/strata/kernels/qsa_select.hpp(+9 -0)📝
src/kernels/cuda/qsa_select.cu(+150 -0)📝
src/kernels/qsa_select_bench.cpp(+72 -42)➕
src/kernels/qsa_select_wmma_parity.cpp(+323 -0)📝
src/prefill/prefill.cpp(+26 -4)📄 Description
Rework of #228 per your note — this PR is only the scorer, its parity test, the bench and the CMake detection. No
.agentic/,AGENTS.md,CLAUDE.md, CI workflows,serve/telemetry.py,direct_file.*, ormath_constants.h. (The rates-table row and the verify-profiler fix that were bundled in #228 are deliberately left out.)What it is
The CUDA TF32 scorer can't run on gfx1100 (no
mma.sync). This addsqsa_block_scores_wmma: a 16×16×16 ROCWMMA GEMM view of the block scores (FP16 operands, FP32 accumulation), reusingblock_scores_tail_kernelunchanged so the tailn_bidstays bitwise the warp kernel's. Keys/queries convert to FP16 per call into an internal scratch.Opt-in, default off (as requested)
STRATA_SELECT_WMMA=1→ try the ROCWMMA arm, else fall throughSTRATA_SELECT_OLD=1→ force the warp kernelThe prompt path prints the arm that actually ran (
strata select: prompt scorer arm = ...), so a quiet fallback can't masquerade as the fast path. Without rocWMMA headers the arm compiles out and the entry refuses; a CUDA build is untouched.Commits
qsa_select.cu/.hpp,prefill.cpp,CMakeLists.txt).--selftest).gfx1100 numbers (RX 7900 XTX, IQ3_S — my card carries these, per your note)
nq=256), median-of-9.B(qi,b) = 2^-9.5·S + 8·2^-24·|score|(PORTING.md §18) over one-hot + coordinate-coded rows.Because the gain is context-dependent (clear at 128K, mixed below), the arm is opt-in and the default path is byte-for-byte unchanged. The parity harness and bench are included so you can rebuild and re-measure on any gfx1100. Numbers are from my campaign build (0.1.29-based engine of record); the scorer is additive and the prompt-path hook is a localized call-site edit that merges cleanly onto 0.1.30.
Built on the multi-query scorer (#187). Refs: PORTING.md §18 (parity bound).
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.