From 4d3f8c1f348c7646a98b6660a784ca84ccefbae3 Mon Sep 17 00:00:00 2001 From: jnke2016 Date: Tue, 26 Nov 2024 15:56:22 -0800 Subject: [PATCH] properly handle sampling with multiple edge types --- cpp/src/sampling/neighbor_sampling_impl.hpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/cpp/src/sampling/neighbor_sampling_impl.hpp b/cpp/src/sampling/neighbor_sampling_impl.hpp index a09cf757a5..8b0b6fe5c8 100644 --- a/cpp/src/sampling/neighbor_sampling_impl.hpp +++ b/cpp/src/sampling/neighbor_sampling_impl.hpp @@ -252,8 +252,12 @@ neighbor_sample_impl(raft::handle_t const& handle, if (labels) { (*level_result_label_vectors).push_back(std::move(*labels)); } if (num_edge_types > 1) { modified_graph_view.clear_edge_mask(); } + + //vector.push_back (raft::device_span(vertex_t const)) //<- // level_result_dst_vectors } + + // Call prepare frontier for each hop. FIXME // FIXME: We should modify vertex_partition_range_lasts to return a raft::host_span // rather than making a copy. auto vertex_partition_range_lasts = modified_graph_view.vertex_partition_range_lasts(); @@ -262,7 +266,7 @@ neighbor_sample_impl(raft::handle_t const& handle, handle, starting_vertices, starting_vertex_labels, - raft::device_span{level_result_dst_vectors.back().data(), + raft::device_span{level_result_dst_vectors.back().data(), // define a vector . level_result_dst_vectors.back().size()}, frontier_vertex_labels ? std::make_optional(raft::device_span(