[MINOR] Reject invalid CUDA streams in buffer factories #1263
All Vouch review confidence checks passed
Residual risk 0.15 = Change Risk (0.35) × (1 − Review Confidence (0.57)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.35 · 165 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.306
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #1263"
general
weight: 0.35
pentschev
Passing
cuda::invalid_streamto a buffer factory used to succeed and only fail later, ascudaErrorInvalidResourceHandlefrom a CUDA call far from the cause. The publicHostBuffer::from_rmm_device_bufferalso skipped the stream ordering thatBufferResource::movedoes. The buffer factories andBuffer::rebind_streamnow throwstd::invalid_argumenton an invalid stream.from_rmm_device_buffernow orders its stream after the device buffer's pending work. Follow-up to #1261.BufferResource::make_buffer,BufferResource::move, theHostBufferconstructors (used byfrom_uint8_vectorandfrom_owned_vector),HostBuffer::from_rmm_device_bufferandBuffer::rebind_streamthrowstd::invalid_argumentforcuda::invalid_stream.HostBuffer::from_rmm_device_buffermakesstreamwait on the device buffer's stream, and frees the memory on theHostBuffer's current stream. Before, memory was freed on the original stream, which could be stale afterrebind_stream.BufferResource::moveandfrom_rmm_device_buffernow just checkscapacity() > 0. An empty buffer owns no memory, so there's nothing to join. This includes default-constructed buffers, which have no stream.