From d997656f4e4c5e66fab4e96d493cc507bbb2646b Mon Sep 17 00:00:00 2001 From: jnke2016 Date: Thu, 21 Nov 2024 20:47:35 -0800 Subject: [PATCH] fix illegal memory access --- cpp/src/sampling/neighbor_sampling_impl.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cpp/src/sampling/neighbor_sampling_impl.hpp b/cpp/src/sampling/neighbor_sampling_impl.hpp index 0b20b57d2b..2ddc85a41b 100644 --- a/cpp/src/sampling/neighbor_sampling_impl.hpp +++ b/cpp/src/sampling/neighbor_sampling_impl.hpp @@ -408,7 +408,7 @@ neighbor_sample_impl(raft::handle_t const& handle, thrust::transform(handle.get_thrust_policy(), thrust::make_counting_iterator(0), - thrust::make_counting_iterator(result_offsets->size()), + thrust::make_counting_iterator(result_offsets->size() - 1), result_offsets->begin() + 1, [result_labels = raft::device_span( cp_result_labels->data(), cp_result_labels->size())] __device__(auto idx) {