Refactor Graph 500 BFS code and replace thrust::tuple with cuda::std::tuple#5235
Conversation
…to enh_graph500_bfs
…ces, as this doesn't help GRAPH 500 BFS performance with forest pruning anymore, too much code complication for only marginal performance improvements)
…to enh_graph500_bfs
…o shuffling local edge srcs|dsts
…:std::tuple, cuda::std::make_tuple, and cuda::std::get
ChuckHastings
left a comment
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
"unqiue" -> "unique"
There was a problem hiding this comment.
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 */ |
There was a problem hiding this comment.
"uqniues" -> "uniques"
| handle.get_stream()); | ||
| second_half_uniques.shrink_to_fit(handle.get_stream()); | ||
|
|
||
| /* find the final uqniues */ |
There was a problem hiding this comment.
"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 |
There was a problem hiding this comment.
"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( |
There was a problem hiding this comment.
"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; |
There was a problem hiding this comment.
Do you have to worry about overflow?
There was a problem hiding this comment.
This is for hashing (mainly for randomization based partitioning of edges) and just taking lower bits are sufficient.
|
/merge |
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).