diff --git a/cpp/src/sampling/detail/sampling_utils_impl.cuh b/cpp/src/sampling/detail/sampling_utils_impl.cuh index 35a67d842cc..990eedcd733 100644 --- a/cpp/src/sampling/detail/sampling_utils_impl.cuh +++ b/cpp/src/sampling/detail/sampling_utils_impl.cuh @@ -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;