diff --git a/cpp/benchmarks/common/generate_input.cu b/cpp/benchmarks/common/generate_input.cu index 50adab71200..dee7e2b8586 100644 --- a/cpp/benchmarks/common/generate_input.cu +++ b/cpp/benchmarks/common/generate_input.cu @@ -429,8 +429,8 @@ std::unique_ptr create_random_column(data_profile const& profile, null_mask.begin()); } - auto [result_bitmask, null_count] = - cudf::detail::valid_if(null_mask.begin(), null_mask.end(), thrust::identity{}); + auto [result_bitmask, null_count] = cudf::detail::valid_if( + null_mask.begin(), null_mask.end(), thrust::identity{}, cudf::get_default_stream()); return std::make_unique( dtype, @@ -508,8 +508,8 @@ std::unique_ptr create_random_utf8_string_column(data_profile cons thrust::make_zip_iterator(offsets.begin(), offsets.begin() + 1), num_rows, string_generator{chars.data(), engine}); - auto [result_bitmask, null_count] = - cudf::detail::valid_if(null_mask.begin(), null_mask.end() - 1, thrust::identity{}); + auto [result_bitmask, null_count] = cudf::detail::valid_if( + null_mask.begin(), null_mask.end() - 1, thrust::identity{}, cudf::get_default_stream()); return cudf::make_strings_column( num_rows, std::move(offsets), @@ -541,7 +541,8 @@ std::unique_ptr create_random_column(data_profi auto str_table = cudf::detail::gather(cudf::table_view{{sample_strings->view()}}, sample_indices, cudf::out_of_bounds_policy::DONT_CHECK, - cudf::detail::negative_index_policy::NOT_ALLOWED); + cudf::detail::negative_index_policy::NOT_ALLOWED, + cudf::get_default_stream()); return std::move(str_table->release()[0]); } @@ -625,7 +626,8 @@ std::unique_ptr create_random_column(data_profi auto [null_mask, null_count] = [&]() { if (profile.get_null_probability().has_value()) { auto valids = valid_dist(engine, num_rows); - return cudf::detail::valid_if(valids.begin(), valids.end(), thrust::identity{}); + return cudf::detail::valid_if( + valids.begin(), valids.end(), thrust::identity{}, cudf::get_default_stream()); } return std::pair{}; }(); @@ -708,8 +710,8 @@ std::unique_ptr create_random_column(data_profile auto offsets_column = std::make_unique( cudf::data_type{cudf::type_id::INT32}, num_rows + 1, offsets.release()); - auto [null_mask, null_count] = - cudf::detail::valid_if(valids.begin(), valids.end(), thrust::identity{}); + auto [null_mask, null_count] = cudf::detail::valid_if( + valids.begin(), valids.end(), thrust::identity{}, cudf::get_default_stream()); list_column = cudf::make_lists_column( num_rows, std::move(offsets_column), @@ -835,7 +837,8 @@ std::pair create_random_null_mask( } else { return cudf::detail::valid_if(thrust::make_counting_iterator(0), thrust::make_counting_iterator(size), - bool_generator{seed, 1.0 - *null_probability}); + bool_generator{seed, 1.0 - *null_probability}, + cudf::get_default_stream()); } } diff --git a/cpp/benchmarks/iterator/iterator.cu b/cpp/benchmarks/iterator/iterator.cu index 381cbe4824b..73060200d00 100644 --- a/cpp/benchmarks/iterator/iterator.cu +++ b/cpp/benchmarks/iterator/iterator.cu @@ -140,7 +140,8 @@ void BM_iterator(benchmark::State& state) cudf::column_view hasnull_F = wrap_hasnull_F; // Initialize dev_result to false - auto dev_result = cudf::detail::make_zeroed_device_uvector_sync(1); + auto dev_result = + cudf::detail::make_zeroed_device_uvector_sync(1, cudf::get_default_stream()); for (auto _ : state) { cuda_event_timer raii(state, true); // flush_l2_cache = true, stream = 0 if (cub_or_thrust) { @@ -208,7 +209,8 @@ void BM_pair_iterator(benchmark::State& state) cudf::column_view hasnull_T = wrap_hasnull_T; // Initialize dev_result to false - auto dev_result = cudf::detail::make_zeroed_device_uvector_sync>(1); + auto dev_result = cudf::detail::make_zeroed_device_uvector_sync>( + 1, cudf::get_default_stream()); for (auto _ : state) { cuda_event_timer raii(state, true); // flush_l2_cache = true, stream = 0 if (cub_or_thrust) { diff --git a/cpp/benchmarks/join/join_common.hpp b/cpp/benchmarks/join/join_common.hpp index d4fb0862506..ad288edb169 100644 --- a/cpp/benchmarks/join/join_common.hpp +++ b/cpp/benchmarks/join/join_common.hpp @@ -86,7 +86,9 @@ static void BM_join(state_type& state, Join JoinFunc) // roughly 75% nulls auto validity = thrust::make_transform_iterator(thrust::make_counting_iterator(0), null75_generator{}); - return cudf::detail::valid_if(validity, validity + size, thrust::identity{}).first; + return cudf::detail::valid_if( + validity, validity + size, thrust::identity{}, cudf::get_default_stream()) + .first; }; std::unique_ptr build_key_column0 = [&]() { diff --git a/cpp/benchmarks/string/json.cu b/cpp/benchmarks/string/json.cu index 5ee56c3cdae..87528608cc7 100644 --- a/cpp/benchmarks/string/json.cu +++ b/cpp/benchmarks/string/json.cu @@ -177,7 +177,8 @@ auto build_json_string_column(int desired_bytes, int num_rows) auto d_store_order = cudf::column_device_view::create(float_2bool_columns->get_column(2)); json_benchmark_row_builder jb{ desired_bytes, num_rows, {*d_books, *d_bicycles}, *d_book_pct, *d_misc_order, *d_store_order}; - auto children = cudf::strings::detail::make_strings_children(jb, num_rows); + auto children = + cudf::strings::detail::make_strings_children(jb, num_rows, cudf::get_default_stream()); return cudf::make_strings_column( num_rows, std::move(children.first), std::move(children.second), 0, {}); } diff --git a/cpp/include/cudf/binaryop.hpp b/cpp/include/cudf/binaryop.hpp index 554a38e03e5..fabe0d86fc4 100644 --- a/cpp/include/cudf/binaryop.hpp +++ b/cpp/include/cudf/binaryop.hpp @@ -255,7 +255,7 @@ void apply_sorting_struct_binary_op(mutable_column_view& out, bool is_lhs_scalar, bool is_rhs_scalar, binary_operator op, - rmm::cuda_stream_view stream = cudf::get_default_stream()); + rmm::cuda_stream_view stream); } // namespace detail } // namespace compiled } // namespace binops diff --git a/cpp/include/cudf/detail/binaryop.hpp b/cpp/include/cudf/detail/binaryop.hpp index 944f2eef743..ffd8be971ab 100644 --- a/cpp/include/cudf/detail/binaryop.hpp +++ b/cpp/include/cudf/detail/binaryop.hpp @@ -35,7 +35,7 @@ std::unique_ptr binary_operation( column_view const& rhs, std::string const& ptx, data_type output_type, - rmm::cuda_stream_view stream = cudf::get_default_stream(), + rmm::cuda_stream_view stream, rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource()); /** @@ -49,7 +49,7 @@ std::unique_ptr binary_operation( column_view const& rhs, binary_operator op, data_type output_type, - rmm::cuda_stream_view stream = cudf::get_default_stream(), + rmm::cuda_stream_view stream, rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource()); /** @@ -63,7 +63,7 @@ std::unique_ptr binary_operation( scalar const& rhs, binary_operator op, data_type output_type, - rmm::cuda_stream_view stream = cudf::get_default_stream(), + rmm::cuda_stream_view stream, rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource()); /** @@ -77,7 +77,7 @@ std::unique_ptr binary_operation( column_view const& rhs, binary_operator op, data_type output_type, - rmm::cuda_stream_view stream = cudf::get_default_stream(), + rmm::cuda_stream_view stream, rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource()); } // namespace detail } // namespace cudf diff --git a/cpp/include/cudf/detail/concatenate.hpp b/cpp/include/cudf/detail/concatenate.hpp index ae5c95c4645..925029597a6 100644 --- a/cpp/include/cudf/detail/concatenate.hpp +++ b/cpp/include/cudf/detail/concatenate.hpp @@ -35,7 +35,7 @@ namespace detail { */ std::unique_ptr concatenate( host_span columns_to_concat, - rmm::cuda_stream_view stream = cudf::get_default_stream(), + rmm::cuda_stream_view stream, rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource()); /** @@ -45,7 +45,7 @@ std::unique_ptr concatenate( */ std::unique_ptr concatenate( host_span tables_to_concat, - rmm::cuda_stream_view stream = cudf::get_default_stream(), + rmm::cuda_stream_view stream, rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource()); } // namespace detail diff --git a/cpp/include/cudf/detail/copy.hpp b/cpp/include/cudf/detail/copy.hpp index 23ed9090f05..22453315762 100644 --- a/cpp/include/cudf/detail/copy.hpp +++ b/cpp/include/cudf/detail/copy.hpp @@ -77,7 +77,7 @@ ColumnView slice(ColumnView const& input, cudf::size_type begin, cudf::size_type */ std::vector slice(column_view const& input, host_span indices, - rmm::cuda_stream_view stream = cudf::get_default_stream()); + rmm::cuda_stream_view stream); /** * @copydoc cudf::slice(column_view const&, std::initializer_list) * @@ -85,7 +85,7 @@ std::vector slice(column_view const& input, */ std::vector slice(column_view const& input, std::initializer_list indices, - rmm::cuda_stream_view stream = cudf::get_default_stream()); + rmm::cuda_stream_view stream); /** * @copydoc cudf::slice(table_view const&, host_span) @@ -94,7 +94,7 @@ std::vector slice(column_view const& input, */ std::vector slice(table_view const& input, host_span indices, - rmm::cuda_stream_view stream = cudf::get_default_stream()); + rmm::cuda_stream_view stream); /** * @copydoc cudf::slice(table_view const&, std::initializer_list) * @@ -102,7 +102,7 @@ std::vector slice(table_view const& input, */ std::vector slice(table_view const& input, std::initializer_list indices, - rmm::cuda_stream_view stream = cudf::get_default_stream()); + rmm::cuda_stream_view stream); /** * @copydoc cudf::split(column_view const&, host_span) @@ -111,7 +111,7 @@ std::vector slice(table_view const& input, */ std::vector split(column_view const& input, host_span splits, - rmm::cuda_stream_view stream = cudf::get_default_stream()); + rmm::cuda_stream_view stream); /** * @copydoc cudf::split(column_view const&, std::initializer_list) * @@ -119,7 +119,7 @@ std::vector split(column_view const& input, */ std::vector split(column_view const& input, std::initializer_list splits, - rmm::cuda_stream_view stream = cudf::get_default_stream()); + rmm::cuda_stream_view stream); /** * @copydoc cudf::split(table_view const&, host_span) @@ -128,7 +128,7 @@ std::vector split(column_view const& input, */ std::vector split(table_view const& input, host_span splits, - rmm::cuda_stream_view stream = cudf::get_default_stream()); + rmm::cuda_stream_view stream); /** * @copydoc cudf::split(table_view const&, std::initializer_list) * @@ -136,7 +136,7 @@ std::vector split(table_view const& input, */ std::vector split(table_view const& input, std::initializer_list splits, - rmm::cuda_stream_view stream = cudf::get_default_stream()); + rmm::cuda_stream_view stream); /** * @copydoc cudf::shift(column_view const&,size_type,scalar const&, @@ -148,7 +148,7 @@ std::unique_ptr shift( column_view const& input, size_type offset, scalar const& fill_value, - rmm::cuda_stream_view stream = cudf::get_default_stream(), + rmm::cuda_stream_view stream, rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource()); /** @@ -189,7 +189,7 @@ std::unique_ptr segmented_shift( device_span segment_offsets, size_type offset, scalar const& fill_value, - rmm::cuda_stream_view stream = cudf::get_default_stream(), + rmm::cuda_stream_view stream, rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource()); /** @@ -200,7 +200,7 @@ std::unique_ptr segmented_shift( std::vector contiguous_split( cudf::table_view const& input, std::vector const& splits, - rmm::cuda_stream_view stream = cudf::get_default_stream(), + rmm::cuda_stream_view stream, rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource()); /** @@ -209,7 +209,7 @@ std::vector contiguous_split( * @param stream Optional CUDA stream on which to execute kernels **/ packed_columns pack(cudf::table_view const& input, - rmm::cuda_stream_view stream = cudf::get_default_stream(), + rmm::cuda_stream_view stream, rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource()); /** @@ -235,7 +235,7 @@ std::unique_ptr copy_if_else( column_view const& lhs, column_view const& rhs, column_view const& boolean_mask, - rmm::cuda_stream_view stream = cudf::get_default_stream(), + rmm::cuda_stream_view stream, rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource()); /** @@ -248,7 +248,7 @@ std::unique_ptr copy_if_else( scalar const& lhs, column_view const& rhs, column_view const& boolean_mask, - rmm::cuda_stream_view stream = cudf::get_default_stream(), + rmm::cuda_stream_view stream, rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource()); /** @@ -261,7 +261,7 @@ std::unique_ptr copy_if_else( column_view const& lhs, scalar const& rhs, column_view const& boolean_mask, - rmm::cuda_stream_view stream = cudf::get_default_stream(), + rmm::cuda_stream_view stream, rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource()); /** @@ -274,7 +274,7 @@ std::unique_ptr copy_if_else( scalar const& lhs, scalar const& rhs, column_view const& boolean_mask, - rmm::cuda_stream_view stream = cudf::get_default_stream(), + rmm::cuda_stream_view stream, rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource()); /** @@ -298,7 +298,7 @@ std::unique_ptr
sample( std::unique_ptr get_element( column_view const& input, size_type index, - rmm::cuda_stream_view stream = cudf::get_default_stream(), + rmm::cuda_stream_view stream, rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource()); /** @@ -306,16 +306,14 @@ std::unique_ptr get_element( * * @param stream CUDA stream used for device memory operations and kernel launches. */ -bool has_nonempty_nulls(column_view const& input, - rmm::cuda_stream_view stream = cudf::get_default_stream()); +bool has_nonempty_nulls(column_view const& input, rmm::cuda_stream_view stream); /** * @copydoc cudf::may_have_nonempty_nulls * * @param stream CUDA stream used for device memory operations and kernel launches. */ -bool may_have_nonempty_nulls(column_view const& input, - rmm::cuda_stream_view stream = cudf::get_default_stream()); +bool may_have_nonempty_nulls(column_view const& input, rmm::cuda_stream_view stream); } // namespace detail } // namespace cudf diff --git a/cpp/include/cudf/detail/copy_if.cuh b/cpp/include/cudf/detail/copy_if.cuh index 229d96659df..6eea72a1e0d 100644 --- a/cpp/include/cudf/detail/copy_if.cuh +++ b/cpp/include/cudf/detail/copy_if.cuh @@ -323,7 +323,7 @@ template std::unique_ptr
copy_if( table_view const& input, Filter filter, - rmm::cuda_stream_view stream = cudf::get_default_stream(), + rmm::cuda_stream_view stream, rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource()) { CUDF_FUNC_RANGE(); diff --git a/cpp/include/cudf/detail/copy_range.cuh b/cpp/include/cudf/detail/copy_range.cuh index 09cbf706d5c..22714e97dfa 100644 --- a/cpp/include/cudf/detail/copy_range.cuh +++ b/cpp/include/cudf/detail/copy_range.cuh @@ -135,7 +135,7 @@ void copy_range(SourceValueIterator source_value_begin, mutable_column_view& target, size_type target_begin, size_type target_end, - rmm::cuda_stream_view stream = cudf::get_default_stream()) + rmm::cuda_stream_view stream) { CUDF_EXPECTS((target_begin <= target_end) && (target_begin >= 0) && (target_begin < target.size()) && (target_end <= target.size()), @@ -196,7 +196,7 @@ void copy_range_in_place(column_view const& source, size_type source_begin, size_type source_end, size_type target_begin, - rmm::cuda_stream_view stream = cudf::get_default_stream()); + rmm::cuda_stream_view stream); /** * @copydoc cudf::copy_range @@ -209,7 +209,7 @@ std::unique_ptr copy_range( size_type source_begin, size_type source_end, size_type target_begin, - rmm::cuda_stream_view stream = cudf::get_default_stream(), + rmm::cuda_stream_view stream, rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource()); } // namespace detail diff --git a/cpp/include/cudf/detail/datetime.hpp b/cpp/include/cudf/detail/datetime.hpp index d2bca74ee9b..c2e3c32b65f 100644 --- a/cpp/include/cudf/detail/datetime.hpp +++ b/cpp/include/cudf/detail/datetime.hpp @@ -31,7 +31,7 @@ namespace detail { */ std::unique_ptr extract_year( cudf::column_view const& column, - rmm::cuda_stream_view stream = cudf::get_default_stream(), + rmm::cuda_stream_view stream, rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource()); /** @@ -41,7 +41,7 @@ std::unique_ptr extract_year( */ std::unique_ptr extract_month( cudf::column_view const& column, - rmm::cuda_stream_view stream = cudf::get_default_stream(), + rmm::cuda_stream_view stream, rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource()); /** @@ -51,7 +51,7 @@ std::unique_ptr extract_month( */ std::unique_ptr extract_day( cudf::column_view const& column, - rmm::cuda_stream_view stream = cudf::get_default_stream(), + rmm::cuda_stream_view stream, rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource()); /** @@ -61,7 +61,7 @@ std::unique_ptr extract_day( */ std::unique_ptr extract_weekday( cudf::column_view const& column, - rmm::cuda_stream_view stream = cudf::get_default_stream(), + rmm::cuda_stream_view stream, rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource()); /** @@ -71,7 +71,7 @@ std::unique_ptr extract_weekday( */ std::unique_ptr extract_hour( cudf::column_view const& column, - rmm::cuda_stream_view stream = cudf::get_default_stream(), + rmm::cuda_stream_view stream, rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource()); /** @@ -81,7 +81,7 @@ std::unique_ptr extract_hour( */ std::unique_ptr extract_minute( cudf::column_view const& column, - rmm::cuda_stream_view stream = cudf::get_default_stream(), + rmm::cuda_stream_view stream, rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource()); /** @@ -91,7 +91,7 @@ std::unique_ptr extract_minute( */ std::unique_ptr extract_second( cudf::column_view const& column, - rmm::cuda_stream_view stream = cudf::get_default_stream(), + rmm::cuda_stream_view stream, rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource()); /** @@ -102,7 +102,7 @@ std::unique_ptr extract_second( */ std::unique_ptr extract_millisecond_fraction( cudf::column_view const& column, - rmm::cuda_stream_view stream = cudf::get_default_stream(), + rmm::cuda_stream_view stream, rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource()); /** @@ -113,7 +113,7 @@ std::unique_ptr extract_millisecond_fraction( */ std::unique_ptr extract_microsecond_fraction( cudf::column_view const& column, - rmm::cuda_stream_view stream = cudf::get_default_stream(), + rmm::cuda_stream_view stream, rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource()); /** @@ -124,7 +124,7 @@ std::unique_ptr extract_microsecond_fraction( */ std::unique_ptr extract_nanosecond_fraction( cudf::column_view const& column, - rmm::cuda_stream_view stream = cudf::get_default_stream(), + rmm::cuda_stream_view stream, rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource()); /** @@ -134,7 +134,7 @@ std::unique_ptr extract_nanosecond_fraction( */ std::unique_ptr last_day_of_month( cudf::column_view const& column, - rmm::cuda_stream_view stream = cudf::get_default_stream(), + rmm::cuda_stream_view stream, rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource()); /** @@ -144,7 +144,7 @@ std::unique_ptr last_day_of_month( */ std::unique_ptr day_of_year( cudf::column_view const& column, - rmm::cuda_stream_view stream = cudf::get_default_stream(), + rmm::cuda_stream_view stream, rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource()); /** @@ -156,7 +156,7 @@ std::unique_ptr day_of_year( std::unique_ptr add_calendrical_months( cudf::column_view const& timestamps, cudf::column_view const& months, - rmm::cuda_stream_view stream = cudf::get_default_stream(), + rmm::cuda_stream_view stream, rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource()); /** @@ -168,7 +168,7 @@ std::unique_ptr add_calendrical_months( std::unique_ptr add_calendrical_months( cudf::column_view const& timestamps, cudf::scalar const& months, - rmm::cuda_stream_view stream = cudf::get_default_stream(), + rmm::cuda_stream_view stream, rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource()); /** @@ -178,12 +178,12 @@ std::unique_ptr add_calendrical_months( */ std::unique_ptr is_leap_year( cudf::column_view const& column, - rmm::cuda_stream_view stream = cudf::get_default_stream(), + rmm::cuda_stream_view stream, rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource()); std::unique_ptr extract_quarter( cudf::column_view const& column, - rmm::cuda_stream_view stream = cudf::get_default_stream(), + rmm::cuda_stream_view stream, rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource()); } // namespace detail diff --git a/cpp/include/cudf/detail/fill.hpp b/cpp/include/cudf/detail/fill.hpp index 3ac62c984fb..e34acfff6b9 100644 --- a/cpp/include/cudf/detail/fill.hpp +++ b/cpp/include/cudf/detail/fill.hpp @@ -36,7 +36,7 @@ void fill_in_place(mutable_column_view& destination, size_type begin, size_type end, scalar const& value, - rmm::cuda_stream_view stream = cudf::get_default_stream()); + rmm::cuda_stream_view stream); /** * @copydoc cudf::fill @@ -48,7 +48,7 @@ std::unique_ptr fill( size_type begin, size_type end, scalar const& value, - rmm::cuda_stream_view stream = cudf::get_default_stream(), + rmm::cuda_stream_view stream, rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource()); } // namespace detail diff --git a/cpp/include/cudf/detail/gather.hpp b/cpp/include/cudf/detail/gather.hpp index 2f6a9525b4e..9d61a8de184 100644 --- a/cpp/include/cudf/detail/gather.hpp +++ b/cpp/include/cudf/detail/gather.hpp @@ -66,7 +66,7 @@ std::unique_ptr
gather( column_view const& gather_map, out_of_bounds_policy bounds_policy, negative_index_policy neg_indices, - rmm::cuda_stream_view stream = cudf::get_default_stream(), + rmm::cuda_stream_view stream, rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource()); /** @@ -81,7 +81,7 @@ std::unique_ptr
gather( device_span const gather_map, out_of_bounds_policy bounds_policy, negative_index_policy neg_indices, - rmm::cuda_stream_view stream = cudf::get_default_stream(), + rmm::cuda_stream_view stream, rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource()); } // namespace detail diff --git a/cpp/include/cudf/detail/groupby/group_replace_nulls.hpp b/cpp/include/cudf/detail/groupby/group_replace_nulls.hpp index 6742e7d9159..9e64048b7b4 100644 --- a/cpp/include/cudf/detail/groupby/group_replace_nulls.hpp +++ b/cpp/include/cudf/detail/groupby/group_replace_nulls.hpp @@ -40,7 +40,7 @@ std::unique_ptr group_replace_nulls( cudf::column_view const& grouped_value, device_span group_labels, cudf::replace_policy replace_policy, - rmm::cuda_stream_view stream = cudf::get_default_stream(), + rmm::cuda_stream_view stream, rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource()); } // namespace detail diff --git a/cpp/include/cudf/detail/hashing.hpp b/cpp/include/cudf/detail/hashing.hpp index 98d3713c5c5..b7469d80a8d 100644 --- a/cpp/include/cudf/detail/hashing.hpp +++ b/cpp/include/cudf/detail/hashing.hpp @@ -52,7 +52,7 @@ std::unique_ptr spark_murmur_hash3_32( std::unique_ptr md5_hash( table_view const& input, - rmm::cuda_stream_view stream = cudf::get_default_stream(), + rmm::cuda_stream_view stream, rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource()); /* Copyright 2005-2014 Daniel James. diff --git a/cpp/include/cudf/detail/interop.hpp b/cpp/include/cudf/detail/interop.hpp index 3d22530f5b3..2215f052113 100644 --- a/cpp/include/cudf/detail/interop.hpp +++ b/cpp/include/cudf/detail/interop.hpp @@ -34,7 +34,7 @@ namespace detail { */ std::unique_ptr
from_dlpack( DLManagedTensor const* managed_tensor, - rmm::cuda_stream_view stream = cudf::get_default_stream(), + rmm::cuda_stream_view stream, rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource()); /** @@ -44,7 +44,7 @@ std::unique_ptr
from_dlpack( */ DLManagedTensor* to_dlpack( table_view const& input, - rmm::cuda_stream_view stream = cudf::get_default_stream(), + rmm::cuda_stream_view stream, rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource()); // Creating arrow as per given type_id and buffer arguments @@ -114,7 +114,7 @@ std::shared_ptr to_arrow(table_view input, */ std::unique_ptr
from_arrow( arrow::Table const& input_table, - rmm::cuda_stream_view stream = cudf::get_default_stream(), + rmm::cuda_stream_view stream, rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource()); } // namespace detail diff --git a/cpp/include/cudf/detail/is_element_valid.hpp b/cpp/include/cudf/detail/is_element_valid.hpp index e70fa8cfe5f..72a85d42eb3 100644 --- a/cpp/include/cudf/detail/is_element_valid.hpp +++ b/cpp/include/cudf/detail/is_element_valid.hpp @@ -41,7 +41,7 @@ namespace detail { bool is_element_valid_sync(column_view const& col_view, size_type element_index, - rmm::cuda_stream_view stream = cudf::get_default_stream()); + rmm::cuda_stream_view stream); } // namespace detail } // namespace cudf diff --git a/cpp/include/cudf/detail/join.hpp b/cpp/include/cudf/detail/join.hpp index 51cda214f7b..2dfe31091ac 100644 --- a/cpp/include/cudf/detail/join.hpp +++ b/cpp/include/cudf/detail/join.hpp @@ -91,7 +91,7 @@ struct hash_join { */ hash_join(cudf::table_view const& build, cudf::null_equality compare_nulls, - rmm::cuda_stream_view stream = cudf::get_default_stream()); + rmm::cuda_stream_view stream); /** * @copydoc cudf::hash_join::inner_join diff --git a/cpp/include/cudf/detail/label_bins.hpp b/cpp/include/cudf/detail/label_bins.hpp index af9f5fb82f5..f556c81c371 100644 --- a/cpp/include/cudf/detail/label_bins.hpp +++ b/cpp/include/cudf/detail/label_bins.hpp @@ -51,7 +51,7 @@ std::unique_ptr label_bins( inclusive left_inclusive, column_view const& right_edges, inclusive right_inclusive, - rmm::cuda_stream_view stream = cudf::get_default_stream(), + rmm::cuda_stream_view stream, rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource()); /** @} */ // end of group diff --git a/cpp/include/cudf/detail/null_mask.hpp b/cpp/include/cudf/detail/null_mask.hpp index f75e3b06ccf..a0e04d7b215 100644 --- a/cpp/include/cudf/detail/null_mask.hpp +++ b/cpp/include/cudf/detail/null_mask.hpp @@ -34,7 +34,7 @@ namespace detail { rmm::device_buffer create_null_mask( size_type size, mask_state state, - rmm::cuda_stream_view stream = cudf::get_default_stream(), + rmm::cuda_stream_view stream, rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource()); /** @@ -46,7 +46,7 @@ void set_null_mask(bitmask_type* bitmask, size_type begin_bit, size_type end_bit, bool valid, - rmm::cuda_stream_view stream = cudf::get_default_stream()); + rmm::cuda_stream_view stream); /** * @brief Given a bitmask, counts the number of set (1) bits in the range diff --git a/cpp/include/cudf/detail/quantiles.hpp b/cpp/include/cudf/detail/quantiles.hpp index c75b2d135d8..752f8ef6367 100644 --- a/cpp/include/cudf/detail/quantiles.hpp +++ b/cpp/include/cudf/detail/quantiles.hpp @@ -62,7 +62,7 @@ std::unique_ptr
quantiles( std::unique_ptr percentile_approx( tdigest::tdigest_column_view const& input, column_view const& percentiles, - rmm::cuda_stream_view stream = cudf::get_default_stream(), + rmm::cuda_stream_view stream, rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource()); } // namespace detail diff --git a/cpp/include/cudf/detail/reduction_functions.hpp b/cpp/include/cudf/detail/reduction_functions.hpp index fa6652b0db3..a2de286f283 100644 --- a/cpp/include/cudf/detail/reduction_functions.hpp +++ b/cpp/include/cudf/detail/reduction_functions.hpp @@ -46,7 +46,7 @@ std::unique_ptr sum( column_view const& col, data_type const output_dtype, std::optional> init, - rmm::cuda_stream_view stream = cudf::get_default_stream(), + rmm::cuda_stream_view stream, rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource()); /** @@ -67,7 +67,7 @@ std::unique_ptr min( column_view const& col, data_type const output_dtype, std::optional> init, - rmm::cuda_stream_view stream = cudf::get_default_stream(), + rmm::cuda_stream_view stream, rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource()); /** @@ -88,7 +88,7 @@ std::unique_ptr max( column_view const& col, data_type const output_dtype, std::optional> init, - rmm::cuda_stream_view stream = cudf::get_default_stream(), + rmm::cuda_stream_view stream, rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource()); /** @@ -110,7 +110,7 @@ std::unique_ptr any( column_view const& col, data_type const output_dtype, std::optional> init, - rmm::cuda_stream_view stream = cudf::get_default_stream(), + rmm::cuda_stream_view stream, rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource()); /** @@ -132,7 +132,7 @@ std::unique_ptr all( column_view const& col, data_type const output_dtype, std::optional> init, - rmm::cuda_stream_view stream = cudf::get_default_stream(), + rmm::cuda_stream_view stream, rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource()); /** @@ -154,7 +154,7 @@ std::unique_ptr product( column_view const& col, data_type const output_dtype, std::optional> init, - rmm::cuda_stream_view stream = cudf::get_default_stream(), + rmm::cuda_stream_view stream, rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource()); /** @@ -174,7 +174,7 @@ std::unique_ptr product( std::unique_ptr sum_of_squares( column_view const& col, data_type const output_dtype, - rmm::cuda_stream_view stream = cudf::get_default_stream(), + rmm::cuda_stream_view stream, rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource()); /** @@ -194,7 +194,7 @@ std::unique_ptr sum_of_squares( std::unique_ptr mean( column_view const& col, data_type const output_dtype, - rmm::cuda_stream_view stream = cudf::get_default_stream(), + rmm::cuda_stream_view stream, rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource()); /** @@ -217,7 +217,7 @@ std::unique_ptr variance( column_view const& col, data_type const output_dtype, cudf::size_type ddof, - rmm::cuda_stream_view stream = cudf::get_default_stream(), + rmm::cuda_stream_view stream, rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource()); /** @@ -240,7 +240,7 @@ std::unique_ptr standard_deviation( column_view const& col, data_type const output_dtype, cudf::size_type ddof, - rmm::cuda_stream_view stream = cudf::get_default_stream(), + rmm::cuda_stream_view stream, rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource()); /** @@ -271,7 +271,7 @@ std::unique_ptr nth_element( column_view const& col, size_type n, null_policy null_handling, - rmm::cuda_stream_view stream = cudf::get_default_stream(), + rmm::cuda_stream_view stream, rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource()); /** @@ -286,7 +286,7 @@ std::unique_ptr nth_element( std::unique_ptr collect_list( column_view const& col, null_policy null_handling, - rmm::cuda_stream_view stream = cudf::get_default_stream(), + rmm::cuda_stream_view stream, rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource()); /** @@ -299,7 +299,7 @@ std::unique_ptr collect_list( */ std::unique_ptr merge_lists( lists_column_view const& col, - rmm::cuda_stream_view stream = cudf::get_default_stream(), + rmm::cuda_stream_view stream, rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource()); /** @@ -318,7 +318,7 @@ std::unique_ptr collect_set( null_policy null_handling, null_equality nulls_equal, nan_equality nans_equal, - rmm::cuda_stream_view stream = cudf::get_default_stream(), + rmm::cuda_stream_view stream, rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource()); /** @@ -335,7 +335,7 @@ std::unique_ptr merge_sets( lists_column_view const& col, null_equality nulls_equal, nan_equality nans_equal, - rmm::cuda_stream_view stream = cudf::get_default_stream(), + rmm::cuda_stream_view stream, rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource()); /** @@ -363,7 +363,7 @@ std::unique_ptr segmented_sum( data_type const output_dtype, null_policy null_handling, std::optional> init, - rmm::cuda_stream_view stream = cudf::get_default_stream(), + rmm::cuda_stream_view stream, rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource()); /** @@ -391,7 +391,7 @@ std::unique_ptr segmented_product( data_type const output_dtype, null_policy null_handling, std::optional> init, - rmm::cuda_stream_view stream = cudf::get_default_stream(), + rmm::cuda_stream_view stream, rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource()); /** @@ -418,7 +418,7 @@ std::unique_ptr segmented_min( data_type const output_dtype, null_policy null_handling, std::optional> init, - rmm::cuda_stream_view stream = cudf::get_default_stream(), + rmm::cuda_stream_view stream, rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource()); /** @@ -445,7 +445,7 @@ std::unique_ptr segmented_max( data_type const output_dtype, null_policy null_handling, std::optional> init, - rmm::cuda_stream_view stream = cudf::get_default_stream(), + rmm::cuda_stream_view stream, rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource()); /** @@ -473,7 +473,7 @@ std::unique_ptr segmented_any( data_type const output_dtype, null_policy null_handling, std::optional> init, - rmm::cuda_stream_view stream = cudf::get_default_stream(), + rmm::cuda_stream_view stream, rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource()); /** @@ -501,7 +501,7 @@ std::unique_ptr segmented_all( data_type const output_dtype, null_policy null_handling, std::optional> init, - rmm::cuda_stream_view stream = cudf::get_default_stream(), + rmm::cuda_stream_view stream, rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource()); } // namespace reduction diff --git a/cpp/include/cudf/detail/repeat.hpp b/cpp/include/cudf/detail/repeat.hpp index 39a0de1bd31..69d9705556f 100644 --- a/cpp/include/cudf/detail/repeat.hpp +++ b/cpp/include/cudf/detail/repeat.hpp @@ -36,7 +36,7 @@ std::unique_ptr
repeat( table_view const& input_table, column_view const& count, bool check_count, - rmm::cuda_stream_view stream = cudf::get_default_stream(), + rmm::cuda_stream_view stream, rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource()); /** @@ -48,7 +48,7 @@ std::unique_ptr
repeat( std::unique_ptr
repeat( table_view const& input_table, size_type count, - rmm::cuda_stream_view stream = cudf::get_default_stream(), + rmm::cuda_stream_view stream, rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource()); } // namespace detail diff --git a/cpp/include/cudf/detail/replace.hpp b/cpp/include/cudf/detail/replace.hpp index 8e6e0729d07..9721c6e9849 100644 --- a/cpp/include/cudf/detail/replace.hpp +++ b/cpp/include/cudf/detail/replace.hpp @@ -34,7 +34,7 @@ namespace detail { std::unique_ptr replace_nulls( column_view const& input, cudf::column_view const& replacement, - rmm::cuda_stream_view stream = cudf::get_default_stream(), + rmm::cuda_stream_view stream, rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource()); /** @@ -46,7 +46,7 @@ std::unique_ptr replace_nulls( std::unique_ptr replace_nulls( column_view const& input, scalar const& replacement, - rmm::cuda_stream_view stream = cudf::get_default_stream(), + rmm::cuda_stream_view stream, rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource()); /** @@ -58,7 +58,7 @@ std::unique_ptr replace_nulls( std::unique_ptr replace_nulls( column_view const& input, replace_policy const& replace_policy, - rmm::cuda_stream_view stream = cudf::get_default_stream(), + rmm::cuda_stream_view stream, rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource()); /** @@ -70,7 +70,7 @@ std::unique_ptr replace_nulls( std::unique_ptr replace_nans( column_view const& input, column_view const& replacement, - rmm::cuda_stream_view stream = cudf::get_default_stream(), + rmm::cuda_stream_view stream, rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource()); /** @@ -82,7 +82,7 @@ std::unique_ptr replace_nans( std::unique_ptr replace_nans( column_view const& input, scalar const& replacement, - rmm::cuda_stream_view stream = cudf::get_default_stream(), + rmm::cuda_stream_view stream, rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource()); /** @@ -94,7 +94,7 @@ std::unique_ptr find_and_replace_all( column_view const& input_col, column_view const& values_to_replace, column_view const& replacement_values, - rmm::cuda_stream_view stream = cudf::get_default_stream(), + rmm::cuda_stream_view stream, rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource()); /** @@ -104,7 +104,7 @@ std::unique_ptr find_and_replace_all( */ std::unique_ptr normalize_nans_and_zeros( column_view const& input, - rmm::cuda_stream_view stream = cudf::get_default_stream(), + rmm::cuda_stream_view stream, rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource()); } // namespace detail diff --git a/cpp/include/cudf/detail/reshape.hpp b/cpp/include/cudf/detail/reshape.hpp index 205761d6888..ccffcbc61df 100644 --- a/cpp/include/cudf/detail/reshape.hpp +++ b/cpp/include/cudf/detail/reshape.hpp @@ -33,7 +33,7 @@ namespace detail { std::unique_ptr
tile( table_view const& input, size_type count, - rmm::cuda_stream_view = cudf::get_default_stream(), + rmm::cuda_stream_view, rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource()); /** @@ -43,7 +43,7 @@ std::unique_ptr
tile( */ std::unique_ptr interleave_columns( table_view const& input, - rmm::cuda_stream_view = cudf::get_default_stream(), + rmm::cuda_stream_view, rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource()); } // namespace detail diff --git a/cpp/include/cudf/detail/rolling.hpp b/cpp/include/cudf/detail/rolling.hpp index 40bedf4046d..dcaece2bafc 100644 --- a/cpp/include/cudf/detail/rolling.hpp +++ b/cpp/include/cudf/detail/rolling.hpp @@ -45,7 +45,7 @@ std::unique_ptr rolling_window( column_view const& following_window, size_type min_periods, rolling_aggregation const& agg, - rmm::cuda_stream_view stream = cudf::get_default_stream(), + rmm::cuda_stream_view stream, rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource()); } // namespace detail diff --git a/cpp/include/cudf/detail/round.hpp b/cpp/include/cudf/detail/round.hpp index 89c9ce6d0e7..1e5612919f4 100644 --- a/cpp/include/cudf/detail/round.hpp +++ b/cpp/include/cudf/detail/round.hpp @@ -35,7 +35,7 @@ std::unique_ptr round( column_view const& input, int32_t decimal_places, rounding_method method, - rmm::cuda_stream_view stream = cudf::get_default_stream(), + rmm::cuda_stream_view stream, rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource()); } // namespace detail diff --git a/cpp/include/cudf/detail/scatter.cuh b/cpp/include/cudf/detail/scatter.cuh index af4854965ee..88babe2f397 100644 --- a/cpp/include/cudf/detail/scatter.cuh +++ b/cpp/include/cudf/detail/scatter.cuh @@ -390,7 +390,7 @@ std::unique_ptr
scatter( MapIterator scatter_map_begin, MapIterator scatter_map_end, table_view const& target, - rmm::cuda_stream_view stream = cudf::get_default_stream(), + rmm::cuda_stream_view stream, rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource()) { CUDF_FUNC_RANGE(); diff --git a/cpp/include/cudf/detail/scatter.hpp b/cpp/include/cudf/detail/scatter.hpp index 515df255f4a..7c4b04537ea 100644 --- a/cpp/include/cudf/detail/scatter.hpp +++ b/cpp/include/cudf/detail/scatter.hpp @@ -63,7 +63,7 @@ std::unique_ptr
scatter( table_view const& source, column_view const& scatter_map, table_view const& target, - rmm::cuda_stream_view stream = cudf::get_default_stream(), + rmm::cuda_stream_view stream, rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource()); /** @@ -76,7 +76,7 @@ std::unique_ptr
scatter( table_view const& source, device_span const scatter_map, table_view const& target, - rmm::cuda_stream_view stream = cudf::get_default_stream(), + rmm::cuda_stream_view stream, rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource()); /** @@ -112,7 +112,7 @@ std::unique_ptr
scatter( std::vector> const& source, column_view const& indices, table_view const& target, - rmm::cuda_stream_view stream = cudf::get_default_stream(), + rmm::cuda_stream_view stream, rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource()); /** @@ -127,7 +127,7 @@ std::unique_ptr
boolean_mask_scatter( table_view const& source, table_view const& target, column_view const& boolean_mask, - rmm::cuda_stream_view stream = cudf::get_default_stream(), + rmm::cuda_stream_view stream, rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource()); /** @@ -143,7 +143,7 @@ std::unique_ptr
boolean_mask_scatter( std::vector> const& source, table_view const& target, column_view const& boolean_mask, - rmm::cuda_stream_view stream = cudf::get_default_stream(), + rmm::cuda_stream_view stream, rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource()); } // namespace detail diff --git a/cpp/include/cudf/detail/sequence.hpp b/cpp/include/cudf/detail/sequence.hpp index a4bebb1886c..4a9bf5c74e1 100644 --- a/cpp/include/cudf/detail/sequence.hpp +++ b/cpp/include/cudf/detail/sequence.hpp @@ -36,7 +36,7 @@ std::unique_ptr sequence( size_type size, scalar const& init, scalar const& step, - rmm::cuda_stream_view stream = cudf::get_default_stream(), + rmm::cuda_stream_view stream, rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource()); /** @@ -49,7 +49,7 @@ std::unique_ptr sequence( std::unique_ptr sequence( size_type size, scalar const& init, - rmm::cuda_stream_view stream = cudf::get_default_stream(), + rmm::cuda_stream_view stream, rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource()); /** @@ -64,7 +64,7 @@ std::unique_ptr calendrical_month_sequence( size_type size, scalar const& init, size_type months, - rmm::cuda_stream_view stream = cudf::get_default_stream(), + rmm::cuda_stream_view stream, rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource()); } // namespace detail diff --git a/cpp/include/cudf/detail/stream_compaction.hpp b/cpp/include/cudf/detail/stream_compaction.hpp index 1651e8b33b6..e725718ed22 100644 --- a/cpp/include/cudf/detail/stream_compaction.hpp +++ b/cpp/include/cudf/detail/stream_compaction.hpp @@ -36,7 +36,7 @@ std::unique_ptr
drop_nulls( table_view const& input, std::vector const& keys, cudf::size_type keep_threshold, - rmm::cuda_stream_view stream = cudf::get_default_stream(), + rmm::cuda_stream_view stream, rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource()); /** @@ -49,7 +49,7 @@ std::unique_ptr
drop_nans( table_view const& input, std::vector const& keys, cudf::size_type keep_threshold, - rmm::cuda_stream_view stream = cudf::get_default_stream(), + rmm::cuda_stream_view stream, rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource()); /** @@ -60,7 +60,7 @@ std::unique_ptr
drop_nans( std::unique_ptr
apply_boolean_mask( table_view const& input, column_view const& boolean_mask, - rmm::cuda_stream_view stream = cudf::get_default_stream(), + rmm::cuda_stream_view stream, rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource()); /** @@ -149,7 +149,7 @@ rmm::device_uvector get_distinct_indices( cudf::size_type unique_count(column_view const& input, null_policy null_handling, nan_policy nan_handling, - rmm::cuda_stream_view stream = cudf::get_default_stream()); + rmm::cuda_stream_view stream); /** * @copydoc cudf::unique_count(table_view const&, null_equality) @@ -168,7 +168,7 @@ cudf::size_type unique_count(table_view const& input, cudf::size_type distinct_count(column_view const& input, null_policy null_handling, nan_policy nan_handling, - rmm::cuda_stream_view stream = cudf::get_default_stream()); + rmm::cuda_stream_view stream); /** * @copydoc cudf::distinct_count(table_view const&, null_equality) diff --git a/cpp/include/cudf/detail/structs/utilities.hpp b/cpp/include/cudf/detail/structs/utilities.hpp index 03e752c102d..115c8ccd90e 100644 --- a/cpp/include/cudf/detail/structs/utilities.hpp +++ b/cpp/include/cudf/detail/structs/utilities.hpp @@ -189,7 +189,7 @@ void superimpose_parent_nulls(bitmask_type const* parent_null_mask, */ std::tuple> superimpose_parent_nulls( column_view const& parent, - rmm::cuda_stream_view stream = cudf::get_default_stream(), + rmm::cuda_stream_view stream, rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource()); /** @@ -215,7 +215,7 @@ std::tuple> superimpose_paren */ std::tuple> superimpose_parent_nulls( table_view const& table, - rmm::cuda_stream_view stream = cudf::get_default_stream(), + rmm::cuda_stream_view stream, rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource()); /** diff --git a/cpp/include/cudf/detail/tdigest/tdigest.hpp b/cpp/include/cudf/detail/tdigest/tdigest.hpp index f1b795e21a9..77f9978ff1b 100644 --- a/cpp/include/cudf/detail/tdigest/tdigest.hpp +++ b/cpp/include/cudf/detail/tdigest/tdigest.hpp @@ -139,7 +139,7 @@ std::unique_ptr make_tdigest_column( std::unique_ptr&& tdigest_offsets, std::unique_ptr&& min_values, std::unique_ptr&& max_values, - rmm::cuda_stream_view stream = cudf::get_default_stream(), + rmm::cuda_stream_view stream, rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource()); /** @@ -153,7 +153,7 @@ std::unique_ptr make_tdigest_column( * @returns An empty tdigest column. */ std::unique_ptr make_empty_tdigest_column( - rmm::cuda_stream_view stream = cudf::get_default_stream(), + rmm::cuda_stream_view stream, rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource()); /** @@ -167,7 +167,7 @@ std::unique_ptr make_empty_tdigest_column( * @returns An empty tdigest scalar. */ std::unique_ptr make_empty_tdigest_scalar( - rmm::cuda_stream_view stream = cudf::get_default_stream(), + rmm::cuda_stream_view stream, rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource()); /** diff --git a/cpp/include/cudf/detail/transform.hpp b/cpp/include/cudf/detail/transform.hpp index 26cdf917cda..8e19ebb8da7 100644 --- a/cpp/include/cudf/detail/transform.hpp +++ b/cpp/include/cudf/detail/transform.hpp @@ -34,7 +34,7 @@ std::unique_ptr transform( std::string const& unary_udf, data_type output_type, bool is_ptx, - rmm::cuda_stream_view stream = cudf::get_default_stream(), + rmm::cuda_stream_view stream, rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource()); /** @@ -45,7 +45,7 @@ std::unique_ptr transform( std::unique_ptr compute_column( table_view const table, ast::operation const& expr, - rmm::cuda_stream_view stream = cudf::get_default_stream(), + rmm::cuda_stream_view stream, rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource()); /** @@ -55,7 +55,7 @@ std::unique_ptr compute_column( */ std::pair, size_type> nans_to_nulls( column_view const& input, - rmm::cuda_stream_view stream = cudf::get_default_stream(), + rmm::cuda_stream_view stream, rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource()); /** @@ -65,7 +65,7 @@ std::pair, size_type> nans_to_nulls( */ std::pair, cudf::size_type> bools_to_mask( column_view const& input, - rmm::cuda_stream_view stream = cudf::get_default_stream(), + rmm::cuda_stream_view stream, rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource()); /** @@ -75,7 +75,7 @@ std::pair, cudf::size_type> bools_to_mask( */ std::pair, std::unique_ptr> encode( cudf::table_view const& input, - rmm::cuda_stream_view stream = cudf::get_default_stream(), + rmm::cuda_stream_view stream, rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource()); /** @@ -86,7 +86,7 @@ std::pair, std::unique_ptr> encode( std::pair, table_view> one_hot_encode( column_view const& input, column_view const& categories, - rmm::cuda_stream_view stream = cudf::get_default_stream(), + rmm::cuda_stream_view stream, rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource()); /** @@ -98,7 +98,7 @@ std::unique_ptr mask_to_bools( bitmask_type const* null_mask, size_type begin_bit, size_type end_bit, - rmm::cuda_stream_view stream = cudf::get_default_stream(), + rmm::cuda_stream_view stream, rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource()); /** @@ -108,7 +108,7 @@ std::unique_ptr mask_to_bools( */ std::unique_ptr row_bit_count( table_view const& t, - rmm::cuda_stream_view stream = cudf::get_default_stream(), + rmm::cuda_stream_view stream, rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource()); } // namespace detail diff --git a/cpp/include/cudf/detail/transpose.hpp b/cpp/include/cudf/detail/transpose.hpp index 14f80a99de9..0470d625edc 100644 --- a/cpp/include/cudf/detail/transpose.hpp +++ b/cpp/include/cudf/detail/transpose.hpp @@ -30,7 +30,7 @@ namespace detail { */ std::pair, table_view> transpose( table_view const& input, - rmm::cuda_stream_view stream = cudf::get_default_stream(), + rmm::cuda_stream_view stream, rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource()); } // namespace detail diff --git a/cpp/include/cudf/detail/unary.hpp b/cpp/include/cudf/detail/unary.hpp index c92b4f7683b..0e1c047d9b0 100644 --- a/cpp/include/cudf/detail/unary.hpp +++ b/cpp/include/cudf/detail/unary.hpp @@ -50,7 +50,7 @@ std::unique_ptr true_if( InputIterator end, size_type size, Predicate p, - rmm::cuda_stream_view stream = cudf::get_default_stream(), + rmm::cuda_stream_view stream, rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource()) { auto output = @@ -71,7 +71,7 @@ std::unique_ptr true_if( std::unique_ptr unary_operation( cudf::column_view const& input, cudf::unary_operator op, - rmm::cuda_stream_view stream = cudf::get_default_stream(), + rmm::cuda_stream_view stream, rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource()); /** @@ -82,7 +82,7 @@ std::unique_ptr unary_operation( std::unique_ptr cast( column_view const& input, data_type type, - rmm::cuda_stream_view stream = cudf::get_default_stream(), + rmm::cuda_stream_view stream, rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource()); /** @@ -92,7 +92,7 @@ std::unique_ptr cast( */ std::unique_ptr is_nan( cudf::column_view const& input, - rmm::cuda_stream_view stream = cudf::get_default_stream(), + rmm::cuda_stream_view stream, rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource()); /** @@ -102,7 +102,7 @@ std::unique_ptr is_nan( */ std::unique_ptr is_not_nan( cudf::column_view const& input, - rmm::cuda_stream_view stream = cudf::get_default_stream(), + rmm::cuda_stream_view stream, rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource()); } // namespace detail diff --git a/cpp/include/cudf/detail/utilities/cuda.cuh b/cpp/include/cudf/detail/utilities/cuda.cuh index 02564ea1343..cdbc26701d1 100644 --- a/cpp/include/cudf/detail/utilities/cuda.cuh +++ b/cpp/include/cudf/detail/utilities/cuda.cuh @@ -170,8 +170,7 @@ __global__ void single_thread_kernel(F f) * @param stream CUDA stream used for the kernel launch */ template -void device_single_thread(Functor functor, - rmm::cuda_stream_view stream = cudf::get_default_stream()) +void device_single_thread(Functor functor, rmm::cuda_stream_view stream) { single_thread_kernel<<<1, 1, 0, stream.value()>>>(functor); } diff --git a/cpp/include/cudf/detail/utilities/vector_factories.hpp b/cpp/include/cudf/detail/utilities/vector_factories.hpp index d59ecea8bb0..75e5222ab97 100644 --- a/cpp/include/cudf/detail/utilities/vector_factories.hpp +++ b/cpp/include/cudf/detail/utilities/vector_factories.hpp @@ -72,7 +72,7 @@ rmm::device_uvector make_zeroed_device_uvector_async( template rmm::device_uvector make_zeroed_device_uvector_sync( std::size_t size, - rmm::cuda_stream_view stream = cudf::get_default_stream(), + rmm::cuda_stream_view stream, rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource()) { rmm::device_uvector ret(size, stream, mr); @@ -148,7 +148,7 @@ rmm::device_uvector make_device_uvector_async( template rmm::device_uvector make_device_uvector_async( device_span source_data, - rmm::cuda_stream_view stream = cudf::get_default_stream(), + rmm::cuda_stream_view stream, rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource()) { rmm::device_uvector ret(source_data.size(), stream, mr); @@ -201,7 +201,7 @@ rmm::device_uvector make_device_uvector_async( template rmm::device_uvector make_device_uvector_sync( host_span source_data, - rmm::cuda_stream_view stream = cudf::get_default_stream(), + rmm::cuda_stream_view stream, rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource()) { auto ret = make_device_uvector_async(source_data, stream, mr); @@ -228,7 +228,7 @@ template < std::is_convertible_v>>* = nullptr> rmm::device_uvector make_device_uvector_sync( Container const& c, - rmm::cuda_stream_view stream = cudf::get_default_stream(), + rmm::cuda_stream_view stream, rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource()) { return make_device_uvector_sync(host_span{c}, stream, mr); @@ -249,7 +249,7 @@ rmm::device_uvector make_device_uvector_sync( template rmm::device_uvector make_device_uvector_sync( device_span source_data, - rmm::cuda_stream_view stream = cudf::get_default_stream(), + rmm::cuda_stream_view stream, rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource()) { auto ret = make_device_uvector_async(source_data, stream, mr); @@ -276,7 +276,7 @@ template < std::is_convertible_v>>* = nullptr> rmm::device_uvector make_device_uvector_sync( Container const& c, - rmm::cuda_stream_view stream = cudf::get_default_stream(), + rmm::cuda_stream_view stream, rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource()) { return make_device_uvector_sync(device_span{c}, stream, mr); @@ -366,8 +366,8 @@ template < typename Container, std::enable_if_t< std::is_convertible_v>>* = nullptr> -std::vector make_std_vector_sync( - Container const& c, rmm::cuda_stream_view stream = cudf::get_default_stream()) +std::vector make_std_vector_sync(Container const& c, + rmm::cuda_stream_view stream) { return make_std_vector_sync(device_span{c}, stream); } @@ -423,8 +423,7 @@ thrust::host_vector make_host_vector_async( * @return The data copied to the host */ template -thrust::host_vector make_host_vector_sync( - device_span v, rmm::cuda_stream_view stream = cudf::get_default_stream()) +thrust::host_vector make_host_vector_sync(device_span v, rmm::cuda_stream_view stream) { auto result = make_host_vector_async(v, stream); stream.synchronize(); @@ -448,7 +447,7 @@ template < std::enable_if_t< std::is_convertible_v>>* = nullptr> thrust::host_vector make_host_vector_sync( - Container const& c, rmm::cuda_stream_view stream = cudf::get_default_stream()) + Container const& c, rmm::cuda_stream_view stream) { return make_host_vector_sync(device_span{c}, stream); } diff --git a/cpp/include/cudf/detail/valid_if.cuh b/cpp/include/cudf/detail/valid_if.cuh index 56cc73e63e2..04c78bed17d 100644 --- a/cpp/include/cudf/detail/valid_if.cuh +++ b/cpp/include/cudf/detail/valid_if.cuh @@ -90,7 +90,7 @@ std::pair valid_if( InputIterator begin, InputIterator end, Predicate p, - rmm::cuda_stream_view stream = cudf::get_default_stream(), + rmm::cuda_stream_view stream, rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource()) { CUDF_EXPECTS(begin <= end, "Invalid range."); diff --git a/cpp/include/cudf/dictionary/detail/concatenate.hpp b/cpp/include/cudf/dictionary/detail/concatenate.hpp index e893e9d6499..716caa3e304 100644 --- a/cpp/include/cudf/dictionary/detail/concatenate.hpp +++ b/cpp/include/cudf/dictionary/detail/concatenate.hpp @@ -39,7 +39,7 @@ namespace detail { */ std::unique_ptr concatenate( host_span columns, - rmm::cuda_stream_view stream = cudf::get_default_stream(), + rmm::cuda_stream_view stream, rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource()); } // namespace detail diff --git a/cpp/include/cudf/dictionary/detail/encode.hpp b/cpp/include/cudf/dictionary/detail/encode.hpp index 454b8400f87..a16d518dd0d 100644 --- a/cpp/include/cudf/dictionary/detail/encode.hpp +++ b/cpp/include/cudf/dictionary/detail/encode.hpp @@ -74,7 +74,7 @@ std::unique_ptr encode( */ std::unique_ptr decode( dictionary_column_view const& dictionary_column, - rmm::cuda_stream_view stream = cudf::get_default_stream(), + rmm::cuda_stream_view stream, rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource()); /** diff --git a/cpp/include/cudf/dictionary/detail/replace.hpp b/cpp/include/cudf/dictionary/detail/replace.hpp index a13a5eee6cb..85e2d9a3a85 100644 --- a/cpp/include/cudf/dictionary/detail/replace.hpp +++ b/cpp/include/cudf/dictionary/detail/replace.hpp @@ -42,7 +42,7 @@ namespace detail { std::unique_ptr replace_nulls( dictionary_column_view const& input, dictionary_column_view const& replacement, - rmm::cuda_stream_view stream = cudf::get_default_stream(), + rmm::cuda_stream_view stream, rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource()); /** @@ -60,7 +60,7 @@ std::unique_ptr replace_nulls( std::unique_ptr replace_nulls( dictionary_column_view const& input, scalar const& replacement, - rmm::cuda_stream_view stream = cudf::get_default_stream(), + rmm::cuda_stream_view stream, rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource()); } // namespace detail diff --git a/cpp/include/cudf/dictionary/detail/search.hpp b/cpp/include/cudf/dictionary/detail/search.hpp index 9cf45eafc7d..2d65b561cd3 100644 --- a/cpp/include/cudf/dictionary/detail/search.hpp +++ b/cpp/include/cudf/dictionary/detail/search.hpp @@ -34,7 +34,7 @@ namespace detail { std::unique_ptr get_index( dictionary_column_view const& dictionary, scalar const& key, - rmm::cuda_stream_view stream = cudf::get_default_stream(), + rmm::cuda_stream_view stream, rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource()); /** @@ -59,7 +59,7 @@ std::unique_ptr get_index( std::unique_ptr get_insert_index( dictionary_column_view const& dictionary, scalar const& key, - rmm::cuda_stream_view stream = cudf::get_default_stream(), + rmm::cuda_stream_view stream, rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource()); } // namespace detail diff --git a/cpp/include/cudf/dictionary/detail/update_keys.hpp b/cpp/include/cudf/dictionary/detail/update_keys.hpp index 23681d36ee1..7f78effdd05 100644 --- a/cpp/include/cudf/dictionary/detail/update_keys.hpp +++ b/cpp/include/cudf/dictionary/detail/update_keys.hpp @@ -35,7 +35,7 @@ namespace detail { std::unique_ptr add_keys( dictionary_column_view const& dictionary_column, column_view const& new_keys, - rmm::cuda_stream_view stream = cudf::get_default_stream(), + rmm::cuda_stream_view stream, rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource()); /** @@ -47,7 +47,7 @@ std::unique_ptr add_keys( std::unique_ptr remove_keys( dictionary_column_view const& dictionary_column, column_view const& keys_to_remove, - rmm::cuda_stream_view stream = cudf::get_default_stream(), + rmm::cuda_stream_view stream, rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource()); /** @@ -58,7 +58,7 @@ std::unique_ptr remove_keys( */ std::unique_ptr remove_unused_keys( dictionary_column_view const& dictionary_column, - rmm::cuda_stream_view stream = cudf::get_default_stream(), + rmm::cuda_stream_view stream, rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource()); /** @@ -70,7 +70,7 @@ std::unique_ptr remove_unused_keys( std::unique_ptr set_keys( dictionary_column_view const& dictionary_column, column_view const& keys, - rmm::cuda_stream_view stream = cudf::get_default_stream(), + rmm::cuda_stream_view stream, rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource()); /** @@ -81,7 +81,7 @@ std::unique_ptr set_keys( */ std::vector> match_dictionaries( cudf::host_span input, - rmm::cuda_stream_view stream = cudf::get_default_stream(), + rmm::cuda_stream_view stream, rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource()); /** @@ -105,7 +105,7 @@ std::vector> match_dictionaries( */ std::pair>, std::vector> match_dictionaries( std::vector tables, - rmm::cuda_stream_view stream = cudf::get_default_stream(), + rmm::cuda_stream_view stream, rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource()); } // namespace detail diff --git a/cpp/include/cudf/io/detail/avro.hpp b/cpp/include/cudf/io/detail/avro.hpp index 00665873b67..c141e25f939 100644 --- a/cpp/include/cudf/io/detail/avro.hpp +++ b/cpp/include/cudf/io/detail/avro.hpp @@ -39,7 +39,7 @@ namespace avro { table_with_metadata read_avro( std::unique_ptr&& source, avro_reader_options const& options, - rmm::cuda_stream_view stream = cudf::get_default_stream(), + rmm::cuda_stream_view stream, rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource()); } // namespace avro diff --git a/cpp/include/cudf/io/detail/csv.hpp b/cpp/include/cudf/io/detail/csv.hpp index 920b815ce12..59de2ea2f12 100644 --- a/cpp/include/cudf/io/detail/csv.hpp +++ b/cpp/include/cudf/io/detail/csv.hpp @@ -55,7 +55,7 @@ void write_csv(data_sink* sink, table_view const& table, const table_metadata* metadata, csv_writer_options const& options, - rmm::cuda_stream_view stream = cudf::get_default_stream(), + rmm::cuda_stream_view stream, rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource()); } // namespace csv diff --git a/cpp/include/cudf/io/detail/json.hpp b/cpp/include/cudf/io/detail/json.hpp index 6d0d23c3c78..42717fe36df 100644 --- a/cpp/include/cudf/io/detail/json.hpp +++ b/cpp/include/cudf/io/detail/json.hpp @@ -39,7 +39,7 @@ namespace json { table_with_metadata read_json( std::vector>& sources, json_reader_options const& options, - rmm::cuda_stream_view stream = cudf::get_default_stream(), + rmm::cuda_stream_view stream, rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource()); } // namespace json diff --git a/cpp/include/cudf/io/detail/orc.hpp b/cpp/include/cudf/io/detail/orc.hpp index 10bdf6e3e71..4c78502a21b 100644 --- a/cpp/include/cudf/io/detail/orc.hpp +++ b/cpp/include/cudf/io/detail/orc.hpp @@ -74,8 +74,7 @@ class reader { * * @return The set of columns along with table metadata */ - table_with_metadata read(orc_reader_options const& options, - rmm::cuda_stream_view stream = cudf::get_default_stream()); + table_with_metadata read(orc_reader_options const& options, rmm::cuda_stream_view stream); }; /** diff --git a/cpp/include/cudf/lists/detail/concatenate.hpp b/cpp/include/cudf/lists/detail/concatenate.hpp index f2982a67389..5a8b4bc3bf3 100644 --- a/cpp/include/cudf/lists/detail/concatenate.hpp +++ b/cpp/include/cudf/lists/detail/concatenate.hpp @@ -45,7 +45,7 @@ namespace detail { */ std::unique_ptr concatenate( host_span columns, - rmm::cuda_stream_view stream = cudf::get_default_stream(), + rmm::cuda_stream_view stream, rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource()); } // namespace detail diff --git a/cpp/include/cudf/lists/detail/gather.cuh b/cpp/include/cudf/lists/detail/gather.cuh index f53e8ca8033..7db908c5b52 100644 --- a/cpp/include/cudf/lists/detail/gather.cuh +++ b/cpp/include/cudf/lists/detail/gather.cuh @@ -320,7 +320,8 @@ std::unique_ptr gather_list_leaf( std::unique_ptr segmented_gather( lists_column_view const& source_column, lists_column_view const& gather_map_list, - out_of_bounds_policy bounds_policy = out_of_bounds_policy::DONT_CHECK, + out_of_bounds_policy bounds_policy = out_of_bounds_policy::DONT_CHECK, + // Move before bounds_policy? rmm::cuda_stream_view stream = cudf::get_default_stream(), rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource()); diff --git a/cpp/include/cudf/lists/detail/scatter.cuh b/cpp/include/cudf/lists/detail/scatter.cuh index c343eea1014..5d89a9be29c 100644 --- a/cpp/include/cudf/lists/detail/scatter.cuh +++ b/cpp/include/cudf/lists/detail/scatter.cuh @@ -96,7 +96,7 @@ std::unique_ptr scatter_impl( MapIterator scatter_map_end, column_view const& source, column_view const& target, - rmm::cuda_stream_view stream = cudf::get_default_stream(), + rmm::cuda_stream_view stream, rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource()) { CUDF_EXPECTS(column_types_equal(source, target), "Mismatched column types."); @@ -169,7 +169,7 @@ std::unique_ptr scatter( MapIterator scatter_map_begin, MapIterator scatter_map_end, column_view const& target, - rmm::cuda_stream_view stream = cudf::get_default_stream(), + rmm::cuda_stream_view stream, rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource()) { auto const num_rows = target.size(); @@ -226,7 +226,7 @@ std::unique_ptr scatter( MapIterator scatter_map_begin, MapIterator scatter_map_end, column_view const& target, - rmm::cuda_stream_view stream = cudf::get_default_stream(), + rmm::cuda_stream_view stream, rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource()) { auto const num_rows = target.size(); diff --git a/cpp/include/cudf/lists/lists_column_factories.hpp b/cpp/include/cudf/lists/lists_column_factories.hpp index e02fa3fde5f..a6eacb97e91 100644 --- a/cpp/include/cudf/lists/lists_column_factories.hpp +++ b/cpp/include/cudf/lists/lists_column_factories.hpp @@ -38,7 +38,7 @@ namespace detail { std::unique_ptr make_lists_column_from_scalar( list_scalar const& value, size_type size, - rmm::cuda_stream_view stream = cudf::get_default_stream(), + rmm::cuda_stream_view stream, rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource()); } // namespace detail diff --git a/cpp/include/cudf/strings/detail/combine.hpp b/cpp/include/cudf/strings/detail/combine.hpp index 3de97ed69f1..ade28faf645 100644 --- a/cpp/include/cudf/strings/detail/combine.hpp +++ b/cpp/include/cudf/strings/detail/combine.hpp @@ -38,7 +38,8 @@ std::unique_ptr concatenate( table_view const& strings_columns, string_scalar const& separator, string_scalar const& narep, - separator_on_nulls separate_nulls = separator_on_nulls::YES, + separator_on_nulls separate_nulls = separator_on_nulls::YES, + // Move before separate_nulls? rmm::cuda_stream_view stream = cudf::get_default_stream(), rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource()); @@ -52,7 +53,7 @@ std::unique_ptr join_strings( strings_column_view const& strings, string_scalar const& separator, string_scalar const& narep, - rmm::cuda_stream_view stream = cudf::get_default_stream(), + rmm::cuda_stream_view stream, rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource()); /** diff --git a/cpp/include/cudf/strings/detail/concatenate.hpp b/cpp/include/cudf/strings/detail/concatenate.hpp index 76397c15dad..caaeb2afbe7 100644 --- a/cpp/include/cudf/strings/detail/concatenate.hpp +++ b/cpp/include/cudf/strings/detail/concatenate.hpp @@ -44,7 +44,7 @@ namespace detail { */ std::unique_ptr concatenate( host_span columns, - rmm::cuda_stream_view stream = cudf::get_default_stream(), + rmm::cuda_stream_view stream, rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource()); } // namespace detail diff --git a/cpp/include/cudf/strings/detail/copying.hpp b/cpp/include/cudf/strings/detail/copying.hpp index e4ae9917f58..c70952b0962 100644 --- a/cpp/include/cudf/strings/detail/copying.hpp +++ b/cpp/include/cudf/strings/detail/copying.hpp @@ -52,7 +52,8 @@ namespace detail { std::unique_ptr copy_slice( strings_column_view const& strings, size_type start, - size_type end = -1, + size_type end = -1, + // Move before end? rmm::cuda_stream_view stream = cudf::get_default_stream(), rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource()); diff --git a/cpp/include/cudf/strings/detail/fill.hpp b/cpp/include/cudf/strings/detail/fill.hpp index e6a2fa8ba4e..1ad9663a614 100644 --- a/cpp/include/cudf/strings/detail/fill.hpp +++ b/cpp/include/cudf/strings/detail/fill.hpp @@ -47,7 +47,7 @@ std::unique_ptr fill( size_type begin, size_type end, string_scalar const& value, - rmm::cuda_stream_view stream = cudf::get_default_stream(), + rmm::cuda_stream_view stream, rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource()); } // namespace detail diff --git a/cpp/include/cudf/strings/detail/json.hpp b/cpp/include/cudf/strings/detail/json.hpp index 87a1040b67d..8ea579ae5c0 100644 --- a/cpp/include/cudf/strings/detail/json.hpp +++ b/cpp/include/cudf/strings/detail/json.hpp @@ -34,7 +34,7 @@ std::unique_ptr get_json_object( cudf::strings_column_view const& col, cudf::string_scalar const& json_path, get_json_object_options options, - rmm::cuda_stream_view stream = cudf::get_default_stream(), + rmm::cuda_stream_view stream, rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource()); } // namespace detail diff --git a/cpp/include/cudf/strings/detail/replace.hpp b/cpp/include/cudf/strings/detail/replace.hpp index 814188d88c9..a9a6ef00103 100644 --- a/cpp/include/cudf/strings/detail/replace.hpp +++ b/cpp/include/cudf/strings/detail/replace.hpp @@ -47,7 +47,8 @@ std::unique_ptr replace( strings_column_view const& strings, string_scalar const& target, string_scalar const& repl, - int32_t maxrepl = -1, + int32_t maxrepl = -1, + // Move before maxrepl? rmm::cuda_stream_view stream = cudf::get_default_stream(), rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource()); @@ -59,9 +60,10 @@ std::unique_ptr replace( */ std::unique_ptr replace_slice( strings_column_view const& strings, - string_scalar const& repl = string_scalar(""), - size_type start = 0, - size_type stop = -1, + string_scalar const& repl = string_scalar(""), + size_type start = 0, + size_type stop = -1, + // Move before repl? rmm::cuda_stream_view stream = cudf::get_default_stream(), rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource()); @@ -75,7 +77,7 @@ std::unique_ptr replace( strings_column_view const& strings, strings_column_view const& targets, strings_column_view const& repls, - rmm::cuda_stream_view stream = cudf::get_default_stream(), + rmm::cuda_stream_view stream, rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource()); /** @@ -98,7 +100,8 @@ std::unique_ptr replace( */ std::unique_ptr replace_nulls( strings_column_view const& strings, - string_scalar const& repl = string_scalar(""), + string_scalar const& repl = string_scalar(""), + // Move before repl? rmm::cuda_stream_view stream = cudf::get_default_stream(), rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource()); diff --git a/cpp/include/cudf/strings/detail/scatter.cuh b/cpp/include/cudf/strings/detail/scatter.cuh index 10641677ea2..c8a90ea538a 100644 --- a/cpp/include/cudf/strings/detail/scatter.cuh +++ b/cpp/include/cudf/strings/detail/scatter.cuh @@ -62,7 +62,7 @@ std::unique_ptr scatter( SourceIterator end, MapIterator scatter_map, strings_column_view const& target, - rmm::cuda_stream_view stream = cudf::get_default_stream(), + rmm::cuda_stream_view stream, rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource()) { if (target.is_empty()) return make_empty_column(type_id::STRING); diff --git a/cpp/include/cudf/strings/detail/utilities.cuh b/cpp/include/cudf/strings/detail/utilities.cuh index 4eca9a5a55e..9404ac14775 100644 --- a/cpp/include/cudf/strings/detail/utilities.cuh +++ b/cpp/include/cudf/strings/detail/utilities.cuh @@ -53,7 +53,7 @@ template std::unique_ptr make_offsets_child_column( InputIterator begin, InputIterator end, - rmm::cuda_stream_view stream = cudf::get_default_stream(), + rmm::cuda_stream_view stream, rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource()) { CUDF_EXPECTS(begin < end, "Invalid iterator range"); @@ -121,7 +121,7 @@ auto make_strings_children( SizeAndExecuteFunction size_and_exec_fn, size_type exec_size, size_type strings_count, - rmm::cuda_stream_view stream = cudf::get_default_stream(), + rmm::cuda_stream_view stream, rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource()) { auto offsets_column = make_numeric_column( @@ -178,7 +178,7 @@ template auto make_strings_children( SizeAndExecuteFunction size_and_exec_fn, size_type strings_count, - rmm::cuda_stream_view stream = cudf::get_default_stream(), + rmm::cuda_stream_view stream, rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource()) { return make_strings_children(size_and_exec_fn, strings_count, strings_count, stream, mr); diff --git a/cpp/include/cudf/strings/detail/utilities.hpp b/cpp/include/cudf/strings/detail/utilities.hpp index f87932b4608..829e0207110 100644 --- a/cpp/include/cudf/strings/detail/utilities.hpp +++ b/cpp/include/cudf/strings/detail/utilities.hpp @@ -38,7 +38,7 @@ namespace detail { */ std::unique_ptr create_chars_child_column( size_type bytes, - rmm::cuda_stream_view stream = cudf::get_default_stream(), + rmm::cuda_stream_view stream, rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource()); /** @@ -51,7 +51,7 @@ std::unique_ptr create_chars_child_column( */ rmm::device_uvector create_string_vector_from_column( cudf::strings_column_view const strings, - rmm::cuda_stream_view stream = cudf::get_default_stream(), + rmm::cuda_stream_view stream, rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource()); } // namespace detail diff --git a/cpp/include/cudf_test/column_wrapper.hpp b/cpp/include/cudf_test/column_wrapper.hpp index f9f571c252a..91773b2c3f1 100644 --- a/cpp/include/cudf_test/column_wrapper.hpp +++ b/cpp/include/cudf_test/column_wrapper.hpp @@ -732,9 +732,9 @@ class strings_column_wrapper : public detail::column_wrapper { { auto all_valid = thrust::make_constant_iterator(true); auto [chars, offsets] = detail::make_chars_and_offsets(begin, end, all_valid); - auto d_chars = cudf::detail::make_device_uvector_sync(chars); - auto d_offsets = cudf::detail::make_device_uvector_sync(offsets); - wrapped = cudf::make_strings_column(d_chars, d_offsets); + auto d_chars = cudf::detail::make_device_uvector_sync(chars, cudf::get_default_stream()); + auto d_offsets = cudf::detail::make_device_uvector_sync(offsets, cudf::get_default_stream()); + wrapped = cudf::make_strings_column(d_chars, d_offsets); } /** @@ -772,10 +772,10 @@ class strings_column_wrapper : public detail::column_wrapper { size_type num_strings = std::distance(begin, end); auto [chars, offsets] = detail::make_chars_and_offsets(begin, end, v); auto null_mask = detail::make_null_mask_vector(v, v + num_strings); - auto d_chars = cudf::detail::make_device_uvector_sync(chars); - auto d_offsets = cudf::detail::make_device_uvector_sync(offsets); - auto d_bitmask = cudf::detail::make_device_uvector_sync(null_mask); - wrapped = cudf::make_strings_column(d_chars, d_offsets, d_bitmask); + auto d_chars = cudf::detail::make_device_uvector_sync(chars, cudf::get_default_stream()); + auto d_offsets = cudf::detail::make_device_uvector_sync(offsets, cudf::get_default_stream()); + auto d_bitmask = cudf::detail::make_device_uvector_sync(null_mask, cudf::get_default_stream()); + wrapped = cudf::make_strings_column(d_chars, d_offsets, d_bitmask); } /** diff --git a/cpp/include/cudf_test/tdigest_utilities.cuh b/cpp/include/cudf_test/tdigest_utilities.cuh index 6e1982164e5..250f8ea8580 100644 --- a/cpp/include/cudf_test/tdigest_utilities.cuh +++ b/cpp/include/cudf_test/tdigest_utilities.cuh @@ -217,7 +217,7 @@ void tdigest_simple_all_nulls_aggregation(Func op) static_cast(values).type(), tdigest_gen{}, op, values, delta); // NOTE: an empty tdigest column still has 1 row. - auto expected = cudf::detail::tdigest::make_empty_tdigest_column(); + auto expected = cudf::detail::tdigest::make_empty_tdigest_column(cudf::get_default_stream()); CUDF_TEST_EXPECT_COLUMNS_EQUAL(*result, *expected); } @@ -508,9 +508,9 @@ template void tdigest_merge_empty(MergeFunc merge_op) { // 3 empty tdigests all in the same group - auto a = cudf::detail::tdigest::make_empty_tdigest_column(); - auto b = cudf::detail::tdigest::make_empty_tdigest_column(); - auto c = cudf::detail::tdigest::make_empty_tdigest_column(); + auto a = cudf::detail::tdigest::make_empty_tdigest_column(cudf::get_default_stream()); + auto b = cudf::detail::tdigest::make_empty_tdigest_column(cudf::get_default_stream()); + auto c = cudf::detail::tdigest::make_empty_tdigest_column(cudf::get_default_stream()); std::vector cols; cols.push_back(*a); cols.push_back(*b); @@ -520,7 +520,7 @@ void tdigest_merge_empty(MergeFunc merge_op) auto const delta = 1000; auto result = merge_op(*values, delta); - auto expected = cudf::detail::tdigest::make_empty_tdigest_column(); + auto expected = cudf::detail::tdigest::make_empty_tdigest_column(cudf::get_default_stream()); CUDF_TEST_EXPECT_COLUMNS_EQUAL(*expected, *result); } diff --git a/cpp/include/nvtext/detail/tokenize.hpp b/cpp/include/nvtext/detail/tokenize.hpp index c06e6211654..9c1cdbd6310 100644 --- a/cpp/include/nvtext/detail/tokenize.hpp +++ b/cpp/include/nvtext/detail/tokenize.hpp @@ -38,8 +38,9 @@ namespace detail { std::unique_ptr tokenize( cudf::strings_column_view const& strings, cudf::string_scalar const& delimiter = cudf::string_scalar{""}, - rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource()); + // Move before delimiter? + rmm::cuda_stream_view stream = cudf::get_default_stream(), + rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource()); /** * @copydoc nvtext::tokenize(strings_column_view const&,strings_column_view @@ -54,7 +55,7 @@ std::unique_ptr tokenize( std::unique_ptr tokenize( cudf::strings_column_view const& strings, cudf::strings_column_view const& delimiters, - rmm::cuda_stream_view stream = cudf::get_default_stream(), + rmm::cuda_stream_view stream, rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource()); /** @@ -71,8 +72,9 @@ std::unique_ptr tokenize( std::unique_ptr count_tokens( cudf::strings_column_view const& strings, cudf::string_scalar const& delimiter = cudf::string_scalar{""}, - rmm::cuda_stream_view stream = cudf::get_default_stream(), - rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource()); + // Move before delimiter? + rmm::cuda_stream_view stream = cudf::get_default_stream(), + rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource()); /** * @copydoc nvtext::count_tokens(strings_column_view const&,strings_column_view @@ -87,7 +89,7 @@ std::unique_ptr count_tokens( std::unique_ptr count_tokens( cudf::strings_column_view const& strings, cudf::strings_column_view const& delimiters, - rmm::cuda_stream_view stream = cudf::get_default_stream(), + rmm::cuda_stream_view stream, rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource()); } // namespace detail diff --git a/cpp/src/bitmask/null_mask.cu b/cpp/src/bitmask/null_mask.cu index 6fef15d58d7..958bf21e6df 100644 --- a/cpp/src/bitmask/null_mask.cu +++ b/cpp/src/bitmask/null_mask.cu @@ -165,7 +165,7 @@ rmm::device_buffer create_null_mask(size_type size, // or null, otherwise; void set_null_mask(bitmask_type* bitmask, size_type begin_bit, size_type end_bit, bool valid) { - return detail::set_null_mask(bitmask, begin_bit, end_bit, valid); + return detail::set_null_mask(bitmask, begin_bit, end_bit, valid, cudf::get_default_stream()); } namespace detail { diff --git a/cpp/src/copying/purge_nonempty_nulls.cu b/cpp/src/copying/purge_nonempty_nulls.cu index 35eb13119f7..ab3cfefd518 100644 --- a/cpp/src/copying/purge_nonempty_nulls.cu +++ b/cpp/src/copying/purge_nonempty_nulls.cu @@ -104,7 +104,10 @@ bool may_have_nonempty_nulls(column_view const& input) /** * @copydoc cudf::has_nonempty_nulls */ -bool has_nonempty_nulls(column_view const& input) { return detail::has_nonempty_nulls(input); } +bool has_nonempty_nulls(column_view const& input) +{ + return detail::has_nonempty_nulls(input, cudf::get_default_stream()); +} /** * @copydoc cudf::purge_nonempty_nulls(lists_column_view const&, rmm::mr::device_memory_resource*) diff --git a/cpp/src/dictionary/remove_keys.cu b/cpp/src/dictionary/remove_keys.cu index 4f17fac3129..8a703959d9e 100644 --- a/cpp/src/dictionary/remove_keys.cu +++ b/cpp/src/dictionary/remove_keys.cu @@ -59,7 +59,7 @@ template std::unique_ptr remove_keys_fn( dictionary_column_view const& dictionary_column, KeysKeeper keys_to_keep_fn, - rmm::cuda_stream_view stream = cudf::get_default_stream(), + rmm::cuda_stream_view stream, rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource()) { auto const keys_view = dictionary_column.keys(); @@ -151,7 +151,7 @@ std::unique_ptr remove_keys_fn( std::unique_ptr remove_keys( dictionary_column_view const& dictionary_column, column_view const& keys_to_remove, - rmm::cuda_stream_view stream = cudf::get_default_stream(), + rmm::cuda_stream_view stream, rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource()) { CUDF_EXPECTS(!keys_to_remove.has_nulls(), "keys_to_remove must not have nulls"); @@ -168,7 +168,7 @@ std::unique_ptr remove_keys( std::unique_ptr remove_unused_keys( dictionary_column_view const& dictionary_column, - rmm::cuda_stream_view stream = cudf::get_default_stream(), + rmm::cuda_stream_view stream, rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource()) { // locate the keys to remove diff --git a/cpp/src/hash/concurrent_unordered_map.cuh b/cpp/src/hash/concurrent_unordered_map.cuh index a268e2ef778..f99aabc56bf 100644 --- a/cpp/src/hash/concurrent_unordered_map.cuh +++ b/cpp/src/hash/concurrent_unordered_map.cuh @@ -159,7 +159,7 @@ class concurrent_unordered_map { * storage */ static auto create(size_type capacity, - rmm::cuda_stream_view stream = cudf::get_default_stream(), + rmm::cuda_stream_view stream, const mapped_type unused_element = std::numeric_limits::max(), const key_type unused_key = std::numeric_limits::max(), const Hasher& hash_function = hasher(), @@ -421,8 +421,7 @@ class concurrent_unordered_map { } } - void assign_async(const concurrent_unordered_map& other, - rmm::cuda_stream_view stream = cudf::get_default_stream()) + void assign_async(const concurrent_unordered_map& other, rmm::cuda_stream_view stream) { if (other.m_capacity <= m_capacity) { m_capacity = other.m_capacity; @@ -440,7 +439,7 @@ class concurrent_unordered_map { stream.value())); } - void clear_async(rmm::cuda_stream_view stream = cudf::get_default_stream()) + void clear_async(rmm::cuda_stream_view stream) { constexpr int block_size = 128; init_hashtbl<<<((m_capacity - 1) / block_size) + 1, block_size, 0, stream.value()>>>( @@ -455,7 +454,7 @@ class concurrent_unordered_map { } } - void prefetch(const int dev_id, rmm::cuda_stream_view stream = cudf::get_default_stream()) + void prefetch(const int dev_id, rmm::cuda_stream_view stream) { cudaPointerAttributes hashtbl_values_ptr_attributes; cudaError_t status = cudaPointerGetAttributes(&hashtbl_values_ptr_attributes, m_hashtbl_values); @@ -475,7 +474,7 @@ class concurrent_unordered_map { * * @param stream CUDA stream used for device memory operations and kernel launches. */ - void destroy(rmm::cuda_stream_view stream = cudf::get_default_stream()) + void destroy(rmm::cuda_stream_view stream) { m_allocator.deallocate(m_hashtbl_values, m_capacity, stream); delete this; @@ -516,7 +515,7 @@ class concurrent_unordered_map { const Hasher& hash_function, const Equality& equal, const allocator_type& allocator, - rmm::cuda_stream_view stream = cudf::get_default_stream()) + rmm::cuda_stream_view stream) : m_hf(hash_function), m_equal(equal), m_allocator(allocator), diff --git a/cpp/src/io/functions.cpp b/cpp/src/io/functions.cpp index 968d3827bfe..f58a34a5b7b 100644 --- a/cpp/src/io/functions.cpp +++ b/cpp/src/io/functions.cpp @@ -349,7 +349,7 @@ table_with_metadata read_orc(orc_reader_options const& options, rmm::mr::device_ auto reader = std::make_unique( std::move(datasources), options, cudf::get_default_stream(), mr); - return reader->read(options); + return reader->read(options, cudf::get_default_stream()); } /** diff --git a/cpp/src/io/json/json_column.cu b/cpp/src/io/json/json_column.cu index 36329db3e88..fb7091018a6 100644 --- a/cpp/src/io/json/json_column.cu +++ b/cpp/src/io/json/json_column.cu @@ -73,7 +73,7 @@ auto print_vec = [](auto const& cpu, auto const name, auto converter) { void print_tree(host_span input, tree_meta_t const& d_gpu_tree, - rmm::cuda_stream_view stream = cudf::get_default_stream()) + rmm::cuda_stream_view stream) { print_vec(cudf::detail::make_std_vector_async(d_gpu_tree.node_categories, stream), "node_categories", diff --git a/cpp/src/join/conditional_join.hpp b/cpp/src/join/conditional_join.hpp index 23ecfebc52a..7c329cd8e17 100644 --- a/cpp/src/join/conditional_join.hpp +++ b/cpp/src/join/conditional_join.hpp @@ -68,7 +68,7 @@ std::size_t compute_conditional_join_output_size( table_view const& right, ast::expression const& binary_predicate, join_kind JoinKind, - rmm::cuda_stream_view stream = cudf::get_default_stream(), + rmm::cuda_stream_view stream, rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource()); } // namespace detail diff --git a/cpp/src/lists/combine/concatenate_rows.cu b/cpp/src/lists/combine/concatenate_rows.cu index 0a3ff333d6c..8b006548391 100644 --- a/cpp/src/lists/combine/concatenate_rows.cu +++ b/cpp/src/lists/combine/concatenate_rows.cu @@ -245,7 +245,8 @@ std::unique_ptr concatenate_rows(table_view const& input, row_null_counts = row_null_counts.data()] __device__(size_t i) -> size_type { auto const row_index = i % num_rows; return row_null_counts[row_index] != num_columns; - }); + }, + stream); } // NULLIFY_OUTPUT_ROW. Output row is nullfied if any input row is null return cudf::detail::valid_if( @@ -255,7 +256,8 @@ std::unique_ptr concatenate_rows(table_view const& input, row_null_counts = row_null_counts.data()] __device__(size_t i) -> size_type { auto const row_index = i % num_rows; return row_null_counts[row_index] == 0; - }); + }, + stream); }(); concat->set_null_mask(std::move(null_mask), null_count); } diff --git a/cpp/src/reductions/reductions.cpp b/cpp/src/reductions/reductions.cpp index a7d7e14a193..d7a195c088c 100644 --- a/cpp/src/reductions/reductions.cpp +++ b/cpp/src/reductions/reductions.cpp @@ -142,7 +142,7 @@ std::unique_ptr reduce( reduce_aggregation const& agg, data_type output_dtype, std::optional> init, - rmm::cuda_stream_view stream = cudf::get_default_stream(), + rmm::cuda_stream_view stream, rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource()) { CUDF_EXPECTS(!init.has_value() || col.type() == init.value().get().type(), @@ -157,7 +157,7 @@ std::unique_ptr reduce( // handcraft the default scalar with input column. if (col.size() <= col.null_count()) { if (agg.kind == aggregation::TDIGEST || agg.kind == aggregation::MERGE_TDIGEST) { - return detail::tdigest::make_empty_tdigest_scalar(); + return detail::tdigest::make_empty_tdigest_scalar(stream); } if (col.type().id() == type_id::EMPTY || col.type() != output_dtype) { // Under some circumstance, the output type will become the List of input type, diff --git a/cpp/src/stream_compaction/distinct_count.cu b/cpp/src/stream_compaction/distinct_count.cu index 96fcd8b53fc..09bd1ff7f5c 100644 --- a/cpp/src/stream_compaction/distinct_count.cu +++ b/cpp/src/stream_compaction/distinct_count.cu @@ -187,7 +187,7 @@ cudf::size_type distinct_count(column_view const& input, nan_policy nan_handling) { CUDF_FUNC_RANGE(); - return detail::distinct_count(input, null_handling, nan_handling); + return detail::distinct_count(input, null_handling, nan_handling, cudf::get_default_stream()); } cudf::size_type distinct_count(table_view const& input, null_equality nulls_equal) diff --git a/cpp/src/stream_compaction/unique_count.cu b/cpp/src/stream_compaction/unique_count.cu index 8a793ef4729..8363ee8120b 100644 --- a/cpp/src/stream_compaction/unique_count.cu +++ b/cpp/src/stream_compaction/unique_count.cu @@ -127,7 +127,7 @@ cudf::size_type unique_count(column_view const& input, nan_policy nan_handling) { CUDF_FUNC_RANGE(); - return detail::unique_count(input, null_handling, nan_handling); + return detail::unique_count(input, null_handling, nan_handling, cudf::get_default_stream()); } cudf::size_type unique_count(table_view const& input, null_equality nulls_equal) diff --git a/cpp/src/strings/replace/replace_re.cu b/cpp/src/strings/replace/replace_re.cu index 34175f2ec6c..04cb074c016 100644 --- a/cpp/src/strings/replace/replace_re.cu +++ b/cpp/src/strings/replace/replace_re.cu @@ -106,7 +106,7 @@ std::unique_ptr replace_re( string_scalar const& replacement, std::optional max_replace_count, regex_flags const flags, - rmm::cuda_stream_view stream = cudf::get_default_stream(), + rmm::cuda_stream_view stream, rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource()) { if (input.is_empty()) return make_empty_column(type_id::STRING); diff --git a/cpp/src/strings/strings_column_factories.cu b/cpp/src/strings/strings_column_factories.cu index 8c5916283be..ca30eb3f6d8 100644 --- a/cpp/src/strings/strings_column_factories.cu +++ b/cpp/src/strings/strings_column_factories.cu @@ -61,7 +61,7 @@ std::unique_ptr make_strings_column( device_span offsets, size_type null_count, rmm::device_buffer&& null_mask, - rmm::cuda_stream_view stream = cudf::get_default_stream(), + rmm::cuda_stream_view stream, rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource()) { CUDF_FUNC_RANGE(); diff --git a/cpp/src/structs/utilities.cpp b/cpp/src/structs/utilities.cpp index bf4216b6983..c924163daf2 100644 --- a/cpp/src/structs/utilities.cpp +++ b/cpp/src/structs/utilities.cpp @@ -118,8 +118,8 @@ struct table_flattener { */ void superimpose_nulls(table_view const& input_table) { - auto [table, null_masks] = superimpose_parent_nulls(input_table); - this->input = table; + auto [table, null_masks] = superimpose_parent_nulls(input_table, cudf::get_default_stream()); + this->input = table; this->superimposed_nullmasks = std::move(null_masks); } diff --git a/cpp/tests/bitmask/bitmask_tests.cpp b/cpp/tests/bitmask/bitmask_tests.cpp index e4fdf2ddabb..f180ff64115 100644 --- a/cpp/tests/bitmask/bitmask_tests.cpp +++ b/cpp/tests/bitmask/bitmask_tests.cpp @@ -86,7 +86,8 @@ TEST_F(CountBitmaskTest, NullMask) rmm::device_uvector make_mask(cudf::size_type size, bool fill_valid = false) { if (!fill_valid) { - return cudf::detail::make_zeroed_device_uvector_sync(size); + return cudf::detail::make_zeroed_device_uvector_sync( + size, cudf::get_default_stream()); } else { auto ret = rmm::device_uvector(size, cudf::get_default_stream()); CUDF_CUDA_TRY(cudaMemsetAsync(ret.data(), diff --git a/cpp/tests/bitmask/is_element_valid_tests.cpp b/cpp/tests/bitmask/is_element_valid_tests.cpp index 888d0103f03..a369c179bd9 100644 --- a/cpp/tests/bitmask/is_element_valid_tests.cpp +++ b/cpp/tests/bitmask/is_element_valid_tests.cpp @@ -29,11 +29,11 @@ struct IsElementValidTest : public cudf::test::BaseFixture { TEST_F(IsElementValidTest, IsElementValidBasic) { cudf::test::fixed_width_column_wrapper col({1, 1, 1, 1, 1}, {1, 0, 0, 0, 1}); - EXPECT_TRUE(cudf::detail::is_element_valid_sync(col, 0)); - EXPECT_FALSE(cudf::detail::is_element_valid_sync(col, 1)); - EXPECT_FALSE(cudf::detail::is_element_valid_sync(col, 2)); - EXPECT_FALSE(cudf::detail::is_element_valid_sync(col, 3)); - EXPECT_TRUE(cudf::detail::is_element_valid_sync(col, 4)); + EXPECT_TRUE(cudf::detail::is_element_valid_sync(col, 0, cudf::get_default_stream())); + EXPECT_FALSE(cudf::detail::is_element_valid_sync(col, 1, cudf::get_default_stream())); + EXPECT_FALSE(cudf::detail::is_element_valid_sync(col, 2, cudf::get_default_stream())); + EXPECT_FALSE(cudf::detail::is_element_valid_sync(col, 3, cudf::get_default_stream())); + EXPECT_TRUE(cudf::detail::is_element_valid_sync(col, 4, cudf::get_default_stream())); } TEST_F(IsElementValidTest, IsElementValidLarge) @@ -46,7 +46,7 @@ TEST_F(IsElementValidTest, IsElementValidLarge) cudf::test::fixed_width_column_wrapper col(val, val + num_rows, valid); for (int i = 0; i < num_rows; i++) { - EXPECT_EQ(cudf::detail::is_element_valid_sync(col, i), filter(i)); + EXPECT_EQ(cudf::detail::is_element_valid_sync(col, i, cudf::get_default_stream()), filter(i)); } } @@ -55,16 +55,16 @@ TEST_F(IsElementValidTest, IsElementValidOffset) cudf::test::fixed_width_column_wrapper col({1, 1, 1, 1, 1}, {1, 0, 0, 0, 1}); { auto offset_col = cudf::slice(col, {1, 5}).front(); - EXPECT_FALSE(cudf::detail::is_element_valid_sync(offset_col, 0)); - EXPECT_FALSE(cudf::detail::is_element_valid_sync(offset_col, 1)); - EXPECT_FALSE(cudf::detail::is_element_valid_sync(offset_col, 2)); - EXPECT_TRUE(cudf::detail::is_element_valid_sync(offset_col, 3)); + EXPECT_FALSE(cudf::detail::is_element_valid_sync(offset_col, 0, cudf::get_default_stream())); + EXPECT_FALSE(cudf::detail::is_element_valid_sync(offset_col, 1, cudf::get_default_stream())); + EXPECT_FALSE(cudf::detail::is_element_valid_sync(offset_col, 2, cudf::get_default_stream())); + EXPECT_TRUE(cudf::detail::is_element_valid_sync(offset_col, 3, cudf::get_default_stream())); } { auto offset_col = cudf::slice(col, {2, 5}).front(); - EXPECT_FALSE(cudf::detail::is_element_valid_sync(offset_col, 0)); - EXPECT_FALSE(cudf::detail::is_element_valid_sync(offset_col, 1)); - EXPECT_TRUE(cudf::detail::is_element_valid_sync(offset_col, 2)); + EXPECT_FALSE(cudf::detail::is_element_valid_sync(offset_col, 0, cudf::get_default_stream())); + EXPECT_FALSE(cudf::detail::is_element_valid_sync(offset_col, 1, cudf::get_default_stream())); + EXPECT_TRUE(cudf::detail::is_element_valid_sync(offset_col, 2, cudf::get_default_stream())); } } @@ -80,6 +80,7 @@ TEST_F(IsElementValidTest, IsElementValidOffsetLarge) auto offset_col = cudf::slice(col, {offset, num_rows}).front(); for (int i = 0; i < offset_col.size(); i++) { - EXPECT_EQ(cudf::detail::is_element_valid_sync(offset_col, i), filter(i + offset)); + EXPECT_EQ(cudf::detail::is_element_valid_sync(offset_col, i, cudf::get_default_stream()), + filter(i + offset)); } } diff --git a/cpp/tests/bitmask/valid_if_tests.cu b/cpp/tests/bitmask/valid_if_tests.cu index 816a89500da..cdc453be8e4 100644 --- a/cpp/tests/bitmask/valid_if_tests.cu +++ b/cpp/tests/bitmask/valid_if_tests.cu @@ -40,8 +40,10 @@ struct all_null { TEST_F(ValidIfTest, EmptyRange) { - auto actual = cudf::detail::valid_if( - thrust::make_counting_iterator(0), thrust::make_counting_iterator(0), odds_valid{}); + auto actual = cudf::detail::valid_if(thrust::make_counting_iterator(0), + thrust::make_counting_iterator(0), + odds_valid{}, + cudf::get_default_stream()); auto const& buffer = actual.first; EXPECT_EQ(0u, buffer.size()); EXPECT_EQ(nullptr, buffer.data()); @@ -50,18 +52,21 @@ TEST_F(ValidIfTest, EmptyRange) TEST_F(ValidIfTest, InvalidRange) { - EXPECT_THROW( - cudf::detail::valid_if( - thrust::make_counting_iterator(1), thrust::make_counting_iterator(0), odds_valid{}), - cudf::logic_error); + EXPECT_THROW(cudf::detail::valid_if(thrust::make_counting_iterator(1), + thrust::make_counting_iterator(0), + odds_valid{}, + cudf::get_default_stream()), + cudf::logic_error); } TEST_F(ValidIfTest, OddsValid) { auto iter = cudf::detail::make_counting_transform_iterator(0, odds_valid{}); auto expected = cudf::test::detail::make_null_mask(iter, iter + 10000); - auto actual = cudf::detail::valid_if( - thrust::make_counting_iterator(0), thrust::make_counting_iterator(10000), odds_valid{}); + auto actual = cudf::detail::valid_if(thrust::make_counting_iterator(0), + thrust::make_counting_iterator(10000), + odds_valid{}, + cudf::get_default_stream()); CUDF_TEST_EXPECT_EQUAL_BUFFERS(expected.data(), actual.first.data(), expected.size()); EXPECT_EQ(5000, actual.second); } @@ -70,8 +75,10 @@ TEST_F(ValidIfTest, AllValid) { auto iter = cudf::detail::make_counting_transform_iterator(0, all_valid{}); auto expected = cudf::test::detail::make_null_mask(iter, iter + 10000); - auto actual = cudf::detail::valid_if( - thrust::make_counting_iterator(0), thrust::make_counting_iterator(10000), all_valid{}); + auto actual = cudf::detail::valid_if(thrust::make_counting_iterator(0), + thrust::make_counting_iterator(10000), + all_valid{}, + cudf::get_default_stream()); CUDF_TEST_EXPECT_EQUAL_BUFFERS(expected.data(), actual.first.data(), expected.size()); EXPECT_EQ(0, actual.second); } @@ -80,8 +87,10 @@ TEST_F(ValidIfTest, AllNull) { auto iter = cudf::detail::make_counting_transform_iterator(0, all_null{}); auto expected = cudf::test::detail::make_null_mask(iter, iter + 10000); - auto actual = cudf::detail::valid_if( - thrust::make_counting_iterator(0), thrust::make_counting_iterator(10000), all_null{}); + auto actual = cudf::detail::valid_if(thrust::make_counting_iterator(0), + thrust::make_counting_iterator(10000), + all_null{}, + cudf::get_default_stream()); CUDF_TEST_EXPECT_EQUAL_BUFFERS(expected.data(), actual.first.data(), expected.size()); EXPECT_EQ(10000, actual.second); } diff --git a/cpp/tests/copying/detail_gather_tests.cu b/cpp/tests/copying/detail_gather_tests.cu index 08037b78a70..a8abaa33ac3 100644 --- a/cpp/tests/copying/detail_gather_tests.cu +++ b/cpp/tests/copying/detail_gather_tests.cu @@ -96,7 +96,8 @@ TYPED_TEST(GatherTest, GatherDetailInvalidIndexTest) cudf::detail::gather(source_table, gather_map, cudf::out_of_bounds_policy::NULLIFY, - cudf::detail::negative_index_policy::NOT_ALLOWED); + cudf::detail::negative_index_policy::NOT_ALLOWED, + cudf::get_default_stream()); auto expect_data = cudf::detail::make_counting_transform_iterator(0, [](auto i) { return (i % 2) ? 0 : i; }); diff --git a/cpp/tests/copying/gather_list_tests.cpp b/cpp/tests/copying/gather_list_tests.cpp index 1caecb558e2..b0a0f99361a 100644 --- a/cpp/tests/copying/gather_list_tests.cpp +++ b/cpp/tests/copying/gather_list_tests.cpp @@ -266,7 +266,8 @@ TYPED_TEST(GatherTestListTyped, GatherDetailInvalidIndex) auto results = cudf::detail::gather(source_table, gather_map, cudf::out_of_bounds_policy::NULLIFY, - cudf::detail::negative_index_policy::NOT_ALLOWED); + cudf::detail::negative_index_policy::NOT_ALLOWED, + cudf::get_default_stream()); std::vector expected_validity{1, 0, 0, 1}; LCW expected{{{{2, 3}, {4, 5}}, diff --git a/cpp/tests/copying/gather_str_tests.cpp b/cpp/tests/copying/gather_str_tests.cpp index 4e4e9619fbf..3db2ce399cc 100644 --- a/cpp/tests/copying/gather_str_tests.cpp +++ b/cpp/tests/copying/gather_str_tests.cpp @@ -86,7 +86,8 @@ TEST_F(GatherTestStr, Gather) auto results = cudf::detail::gather(source_table, gather_map, cudf::out_of_bounds_policy::NULLIFY, - cudf::detail::negative_index_policy::NOT_ALLOWED); + cudf::detail::negative_index_policy::NOT_ALLOWED, + cudf::get_default_stream()); std::vector h_expected; std::vector expected_validity; @@ -116,7 +117,8 @@ TEST_F(GatherTestStr, GatherDontCheckOutOfBounds) auto results = cudf::detail::gather(source_table, gather_map, cudf::out_of_bounds_policy::DONT_CHECK, - cudf::detail::negative_index_policy::NOT_ALLOWED); + cudf::detail::negative_index_policy::NOT_ALLOWED, + cudf::get_default_stream()); std::vector h_expected; for (auto itr = h_map.begin(); itr != h_map.end(); ++itr) { @@ -134,7 +136,8 @@ TEST_F(GatherTestStr, GatherEmptyMapStringsColumn) auto results = cudf::detail::gather(cudf::table_view({zero_size_strings_column}), gather_map, cudf::out_of_bounds_policy::NULLIFY, - cudf::detail::negative_index_policy::NOT_ALLOWED); + cudf::detail::negative_index_policy::NOT_ALLOWED, + cudf::get_default_stream()); cudf::test::expect_column_empty(results->get_column(0).view()); } @@ -147,6 +150,7 @@ TEST_F(GatherTestStr, GatherZeroSizeStringsColumn) auto results = cudf::detail::gather(cudf::table_view({zero_size_strings_column}), gather_map, cudf::out_of_bounds_policy::NULLIFY, - cudf::detail::negative_index_policy::NOT_ALLOWED); + cudf::detail::negative_index_policy::NOT_ALLOWED, + cudf::get_default_stream()); CUDF_TEST_EXPECT_COLUMNS_EQUAL(expected, results->get_column(0).view()); } diff --git a/cpp/tests/copying/purge_nonempty_nulls_tests.cpp b/cpp/tests/copying/purge_nonempty_nulls_tests.cpp index 77fd3f66ee5..b917386648a 100644 --- a/cpp/tests/copying/purge_nonempty_nulls_tests.cpp +++ b/cpp/tests/copying/purge_nonempty_nulls_tests.cpp @@ -75,7 +75,8 @@ TEST_F(PurgeNonEmptyNullsTest, SingleLevelList) EXPECT_FALSE(cudf::has_nonempty_nulls(*input)); // Set nullmask, post construction. - cudf::detail::set_null_mask(input->mutable_view().null_mask(), 2, 3, false); + cudf::detail::set_null_mask( + input->mutable_view().null_mask(), 2, 3, false, cudf::get_default_stream()); EXPECT_TRUE(cudf::may_have_nonempty_nulls(*input)); EXPECT_TRUE(cudf::has_nonempty_nulls(*input)); @@ -157,7 +158,8 @@ TEST_F(PurgeNonEmptyNullsTest, TwoLevelList) EXPECT_FALSE(cudf::has_nonempty_nulls(*input)); // Set nullmask, post construction. - cudf::detail::set_null_mask(input->mutable_view().null_mask(), 3, 4, false); + cudf::detail::set_null_mask( + input->mutable_view().null_mask(), 3, 4, false, cudf::get_default_stream()); EXPECT_TRUE(cudf::may_have_nonempty_nulls(*input)); EXPECT_TRUE(cudf::has_nonempty_nulls(*input)); @@ -211,7 +213,8 @@ TEST_F(PurgeNonEmptyNullsTest, ThreeLevelList) EXPECT_FALSE(cudf::has_nonempty_nulls(*input)); // Set nullmask, post construction. - cudf::detail::set_null_mask(input->mutable_view().null_mask(), 3, 4, false); + cudf::detail::set_null_mask( + input->mutable_view().null_mask(), 3, 4, false, cudf::get_default_stream()); EXPECT_TRUE(cudf::may_have_nonempty_nulls(*input)); EXPECT_TRUE(cudf::has_nonempty_nulls(*input)); @@ -264,7 +267,8 @@ TEST_F(PurgeNonEmptyNullsTest, ListOfStrings) EXPECT_FALSE(cudf::has_nonempty_nulls(*input)); // Set nullmask, post construction. - cudf::detail::set_null_mask(input->mutable_view().null_mask(), 2, 3, false); + cudf::detail::set_null_mask( + input->mutable_view().null_mask(), 2, 3, false, cudf::get_default_stream()); EXPECT_TRUE(cudf::may_have_nonempty_nulls(*input)); EXPECT_TRUE(cudf::has_nonempty_nulls(*input)); @@ -350,7 +354,8 @@ TEST_F(PurgeNonEmptyNullsTest, UnsanitizedListOfUnsanitizedStrings) EXPECT_TRUE(cudf::has_nonempty_nulls(*lists)); // Set lists nullmask, post construction. - cudf::detail::set_null_mask(lists->mutable_view().null_mask(), 2, 3, false); + cudf::detail::set_null_mask( + lists->mutable_view().null_mask(), 2, 3, false, cudf::get_default_stream()); EXPECT_TRUE(cudf::may_have_nonempty_nulls(*lists)); EXPECT_TRUE(cudf::has_nonempty_nulls(*lists)); diff --git a/cpp/tests/copying/segmented_gather_list_tests.cpp b/cpp/tests/copying/segmented_gather_list_tests.cpp index e3a003c51d1..180125b7880 100644 --- a/cpp/tests/copying/segmented_gather_list_tests.cpp +++ b/cpp/tests/copying/segmented_gather_list_tests.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020-2021, NVIDIA CORPORATION. + * Copyright (c) 2020-2022, NVIDIA CORPORATION. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -306,7 +306,8 @@ TYPED_TEST(SegmentedGatherTest, GatherOnNonCompactedNullLists) auto const input = list.release(); // Set non-empty list row at index 5 to null. - cudf::detail::set_null_mask(input->mutable_view().null_mask(), 5, 6, false); + cudf::detail::set_null_mask( + input->mutable_view().null_mask(), 5, 6, false, cudf::get_default_stream()); auto const gather_map = LCW{{-1, 2, 1, -4}, {0}, {-2, 1}, {0, 2, 1}, {}, {0}, {1, 2}}; auto const expected = diff --git a/cpp/tests/device_atomics/device_atomics_test.cu b/cpp/tests/device_atomics/device_atomics_test.cu index fd43690dcff..43874b84114 100644 --- a/cpp/tests/device_atomics/device_atomics_test.cu +++ b/cpp/tests/device_atomics/device_atomics_test.cu @@ -141,8 +141,9 @@ struct AtomicsTest : public cudf::test::BaseFixture { result_init[4] = result_init[1]; result_init[5] = result_init[2]; - auto dev_data = cudf::detail::make_device_uvector_sync(v); - auto dev_result = cudf::detail::make_device_uvector_sync(result_init); + auto dev_data = cudf::detail::make_device_uvector_sync(v, cudf::get_default_stream()); + auto dev_result = + cudf::detail::make_device_uvector_sync(result_init, cudf::get_default_stream()); if (block_size == 0) { block_size = vec_size; } @@ -154,7 +155,7 @@ struct AtomicsTest : public cudf::test::BaseFixture { dev_result.data(), dev_data.data(), vec_size); } - auto host_result = cudf::detail::make_host_vector_sync(dev_result); + auto host_result = cudf::detail::make_host_vector_sync(dev_result, cudf::get_default_stream()); CUDF_CHECK_CUDA(cudf::get_default_stream().value()); @@ -293,15 +294,15 @@ struct AtomicsBitwiseOpTest : public cudf::test::BaseFixture { exact[2] = std::accumulate( v.begin(), v.end(), identity[2], [](T acc, uint64_t i) { return acc ^ T(i); }); - auto dev_result = cudf::detail::make_device_uvector_sync(identity); - auto dev_data = cudf::detail::make_device_uvector_sync(v); + auto dev_result = cudf::detail::make_device_uvector_sync(identity, cudf::get_default_stream()); + auto dev_data = cudf::detail::make_device_uvector_sync(v, cudf::get_default_stream()); if (block_size == 0) { block_size = vec_size; } gpu_atomic_bitwiseOp_test<<>>( reinterpret_cast(dev_result.data()), reinterpret_cast(dev_data.data()), vec_size); - auto host_result = cudf::detail::make_host_vector_sync(dev_result); + auto host_result = cudf::detail::make_host_vector_sync(dev_result, cudf::get_default_stream()); CUDF_CHECK_CUDA(cudf::get_default_stream().value()); diff --git a/cpp/tests/dictionary/search_test.cpp b/cpp/tests/dictionary/search_test.cpp index 53eb429f4b6..8b77d71593d 100644 --- a/cpp/tests/dictionary/search_test.cpp +++ b/cpp/tests/dictionary/search_test.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020, NVIDIA CORPORATION. + * Copyright (c) 2020-2022, NVIDIA CORPORATION. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -35,7 +35,8 @@ TEST_F(DictionarySearchTest, StringsColumn) result = cudf::dictionary::get_index(dictionary, cudf::string_scalar("eee")); EXPECT_FALSE(result->is_valid()); - result = cudf::dictionary::detail::get_insert_index(dictionary, cudf::string_scalar("eee")); + result = cudf::dictionary::detail::get_insert_index( + dictionary, cudf::string_scalar("eee"), cudf::get_default_stream()); n_result = dynamic_cast*>(result.get()); EXPECT_EQ(uint32_t{5}, n_result->value()); } @@ -51,7 +52,8 @@ TEST_F(DictionarySearchTest, WithNulls) result = cudf::dictionary::get_index(dictionary, cudf::numeric_scalar(5)); EXPECT_FALSE(result->is_valid()); - result = cudf::dictionary::detail::get_insert_index(dictionary, cudf::numeric_scalar(5)); + result = cudf::dictionary::detail::get_insert_index( + dictionary, cudf::numeric_scalar(5), cudf::get_default_stream()); n_result = dynamic_cast*>(result.get()); EXPECT_EQ(uint32_t{1}, n_result->value()); } @@ -62,7 +64,7 @@ TEST_F(DictionarySearchTest, EmptyColumn) cudf::numeric_scalar key(7); auto result = cudf::dictionary::get_index(dictionary, key); EXPECT_FALSE(result->is_valid()); - result = cudf::dictionary::detail::get_insert_index(dictionary, key); + result = cudf::dictionary::detail::get_insert_index(dictionary, key, cudf::get_default_stream()); EXPECT_FALSE(result->is_valid()); } @@ -71,5 +73,7 @@ TEST_F(DictionarySearchTest, Errors) cudf::test::dictionary_column_wrapper dictionary({1, 2, 3}); cudf::numeric_scalar key(7); EXPECT_THROW(cudf::dictionary::get_index(dictionary, key), cudf::logic_error); - EXPECT_THROW(cudf::dictionary::detail::get_insert_index(dictionary, key), cudf::logic_error); + EXPECT_THROW( + cudf::dictionary::detail::get_insert_index(dictionary, key, cudf::get_default_stream()), + cudf::logic_error); } diff --git a/cpp/tests/fixed_point/fixed_point_tests.cu b/cpp/tests/fixed_point/fixed_point_tests.cu index 394229b460e..ab9970dc370 100644 --- a/cpp/tests/fixed_point/fixed_point_tests.cu +++ b/cpp/tests/fixed_point/fixed_point_tests.cu @@ -83,7 +83,7 @@ TEST_F(FixedPointTest, DecimalXXThrustOnDevice) using decimal32 = fixed_point; std::vector vec1(1000, decimal32{1, scale_type{-2}}); - auto d_vec1 = cudf::detail::make_device_uvector_sync(vec1); + auto d_vec1 = cudf::detail::make_device_uvector_sync(vec1, cudf::get_default_stream()); auto const sum = thrust::reduce(rmm::exec_policy(cudf::get_default_stream()), std::cbegin(d_vec1), @@ -96,7 +96,7 @@ TEST_F(FixedPointTest, DecimalXXThrustOnDevice) // change inclusive scan to run on device (avoid copying to host) thrust::inclusive_scan(std::cbegin(vec1), std::cend(vec1), std::begin(vec1)); - d_vec1 = cudf::detail::make_device_uvector_sync(vec1); + d_vec1 = cudf::detail::make_device_uvector_sync(vec1, cudf::get_default_stream()); std::vector vec2(1000); std::iota(std::begin(vec2), std::end(vec2), 1); @@ -118,7 +118,7 @@ TEST_F(FixedPointTest, DecimalXXThrustOnDevice) std::begin(d_vec3), cast_to_int32_fn{}); - auto vec3 = cudf::detail::make_std_vector_sync(d_vec3); + auto vec3 = cudf::detail::make_std_vector_sync(d_vec3, cudf::get_default_stream()); EXPECT_EQ(vec2, vec3); } diff --git a/cpp/tests/groupby/tdigest_tests.cu b/cpp/tests/groupby/tdigest_tests.cu index f9c907767f5..2e4a41a70f8 100644 --- a/cpp/tests/groupby/tdigest_tests.cu +++ b/cpp/tests/groupby/tdigest_tests.cu @@ -466,13 +466,13 @@ TEST_F(TDigestMergeTest, EmptyGroups) cudf::test::fixed_width_column_wrapper keys{0, 0, 0, 0, 0, 0, 0}; int const delta = 1000; - auto a = cudf::detail::tdigest::make_empty_tdigest_column(); + auto a = cudf::detail::tdigest::make_empty_tdigest_column(cudf::get_default_stream()); auto b = cudf::type_dispatcher( static_cast(values_b).type(), tdigest_gen_grouped{}, keys, values_b, delta); - auto c = cudf::detail::tdigest::make_empty_tdigest_column(); + auto c = cudf::detail::tdigest::make_empty_tdigest_column(cudf::get_default_stream()); auto d = cudf::type_dispatcher( static_cast(values_d).type(), tdigest_gen_grouped{}, keys, values_d, delta); - auto e = cudf::detail::tdigest::make_empty_tdigest_column(); + auto e = cudf::detail::tdigest::make_empty_tdigest_column(cudf::get_default_stream()); std::vector cols; cols.push_back(*a); diff --git a/cpp/tests/hash_map/map_test.cu b/cpp/tests/hash_map/map_test.cu index 2895d3323b8..f38c5b3f58f 100644 --- a/cpp/tests/hash_map/map_test.cu +++ b/cpp/tests/hash_map/map_test.cu @@ -57,7 +57,7 @@ struct InsertTest : public cudf::test::BaseFixture { const size_t input_size = std::min(static_cast(size), std::numeric_limits::max()); pairs.resize(input_size, cudf::get_default_stream()); - map = std::move(map_type::create(compute_hash_table_size(size))); + map = std::move(map_type::create(compute_hash_table_size(size), cudf::get_default_stream())); cudf::get_default_stream().synchronize(); } diff --git a/cpp/tests/iterator/iterator_tests.cuh b/cpp/tests/iterator/iterator_tests.cuh index 7eb2c3d70bb..894e117ba40 100644 --- a/cpp/tests/iterator/iterator_tests.cuh +++ b/cpp/tests/iterator/iterator_tests.cuh @@ -87,7 +87,8 @@ struct IteratorTest : public cudf::test::BaseFixture { { InputIterator d_in_last = d_in + num_items; EXPECT_EQ(thrust::distance(d_in, d_in_last), num_items); - auto dev_expected = cudf::detail::make_device_uvector_sync(expected); + auto dev_expected = + cudf::detail::make_device_uvector_sync(expected, cudf::get_default_stream()); // using a temporary vector and calling transform and all_of separately is // equivalent to thrust::equal but compiles ~3x faster @@ -110,7 +111,7 @@ struct IteratorTest : public cudf::test::BaseFixture { rmm::device_uvector const& dev_result, const char* msg = nullptr) { - auto host_result = cudf::detail::make_host_vector_sync(dev_result); + auto host_result = cudf::detail::make_host_vector_sync(dev_result, cudf::get_default_stream()); EXPECT_EQ(expected, host_result[0]) << msg; } diff --git a/cpp/tests/iterator/value_iterator_test.cuh b/cpp/tests/iterator/value_iterator_test.cuh index d68ec4e1471..fa931d34a0e 100644 --- a/cpp/tests/iterator/value_iterator_test.cuh +++ b/cpp/tests/iterator/value_iterator_test.cuh @@ -25,7 +25,7 @@ template void non_null_iterator(IteratorTest& testFixture) { auto host_array = cudf::test::make_type_param_vector({0, 6, 0, -14, 13, 64, -13, -20, 45}); - auto dev_array = cudf::detail::make_device_uvector_sync(host_array); + auto dev_array = cudf::detail::make_device_uvector_sync(host_array, cudf::get_default_stream()); // calculate the expected value by CPU. thrust::host_vector replaced_array(host_array); diff --git a/cpp/tests/iterator/value_iterator_test_strings.cu b/cpp/tests/iterator/value_iterator_test_strings.cu index 9aa18eb844f..8b4080fa493 100644 --- a/cpp/tests/iterator/value_iterator_test_strings.cu +++ b/cpp/tests/iterator/value_iterator_test_strings.cu @@ -30,7 +30,7 @@ auto strings_to_string_views(std::vector& input_strings) std::vector offsets; std::tie(chars, offsets) = cudf::test::detail::make_chars_and_offsets( input_strings.begin(), input_strings.end(), all_valid); - auto dev_chars = cudf::detail::make_device_uvector_sync(chars); + auto dev_chars = cudf::detail::make_device_uvector_sync(chars, cudf::get_default_stream()); // calculate the expected value by CPU. (but contains device pointers) thrust::host_vector replaced_array(input_strings.size()); @@ -51,7 +51,7 @@ TEST_F(StringIteratorTest, string_view_null_iterator) using T = cudf::string_view; std::string zero("zero"); // the char data has to be in GPU - auto initmsg = cudf::detail::make_device_uvector_sync(zero); + auto initmsg = cudf::detail::make_device_uvector_sync(zero, cudf::get_default_stream()); T init = T{initmsg.data(), int(initmsg.size())}; // data and valid arrays @@ -86,7 +86,7 @@ TEST_F(StringIteratorTest, string_view_no_null_iterator) // T init = T{"", 0}; std::string zero("zero"); // the char data has to be in GPU - auto initmsg = cudf::detail::make_device_uvector_sync(zero); + auto initmsg = cudf::detail::make_device_uvector_sync(zero, cudf::get_default_stream()); T init = T{initmsg.data(), int(initmsg.size())}; // data array @@ -110,7 +110,7 @@ TEST_F(StringIteratorTest, string_scalar_iterator) // T init = T{"", 0}; std::string zero("zero"); // the char data has to be in GPU - auto initmsg = cudf::detail::make_device_uvector_sync(zero); + auto initmsg = cudf::detail::make_device_uvector_sync(zero, cudf::get_default_stream()); T init = T{initmsg.data(), int(initmsg.size())}; // data array diff --git a/cpp/tests/join/join_tests.cpp b/cpp/tests/join/join_tests.cpp index fb2eb77512c..ed4326055c6 100644 --- a/cpp/tests/join/join_tests.cpp +++ b/cpp/tests/join/join_tests.cpp @@ -1880,7 +1880,8 @@ TEST_F(JoinTest, Repro_StructsWithoutNullsPushedDown) auto fact_ints = ints{0, 1, 2, 3, 4}; auto fact_structs = structs{{fact_ints}, no_nulls()}.release(); // Now set struct validity to invalidate index#3. - cudf::detail::set_null_mask(fact_structs->mutable_view().null_mask(), 3, 4, false); + cudf::detail::set_null_mask( + fact_structs->mutable_view().null_mask(), 3, 4, false, cudf::get_default_stream()); // Struct row#3 is null, but Struct.child has a non-null value. return make_table(std::move(fact_structs)); }(); @@ -1896,7 +1897,8 @@ TEST_F(JoinTest, Repro_StructsWithoutNullsPushedDown) // Note: Join result might not have nulls pushed down, since it's an output of gather(). // Must superimpose parent nulls before comparisons. - auto [superimposed_results, _] = cudf::structs::detail::superimpose_parent_nulls(*result); + auto [superimposed_results, _] = + cudf::structs::detail::superimpose_parent_nulls(*result, cudf::get_default_stream()); auto const expected = [] { auto fact_ints = ints{0}; diff --git a/cpp/tests/lists/contains_tests.cpp b/cpp/tests/lists/contains_tests.cpp index a93ef4f8b1d..05118198095 100644 --- a/cpp/tests/lists/contains_tests.cpp +++ b/cpp/tests/lists/contains_tests.cpp @@ -231,8 +231,9 @@ TYPED_TEST(TypedContainsTest, SlicedLists) { // First Slice. - auto sliced_column_1 = cudf::detail::slice(search_space, {1, 8}).front(); - auto search_key_one = create_scalar_search_key(1); + auto sliced_column_1 = + cudf::detail::slice(search_space, {1, 8}, cudf::get_default_stream()).front(); + auto search_key_one = create_scalar_search_key(1); { // CONTAINS auto result = lists::contains(sliced_column_1, *search_key_one); @@ -263,8 +264,9 @@ TYPED_TEST(TypedContainsTest, SlicedLists) { // Second Slice. - auto sliced_column_2 = cudf::detail::slice(search_space, {3, 10}).front(); - auto search_key_one = create_scalar_search_key(1); + auto sliced_column_2 = + cudf::detail::slice(search_space, {3, 10}, cudf::get_default_stream()).front(); + auto search_key_one = create_scalar_search_key(1); { // CONTAINS auto result = lists::contains(sliced_column_2, *search_key_one); diff --git a/cpp/tests/lists/extract_tests.cpp b/cpp/tests/lists/extract_tests.cpp index 34c8e044a3f..916dd121253 100644 --- a/cpp/tests/lists/extract_tests.cpp +++ b/cpp/tests/lists/extract_tests.cpp @@ -228,7 +228,8 @@ TYPED_TEST(ListsExtractNumericsTest, ExtractElementsFromNonCompactedNullLists) .release(); // Set null at index 4. - cudf::detail::set_null_mask(input->mutable_view().null_mask(), 4, 5, false); + cudf::detail::set_null_mask( + input->mutable_view().null_mask(), 4, 5, false, cudf::get_default_stream()); { auto result = cudf::lists::extract_list_element(cudf::lists_column_view{*input}, 0); diff --git a/cpp/tests/partitioning/hash_partition_test.cpp b/cpp/tests/partitioning/hash_partition_test.cpp index 1addbca945b..abf4095e4ec 100644 --- a/cpp/tests/partitioning/hash_partition_test.cpp +++ b/cpp/tests/partitioning/hash_partition_test.cpp @@ -303,7 +303,8 @@ void run_fixed_width_test(size_t cols, // Make a table view of the partition numbers constexpr cudf::data_type dtype{cudf::type_id::INT32}; - auto d_partitions = cudf::detail::make_device_uvector_sync(partitions); + auto d_partitions = + cudf::detail::make_device_uvector_sync(partitions, cudf::get_default_stream()); cudf::column_view partitions_col(dtype, rows, d_partitions.data()); cudf::table_view partitions_table({partitions_col}); diff --git a/cpp/tests/quantiles/percentile_approx_test.cu b/cpp/tests/quantiles/percentile_approx_test.cu index a26f6a99ba6..b02b7d6c336 100644 --- a/cpp/tests/quantiles/percentile_approx_test.cu +++ b/cpp/tests/quantiles/percentile_approx_test.cu @@ -271,9 +271,11 @@ void grouped_test(data_type input_type, std::vector> params) std::pair make_null_mask(column_view const& col) { - return cudf::detail::valid_if(thrust::make_counting_iterator(0), - thrust::make_counting_iterator(col.size()), - [] __device__(size_type i) { return i % 2 == 0; }); + return cudf::detail::valid_if( + thrust::make_counting_iterator(0), + thrust::make_counting_iterator(col.size()), + [] __device__(size_type i) { return i % 2 == 0; }, + cudf::get_default_stream()); } void simple_with_nulls_test(data_type input_type, std::vector> params) @@ -384,7 +386,7 @@ struct PercentileApproxTest : public cudf::test::BaseFixture { TEST_F(PercentileApproxTest, EmptyInput) { - auto empty_ = cudf::detail::tdigest::make_empty_tdigest_column(); + auto empty_ = cudf::detail::tdigest::make_empty_tdigest_column(cudf::get_default_stream()); cudf::test::fixed_width_column_wrapper percentiles{0.0, 0.25, 0.3}; std::vector input; @@ -428,11 +430,12 @@ TEST_F(PercentileApproxTest, EmptyPercentiles) auto result = cudf::percentile_approx(tdv, percentiles); cudf::test::fixed_width_column_wrapper offsets{0, 0, 0}; - auto expected = cudf::make_lists_column(2, - offsets.release(), - cudf::make_empty_column(type_id::FLOAT64), - 2, - cudf::detail::create_null_mask(2, mask_state::ALL_NULL)); + auto expected = cudf::make_lists_column( + 2, + offsets.release(), + cudf::make_empty_column(type_id::FLOAT64), + 2, + cudf::detail::create_null_mask(2, mask_state::ALL_NULL, cudf::get_default_stream())); CUDF_TEST_EXPECT_COLUMNS_EQUAL(*result, *expected); } diff --git a/cpp/tests/replace/replace_nulls_tests.cpp b/cpp/tests/replace/replace_nulls_tests.cpp index ef4a9dea48c..2c751a67a63 100644 --- a/cpp/tests/replace/replace_nulls_tests.cpp +++ b/cpp/tests/replace/replace_nulls_tests.cpp @@ -679,7 +679,9 @@ TEST_F(ReplaceDictionaryTest, ReplaceNullsError) auto input_one = cudf::dictionary::encode(input_one_w); auto dict_input = cudf::dictionary_column_view(input_one->view()); auto dict_repl = cudf::dictionary_column_view(replacement->view()); - EXPECT_THROW(cudf::dictionary::detail::replace_nulls(dict_input, dict_repl), cudf::logic_error); + EXPECT_THROW( + cudf::dictionary::detail::replace_nulls(dict_input, dict_repl, cudf::get_default_stream()), + cudf::logic_error); } TEST_F(ReplaceDictionaryTest, ReplaceNullsEmpty) @@ -687,7 +689,8 @@ TEST_F(ReplaceDictionaryTest, ReplaceNullsEmpty) cudf::test::fixed_width_column_wrapper input_empty_w({}); auto input_empty = cudf::dictionary::encode(input_empty_w); auto dict_input = cudf::dictionary_column_view(input_empty->view()); - auto result = cudf::dictionary::detail::replace_nulls(dict_input, dict_input); + auto result = + cudf::dictionary::detail::replace_nulls(dict_input, dict_input, cudf::get_default_stream()); CUDF_TEST_EXPECT_COLUMNS_EQUAL(result->view(), input_empty->view()); } @@ -696,11 +699,12 @@ TEST_F(ReplaceDictionaryTest, ReplaceNullsNoNulls) cudf::test::fixed_width_column_wrapper input_w({1, 1, 1}); auto input = cudf::dictionary::encode(input_w); auto dict_input = cudf::dictionary_column_view(input->view()); - auto result = cudf::dictionary::detail::replace_nulls(dict_input, dict_input); + auto result = + cudf::dictionary::detail::replace_nulls(dict_input, dict_input, cudf::get_default_stream()); CUDF_TEST_EXPECT_COLUMNS_EQUAL(result->view(), input->view()); - result = - cudf::dictionary::detail::replace_nulls(dict_input, cudf::numeric_scalar(0, false)); + result = cudf::dictionary::detail::replace_nulls( + dict_input, cudf::numeric_scalar(0, false), cudf::get_default_stream()); CUDF_TEST_EXPECT_COLUMNS_EQUAL(result->view(), input->view()); } diff --git a/cpp/tests/scalar/scalar_device_view_test.cu b/cpp/tests/scalar/scalar_device_view_test.cu index 1a0fea7219e..c7365d63e1c 100644 --- a/cpp/tests/scalar/scalar_device_view_test.cu +++ b/cpp/tests/scalar/scalar_device_view_test.cu @@ -130,7 +130,7 @@ TEST_F(StringScalarDeviceViewTest, Value) auto scalar_device_view = cudf::get_scalar_device_view(s); rmm::device_scalar result{cudf::get_default_stream()}; - auto value_v = cudf::detail::make_device_uvector_sync(value); + auto value_v = cudf::detail::make_device_uvector_sync(value, cudf::get_default_stream()); test_string_value<<<1, 1, 0, cudf::get_default_stream().value()>>>( scalar_device_view, value_v.data(), value.size(), result.data()); diff --git a/cpp/tests/strings/concatenate_tests.cpp b/cpp/tests/strings/concatenate_tests.cpp index 1462d4dc73a..387f0f5c997 100644 --- a/cpp/tests/strings/concatenate_tests.cpp +++ b/cpp/tests/strings/concatenate_tests.cpp @@ -60,7 +60,7 @@ TEST_F(StringsConcatenateTest, Concatenate) strings_columns.push_back(strings2); strings_columns.push_back(strings3); - auto results = cudf::strings::detail::concatenate(strings_columns); + auto results = cudf::strings::detail::concatenate(strings_columns, cudf::get_default_stream()); cudf::test::strings_column_wrapper expected(h_strings.begin(), h_strings.end()); CUDF_TEST_EXPECT_COLUMNS_EQUAL(*results, expected); @@ -74,7 +74,7 @@ TEST_F(StringsConcatenateTest, ZeroSizeStringsColumns) strings_columns.push_back(zero_size_strings_column); strings_columns.push_back(zero_size_strings_column); strings_columns.push_back(zero_size_strings_column); - auto results = cudf::strings::detail::concatenate(strings_columns); + auto results = cudf::strings::detail::concatenate(strings_columns, cudf::get_default_stream()); cudf::test::expect_column_empty(results->view()); } @@ -107,6 +107,6 @@ TEST_F(StringsConcatenateTest, ZeroSizeStringsPlusNormal) h_strings.data() + h_strings.size()); strings_columns.push_back(strings1); - auto results = cudf::strings::detail::concatenate(strings_columns); + auto results = cudf::strings::detail::concatenate(strings_columns, cudf::get_default_stream()); CUDF_TEST_EXPECT_COLUMNS_EQUAL(*results, strings1); } diff --git a/cpp/tests/strings/contains_tests.cpp b/cpp/tests/strings/contains_tests.cpp index ba738f7b616..aaacc08d5fb 100644 --- a/cpp/tests/strings/contains_tests.cpp +++ b/cpp/tests/strings/contains_tests.cpp @@ -269,8 +269,8 @@ TEST_F(StringsContainsTests, HexTest) std::vector offsets( {thrust::make_counting_iterator(0), thrust::make_counting_iterator(0) + count + 1}); - auto d_chars = cudf::detail::make_device_uvector_sync(ascii_chars); - auto d_offsets = cudf::detail::make_device_uvector_sync(offsets); + auto d_chars = cudf::detail::make_device_uvector_sync(ascii_chars, cudf::get_default_stream()); + auto d_offsets = cudf::detail::make_device_uvector_sync(offsets, cudf::get_default_stream()); auto input = cudf::make_strings_column(d_chars, d_offsets); auto strings_view = cudf::strings_column_view(input->view()); diff --git a/cpp/tests/strings/factories_test.cu b/cpp/tests/strings/factories_test.cu index c27f48a9069..818cb3cadce 100644 --- a/cpp/tests/strings/factories_test.cu +++ b/cpp/tests/strings/factories_test.cu @@ -78,7 +78,7 @@ TEST_F(StringsFactoriesTest, CreateColumnFromPair) } h_offsets[idx + 1] = offset; } - auto d_strings = cudf::detail::make_device_uvector_sync(strings); + auto d_strings = cudf::detail::make_device_uvector_sync(strings, cudf::get_default_stream()); CUDF_CUDA_TRY(cudaMemcpy(d_buffer.data(), h_buffer.data(), memsize, cudaMemcpyHostToDevice)); auto column = cudf::make_strings_column(d_strings); EXPECT_EQ(column->type(), cudf::data_type{cudf::type_id::STRING}); @@ -143,9 +143,9 @@ TEST_F(StringsFactoriesTest, CreateColumnFromOffsets) } std::vector h_nulls{h_null_mask}; - auto d_buffer = cudf::detail::make_device_uvector_sync(h_buffer); - auto d_offsets = cudf::detail::make_device_uvector_sync(h_offsets); - auto d_nulls = cudf::detail::make_device_uvector_sync(h_nulls); + auto d_buffer = cudf::detail::make_device_uvector_sync(h_buffer, cudf::get_default_stream()); + auto d_offsets = cudf::detail::make_device_uvector_sync(h_offsets, cudf::get_default_stream()); + auto d_nulls = cudf::detail::make_device_uvector_sync(h_nulls, cudf::get_default_stream()); auto column = cudf::make_strings_column(d_buffer, d_offsets, d_nulls, null_count); EXPECT_EQ(column->type(), cudf::data_type{cudf::type_id::STRING}); EXPECT_EQ(column->null_count(), null_count); @@ -184,7 +184,8 @@ TEST_F(StringsFactoriesTest, CreateScalar) TEST_F(StringsFactoriesTest, EmptyStringsColumn) { rmm::device_uvector d_chars{0, cudf::get_default_stream()}; - auto d_offsets = cudf::detail::make_zeroed_device_uvector_sync(1); + auto d_offsets = + cudf::detail::make_zeroed_device_uvector_sync(1, cudf::get_default_stream()); rmm::device_uvector d_nulls{0, cudf::get_default_stream()}; auto results = cudf::make_strings_column(d_chars, d_offsets, d_nulls, 0); diff --git a/cpp/tests/strings/fill_tests.cpp b/cpp/tests/strings/fill_tests.cpp index 46f6b633dc5..ed731fe39b4 100644 --- a/cpp/tests/strings/fill_tests.cpp +++ b/cpp/tests/strings/fill_tests.cpp @@ -39,7 +39,8 @@ TEST_F(StringsFillTest, Fill) thrust::make_transform_iterator(h_strings.begin(), [](auto str) { return str != nullptr; })); cudf::strings_column_view view(strings); { - auto results = cudf::strings::detail::fill(view, 1, 5, cudf::string_scalar("zz")); + auto results = cudf::strings::detail::fill( + view, 1, 5, cudf::string_scalar("zz"), cudf::get_default_stream()); std::vector h_expected{"eee", "zz", "zz", "zz", "zz", "bbb", "ééé"}; cudf::test::strings_column_wrapper expected( @@ -49,7 +50,8 @@ TEST_F(StringsFillTest, Fill) CUDF_TEST_EXPECT_COLUMNS_EQUIVALENT(*results, expected); } { - auto results = cudf::strings::detail::fill(view, 2, 4, cudf::string_scalar("", false)); + auto results = cudf::strings::detail::fill( + view, 2, 4, cudf::string_scalar("", false), cudf::get_default_stream()); std::vector h_expected{"eee", "bb", nullptr, nullptr, "aa", "bbb", "ééé"}; cudf::test::strings_column_wrapper expected( @@ -59,17 +61,20 @@ TEST_F(StringsFillTest, Fill) CUDF_TEST_EXPECT_COLUMNS_EQUIVALENT(*results, expected); } { - auto results = cudf::strings::detail::fill(view, 5, 5, cudf::string_scalar("zz")); + auto results = cudf::strings::detail::fill( + view, 5, 5, cudf::string_scalar("zz"), cudf::get_default_stream()); CUDF_TEST_EXPECT_COLUMNS_EQUIVALENT(*results, view.parent()); } { - auto results = cudf::strings::detail::fill(view, 0, 7, cudf::string_scalar("")); + auto results = + cudf::strings::detail::fill(view, 0, 7, cudf::string_scalar(""), cudf::get_default_stream()); cudf::test::strings_column_wrapper expected({"", "", "", "", "", "", ""}, {1, 1, 1, 1, 1, 1, 1}); CUDF_TEST_EXPECT_COLUMNS_EQUIVALENT(*results, expected); } { - auto results = cudf::strings::detail::fill(view, 0, 7, cudf::string_scalar("", false)); + auto results = cudf::strings::detail::fill( + view, 0, 7, cudf::string_scalar("", false), cudf::get_default_stream()); cudf::test::strings_column_wrapper expected({"", "", "", "", "", "", ""}, {0, 0, 0, 0, 0, 0, 0}); CUDF_TEST_EXPECT_COLUMNS_EQUIVALENT(*results, expected); @@ -80,8 +85,11 @@ TEST_F(StringsFillTest, ZeroSizeStringsColumns) { cudf::column_view zero_size_strings_column( cudf::data_type{cudf::type_id::STRING}, 0, nullptr, nullptr, 0); - auto results = cudf::strings::detail::fill( - cudf::strings_column_view(zero_size_strings_column), 0, 1, cudf::string_scalar("")); + auto results = cudf::strings::detail::fill(cudf::strings_column_view(zero_size_strings_column), + 0, + 1, + cudf::string_scalar(""), + cudf::get_default_stream()); cudf::test::expect_column_empty(results->view()); } @@ -94,6 +102,10 @@ TEST_F(StringsFillTest, FillRangeError) thrust::make_transform_iterator(h_strings.begin(), [](auto str) { return str != nullptr; })); cudf::strings_column_view view(strings); - EXPECT_THROW(cudf::strings::detail::fill(view, 5, 1, cudf::string_scalar("")), cudf::logic_error); - EXPECT_THROW(cudf::strings::detail::fill(view, 5, 9, cudf::string_scalar("")), cudf::logic_error); + EXPECT_THROW( + cudf::strings::detail::fill(view, 5, 1, cudf::string_scalar(""), cudf::get_default_stream()), + cudf::logic_error); + EXPECT_THROW( + cudf::strings::detail::fill(view, 5, 9, cudf::string_scalar(""), cudf::get_default_stream()), + cudf::logic_error); } diff --git a/cpp/tests/strings/integers_tests.cpp b/cpp/tests/strings/integers_tests.cpp index e938eec8b3e..52c3638d338 100644 --- a/cpp/tests/strings/integers_tests.cpp +++ b/cpp/tests/strings/integers_tests.cpp @@ -297,8 +297,8 @@ TYPED_TEST(StringsIntegerConvertTest, FromToInteger) std::iota(h_integers.begin(), h_integers.end(), -(TypeParam)(h_integers.size() / 2)); h_integers.push_back(std::numeric_limits::min()); h_integers.push_back(std::numeric_limits::max()); - auto d_integers = cudf::detail::make_device_uvector_sync(h_integers); - auto integers = cudf::make_numeric_column(cudf::data_type{cudf::type_to_id()}, + auto d_integers = cudf::detail::make_device_uvector_sync(h_integers, cudf::get_default_stream()); + auto integers = cudf::make_numeric_column(cudf::data_type{cudf::type_to_id()}, (cudf::size_type)d_integers.size()); auto integers_view = integers->mutable_view(); CUDF_CUDA_TRY(cudaMemcpy(integers_view.data(), @@ -311,7 +311,7 @@ TYPED_TEST(StringsIntegerConvertTest, FromToInteger) auto results_strings = cudf::strings::from_integers(integers->view()); // copy back to host - h_integers = cudf::detail::make_host_vector_sync(d_integers); + h_integers = cudf::detail::make_host_vector_sync(d_integers, cudf::get_default_stream()); std::vector h_strings; for (auto itr = h_integers.begin(); itr != h_integers.end(); ++itr) h_strings.push_back(std::to_string(*itr)); diff --git a/cpp/tests/structs/utilities_tests.cpp b/cpp/tests/structs/utilities_tests.cpp index d58568cd1b5..77f29a372be 100644 --- a/cpp/tests/structs/utilities_tests.cpp +++ b/cpp/tests/structs/utilities_tests.cpp @@ -326,7 +326,7 @@ void test_non_struct_columns(cudf::column_view const& input) { // superimpose_parent_nulls() on non-struct columns should return the input column, unchanged. auto [superimposed, backing_validity_buffers] = - cudf::structs::detail::superimpose_parent_nulls(input); + cudf::structs::detail::superimpose_parent_nulls(input, cudf::get_default_stream()); CUDF_TEST_EXPECT_COLUMNS_EQUIVALENT(input, superimposed); EXPECT_TRUE(backing_validity_buffers.empty()); @@ -372,7 +372,7 @@ TYPED_TEST(TypedSuperimposeTest, BasicStruct) // Reset STRUCTs' null-mask. Mark first STRUCT row as null. auto structs_view = structs_input->mutable_view(); - cudf::detail::set_null_mask(structs_view.null_mask(), 0, 1, false); + cudf::detail::set_null_mask(structs_view.null_mask(), 0, 1, false, cudf::get_default_stream()); // At this point, the STRUCT nulls aren't pushed down to members, // even though the parent null-mask was modified. @@ -380,7 +380,8 @@ TYPED_TEST(TypedSuperimposeTest, BasicStruct) CUDF_TEST_EXPECT_COLUMNS_EQUIVALENT(structs_view.child(1), make_lists_member(nulls_at({4, 5}))); - auto [output, backing_buffers] = cudf::structs::detail::superimpose_parent_nulls(structs_view); + auto [output, backing_buffers] = + cudf::structs::detail::superimpose_parent_nulls(structs_view, cudf::get_default_stream()); // After superimpose_parent_nulls(), the struct nulls (i.e. at index-0) should have been pushed // down to the children. All members should have nulls at row-index 0. @@ -402,8 +403,8 @@ TYPED_TEST(TypedSuperimposeTest, NonNullableParentStruct) auto lists_member = make_lists_member(nulls_at({4, 5})); auto structs_input = structs{{nums_member, lists_member}, no_nulls()}.release(); - auto [output, backing_buffers] = - cudf::structs::detail::superimpose_parent_nulls(structs_input->view()); + auto [output, backing_buffers] = cudf::structs::detail::superimpose_parent_nulls( + structs_input->view(), cudf::get_default_stream()); // After superimpose_parent_nulls(), none of the child structs should have changed, // because the parent had no nulls to begin with. @@ -429,12 +430,12 @@ TYPED_TEST(TypedSuperimposeTest, NestedStruct_ChildNullable_ParentNonNullable) // Reset STRUCTs' null-mask. Mark first STRUCT row as null. auto structs_view = outer_struct_members.back()->mutable_view(); - cudf::detail::set_null_mask(structs_view.null_mask(), 0, 1, false); + cudf::detail::set_null_mask(structs_view.null_mask(), 0, 1, false, cudf::get_default_stream()); auto structs_of_structs = structs{std::move(outer_struct_members)}.release(); - auto [output, backing_buffers] = - cudf::structs::detail::superimpose_parent_nulls(structs_of_structs->view()); + auto [output, backing_buffers] = cudf::structs::detail::superimpose_parent_nulls( + structs_of_structs->view(), cudf::get_default_stream()); // After superimpose_parent_nulls(), outer-struct column should not have pushed nulls to child // structs. But the child struct column must push its nulls to its own children. @@ -462,17 +463,18 @@ TYPED_TEST(TypedSuperimposeTest, NestedStruct_ChildNullable_ParentNullable) // Reset STRUCTs' null-mask. Mark first STRUCT row as null. auto structs_view = outer_struct_members.back()->mutable_view(); auto num_rows = structs_view.size(); - cudf::detail::set_null_mask(structs_view.null_mask(), 0, 1, false); + cudf::detail::set_null_mask(structs_view.null_mask(), 0, 1, false, cudf::get_default_stream()); auto structs_of_structs = structs{std::move(outer_struct_members), std::vector(num_rows, true)}.release(); // Modify STRUCT-of-STRUCT's null-mask. Mark second STRUCT row as null. auto structs_of_structs_view = structs_of_structs->mutable_view(); - cudf::detail::set_null_mask(structs_of_structs_view.null_mask(), 1, 2, false); + cudf::detail::set_null_mask( + structs_of_structs_view.null_mask(), 1, 2, false, cudf::get_default_stream()); - auto [output, backing_buffers] = - cudf::structs::detail::superimpose_parent_nulls(structs_of_structs->view()); + auto [output, backing_buffers] = cudf::structs::detail::superimpose_parent_nulls( + structs_of_structs->view(), cudf::get_default_stream()); // After superimpose_parent_nulls(), outer-struct column should not have pushed nulls to child // structs. But the child struct column must push its nulls to its own children. @@ -491,7 +493,8 @@ cudf::column_view slice_off_first_and_last_rows(cudf::column_view const& col) void mark_row_as_null(cudf::mutable_column_view const& col, size_type row_index) { - cudf::detail::set_null_mask(col.null_mask(), row_index, row_index + 1, false); + cudf::detail::set_null_mask( + col.null_mask(), row_index, row_index + 1, false, cudf::get_default_stream()); } TYPED_TEST(TypedSuperimposeTest, Struct_Sliced) @@ -522,7 +525,8 @@ TYPED_TEST(TypedSuperimposeTest, Struct_Sliced) // nums_member: 11011 // lists_member: 00111 - auto [output, backing_buffers] = cudf::structs::detail::superimpose_parent_nulls(sliced_structs); + auto [output, backing_buffers] = + cudf::structs::detail::superimpose_parent_nulls(sliced_structs, cudf::get_default_stream()); // After superimpose_parent_nulls(), the null masks should be: // STRUCT: 11110 @@ -570,7 +574,8 @@ TYPED_TEST(TypedSuperimposeTest, NestedStruct_Sliced) // nums_member: 11010 // lists_member: 00110 - auto [output, backing_buffers] = cudf::structs::detail::superimpose_parent_nulls(sliced_structs); + auto [output, backing_buffers] = + cudf::structs::detail::superimpose_parent_nulls(sliced_structs, cudf::get_default_stream()); // After superimpose_parent_nulls(), the null masks will be: // STRUCT: 11101 diff --git a/cpp/tests/table/table_view_tests.cu b/cpp/tests/table/table_view_tests.cu index a092006bda6..0542d007ca0 100644 --- a/cpp/tests/table/table_view_tests.cu +++ b/cpp/tests/table/table_view_tests.cu @@ -47,7 +47,8 @@ void row_comparison(cudf::table_view input1, auto device_table_1 = cudf::table_device_view::create(input1, stream); auto device_table_2 = cudf::table_device_view::create(input2, stream); - auto d_column_order = cudf::detail::make_device_uvector_sync(column_order); + auto d_column_order = + cudf::detail::make_device_uvector_sync(column_order, cudf::get_default_stream()); auto comparator = cudf::row_lexicographic_comparator( cudf::nullate::NO{}, *device_table_1, *device_table_2, d_column_order.data()); diff --git a/cpp/tests/types/type_dispatcher_test.cu b/cpp/tests/types/type_dispatcher_test.cu index e3856759cfc..911911851f2 100644 --- a/cpp/tests/types/type_dispatcher_test.cu +++ b/cpp/tests/types/type_dispatcher_test.cu @@ -69,7 +69,7 @@ __global__ void dispatch_test_kernel(cudf::type_id id, bool* d_result) TYPED_TEST(TypedDispatcherTest, DeviceDispatch) { - auto result = cudf::detail::make_zeroed_device_uvector_sync(1); + auto result = cudf::detail::make_zeroed_device_uvector_sync(1, cudf::get_default_stream()); dispatch_test_kernel<<<1, 1, 0, cudf::get_default_stream().value()>>>( cudf::type_to_id(), result.data()); CUDF_CUDA_TRY(cudaDeviceSynchronize()); @@ -130,7 +130,7 @@ __global__ void double_dispatch_test_kernel(cudf::type_id id1, cudf::type_id id2 TYPED_TEST(TypedDoubleDispatcherTest, DeviceDoubleDispatch) { - auto result = cudf::detail::make_zeroed_device_uvector_sync(1); + auto result = cudf::detail::make_zeroed_device_uvector_sync(1, cudf::get_default_stream()); double_dispatch_test_kernel<<<1, 1, 0, cudf::get_default_stream().value()>>>( cudf::type_to_id(), cudf::type_to_id(), result.data()); CUDF_CUDA_TRY(cudaDeviceSynchronize()); diff --git a/cpp/tests/utilities/column_utilities.cu b/cpp/tests/utilities/column_utilities.cu index 080bb3ef916..417d4b4a6fc 100644 --- a/cpp/tests/utilities/column_utilities.cu +++ b/cpp/tests/utilities/column_utilities.cu @@ -495,7 +495,7 @@ std::string stringify_column_differences(cudf::device_span difference CUDF_EXPECTS(not differences.empty(), "Shouldn't enter this function if `differences` is empty"); std::string const depth_str = depth > 0 ? "depth " + std::to_string(depth) + '\n' : ""; // move the differences to the host. - auto h_differences = cudf::detail::make_host_vector_sync(differences); + auto h_differences = cudf::detail::make_host_vector_sync(differences, cudf::get_default_stream()); if (verbosity == debug_output_level::ALL_ERRORS) { std::ostringstream buffer; buffer << depth_str << "differences:" << std::endl; @@ -976,7 +976,8 @@ std::string nested_offsets_to_string(NestedColumnView const& c, std::string cons shifted_offsets.begin(), [first] __device__(int32_t offset) { return static_cast(offset - first); }); - auto const h_shifted_offsets = cudf::detail::make_host_vector_sync(shifted_offsets); + auto const h_shifted_offsets = + cudf::detail::make_host_vector_sync(shifted_offsets, cudf::get_default_stream()); std::ostringstream buffer; for (size_t idx = 0; idx < h_shifted_offsets.size(); idx++) { buffer << h_shifted_offsets[idx]; diff --git a/java/src/main/native/src/ColumnVectorJni.cpp b/java/src/main/native/src/ColumnVectorJni.cpp index f01d832eb19..39d58f896ea 100644 --- a/java/src/main/native/src/ColumnVectorJni.cpp +++ b/java/src/main/native/src/ColumnVectorJni.cpp @@ -307,8 +307,9 @@ JNIEXPORT jlong JNICALL Java_ai_rapids_cudf_ColumnVector_concatenate(JNIEnv *env auto columns = cudf::jni::native_jpointerArray{env, column_handles}.get_dereferenced(); auto const is_lists_column = columns[0].type().id() == cudf::type_id::LIST; - return release_as_jlong(is_lists_column ? cudf::lists::detail::concatenate(columns) : - cudf::concatenate(columns)); + return release_as_jlong( + is_lists_column ? cudf::lists::detail::concatenate(columns, cudf::get_default_stream()) : + cudf::concatenate(columns)); } CATCH_STD(env, 0); } diff --git a/java/src/main/native/src/ColumnViewJni.cpp b/java/src/main/native/src/ColumnViewJni.cpp index 716a9f0b834..e2a96de93ef 100644 --- a/java/src/main/native/src/ColumnViewJni.cpp +++ b/java/src/main/native/src/ColumnViewJni.cpp @@ -1322,8 +1322,8 @@ JNIEXPORT jlong JNICALL Java_ai_rapids_cudf_ColumnView_binaryOpVV(JNIEnv *env, j } auto out_view = out->mutable_view(); - cudf::binops::compiled::detail::apply_sorting_struct_binary_op(out_view, *lhs, *rhs, false, - false, op); + cudf::binops::compiled::detail::apply_sorting_struct_binary_op( + out_view, *lhs, *rhs, false, false, op, cudf::get_default_stream()); return release_as_jlong(out); } @@ -1369,8 +1369,8 @@ JNIEXPORT jlong JNICALL Java_ai_rapids_cudf_ColumnView_binaryOpVS(JNIEnv *env, j auto rhsv = cudf::make_column_from_scalar(*rhs, 1); auto out_view = out->mutable_view(); - cudf::binops::compiled::detail::apply_sorting_struct_binary_op(out_view, *lhs, rhsv->view(), - false, true, op); + cudf::binops::compiled::detail::apply_sorting_struct_binary_op( + out_view, *lhs, rhsv->view(), false, true, op, cudf::get_default_stream()); return release_as_jlong(out); } diff --git a/java/src/main/native/src/ColumnViewJni.cu b/java/src/main/native/src/ColumnViewJni.cu index a3f9ab5928d..f52e98b90b9 100644 --- a/java/src/main/native/src/ColumnViewJni.cu +++ b/java/src/main/native/src/ColumnViewJni.cu @@ -52,10 +52,10 @@ new_column_with_boolean_column_as_validity(cudf::column_view const &exemplar, auto validity_begin = cudf::detail::make_optional_iterator( *validity_device_view, cudf::nullate::DYNAMIC{validity_column.has_nulls()}); auto validity_end = validity_begin + validity_device_view->size(); - auto [null_mask, null_count] = - cudf::detail::valid_if(validity_begin, validity_end, [] __device__(auto optional_bool) { - return optional_bool.value_or(false); - }); + auto [null_mask, null_count] = cudf::detail::valid_if( + validity_begin, validity_end, + [] __device__(auto optional_bool) { return optional_bool.value_or(false); }, + cudf::get_default_stream()); auto const exemplar_without_null_mask = cudf::column_view{ exemplar.type(), exemplar.size(), @@ -152,8 +152,8 @@ void post_process_list_overlap(cudf::column_view const &lhs, cudf::column_view c }); // Create a new nullmask from the validity data. - auto [new_null_mask, new_null_count] = - cudf::detail::valid_if(validity.begin(), validity.end(), thrust::identity{}); + auto [new_null_mask, new_null_count] = cudf::detail::valid_if( + validity.begin(), validity.end(), thrust::identity{}, cudf::get_default_stream()); if (new_null_count > 0) { // If the `overlap_result` column is nullable, perform `bitmask_and` of its nullmask and the diff --git a/java/src/main/native/src/ScalarJni.cpp b/java/src/main/native/src/ScalarJni.cpp index b44d2604882..e47728f6acc 100644 --- a/java/src/main/native/src/ScalarJni.cpp +++ b/java/src/main/native/src/ScalarJni.cpp @@ -514,8 +514,8 @@ JNIEXPORT jlong JNICALL Java_ai_rapids_cudf_Scalar_binaryOpSV(JNIEnv *env, jclas auto lhs_col = cudf::make_column_from_scalar(*lhs, 1); auto out_view = out->mutable_view(); - cudf::binops::compiled::detail::apply_sorting_struct_binary_op(out_view, lhs_col->view(), - *rhs, true, false, op); + cudf::binops::compiled::detail::apply_sorting_struct_binary_op( + out_view, lhs_col->view(), *rhs, true, false, op, cudf::get_default_stream()); return release_as_jlong(out); }