← Back to Pull requests

Fix WarpScan::InclusiveScan with ReduceByKeyOp in logical warps #12785

Open
unknown opened this pull request with 194 lines diff across 2 files
View on GitHub
unknown unknown commented on Nov 24, 2026 06:12 UTC
Author

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

  • RTX 5090, CUDA 13.0, 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).

  • A100, CUDA 12.9, 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.

  • On the same A100, a separate width-8 test exercised all 128 possible key-boundary patterns. Of 65,536 outputs, 15,408 differed from the reference on main and all matched with this change.
  • Checklist

  • New or existing tests cover these changes.

  • The documentation is up to date with these changes.
  • I developed the fix and tests with Astra, an AI coding assistant.

    Diff: 194 lines (+145 / -49) across 2 files Reviewer: fbusato Review duration: 9763m
    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
    0.36
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.02 · 1 substantive comment(s)
    0.02
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    46%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    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
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 46.7% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 36% (MEDIUM) · Higher = larger blast radius
    36%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 46.7% · Lower = rushed or shallow review
    46.7%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 19.2% · Safe to merge
    19.2%
    Repository