perf(rocprim): reduced branches in device_search and device_find_end (port of #11299 to hipccl3) #13006
All Vouch review confidence checks passed
Residual risk 0.15 = Change Risk (0.37) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.37 · 237 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.327
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #13006"
general
weight: 0.35
NguyenNhuDi
Port of #11299 (by @DeltaNeverUsed) to the hipccl3 layout, so the change lands in
projects/hipccl/hipccl3/instead of the retiredprojects/location. The original PR will be closed once this one is accepted.Original description
Motivation
The inner loops in device_search used per-iteration branching that causes thread divergence on GPU wavefronts.
Benchmarks also did not cover the best-case scenario.
Technical Details
Part of this PR is refactoring the relevant benchmarks as well as adding the best case scenario to the benchmarks.
- Combined the header files for device_search and device_find_end since they were nearly identical
- Refactors and adds the best case scenario
- Is the actual performance improvement
Test Plan
All tests still pass
Submission Checklist
About this port
projects/rocprim/->projects/hipccl/hipccl3/rocprim/). The commit IDs differ from the originals.CHANGELOG.mdhas nox.y.z (unreleased)section, so the entry "Reduced branching indevice_searchanddevice_find_end" is placed under the existing Optimizations list of the4.8.0section, as agreed. The commit message notes this.projects/hipcclyet, so the checks on this PR do not exercise the change. Please build the affected hipccl3 component and run its relevant tests before merging.🤖 Generated with Claude Code