[RF] Declare CudaInterface Deleter specializations #24476
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 · 220 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.323
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #24476"
general
weight: 0.35
guitargeek
This Pull request:
Changes or fixes:
This PR ensures that explicit specializations of a member function of a class template are declared before their first use in every translation unit ([temp.expl.spec]).
In
CudaInterface.cu,DeviceMemory::DeviceMemoryandPinnedHostMemory::PinnedHostMemorycallstd::unique_ptr::resetbefore the explicit specializations ofDeleter<DeviceMemory>::operator()andDeleter<PinnedHostMemory>::operator()are defined. With libstdc++ 14,std::unique_ptr::resetevaluates__is_invocableon the deleter, causingnvcc(cudafe++) to reject the later explicit specializations as an error. Other translation units includingCudaInterface.h(such asRooBatchCompute.cu) also instantiate these deleters without seeing any declaration of the explicit specializations.This PR declares the explicit specializations of
Deleter<T>::operator()inCudaInterface.hbefore any use and move theDeviceMemoryandPinnedHostMemorydeleter definitions above their constructors inCudaInterface.cuto matchCudaStream.Checklist:
This PR fixes the compilation issue with CUDA 13.3 and C++23 standard in https://eicweb.phy.anl.gov/containers/eic_container/-/jobs/8933871#L1733
The backport of this fix to 6.40.04 (not fully transparent due to code changes since that tag) was used to build the same configuration of ROOT successfully in https://eicweb.phy.anl.gov/containers/eic_container/-/jobs/8939244#L1730 and https://eicweb.phy.anl.gov/containers/eic_container/-/jobs/8939246#L1719 (please ignore the other transient error further down; the main thing is that ROOT built correctly)
Assisted-by: antigravity:gemini