Skip to content

Refactor Graph 500 BFS code and replace thrust::tuple with cuda::std::tuple#5235

Merged
rapids-bot[bot] merged 36 commits into
rapidsai:branch-25.10from
seunghwak:enh_graph500_bfs
Aug 22, 2025
Merged

Refactor Graph 500 BFS code and replace thrust::tuple with cuda::std::tuple#5235
rapids-bot[bot] merged 36 commits into
rapidsai:branch-25.10from
seunghwak:enh_graph500_bfs

Conversation

@seunghwak
Copy link
Copy Markdown
Contributor

@seunghwak seunghwak commented Aug 21, 2025

Graph 500 BFS updates

and

replace thrust::tuple, thrust::make_tuple, thrust::get with cuda::std::tuple, cuda::std::make_tuple, cuda::std::get (#5226 did this migration but there were multiple remaining ones).

…:std::tuple, cuda::std::make_tuple, and cuda::std::get
@seunghwak seunghwak requested a review from a team as a code owner August 21, 2025 20:53
@seunghwak seunghwak added improvement Improvement / enhancement to an existing function non-breaking Non-breaking change labels Aug 21, 2025
@seunghwak seunghwak added this to the 25.10 milestone Aug 21, 2025
Copy link
Copy Markdown
Collaborator

@ChuckHastings ChuckHastings left a comment

Choose a reason for hiding this comment

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

A few minor spelling items and a question. Otherwise looks good.

std::optional<large_buffer_type_t> large_buffer_type)
{
if (vertices.size() > mem_frugal_threshold) { // halve the temporary memory usage compared to the
// simple copy & sort & unqiue approach
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

"unqiue" -> "unique"

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Thanks for finding all the typos, I will fix it.

handle.get_stream());
first_half_uniques.shrink_to_fit(handle.get_stream());

/* find uqniues in the second half */
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

"uqniues" -> "uniques"

handle.get_stream());
second_half_uniques.shrink_to_fit(handle.get_stream());

/* find the final uqniues */
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

"uqniues" -> "uniques"

vertex_t local_vertex_partition_range_first,
int vertex_partition_id)
{
// note that updaing mg_w_to_predecessors can happen outside the timed part (as this is just used
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

"updaing" -> "updating"

gather_offset_first + remaining_vertices.size(),
parents.begin(),
remaining_vertex_parents.begin());
auto remaing_vertex_parent_dists = cugraph::collect_values_for_int_vertices(
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

"remaing_vertex_parent_dists" -> "remaining_vertex_parent_dists"

cuco::murmurhash3_32<vertex_t> hash_func{};
auto hash0 = hash_func(cuda::std::get<0>(pair));
auto hash1 = hash_func(cuda::std::get<1>(pair));
return hash0 + hash1;
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Do you have to worry about overflow?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This is for hashing (mainly for randomization based partitioning of edges) and just taking lower bits are sufficient.

@ChuckHastings
Copy link
Copy Markdown
Collaborator

/merge

@rapids-bot rapids-bot Bot merged commit 6ca16f4 into rapidsai:branch-25.10 Aug 22, 2025
65 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.

2 participants