Skip to content

Commit

Permalink
Merge pull request #6713 from nvdbaranec/get_value_fix
Browse files Browse the repository at this point in the history
[REVIEW] Add missing call to cudaStreamSynchronize() in get_value()
  • Loading branch information
jrhemstad authored Nov 13, 2020
2 parents 400d9a7 + e82294c commit fb789bf
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@
- PR #6693 Fix issue related to `na_values` input in `read_csv`
- PR #6701 Fix issue when `numpy.str_` is given as input to string parameters in io APIs
- PR #6704 Fix leak warnings in JNI unit tests
- PR #6713 Fix missing call to cudaStreamSynchronize in get_value
- PR #6708 Apply `na_rep` to column names in csv writer
- PR #6720 Fix implementation of `dtype` parameter in `cudf.read_csv`
- PR #6721 Add missing serialization methods for ListColumn
Expand Down
4 changes: 3 additions & 1 deletion cpp/include/cudf/detail/get_value.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ namespace detail {
/**
* @brief Return a fixed-width value from column.
*
* This will retrieve the specified value from device memory.
* Retrieves the specified value from device memory. This function
* synchronizes the stream.
*
* @throw cudf::logic_error if `col_view` is not a fixed-width column
* @throw cudf::logic_error if `element_index < 0 or >= col_view.size()`
Expand All @@ -47,6 +48,7 @@ T get_value(column_view const& col_view, size_type element_index, cudaStream_t s
T result;
CUDA_TRY(cudaMemcpyAsync(
&result, col_view.data<T>() + element_index, sizeof(T), cudaMemcpyDeviceToHost, stream));
CUDA_TRY(cudaStreamSynchronize(stream));
return result;
}

Expand Down

0 comments on commit fb789bf

Please sign in to comment.