Skip to content

Commit

Permalink
Fix sampling bug (#2343)
Browse files Browse the repository at this point in the history
@jnke2016 found a bug in the sampling code.

Fix weight lookup to match index lookup.  The weight array mirrors the indices array in its structure, but the computation to do the lookup was correct for the indices array but incorrect for the weights array.

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

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

URL: #2343
  • Loading branch information
ChuckHastings authored Jun 6, 2022
1 parent a1c9141 commit 00b8344
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cpp/src/sampling/detail/sampling_utils_impl.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -528,7 +528,7 @@ gather_local_edges(
edge_index_first[index] = g_dst_index - g_degree_offset + glbl_adj_list_offsets[location];
if (weights != nullptr) {
weight_t const* edge_weights = *(partitions[partition_id].weights()) + sparse_offset;
weights[index] = edge_weights[g_dst_index];
weights[index] = edge_weights[g_dst_index - g_degree_offset];
}
} else {
minors[index] = invalid_vertex_id;
Expand Down

0 comments on commit 00b8344

Please sign in to comment.