Skip to content

Store vertex properties in vertex_property_t in preparation for vertex insertion/deletion support - #5707

Open
seunghwak wants to merge 64 commits into
rapidsai:mainfrom
seunghwak:fea_vertex_property
Open

seunghwak wants to merge 64 commits into
rapidsai:mainfrom
seunghwak:fea_vertex_property

Conversation

@seunghwak

@seunghwak seunghwak commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

Add vertex_property_t and migrate C++ APIs to it

We currently store vertex properties in an rmm::device_uvector object, assuming that active vertex IDs are consecutive integers starting from 0. Once we support vertex insertions and deletions, vertex IDs may no longer satisfy this assumption. This PR adds a vertex_property_t abstraction, similar to edge_property_t and edge_src_property_t / edge_dst_property_t. It hides that complexity and lets us change internal data structures later without repeatedly breaking the public API. At first, including the initial dynamic graph implementation, vertex_property_t is just a wrapper around rmm::device_uvector. This is step 2 of the plan in cpp/docs/DYNAMIC_GRAPH_DESIGN.md.

This PR also fixes several inconsistencies in the cuGraph C++ algorithms API, since the API is changing anyway. For example, some algorithms return their results while others take a pointer to write output into. Likewise, some iterative algorithms report the iteration count and whether they converged, while others don't.

Changes

  • New types: vertex_property_t, vertex_property_view_t, and vertex_property_device_view_t (for device lambdas).
  • Primitives:
    • New per-vertex prims: transform_v, transform_if_v, fill_v, copy_v, sequence_v, scatter_v, scatter_if_v, gather_v and extract_transform_if_v; these new primitives are largely thrust wrappers but takes the inputs/outputs in vertex_property_view_t.
    • Existing prims that work over the whole local vertex range now take vertex property views instead of iterators. These include reduce_v, count_if_v, transform_reduce_v, update_edge_src_property / update_edge_dst_property, update_v_frontier and the per_v_transform_reduce_* family. Their iterator overloads were replaced, not deprecated.
  • Public APIs (algorithms.hpp, graph_functions.hpp, sampling_functions.hpp):
    • Each affected function gets a new overload taking and/or returning vertex_property_t / vertex_property_view_t, and the old overload is marked @deprecated.
    • This covers centrality and link analysis, traversal, community detection, core and k-truss related functions, renumbering, graph transforms, degree and weight-sum computations, and negative_sampling.
    • sssp is renamed to shortest_paths.
    • dendrogram_t now stores its levels as vertex_property_t; Dendrogram remains as a deprecated alias.
  • Consistency:
    • Results are returned rather than written through output pointers.
    • Iterative algorithms return metadata with the iteration count and convergence status.
    • do_expensive_check (default false) is added to every non-deprecated, non-legacy function in algorithms.hpp and graph_functions.hpp that lacked it.
    • rng_state now always comes right after handle.
    • Declarations with no definition and functions already deprecated upstream are removed.

Compatibility notes

  • Ambiguous calls: for pagerank, eigenvector_centrality, symmetrize_graph, transpose_graph and transpose_graph_storage, a call with explicit template arguments and a bare std::nullopt is now ambiguous. Passing a typed optional selects the deprecated overload.
  • Dendrogram: its old raw-pointer member functions were replaced.
  • Not changed: strongly_connected_components (left alone for the pending SCC PR) and MTMG.

@copy-pr-bot

copy-pr-bot Bot commented Oct 15, 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 self-assigned this Oct 15, 2026
@seunghwak seunghwak added improvement Improvement / enhancement to an existing function breaking Breaking change labels Oct 15, 2026
@seunghwak
seunghwak marked this pull request as ready for review October 22, 2026 19:44
@seunghwak
seunghwak requested review from a team as code owners October 22, 2026 19:44
@seunghwak

Copy link
Copy Markdown
Contributor Author

/ok to test 5c93a22

@seunghwak seunghwak changed the title [WIP] Store vertex properties in vertex_property_t in preparation for vertex insertion/deletion support Store vertex properties in vertex_property_t in preparation for vertex insertion/deletion support Oct 22, 2026
@seunghwak

Copy link
Copy Markdown
Contributor Author

/ok to test 7e06c04

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

breaking Breaking change improvement Improvement / enhancement to an existing function

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant