Skip to content

Commit

Permalink
cugraph_c ensure host memory has finished copy before giving to user
Browse files Browse the repository at this point in the history
Previously we just staged the copy onto the stream, with no promise
that the copy would be completed by the time the caller dereferences
it.
  • Loading branch information
robertmaynard committed Jul 13, 2023
1 parent 3a0575b commit 217736a
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions cpp/src/c_api/array.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -356,6 +356,7 @@ extern "C" cugraph_error_code_t cugraph_type_erased_device_array_view_copy_to_ho
reinterpret_cast<byte_t const*>(internal_pointer->data_),
internal_pointer->num_bytes(),
p_handle->handle_->get_stream());
p_handle->handle_->sync_stream();

return CUGRAPH_SUCCESS;
} catch (std::exception const& ex) {
Expand Down

0 comments on commit 217736a

Please sign in to comment.