From 6917d9f540622bedd82ceb3b56eeb6691c5fa906 Mon Sep 17 00:00:00 2001 From: David Wendt Date: Thu, 21 Sep 2023 13:51:40 -0400 Subject: [PATCH 1/2] Fix calls to copy_bitmask to pass stream parameter --- cpp/src/lists/count_elements.cu | 4 ++-- cpp/src/replace/clamp.cu | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/cpp/src/lists/count_elements.cu b/cpp/src/lists/count_elements.cu index f8e7b4c6126..1de116a7413 100644 --- a/cpp/src/lists/count_elements.cu +++ b/cpp/src/lists/count_elements.cu @@ -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. @@ -52,7 +52,7 @@ std::unique_ptr count_elements(lists_column_view const& input, // create output column auto output = make_fixed_width_column(data_type{type_to_id()}, input.size(), - copy_bitmask(input.parent()), + copy_bitmask(input.parent(), stream, mr), input.null_count(), stream, mr); diff --git a/cpp/src/replace/clamp.cu b/cpp/src/replace/clamp.cu index 2b48aed2d29..cc9bc637bb3 100644 --- a/cpp/src/replace/clamp.cu +++ b/cpp/src/replace/clamp.cu @@ -163,7 +163,9 @@ std::enable_if_t(), std::unique_ptr> 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(copy_bitmask(input, stream, mr), input.null_count()); + } auto output_device_view = cudf::mutable_column_device_view::create(output->mutable_view(), stream); From 28f6fd51fdb25b09f0faf89d78682015fcf1df01 Mon Sep 17 00:00:00 2001 From: David Wendt Date: Thu, 21 Sep 2023 16:30:08 -0400 Subject: [PATCH 2/2] add detail:: namespace to copy_bitmask calls --- cpp/src/lists/count_elements.cu | 10 +++++----- cpp/src/replace/clamp.cu | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/cpp/src/lists/count_elements.cu b/cpp/src/lists/count_elements.cu index 1de116a7413..40a14d805e1 100644 --- a/cpp/src/lists/count_elements.cu +++ b/cpp/src/lists/count_elements.cu @@ -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 count_elements(lists_column_view const& input, rmm::cuda_stream_view stream, @@ -52,7 +52,7 @@ std::unique_ptr count_elements(lists_column_view const& input, // create output column auto output = make_fixed_width_column(data_type{type_to_id()}, input.size(), - copy_bitmask(input.parent(), stream, mr), + cudf::detail::copy_bitmask(input.parent(), stream, mr), input.null_count(), stream, mr); diff --git a/cpp/src/replace/clamp.cu b/cpp/src/replace/clamp.cu index cc9bc637bb3..950cb484ddf 100644 --- a/cpp/src/replace/clamp.cu +++ b/cpp/src/replace/clamp.cu @@ -164,7 +164,7 @@ std::enable_if_t(), std::unique_ptr> clamp 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, stream, mr), input.null_count()); + output->set_null_mask(cudf::detail::copy_bitmask(input, stream, mr), input.null_count()); } auto output_device_view =