Implement async memcpy utilities #5593
All Vouch review confidence checks passed
Residual risk 0.19 = Change Risk (0.33) × (1 − Review Confidence (0.43)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.33 · 159 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.304
Real PR Conversation Timeline
1 comments
"Review active on #5593"
general
weight: 0.35
ttnghia
Currently
cudf-spark-jniconsumes libcudf'sdetail::memcpy APIs:memcpy_batch_asyncandmemcpy_asyncused across the protobuf, cast-string, map, shuffle, row-conversion, bloom-filter, and HostTable paths plus tests and a benchmark etc. libcudf does not want consumers reaching into itsdetail::namespace, and such usage is fragile and can break due to libcudf changes at anytime.This PR removes every
cudf::detail::memcpy dependency by duplicating the two host-only utilitiesmemcpy_batch_asyncandmemcpy_asyncinto a newspark_rapids_jni::module (cuda_memcpy.{hpp,cu}), then converting all the current call sites in the code to the vendored versions. The vendored bodies are technically identical to libcudf's (CUDA 13+cudaMemcpyBatchAsyncwithcudaMemcpySrcAccessOrderStream, invalid-entry filtering, the 128 KiBcudaMemcpyFlagPreferOverlapWithComputethreshold, and the per-copy fallback loop), plus one deliberate fix: acount == 0early return so an empty batch is a no-op instead of tripping CUDA 13'snumAttrs <= countrequirement.The whole
cuda_memcpymodule was not vendored because the remaining span-based machinery exists only to serve the pinned-copy kernel path, which no call site in this repo executes.Closes #5590.