Skip to content

Commit

Permalink
fix illegal memory access
Browse files Browse the repository at this point in the history
  • Loading branch information
jnke2016 committed Oct 22, 2024
1 parent c0a618f commit 965001b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion cpp/src/sampling/detail/conversion_utilities.cu
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ rmm::device_uvector<int32_t> flatten_label_map(
label_t{0},
thrust::maximum<label_t>());

label_map.resize(max_label, handle.get_stream());
label_map.resize(max_label + 1, handle.get_stream());

thrust::fill(handle.get_thrust_policy(), label_map.begin(), label_map.end(), int32_t{0});
thrust::scatter(handle.get_thrust_policy(),
Expand Down
6 changes: 3 additions & 3 deletions cpp/src/sampling/detail/conversion_utilities_impl.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,10 @@ rmm::device_uvector<int32_t> flatten_label_map(
label_t{0},
thrust::maximum<label_t>());

label_map.resize(max_label, handle.get_stream());
label_map.resize(max_label + 1, handle.get_stream());

thrust::fill(handle.get_thrust_policy(), label_map.begin(), label_map.end(), label_t{0});
thrust::gather(handle.get_thrust_policy(),
thrust::fill(handle.get_thrust_policy(), label_map.begin(), label_map.end(), int32_t{0});
thrust::scatter(handle.get_thrust_policy(),
std::get<0>(label_to_output_comm_rank).begin(),
std::get<0>(label_to_output_comm_rank).end(),
std::get<1>(label_to_output_comm_rank).begin(),
Expand Down

0 comments on commit 965001b

Please sign in to comment.