Skip to content

Commit

Permalink
Fix calls to copy_bitmask to pass stream parameter (#14158)
Browse files Browse the repository at this point in the history
Fixes a couple places where `cudf::copy_bitmask` was called instead of `cudf::detail::copy_bitmask` to pass the available stream (and mr) parameters.

Found while reviewing #14121
Reference: #14121 (comment)

Authors:
  - David Wendt (https://github.com/davidwendt)

Approvers:
  - Bradley Dice (https://github.com/bdice)
  - MithunR (https://github.com/mythrocks)

URL: #14158
  • Loading branch information
davidwendt authored Sep 22, 2023
1 parent dd58dc4 commit 98b1bc6
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
12 changes: 6 additions & 6 deletions cpp/src/lists/count_elements.cu
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2021-2022, NVIDIA CORPORATION.
* Copyright (c) 2021-2023, NVIDIA CORPORATION.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -36,12 +36,12 @@ namespace cudf {
namespace lists {
namespace detail {
/**
* @brief Returns a numeric column containing lengths of each element.
* @brief Returns a numeric column containing lengths of each element
*
* @param input Input lists column.
* @param stream CUDA stream used for device memory operations and kernel launches.
* @param input Input lists column
* @param stream CUDA stream used for device memory operations and kernel launches
* @param mr Device memory resource used to allocate the returned column's device memory
* @return New INT32 column with lengths.
* @return New size_type column with lengths
*/
std::unique_ptr<column> count_elements(lists_column_view const& input,
rmm::cuda_stream_view stream,
Expand All @@ -52,7 +52,7 @@ std::unique_ptr<column> count_elements(lists_column_view const& input,
// create output column
auto output = make_fixed_width_column(data_type{type_to_id<size_type>()},
input.size(),
copy_bitmask(input.parent()),
cudf::detail::copy_bitmask(input.parent(), stream, mr),
input.null_count(),
stream,
mr);
Expand Down
4 changes: 3 additions & 1 deletion cpp/src/replace/clamp.cu
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,9 @@ std::enable_if_t<cudf::is_fixed_width<T>(), std::unique_ptr<cudf::column>> clamp
auto output =
detail::allocate_like(input, input.size(), mask_allocation_policy::NEVER, stream, mr);
// mask will not change
if (input.nullable()) { output->set_null_mask(copy_bitmask(input), input.null_count()); }
if (input.nullable()) {
output->set_null_mask(cudf::detail::copy_bitmask(input, stream, mr), input.null_count());
}

auto output_device_view =
cudf::mutable_column_device_view::create(output->mutable_view(), stream);
Expand Down

0 comments on commit 98b1bc6

Please sign in to comment.