Make threadpool an alternative to OpenMP. #12715
All Vouch review confidence checks passed
Residual risk 0.14 = Change Risk (0.35) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.35 · 173 lines diff across 2 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 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
Diff Size
diff_size
0.309
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #12715"
general
weight: 0.35
chyunsu3
Performance note
The pool is not yet optimized. Specifically, it has high latency for small tasks and doesn't handle the dynamic scheduling used by the
exacttree method. This leads to lower prediction performance and lowerexacttree method performance when the input is sparse.In addition, it doesn't consider CPU affinity. I expect this would be used by macOS users, where OpenMP is difficult to handle. But replacing OpenMP entirely is unlikely. The following benchmark is done on Linux.
We could mitigate most of the overhead by batching submits and pinning to CPUs. gomp uses spinning wait internally, which is unlikely to happen in XGBoost. We can do optimization for macOS in future PRs.
<img width="2340" height="954" alt="comparison" src="https://github.com/user-attachments/assets/baa66525-1b35-4295-b16b-cd6dbfbaa9ac" />
Correctness note
Followups