Skip to content

Commit

Permalink
fix device to host copy not sync stream
Browse files Browse the repository at this point in the history
  • Loading branch information
lijinf2 committed Feb 27, 2024
1 parent ec75703 commit 7bf294a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions cpp/src/glm/qn_mg.cu
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ std::vector<T> distinct_mg(const raft::handle_t& handle, T* y, size_t n)

std::vector<size_t> recv_counts_host(n_ranks);
raft::copy(recv_counts_host.data(), recv_counts.data(), n_ranks, stream);
raft::resource::sync_stream(handle);

std::vector<size_t> displs(n_ranks);
size_t pos = 0;
Expand All @@ -84,6 +85,7 @@ std::vector<T> distinct_mg(const raft::handle_t& handle, T* y, size_t n)

std::vector<T> global_unique_y_host(global_unique_y.size());
raft::copy(global_unique_y_host.data(), global_unique_y.data(), global_unique_y.size(), stream);
raft::resource::sync_stream(handle);

return global_unique_y_host;
}
Expand Down

0 comments on commit 7bf294a

Please sign in to comment.