Skip to content

Add a non-type template paramter bool dynamic (= false) to graph_t and graph_view_t - #5754

Merged
rapids-bot[bot] merged 72 commits into
rapidsai:mainfrom
seunghwak:fea_dynamic_graph_t
Nov 24, 2026
Merged

rapids-bot[bot] merged 72 commits into
rapidsai:mainfrom
seunghwak:fea_dynamic_graph_t

Conversation

@seunghwak

@seunghwak seunghwak commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

This PR is step 3 of the dynamic graph plan: it adds a non-type template parameter bool dynamic to graph_t and graph_view_t, defaulting to false. Only the static path (dynamic = false) is implemented. dynamic = true is a placeholder for the upcoming dynamic graph support (edge/vertex insertion and deletion).

Changes

  • graph_t and graph_view_t take bool dynamic = false as a fifth template parameter, replacing the unused typename Enable = void. The multi-GPU and single-GPU specializations are now written with literal true/false instead of std::enable_if_t, and both expose static constexpr bool is_dynamic.
  • The topology members move into storage structs in cugraph::detail, selected with std::conditional_t<dynamic, ...>:
    • detail::static_graph_t / detail::static_graph_view_t hold the existing members (multi-GPU and single-GPU versions).
    • detail::dynamic_graph_t / detail::dynamic_graph_view_t are placeholders.
    • edge_mask_view_ stays in graph_view_t.
  • Constructors that take CSR/CSC data and graph_t::view() are constrained with requires(!dynamic).
  • graph_meta_t moves to cugraph::detail.
  • eidecl_graph.hpp is removed. The extern template declarations were redundant with the explicit instantiations, and removing them does not change the set of exported graph_t/graph_view_t functionality.

Existing code that names graph_t<vertex_t, edge_t, store_transposed, multi_gpu> or graph_view_t<...> with four arguments is unaffected, and the explicit instantiations use the default dynamic = false. Algorithm and primitive signatures are unchanged; they will gain dynamic support as dynamic graphs are implemented.

Breaking changes (C++ only)

  • cugraph::graph_meta_t is now cugraph::detail::graph_meta_t.
  • <cugraph/eidecl_graph.hpp> no longer exists.

@seunghwak
seunghwak requested a review from a team as a code owner November 19, 2026 19:23
@copy-pr-bot

copy-pr-bot Bot commented Nov 19, 2026

Copy link
Copy Markdown

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@seunghwak seunghwak changed the title [WIP] Add a non-type template paramter bool dynamic (= false) to graph_t and graph_view_t Add a non-type template paramter bool dynamic (= false) to graph_t and graph_view_t Nov 19, 2026
@seunghwak seunghwak self-assigned this Nov 19, 2026
@seunghwak seunghwak added feature request New feature or request breaking Breaking change labels Nov 19, 2026
@seunghwak

Copy link
Copy Markdown
Contributor Author

/ok to test 9f63d3f

@seunghwak

Copy link
Copy Markdown
Contributor Author

/ok to test 50e4871

@seunghwak

Copy link
Copy Markdown
Contributor Author

/ok to test 020c60e

@ChuckHastings

Copy link
Copy Markdown
Collaborator

/merge

@rapids-bot
rapids-bot Bot merged commit d927a8c into rapidsai:main Nov 24, 2026
144 of 149 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

breaking Breaking change feature request New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants