← Back to Pull requests

Avoid calling OMP functions directly. #12679

Merged
trivialfis merged 20 files (886 lines) on Oct 12, 2026 08:01 UTC
View on GitHub
trivialfis trivialfis commented on Oct 08, 2026 23:14 UTC
Author

Avoid calling omp-related functions like omp_get_thread_num.

Diff: 886 lines (+395 / -491) across 20 files Reviewer: RAMitchell Review duration: 4846m
All Vouch review confidence checks passed
Residual risk 0.17 = Change Risk (0.72) × (1 − Review Confidence (0.76)). Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.72 · 886 lines diff across 20 files
0.72
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.62 · 3 substantive comment(s)
0.62
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
75%
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.400
Mass File Touch mass_file_touch
0.080
Real PR Conversation Timeline
6 items
coderabbitai[bot] coderabbitai[bot] commented on Oct 08, 2026 23:14 UTC
Bot

<!-- This is an auto-generated comment: summarize by coderabbit.ai -->
<!-- review_stack_entry_start -->

<a href="https://app.coderabbit.ai/change-stack/dmlc/xgboost/pull/12679?scope=ghh_OusAJGA4HG8ljoOV0wJvVx8NmnZIjc2DdjmxOu0xZWA&amp;cs_source=review_comment"><picture><source media="(prefers-color-scheme: dark)" srcset="https://storage.googleapis.com/coderabbit_public_assets/review-stack-in-coderabbit-ui-dark.svg?v=3"><source media="(prefers-color-scheme: light)" srcset="https://storage.googleapis.com/coderabbit_public_assets/review-stack-in-coderabbit-ui.svg?v=3"><img src="https://storage.googleapis.com/coderabbit_public_assets/review-stack-in-coderabbit-ui.svg?v=3" alt="Review in Change Stack →" height="32"></picture></a>

<!-- review_stack_entry_end -->
<!-- recent_review_start -->

No actionable comments were generated in the recent review. 🎉

<details>
<summary><strong>ℹ️ Recent review info</strong></summary>
<dl>
<dd>

<details>
<summary><strong>⚙️ Run configuration</strong></summary>
<dl>
<dd>

  • Configuration used: Repository UI

  • Review profile: CHILL

  • Plan: Advanced

  • Run ID: 266969c5-488c-49ae-b6da-d2ac1fe68738
  • <hr>

    </dd>
    </dl>
    </details>

    <details>
    <summary><strong>📥 Commits</strong></summary>
    <dl>
    <dd>

    Reviewing files that changed from the base of the PR and between 72282fa4235a77231448e328f913da6936da7f7d and 445ee61076a4661e525bf205e63ab7169287f31f.

    <hr>

    </dd>
    </dl>
    </details>

    <details>
    <summary><strong>📒 Files selected for processing (4)</strong></summary>
    <dl>
    <dd>

    src/common/threading_utils.h
    src/data/data.cc
    src/metric/auc.cc
    tests/cpp/common/test_threading_utils.cc

    <hr>

    </dd>
    </dl>
    </details>

    Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.

    <hr>

    </dd>
    </dl>
    </details>

    ---

    <!-- recent_review_end -->
    <!-- walkthrough_start -->

    Walkthrough

    The change updates sparse-page transpose and sortedness calculations, replaces per-thread gradient accumulations with transform-reductions, and uses explicit worker IDs to select thread-local state in CPU parallel callbacks. Ranking metrics now share a cached base implementation. Grouped AUC and AUCPR tests cover how invalid and zero-AUC groups contribute.

    Suggested reviewers: ramitchell

    <!-- walkthrough_end -->
    <!-- change_assessment_start -->
    Priority: ➖ Normal

    <!-- change_assessment_commit:"445ee61076a4661e525bf205e63ab7169287f31f" -->

    <!-- change_assessment_end -->
    <!-- final_review_risk_start -->
    Merge Risk: ⚪ Minimal · up to 445ee
    <!-- final_review_risk_coverage:{"sourceCommitId":"445ee61076a4661e525bf205e63ab7169287f31f","coveredCommitId":"445ee61076a4661e525bf205e63ab7169287f31f","kind":"reviewed"} -->

    No identified issue prevents merging after normal checks.
    <!-- final_review_risk_end -->
    <!-- autopilot:start -->

  • <!-- {"checkboxId":"2708ad07-9f24-4260-9c11-7dc76a49f2e3"} --> <strong title="Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts">Autofix</strong> · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

  • <!-- autopilot:end -->
    <!-- This is an auto-generated comment: all tool run failures by coderabbit.ai -->

    [!WARNING]

    Some tools did not complete. Review the errors below.

    > <details>

    <summary><strong>🔧 Cppcheck (2.22.0)</strong></summary>

    <dl>

    <dd>

    > <details>

    <summary><strong>src/data/data.cc</strong></summary>

    <dl>

    <dd>

    > Cppcheck timed out; analysis of this file is incomplete

    > </dd>

    </dl>

    </details>

    >

    <hr>

    > </dd>

    </dl>

    </details>

    <!-- end of auto-generated comment: all tool run failures by coderabbit.ai -->
    <!-- tips_start -->

    ---

    Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

    <details>
    <summary><strong>❤️ Share</strong></summary>
    <dl>
    <dd>

  • X

  • Mastodon

  • Reddit

  • LinkedIn
  • <hr>

    </dd>
    </dl>
    </details>

    <sub>Comment @coderabbitai help to get the list of available commands.</sub>

    <!-- tips_end -->

    RAMitchell RAMitchell commented on Oct 11, 2026 07:27 UTC
    Reviewer

    Curious why need common::Worker? Why not just an overload. Only tid is used. What about:

    common::ParallelFor(n, n_threads, [&](auto idx, std::int32_t tid) {
      // Use stemp_[tid].
    });
    

    Might be good to do some small perf checks for these functions. There is risk of regression.

    trivialfis trivialfis commented on Oct 11, 2026 14:31 UTC
    Author

    Curious why need common::Worker?

    I don't enjoy lots of integers as parameters, I always have concerns that I get the parameter ordering wrong.

    Might be good to do some small perf checks for these functions. There is risk of regression.

    It's just a plain struct, with one less global function call. I can do some simple checks.

    trivialfis trivialfis commented on Oct 12, 2026 04:32 UTC
    Author

    Reverted the single-element-per-thread loops, which cause regression. Rest should be the same. Also, cleaned up the Worker type to be an alias of integer.

    RAMitchell RAMitchell approved these changes on Oct 12, 2026 07:41 UTC
    Approved Reviewer

    Approved these changes.

    Reviewers
    Assignees
    trivialfis trivialfis
    Labels
    risk: low confidence: 75.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: 71.5% (HIGH) · Higher = larger blast radius
    71.5%
    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: 75.7% · Lower = rushed or shallow review
    75.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: 17.4% · Safe to merge
    17.4%
    Repository