Skip to content

refactor C++ examples for new RAPIDS branching strategy - #5423

Merged
rapids-bot[bot] merged 5 commits into
rapidsai:mainfrom
jameslamb:new-branching-strategy
Feb 17, 2026
Merged

refactor C++ examples for new RAPIDS branching strategy#5423
rapids-bot[bot] merged 5 commits into
rapidsai:mainfrom
jameslamb:new-branching-strategy

Conversation

@jameslamb

@jameslamb jameslamb commented Feb 9, 2026

Copy link
Copy Markdown
Member

Contributes to rapidsai/build-planning#224

In the new RAPIDS branching strategy (https://docs.rapids.ai/notices/rsn0047/), the default development branch is main and releases are finalized on branches named release/{YY.MM}.

Changes to the C++ examples to react to that:

  • use a version from the VERSION file and a branch from the RAPIDS_BRANCH file (previously was hard-coded to branch-23.12)
  • other misc. refactoring to fix docs and build script

Notes for Reviewers

How I tested this

Opened a cuad12.9-conda devcontainer and ran the following:

build-cugraph-cpp
cd ./cugraph/cpp/examples
./build.sh all

@jameslamb jameslamb added improvement Improvement / enhancement to an existing function non-breaking Non-breaking change labels Feb 9, 2026
@copy-pr-bot

copy-pr-bot Bot commented Feb 9, 2026

Copy link
Copy Markdown

Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually.

Contributors can view more details about this message here.

@jameslamb jameslamb changed the title WIP: refactor update-version.sh, C++ examples for new RAPIDS branching strategy WIP: refactor C++ examples for new RAPIDS branching strategy Feb 9, 2026
include(rapids-cuda)
include(rapids-find)

rapids_cuda_init_architectures(graph_operations)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Without this, compiling the examples failed like this:

-- The CXX compiler identification is GNU 14.3.0
CMake Error at /home/coder/.conda/envs/rapids/share/cmake-4.2/Modules/Internal/CMakeCUDAArchitecturesValidate.cmake:14 (message):
  CMAKE_CUDA_ARCHITECTURES:

    RAPIDS

  is not one of the following:

    * a semicolon-separated list of integers, each optionally
      followed by '-real' or '-virtual'
    * a special value: all, all-major, native

Not sure how this was working before.

include(${CMAKE_CURRENT_LIST_DIR}/../../../../cmake/rapids_config.cmake)
include(rapids-cmake)
include(rapids-cuda)
include(rapids-find)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Each example invoking get_nccl.cmake needs rapids-find, to avoid:

-- Found MPI: TRUE (found version "3.1") found components: CXX
CMake Error at /home/coder/cugraph/cpp/cmake/thirdparty/get_nccl.cmake:12 (rapids_find_generate_module):
  Unknown CMake command "rapids_find_generate_module".
Call Stack (most recent call first):
  /home/coder/cugraph/cpp/cmake/thirdparty/get_nccl.cmake:23 (find_and_configure_nccl)
  CMakeLists.txt:23 (include)


project(
mg_graph_algorithms
sg_graph_algorithms

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This one seemed like a typo.

Comment thread cpp/examples/build.sh
--help
"

VERBOSE_FLAG=""

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Running ./build.sh all without supplying -v, CMake errored out like:

Unrecognized option: 

(or similar, forgot to save the exact error).

Basically, passing through an empty string looked to CMake like an additional, empty command-line argument.

The changes I've made here avoid that.

GIT_TAG ${CUGRAPH_TAG}
NAME cugraph
VERSION ${RAPIDS_VERSION}
FIND_PACKAGE_ARGUMENTS "PATHS ${cugraph_ROOT} ${cugraph_ROOT}/latest" GIT_REPOSITORY

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stole this from cuDF:

https://github.com/rapidsai/cudf/blob/243e39ac33eb9e4beb41cf4e96763df1faa33096/cpp/examples/fetch_dependencies.cmake#L21

This helps CPMFindpackage() find your locall-built cuGraph in cugraph/cpp/build/, so it doesn't clone down a copy of the repo and recompile it.

Confirmed locally (see "How I tested this" in the PR description):

...
-- CPM: Using local package cugraph@26.04.0
...

cpp
)

include(../../../../cmake/rapids_config.cmake)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Moved these into each CMakeLists.txt.

rapids-cmake needs to be pulled in before the project() call to run rapids_init_cuda_architectures(), so it shouldn't happen in this shared file that's included after project().

@jameslamb

Copy link
Copy Markdown
Member Author

I think NVIDIA/raft#2913 broke builds here

/home/coder/cugraph/cpp/build/pip/cuda-13.1/release/_deps/raft-src/cpp/include/raft/util/vectorized_kvp.cuh(31): error: this declaration has no storage class or type specifier
  requires(sizeof(KeyValuePair<K, V>) == 4) struct IOType<KeyValuePair<K, V>, 1> {

(build link)

@jameslamb jameslamb changed the title WIP: refactor C++ examples for new RAPIDS branching strategy refactor C++ examples for new RAPIDS branching strategy Feb 12, 2026
@jameslamb
jameslamb marked this pull request as ready for review February 12, 2026 04:12
@jameslamb
jameslamb requested review from a team as code owners February 12, 2026 04:12

@bdice bdice left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we build these examples in CI? Might be a good follow-up.

@acostadon acostadon left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great

@jameslamb

Copy link
Copy Markdown
Member Author

Do we build these examples in CI? Might be a good follow-up.

We do not, and I don't see an open issue tracking that. Added one here: #5427

I'll let cuGraph developers decide on the priority of that one.

@jameslamb

Copy link
Copy Markdown
Member Author

2 of the 3 failing CI jobs are on RTX Pro 6000s, which should be skipped once we can get #5422 merged (I just restarted CI there again).

The other one is a test timeout that I suspect will be resolved on a re-run.

@ChuckHastings

Copy link
Copy Markdown
Collaborator

/merge

@rapids-bot
rapids-bot Bot merged commit 81b86e4 into rapidsai:main Feb 17, 2026
145 of 147 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

improvement Improvement / enhancement to an existing function non-breaking Non-breaking change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants