Skip to content

Commit

Permalink
BFS fix for exec_policy (#4417)
Browse files Browse the repository at this point in the history
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: #4417
  • Loading branch information
ChuckHastings authored May 15, 2024
1 parent b9c0fc6 commit a77840e
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions cpp/src/traversal/bfs_impl.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,6 @@

#include <raft/core/handle.hpp>

#include <rmm/exec_policy.hpp>

#include <thrust/copy.h>
#include <thrust/count.h>
#include <thrust/fill.h>
Expand Down Expand Up @@ -149,19 +147,19 @@ void bfs(raft::handle_t const& handle,
auto constexpr invalid_distance = std::numeric_limits<vertex_t>::max();
auto constexpr invalid_vertex = invalid_vertex_id<vertex_t>::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);
auto vertex_partition = vertex_partition_device_view_t<vertex_t, GraphViewType::is_multi_gpu>(
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) {
Expand Down

0 comments on commit a77840e

Please sign in to comment.