Repository navigation
perf(cuda): half2 score kernel, two references per thread - #12
Merged
Merged
Conversation
jayhesselberth
force-pushed
the
perf-cuda-half2
branch
from
October 17, 2026 14:30
c1c1c4e to
70896cb
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
On sm_80+ an fp16x2 kernel scores two references per thread for every read inside the new
cuda::fits_f16bound (min(n,L)·m + 2|o| + |e| ≤ 2048, ~420 for tRNA); the int kernel takes the rest in the same batch. Output is byte-identical:gpu_parityruns every check on both kernels, including positive-mismatch and free-gap schemes, and both deliberately broken variants fail it. Rebased onto #11 (its narrow tail stripe stays on the int kernel; the half2 kernel still walks a full 16-row tail — portingRR ∈ {16, 8, 4}to it is the obvious follow-up).A30,
examples/gpu_score_probe.rs, M1 reads vs the 164-ref panel, int kernel as of #11 vs half2:--device gpu, pre-perf: non-saturating i16 adds in CPU kernels, narrow CUDA tail stripe #11mainvs this branch: 6.4 → 4.3 s wall (md5 equal); 10.3 → 5.5 s with--strand both --secondary --mode semiglobal__launch_bounds__(256, 3)= 80 registers on evidence: 64 and 72 spill, 96 loses occupancy (table inbenchmarks/README.md)Checks after the rebase, all in srun allocations: fmt, clippy with and without
--features gpu, workspace tests 130/130 (rna);gpu_parity5/5 (288,480 pairs equal on both kernels), CLI GPU tests 5/5, cuda unit tests 2/2 (A30).Closes #9
🤖 Generated with Claude Code