fix(rocthrust): fix `copy_if` issues on large data types #16577
All Vouch review confidence checks passed
Residual risk 0.17 = Change Risk (0.32) × (1 − Review Confidence (0.47)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.32 · 129 lines diff across 1 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.02 · 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
Shallow Review Depth
shallow_review_depth
0.344
Diff Size
diff_size
0.291
Real PR Conversation Timeline
1 comments
"Review active on #16577"
general
weight: 0.35
NguyenNhuDi
Motivation
It has been reported that when
copy_ifuses large data types there are several issues.1.) 512-byte or larger types aborts or hangs once 256 or more elements are selected.
2.) 512-byte+ types launches its scatter on stream 0, not the policy stream.
This PR aims to fix these issues.
JIRA ID: AIPRIMS-279, AIPRIMS-280
Technical Details
1.) previously
thrust::inclusive_scan(policy, flags.begin(), flags.end(), pos.begin());set the scan toflagstype which wasuint8causing an overflow for anything larger than 256. By using a wider input this can be negated.2.) The call to
copy_if_kerneloriginally did not include thestreamargument, resulting in it defaulting to 0 instead of whatever the user passed in. The fix to this is imply adding in thestreampassed in.Test Plan
CI and local testing
Test Result
Local testing passed all unit tests.
Submission Checklist