← Back to Pull requests

[RF] Declare CudaInterface Deleter specializations #24476

Closed
unknown closed this pull request without merging on Dec 03, 2026 06:14 UTC
View on GitHub
unknown unknown commented on Dec 02, 2026 20:25 UTC
Author

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::DeviceMemory and PinnedHostMemory::PinnedHostMemory call std::unique_ptr::reset before the explicit specializations of Deleter<DeviceMemory>::operator() and Deleter<PinnedHostMemory>::operator() are defined. With libstdc++ 14, std::unique_ptr::reset evaluates __is_invocable on the deleter, causing nvcc (cudafe++) to reject the later explicit specializations as an error. Other translation units including CudaInterface.h (such as RooBatchCompute.cu) also instantiate these deleters without seeing any declaration of the explicit specializations.

This PR declares the explicit specializations of Deleter<T>::operator() in CudaInterface.h before any use and move the DeviceMemory and PinnedHostMemory deleter definitions above their constructors in CudaInterface.cu to match CudaStream.

Checklist:

  • tested changes ~~locally~~ in CI

  • ~~updated the docs (if necessary)~~
  • 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

    Diff: 220 lines (+165 / -55) across 2 files Reviewer: guitargeek Review duration: 588m
    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
    0.37
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.17 · 1 substantive comment(s)
    0.17
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    60%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    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
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 60.5% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 36.8% (MEDIUM) · Higher = larger blast radius
    36.8%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 60.5% · Lower = rushed or shallow review
    60.5%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 14.5% · Safe to merge
    14.5%