← Back to Pull requests

Fix compiler issue when passing launch bounds in a variable #7

Merged
mjklemm merged 2 files (69 lines) on Jun 30, 2026 15:18 UTC
View on GitHub
mjklemm mjklemm commented on Jun 29, 2026 16:44 UTC
Author

No description provided by author.

Diff: 69 lines (+64 / -5) across 2 files Reviewer: skc7 Review duration: 1353m
All Vouch review confidence checks passed
Residual risk 0.06 = Change Risk (0.30) × (1 − Review Confidence (0.81)). Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.30 · 69 lines diff across 2 files
0.30
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.71 · 1 substantive comment(s)
0.71
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 50%
81%
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
Diff Size diff_size
0.254
Real PR Conversation Timeline
4 items
Copilot Copilot commented on code on Jun 29, 2026 16:47 UTC
Code Review
mlir/lib/Target/LLVMIR/Dialect/OpenMP/OpenMPToLLVMIRTranslation.cpp:1
@@ -6438,13 +6438,17 @@ initTargetDefaultAttrs(omp::TargetOp targetOp, Operation *capturedOp,
     if (!clauseValue)
       return;
 
-    if (auto val = extractConstInteger(clauseValue))
+    if (auto val = extractConstInteger(clauseValue)) {
       result = *val;
+      return;
+    }

The new early-return changes behavior for negative constant clause values: previously a negative constant (e.g., -1) would be converted to the "unknown" sentinel (0) via the result < 0 check, but now it returns early and leaves result negative, which is later treated as "unset". Since extractConstInteger() can return negative values, consider preserving the previous handling for negative constants while still returning early for non-negative constants.

copilot-pull-request-reviewer[bot] copilot-pull-request-reviewer[bot] commented on Jun 29, 2026 16:47 UTC
Reviewer

Pull request overview

This PR fixes an OpenMP-to-LLVM IR translation issue where non-constant launch-bound clause values (e.g., variable thread_limit / num_threads) could incorrectly leave a per-dimension sentinel value of 1, unintentionally clamping GPU kernel launch bounds to a single thread.

Changes:

  • Make setMaxValueFromClause treat any applicable non-constant clause value as “unknown” (0) even when the initial sentinel is 1.

  • Add an early return for constant clause values to avoid overwriting them with the “unknown” sentinel.
  • skc7 skc7 approved these changes on Jun 30, 2026 13:57 UTC
    Approved Reviewer

    LGTM

    Reviewers
    Assignees
    mjklemm mjklemm
    Labels
    risk: low confidence: 81.1% 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: 29.9% (LOW) · Higher = larger blast radius
    29.9%
    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: 81.1% · Lower = rushed or shallow review
    81.1%
    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: 5.7% · Safe to merge
    5.7%