← Back to Pull requests

[hipCCL] export libhipcxx dependency when linking libhipcxx::libhipcxx #14064

Closed
unknown closed this pull request without merging on Nov 23, 2026 14:59 UTC
View on GitHub
unknown unknown commented on Oct 20, 2026 21:48 UTC
Author

Motivation


When rocThrust finds libhipcxx at configure time (ROCTHRUST_USE_LIBHIPCXX=ON is the default, and /opt/rocm is on CMAKE_PREFIX_PATH), roc::rocthrust links libhipcxx::libhipcxx. But rocm_export_targets only declared rocprim as a dependency, so the installed rocthrust-config.cmake never calls find_dependency(libhipcxx). Any project that does find_package(rocthrust) and links roc::rocthrust then fails at generate time:

The link interface of target "roc::rocthrust" contains: libhipcxx::libhipcxx
but the target was not found.

This happens with both the projects/rocthrust and hipccl3 layouts, and could show up once libhipcxx CI is enabled.

In addition, the hipCCL superbuild with HIPCCL_BUILD_LIBHIPCXX=ON was not installing libihpcxx.

Technical Details


In thrust/CMakeLists.txt (projects/rocthrust and projects/hipccl/hipccl3/rocthrust):
  • Build the export DEPENDS list next to the target_link_libraries() calls, so they stay in sync: PACKAGE rocprim when linking roc::rocprim_hip, PACKAGE libhipcxx when linking libhipcxx::libhipcxx.

  • Replace the two rocm_export_targets() branches with a single call that passes that list.
  • The installed rocthrust-config.cmake now contains find_dependency(libhipcxx) when rocThrust was built with libhipcxx, and only find_dependency(rocprim) otherwise.

  • libhipcxx only enables its install rules when it is the top-level project, so nothing was installed. The hipccl3 root now sets libhipcxx_ENABLE_INSTALL_RULES=ON.

  • libhipcxx was added after rocThrust, so rocThrust's find_package(libhipcxx) found the copy in /opt/rocm. libhipcxx is now added first, and rocThrust only calls find_package(libhipcxx) when

  • libhipcxx::libhipcxx doesn't already exist.

    Test Plan


    Built rocPRIM/hipCUB/rocThrust from the same commit in the legacy layout and in hipccl3 (HIPCCL_BUILD_LIBHIPCXX=OFF, libhipcxx found from the nightly), on gfx90a and gfx942 (MI300X).

    Test Result

  • find_package(rocprim/hipcub/rocthrust) test program: failed before, builds and runs now

  • rocThrust built without libhipcxx: config has no libhipcxx dependency, test still passes

  • -I-only (Bazel/JAX-style) test with and without libhipcxx: builds and runs

  • #13737 guards (no libhipcxx, C++17): compiles

  • With libhipcxx unavailable, find_package(rocthrust) now fails with a clear find_dependency error instead of the missing-target error

  • libhipcxx headers install to include/hipccl/libhipcxx; a find_package consumer uses those headers (not /opt/rocm); smoke tests build and run on gfx942.
  • Submission Checklist

  • Look over the contributing guidelines at https://github.com/ROCm/TheRock/blob/main/GOVERNANCE.md#pull-requests.
  • Diff: 337 lines (+252 / -85) across 4 files Reviewer: Naraenda Review duration: 48550m
    All Vouch review confidence checks passed
    Residual risk 0.17 = Change Risk (0.42) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.42 · 337 lines diff across 4 files
    0.42
    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.348
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #14064"
    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: 42.2% (MEDIUM) · Higher = larger blast radius
    42.2%
    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: 16.7% · Safe to merge
    16.7%