From a77840eac34e529bf4a76e6fa3907fea5fef15c0 Mon Sep 17 00:00:00 2001 From: Chuck Hastings <45364586+ChuckHastings@users.noreply.github.com> Date: Wed, 15 May 2024 00:33:25 -0400 Subject: [PATCH] BFS fix for exec_policy (#4417) Shouldn't be constructing rmm::exec_policy from another rmm::exec_policy. Recent raft change causes this to not compile, but we shouldn't have been doing this in the first place. Authors: - Chuck Hastings (https://github.com/ChuckHastings) Approvers: - Seunghwa Kang (https://github.com/seunghwak) - Naim (https://github.com/naimnv) URL: https://github.com/rapidsai/cugraph/pull/4417 --- cpp/src/traversal/bfs_impl.cuh | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/cpp/src/traversal/bfs_impl.cuh b/cpp/src/traversal/bfs_impl.cuh index 1f6f29d8683..fb837484a14 100644 --- a/cpp/src/traversal/bfs_impl.cuh +++ b/cpp/src/traversal/bfs_impl.cuh @@ -31,8 +31,6 @@ #include -#include - #include #include #include @@ -149,11 +147,11 @@ void bfs(raft::handle_t const& handle, auto constexpr invalid_distance = std::numeric_limits::max(); auto constexpr invalid_vertex = invalid_vertex_id::value; - thrust::fill(rmm::exec_policy(handle.get_thrust_policy()), + thrust::fill(handle.get_thrust_policy(), distances, distances + push_graph_view.local_vertex_partition_range_size(), invalid_distance); - thrust::fill(rmm::exec_policy(handle.get_thrust_policy()), + thrust::fill(handle.get_thrust_policy(), predecessor_first, predecessor_first + push_graph_view.local_vertex_partition_range_size(), invalid_vertex); @@ -161,7 +159,7 @@ void bfs(raft::handle_t const& handle, push_graph_view.local_vertex_partition_view()); if (n_sources) { thrust::for_each( - rmm::exec_policy(handle.get_thrust_policy()), + handle.get_thrust_policy(), sources, sources + n_sources, [vertex_partition, distances, predecessor_first] __device__(auto v) {