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 d98a9d0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cpp/src/c_api/array.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,8 @@ 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) {
auto tmp_error = new cugraph::c_api::cugraph_error_t{ex.what()};
Expand Down

0 comments on commit d98a9d0

Please sign in to comment.