Fix WarpScan::InclusiveScan with ReduceByKeyOp in logical warps #12785
All Vouch review confidence checks passed
Residual risk 0.19 = Change Risk (0.36) × (1 − Review Confidence (0.47)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.36 · 194 lines diff across 2 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.02 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Shallow Review Depth
shallow_review_depth
0.344
Diff Size
diff_size
0.315
Real PR Conversation Timeline
1 comments
"Review active on #12785"
general
weight: 0.35
fbusato
Description
Closes #12772.
In a logical warp starting at physical lane 8, a key change at lane 10 starts a segment at logical lane 2. The ballot records bit 10. The generic scan step compares the index of that bit with its logical lane ID, so it can discard valid predecessors. Shift the ballot by the logical warp's base before extracting the segment start. The shift is zero for a full warp.
The regression uses four 8-lane logical warps and a custom addition operator. Each logical warp has a single zero followed by seven ones under a different key. This isolates accumulation after an explicit key change from the first-segment case in #12768. With #12768 now on main, an empty ballot still maps to logical lane 0 for the first segment.
Testing
sm_120: all 209 WarpScan cases passed (13,603 assertions), including the logical-lane regression. The separate first-segment tests added by #12768 also passed (2 cases, 144 assertions).sm_80: compared logical widths 8, 16 and 32 with a sequential reference. On main (0fd514d), 696 of 11,520 outputs differed, all in later segments. With this change, all 11,520 matched.Checklist
I developed the fix and tests with Astra, an AI coding assistant.