← Back to Pull requests

fix(math-libs): make hipCCL build-depend on libhipcxx (carryover of #9933) #9963

Closed
unknown closed this pull request without merging on Nov 20, 2026 15:43 UTC
View on GitHub
unknown unknown commented on Nov 13, 2026 21:48 UTC
Author

Motivation

The hipCCL 3.1 superbuild (rocm-libraries projects/hipccl/hipccl3) requires libhipcxx >= 3.4
at configure time. TheRock builds libhipcxx as its own subproject, but declared it after hipCCL
(libhipcxx depended on prim), so hipCCL configured before libhipcxx was staged and the Math Libs
stage failed with hipcub requires libhipcxx >= 3.4, but no suitable libhipcxx installation was
found
.

This reverses the dependency so libhipcxx is built before prim, and moves libhipcxx's tests,
which include hipCUB headers, into a separate subproject that builds after prim.

Technical Details

Build order and topology

  • math-libs/CMakeLists.txt: declare libhipcxx before the THEROCK_ENABLE_PRIM block and add

  • it to the BUILD_DEPS of hipCCL and hipCCL_tests.
  • BUILD_TOPOLOGY.toml: prim lists libhipcxx in artifact_deps, and [artifacts.libhipcxx]

  • is declared before [artifacts.prim].

    libhipcxx / libhipcxx_tests split

  • The libhipcxx subproject is built with -DLIBCUDACXX_ENABLE_LIBCUDACXX_TESTS=OFF

  • -Dlibhipcxx_ENABLE_CMAKE_TESTS=OFF
    .
  • A new libhipcxx_tests subproject builds the same source with tests on, after prim. It is

  • declared only when THEROCK_BUILD_TESTING and THEROCK_ENABLE_PRIM are on.
  • artifact-libhipcxx.toml: the test component comes from math-libs/libhipcxx_tests/build

  • and is marked optional.
  • build_tools/packaging/linux/package.json: amdrocm-ccl-test selects the libhipcxx test files

  • by the libhipcxx_tests subdirectory.

    rocThrust optional libhipcxx backend

  • At the current rocm-libraries pin, rocThrust links libhipcxx::libhipcxx when it finds

  • libhipcxx, but its exported package config does not find_package(libhipcxx), so consumers of
    the installed rocThrust would fail. hipCCL, hipCCL_tests and the legacy rocThrust
    subproject (THEROCK_FLAG_BUILD_HIPCCL=OFF) pass -DROCTHRUST_USE_LIBHIPCXX=OFF, keeping
    rocThrust's behavior on main.
  • The export is fixed in ROCm/rocm-libraries#16372 (3.1-staging). At pins with the hipccl3 3.1

  • changes the option no longer exists and the flag is unused; it can be removed once the pin
    includes that fix.
  • libhipcxx stays in hipCCL's BUILD_DEPS: a subproject only receives packages from its own

  • runtime dependencies and its direct BUILD_DEPS, so RUNTIME_DEPS would not expose libhipcxx
    to hipCCL's consumers, none of which use the rocThrust or hipCUB package configs.

    Artifact install script

  • build_tools/install_rocm_from_artifacts.py: --prim --dev also fetches libhipcxx_dev,

  • since the installed rocThrust and hipCUB configs depend on libhipcxx. Unit tests added.

    Consumer graph

  • test_tools/therock_consumer_graph.json: hipccl and hipccl_tests are consumers of

  • libhipcxx, and the libhipcxx_tests node is added.

    Test Plan

  • Multi-Arch CI: Math Libs stages (Linux and Windows) build hipCCL, libhipcxx and

  • libhipcxx_tests; libhipcxx_amdclang, libhipcxx_hiprtc and the rocPRIM, hipCUB and rocThrust
    tests pass; DEB/RPM build and install tests and the consumer-graph drift check pass.
  • build_tools/tests/install_rocm_from_artifacts_test.py and the build_tools/packaging/linux

  • unit tests pass.
  • The rocThrust export fix (ROCm/rocm-libraries#16372) was checked by building hipccl3 at the

  • 3.1-staging tip: a plain find_package(rocthrust) consumer fails without the fix and
    configures, compiles and links with it.

    Submission Checklist

  • Look over the contributing guidelines at https://github.com/ROCm/TheRock/blob/main/CONTRIBUTING.md.
  • JIRA ID: AIPRIMS-258

    Diff: 458 lines (+343 / -115) across 5 files Reviewer: ammallya Review duration: 9714m
    All Vouch review confidence checks passed
    Residual risk 0.18 = Change Risk (0.46) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.46 · 458 lines diff across 5 files
    0.46
    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.367
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #9963"
    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: 45.5% (MEDIUM) · Higher = larger blast radius
    45.5%
    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: 18.0% · Safe to merge
    18.0%
    Repository