Skip to content

Commit

Permalink
Expose stream-ordering in replace API (#17436)
Browse files Browse the repository at this point in the history
Adds stream parameter to
```
cudf::normalize_nans_and_zeros
```
Reference: #13744

Authors:
  - Shruti Shivakumar (https://github.com/shrshi)

Approvers:
  - MithunR (https://github.com/mythrocks)
  - Nghia Truong (https://github.com/ttnghia)

URL: #17436
  • Loading branch information
shrshi authored Dec 1, 2024
1 parent b084d74 commit 4de7e7a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion cpp/src/replace/nans.cu
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ std::unique_ptr<column> normalize_nans_and_zeros(column_view const& input,
void normalize_nans_and_zeros(mutable_column_view& in_out, rmm::cuda_stream_view stream)
{
CUDF_FUNC_RANGE();
detail::normalize_nans_and_zeros(in_out, cudf::get_default_stream());
detail::normalize_nans_and_zeros(in_out, stream);
}

} // namespace cudf
4 changes: 2 additions & 2 deletions cpp/tests/streams/replace_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,6 @@ TEST_F(ReplaceTest, NormalizeNansAndZerosMutable)
auto nan = std::numeric_limits<double>::quiet_NaN();
auto input_column = cudf::test::make_type_param_vector<double>({-0.0, 0.0, -nan, nan, nan});
cudf::test::fixed_width_column_wrapper<double> input(input_column.begin(), input_column.end());
cudf::normalize_nans_and_zeros(static_cast<cudf::mutable_column_view>(input),
cudf::test::get_default_stream());
cudf::mutable_column_view mutable_view = cudf::column(input, cudf::test::get_default_stream());
cudf::normalize_nans_and_zeros(mutable_view, cudf::test::get_default_stream());
}

0 comments on commit 4de7e7a

Please sign in to comment.