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 Mar 5, 2024
1 parent 73e04e2 commit 909cad8
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 @@ -69,6 +69,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 @@ -88,6 +89,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 909cad8

Please sign in to comment.