mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[PR #1399] [CLOSED] qsa_select_bench: accuracy floor per sample (fails on an RTX 5090 / MSVC build) #3429
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#3429
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/1399
Author: @sergqwer
Created: 10/7/2026
Status: ❌ Closed
Base:
main← Head:pr/select-bench-gate📝 Commits (1)
2fc1e5eqsa_select_bench: the accuracy floor scales with each sample's sum |q*k| (a K = 128 FP32 sum's worst case), not 1e-6 of the score scale📊 Changes
1 file changed (+26 additions, -8 deletions)
View changed files
📝
src/kernels/qsa_select_bench.cpp(+26 -8)📄 Description
qsa_select_bench(a CUDA test since65ce3299) fails on an RTX 5090 with a Windows (MSVC) build of v0.1.40.2:The tensor-core scorer is fine: 1.03e-6 of the score scale against a floor of 1.00e-6, and every selection is the warp kernel's. The floor sits at the method's own error. 3xTF32 accumulates 48 MMAs (16 k-steps x 3) in the tensor cores' FP32, so its error is about 1e-6 of the score scale by construction. Which side of 1.00e-6 a run lands on depends on the data, and the data depend on the standard library.
std::normal_distribution<float>is implementation-defined: MSVC's STL draws other numbers than libstdc++ from the samemt19937(7). That is likely why it passes on Linux.Change (test only): the floor is now per sample and scales with that sample's own sum |q * k|. It is set at the worst case of a K = 128 FP32 dot product, 128 x 2^-24 = 2^-17 (7.6e-6) of that sum. The "no worse than 4x the warp kernel" part is unchanged. 3xTF32's bound is within the floor: 48 accumulations at <= 2^-23 each (tensor cores may truncate) plus the dropped lo * lo terms, about 7e-6. The line also prints the worst ratio and the floor.
RTX 5090, CUDA 13.3, MSVC 17.14:
qsa_select_bench(32K, tensor cores)qsa_select_bench_fp32_tiled(131K,STRATA_SELECT_SIMT=1)No engine code changes.
🤖 Generated with Claude Code
https://claude.ai/code/session_01VZy1yKaDDiA8a7svdwaHio
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.