Skip to content

Commit

Permalink
Bug fix for decompressing partial edge list and using (key, value) pa…
Browse files Browse the repository at this point in the history
…irs for major properties. (rapidsai#2366)

Authors:
  - Seunghwa Kang (https://github.com/seunghwak)

Approvers:
  - Chuck Hastings (https://github.com/ChuckHastings)

URL: rapidsai#2366
  • Loading branch information
seunghwak authored Jun 23, 2022
1 parent b4a4160 commit fa701f5
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion cpp/include/cugraph/detail/decompress_edge_partition.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,7 @@ void partially_decompress_edge_partition_to_fill_edgelist(
thrust::fill(
thrust::seq, majors + major_offset, majors + major_offset + local_degree, major);
thrust::copy(thrust::seq, indices, indices + local_degree, minors + major_offset);
if (weights)
if (output_weights)
thrust::copy(
thrust::seq, *weights, *weights + local_degree, *output_weights + major_offset);

Expand Down
2 changes: 1 addition & 1 deletion cpp/include/cugraph/graph.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ class graph_t<vertex_t, edge_t, weight_t, store_transposed, multi_gpu, std::enab
local_sorted_unique_edge_src_chunk_start_offsets =
std::vector<raft::device_span<vertex_t const>>(
(*local_sorted_unique_edge_src_chunk_start_offsets_).size());
for (size_t i = 0; (*local_sorted_unique_edge_srcs).size(); ++i) {
for (size_t i = 0; i < (*local_sorted_unique_edge_srcs).size(); ++i) {
(*local_sorted_unique_edge_srcs)[i] =
raft::device_span<vertex_t const>((*local_sorted_unique_edge_srcs_)[i].begin(),
(*local_sorted_unique_edge_srcs_)[i].end());
Expand Down
4 changes: 4 additions & 0 deletions cpp/src/structure/graph_impl.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -638,6 +638,10 @@ update_local_sorted_unique_edge_majors_minors(
auto const chunk_size =
std::min(static_cast<size_t>(1.0 / max_major_properties_fill_ratio), size_t{1024});

local_sorted_unique_edge_majors = std::vector<rmm::device_uvector<vertex_t>>{};
local_sorted_unique_edge_major_chunk_start_offsets =
std::vector<rmm::device_uvector<vertex_t>>{};

(*local_sorted_unique_edge_majors).reserve(edge_partition_offsets.size());
(*local_sorted_unique_edge_major_chunk_start_offsets).reserve(edge_partition_offsets.size());
for (size_t i = 0; i < edge_partition_offsets.size(); ++i) {
Expand Down

0 comments on commit fa701f5

Please sign in to comment.