diff --git a/cpp/benchmarks/column/concatenate_benchmark.cpp b/cpp/benchmarks/column/concatenate_benchmark.cpp index b04cfba7d07..3634b2f08a2 100644 --- a/cpp/benchmarks/column/concatenate_benchmark.cpp +++ b/cpp/benchmarks/column/concatenate_benchmark.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020, NVIDIA CORPORATION. + * Copyright (c) 2020-2021, NVIDIA CORPORATION. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -62,7 +62,7 @@ static void BM_concatenate(benchmark::State& state) CHECK_CUDA(0); for (auto _ : state) { - cuda_event_timer raii(state, true, 0); + cuda_event_timer raii(state, true, rmm::cuda_stream_default); auto result = cudf::concatenate(column_views); } @@ -124,7 +124,7 @@ static void BM_concatenate_tables(benchmark::State& state) CHECK_CUDA(0); for (auto _ : state) { - cuda_event_timer raii(state, true, 0); + cuda_event_timer raii(state, true, rmm::cuda_stream_default); auto result = cudf::concatenate(table_views); } @@ -184,7 +184,7 @@ static void BM_concatenate_strings(benchmark::State& state) CHECK_CUDA(0); for (auto _ : state) { - cuda_event_timer raii(state, true, 0); + cuda_event_timer raii(state, true, rmm::cuda_stream_default); auto result = cudf::concatenate(column_views); } diff --git a/cpp/benchmarks/join/join_benchmark.cu b/cpp/benchmarks/join/join_benchmark.cu index fa6afdd908c..d1c11696ddd 100644 --- a/cpp/benchmarks/join/join_benchmark.cu +++ b/cpp/benchmarks/join/join_benchmark.cu @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019, NVIDIA CORPORATION. + * Copyright (c) 2019-2021, NVIDIA CORPORATION. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -103,7 +103,7 @@ static void BM_join(benchmark::State &state) // Benchmark the inner join operation for (auto _ : state) { - cuda_event_timer raii(state, true, 0); + cuda_event_timer raii(state, true, rmm::cuda_stream_default); auto result = cudf::inner_join( probe_table, build_table, columns_to_join, columns_to_join, cudf::null_equality::UNEQUAL); diff --git a/cpp/benchmarks/sort/sort_benchmark.cpp b/cpp/benchmarks/sort/sort_benchmark.cpp index fb74469e7c0..fe68ddd0051 100644 --- a/cpp/benchmarks/sort/sort_benchmark.cpp +++ b/cpp/benchmarks/sort/sort_benchmark.cpp @@ -61,7 +61,7 @@ static void BM_sort(benchmark::State& state, bool nulls) auto input = cudf::table_view(column_views); for (auto _ : state) { - cuda_event_timer raii(state, true, 0); + cuda_event_timer raii(state, true, rmm::cuda_stream_default); auto result = (stable) ? cudf::stable_sorted_order(input) : cudf::sorted_order(input); } diff --git a/cpp/benchmarks/sort/sort_strings_benchmark.cpp b/cpp/benchmarks/sort/sort_strings_benchmark.cpp index 54e85b7ea8c..f5effcafcfb 100644 --- a/cpp/benchmarks/sort/sort_strings_benchmark.cpp +++ b/cpp/benchmarks/sort/sort_strings_benchmark.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020, NVIDIA CORPORATION. + * Copyright (c) 2020-2021, NVIDIA CORPORATION. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -32,7 +32,7 @@ static void BM_sort(benchmark::State& state) auto const table = create_random_table({cudf::type_id::STRING}, 1, row_count{n_rows}); for (auto _ : state) { - cuda_event_timer raii(state, true, 0); + cuda_event_timer raii(state, true, rmm::cuda_stream_default); cudf::sort(table->view()); } } diff --git a/cpp/benchmarks/string/case_benchmark.cpp b/cpp/benchmarks/string/case_benchmark.cpp index 9c1c81da22a..508ae49e093 100644 --- a/cpp/benchmarks/string/case_benchmark.cpp +++ b/cpp/benchmarks/string/case_benchmark.cpp @@ -32,7 +32,7 @@ static void BM_case(benchmark::State& state) cudf::strings_column_view input(table->view().column(0)); for (auto _ : state) { - cuda_event_timer raii(state, true, 0); + cuda_event_timer raii(state, true, rmm::cuda_stream_default); cudf::strings::to_lower(input); } diff --git a/cpp/benchmarks/string/combine_benchmark.cpp b/cpp/benchmarks/string/combine_benchmark.cpp index 2a5013a9ae7..7dabd32e874 100644 --- a/cpp/benchmarks/string/combine_benchmark.cpp +++ b/cpp/benchmarks/string/combine_benchmark.cpp @@ -43,7 +43,7 @@ static void BM_combine(benchmark::State& state) cudf::string_scalar separator("+"); for (auto _ : state) { - cuda_event_timer raii(state, true, 0); + cuda_event_timer raii(state, true, rmm::cuda_stream_default); cudf::strings::concatenate(table->view(), separator); } diff --git a/cpp/benchmarks/string/contains_benchmark.cpp b/cpp/benchmarks/string/contains_benchmark.cpp index 1a2ac8ad602..79bdda77634 100644 --- a/cpp/benchmarks/string/contains_benchmark.cpp +++ b/cpp/benchmarks/string/contains_benchmark.cpp @@ -35,7 +35,7 @@ static void BM_contains(benchmark::State& state, contains_type ct) cudf::strings_column_view input(table->view().column(0)); for (auto _ : state) { - cuda_event_timer raii(state, true, 0); + cuda_event_timer raii(state, true, rmm::cuda_stream_default); // contains_re(), matches_re(), and count_re() all have similar functions // with count_re() being the most regex intensive switch (ct) { diff --git a/cpp/benchmarks/string/copy_benchmark.cpp b/cpp/benchmarks/string/copy_benchmark.cpp index af9f5b4fa4a..b49bc878ca7 100644 --- a/cpp/benchmarks/string/copy_benchmark.cpp +++ b/cpp/benchmarks/string/copy_benchmark.cpp @@ -54,7 +54,7 @@ static void BM_copy(benchmark::State& state, copy_type ct) host_map_data.end()); for (auto _ : state) { - cuda_event_timer raii(state, true, 0); + cuda_event_timer raii(state, true, rmm::cuda_stream_default); switch (ct) { case gather: cudf::gather(source->view(), index_map); break; case scatter: cudf::scatter(source->view(), index_map, target->view()); break; diff --git a/cpp/benchmarks/string/extract_benchmark.cpp b/cpp/benchmarks/string/extract_benchmark.cpp index dbae18dde3b..f53ea60cdf9 100644 --- a/cpp/benchmarks/string/extract_benchmark.cpp +++ b/cpp/benchmarks/string/extract_benchmark.cpp @@ -44,7 +44,7 @@ static void BM_extract(benchmark::State& state, int re_instructions) std::string const pattern = "(" + raw_pattern.substr(0, re_instructions) + ")"; for (auto _ : state) { - cuda_event_timer raii(state, true, 0); + cuda_event_timer raii(state, true, rmm::cuda_stream_default); auto results = cudf::strings::extract(input, pattern); } diff --git a/cpp/benchmarks/string/factory_benchmark.cu b/cpp/benchmarks/string/factory_benchmark.cu index 6c5dceffaa8..802ca949976 100644 --- a/cpp/benchmarks/string/factory_benchmark.cu +++ b/cpp/benchmarks/string/factory_benchmark.cu @@ -63,7 +63,7 @@ static void BM_factory(benchmark::State& state) string_view_to_pair{}); for (auto _ : state) { - cuda_event_timer raii(state, true, 0); + cuda_event_timer raii(state, true, rmm::cuda_stream_default); cudf::make_strings_column(pairs); } diff --git a/cpp/benchmarks/string/filter_benchmark.cpp b/cpp/benchmarks/string/filter_benchmark.cpp index 123c5597df9..d510ca9baed 100644 --- a/cpp/benchmarks/string/filter_benchmark.cpp +++ b/cpp/benchmarks/string/filter_benchmark.cpp @@ -50,7 +50,7 @@ static void BM_filter_chars(benchmark::State& state, FilterAPI api) {cudf::char_utf8{'a'}, cudf::char_utf8{'c'}}}; for (auto _ : state) { - cuda_event_timer raii(state, true, 0); + cuda_event_timer raii(state, true, rmm::cuda_stream_default); switch (api) { case filter: cudf::strings::filter_characters_of_type(input, types); break; case filter_chars: cudf::strings::filter_characters(input, filter_table); break; diff --git a/cpp/benchmarks/string/find_benchmark.cpp b/cpp/benchmarks/string/find_benchmark.cpp index 200527d606e..fd7c515eb0b 100644 --- a/cpp/benchmarks/string/find_benchmark.cpp +++ b/cpp/benchmarks/string/find_benchmark.cpp @@ -46,7 +46,7 @@ static void BM_find_scalar(benchmark::State& state, FindAPI find_api) cudf::test::strings_column_wrapper targets({"+", "-"}); for (auto _ : state) { - cuda_event_timer raii(state, true, 0); + cuda_event_timer raii(state, true, rmm::cuda_stream_default); switch (find_api) { case find: cudf::strings::find(input, target); break; case find_multi: diff --git a/cpp/benchmarks/string/replace_benchmark.cpp b/cpp/benchmarks/string/replace_benchmark.cpp index 968b8f5abb0..0d785fd25aa 100644 --- a/cpp/benchmarks/string/replace_benchmark.cpp +++ b/cpp/benchmarks/string/replace_benchmark.cpp @@ -49,7 +49,7 @@ static void BM_replace(benchmark::State& state, replace_type rt) cudf::test::strings_column_wrapper repls({"", ""}); for (auto _ : state) { - cuda_event_timer raii(state, true, 0); + cuda_event_timer raii(state, true, rmm::cuda_stream_default); switch (rt) { case scalar: cudf::strings::replace(input, target, repl); break; case slice: cudf::strings::replace_slice(input, repl, 1, 10); break; diff --git a/cpp/benchmarks/string/replace_re_benchmark.cpp b/cpp/benchmarks/string/replace_re_benchmark.cpp index 616e2c0f22c..18ec28371e3 100644 --- a/cpp/benchmarks/string/replace_re_benchmark.cpp +++ b/cpp/benchmarks/string/replace_re_benchmark.cpp @@ -43,7 +43,7 @@ static void BM_replace(benchmark::State& state, replace_type rt) cudf::test::strings_column_wrapper repls({"#", ""}); for (auto _ : state) { - cuda_event_timer raii(state, true, 0); + cuda_event_timer raii(state, true, rmm::cuda_stream_default); switch (rt) { case replace_type::replace_re: // contains_re and matches_re use the same main logic cudf::strings::replace_re(input, "\\d+"); diff --git a/cpp/benchmarks/string/split_benchmark.cpp b/cpp/benchmarks/string/split_benchmark.cpp index 35bedb1b767..0494fba7642 100644 --- a/cpp/benchmarks/string/split_benchmark.cpp +++ b/cpp/benchmarks/string/split_benchmark.cpp @@ -44,7 +44,7 @@ static void BM_split(benchmark::State& state, split_type rt) cudf::string_scalar target("+"); for (auto _ : state) { - cuda_event_timer raii(state, true, 0); + cuda_event_timer raii(state, true, rmm::cuda_stream_default); switch (rt) { case split: cudf::strings::split(input, target); break; case split_ws: cudf::strings::split(input); break; diff --git a/cpp/benchmarks/string/substring_benchmark.cpp b/cpp/benchmarks/string/substring_benchmark.cpp index d47c42e45be..e8a66f7b323 100644 --- a/cpp/benchmarks/string/substring_benchmark.cpp +++ b/cpp/benchmarks/string/substring_benchmark.cpp @@ -54,7 +54,7 @@ static void BM_substring(benchmark::State& state, substring_type rt) cudf::test::strings_column_wrapper delimiters(delim_itr, delim_itr + n_rows); for (auto _ : state) { - cuda_event_timer raii(state, true, 0); + cuda_event_timer raii(state, true, rmm::cuda_stream_default); switch (rt) { case position: cudf::strings::slice_strings(input, 1, max_str_length / 2); break; case multi_position: cudf::strings::slice_strings(input, starts, stops); break; diff --git a/cpp/benchmarks/string/translate_benchmark.cpp b/cpp/benchmarks/string/translate_benchmark.cpp index c49a986d744..49396b0ce71 100644 --- a/cpp/benchmarks/string/translate_benchmark.cpp +++ b/cpp/benchmarks/string/translate_benchmark.cpp @@ -54,7 +54,7 @@ static void BM_translate(benchmark::State& state, int entry_count) }); for (auto _ : state) { - cuda_event_timer raii(state, true, 0); + cuda_event_timer raii(state, true, rmm::cuda_stream_default); cudf::strings::translate(input, entries); } diff --git a/cpp/benchmarks/string/url_decode_benchmark.cpp b/cpp/benchmarks/string/url_decode_benchmark.cpp index 26c23ea23b4..fbb99bf3e8f 100644 --- a/cpp/benchmarks/string/url_decode_benchmark.cpp +++ b/cpp/benchmarks/string/url_decode_benchmark.cpp @@ -80,7 +80,7 @@ void BM_url_decode(benchmark::State& state) auto strings_view = cudf::strings_column_view(column); for (auto _ : state) { - cuda_event_timer raii(state, true, 0); + cuda_event_timer raii(state, true, rmm::cuda_stream_default); auto result = cudf::strings::url_decode(strings_view); } diff --git a/cpp/benchmarks/text/normalize_benchmark.cpp b/cpp/benchmarks/text/normalize_benchmark.cpp index 32c4fb7dcde..bb872fee0b3 100644 --- a/cpp/benchmarks/text/normalize_benchmark.cpp +++ b/cpp/benchmarks/text/normalize_benchmark.cpp @@ -41,7 +41,7 @@ static void BM_normalize(benchmark::State& state, bool to_lower) cudf::strings_column_view input(table->view().column(0)); for (auto _ : state) { - cuda_event_timer raii(state, true, 0); + cuda_event_timer raii(state, true, rmm::cuda_stream_default); nvtext::normalize_characters(input, to_lower); } diff --git a/cpp/benchmarks/text/normalize_spaces_benchmark.cpp b/cpp/benchmarks/text/normalize_spaces_benchmark.cpp index dcabb0c225c..6260bb02c55 100644 --- a/cpp/benchmarks/text/normalize_spaces_benchmark.cpp +++ b/cpp/benchmarks/text/normalize_spaces_benchmark.cpp @@ -42,7 +42,7 @@ static void BM_normalize(benchmark::State& state) cudf::strings_column_view input(table->view().column(0)); for (auto _ : state) { - cuda_event_timer raii(state, true, 0); + cuda_event_timer raii(state, true, rmm::cuda_stream_default); nvtext::normalize_spaces(input); } diff --git a/cpp/benchmarks/text/tokenize_benchmark.cpp b/cpp/benchmarks/text/tokenize_benchmark.cpp index f9e742f0f31..7bb84e11a4a 100644 --- a/cpp/benchmarks/text/tokenize_benchmark.cpp +++ b/cpp/benchmarks/text/tokenize_benchmark.cpp @@ -46,7 +46,7 @@ static void BM_tokenize(benchmark::State& state, tokenize_type tt) cudf::test::strings_column_wrapper delimiters({" ", "+", "-"}); for (auto _ : state) { - cuda_event_timer raii(state, true, 0); + cuda_event_timer raii(state, true, rmm::cuda_stream_default); switch (tt) { case tokenize_type::single: nvtext::tokenize(input); break; case tokenize_type::multi: diff --git a/cpp/include/cudf/scalar/scalar.hpp b/cpp/include/cudf/scalar/scalar.hpp index ded833f4ca0..745f88572b4 100644 --- a/cpp/include/cudf/scalar/scalar.hpp +++ b/cpp/include/cudf/scalar/scalar.hpp @@ -151,7 +151,7 @@ class fixed_width_scalar : public scalar { /** * @brief Implicit conversion operator to get the value of the scalar on the host */ - explicit operator value_type() const { return this->value(0); } + explicit operator value_type() const { return this->value(rmm::cuda_stream_default); } /** * @brief Get the value of the scalar @@ -449,7 +449,7 @@ class string_scalar : public scalar { /** * @brief Implicit conversion operator to get the value of the scalar in a host std::string */ - explicit operator std::string() const { return this->to_string(0); } + explicit operator std::string() const { return this->to_string(rmm::cuda_stream_default); } /** * @brief Get the value of the scalar in a host std::string diff --git a/cpp/include/cudf/types.hpp b/cpp/include/cudf/types.hpp index d7b6402fe4e..b08fccc0d66 100644 --- a/cpp/include/cudf/types.hpp +++ b/cpp/include/cudf/types.hpp @@ -64,8 +64,8 @@ class list_scalar; class string_scalar; template class numeric_scalar; template class fixed_point_scalar; -template class timestamp_scalar; -template class duration_scalar; +template struct timestamp_scalar; +template struct duration_scalar; class string_scalar_device_view; template class numeric_scalar_device_view; diff --git a/cpp/src/copying/concatenate.cu b/cpp/src/copying/concatenate.cu index 1b948083982..e87cadbffe8 100644 --- a/cpp/src/copying/concatenate.cu +++ b/cpp/src/copying/concatenate.cu @@ -455,7 +455,8 @@ rmm::device_buffer concatenate_masks(host_span views, rmm::device_buffer null_mask = create_null_mask(total_element_count, mask_state::UNINITIALIZED, mr); - detail::concatenate_masks(views, static_cast(null_mask.data()), 0); + detail::concatenate_masks( + views, static_cast(null_mask.data()), rmm::cuda_stream_default); return null_mask; } diff --git a/cpp/src/copying/pack.cpp b/cpp/src/copying/pack.cpp index 0d1bb5a8312..182e3ff0584 100644 --- a/cpp/src/copying/pack.cpp +++ b/cpp/src/copying/pack.cpp @@ -17,6 +17,8 @@ #include #include +#include + namespace cudf { namespace detail { @@ -216,7 +218,7 @@ table_view unpack(uint8_t const* metadata, uint8_t const* gpu_data) packed_columns pack(cudf::table_view const& input, rmm::mr::device_memory_resource* mr) { CUDF_FUNC_RANGE(); - return detail::pack(input, 0, mr); + return detail::pack(input, rmm::cuda_stream_default, mr); } /** diff --git a/cpp/src/io/csv/writer_impl.cu b/cpp/src/io/csv/writer_impl.cu index f7e153d71f4..fcab4190071 100644 --- a/cpp/src/io/csv/writer_impl.cu +++ b/cpp/src/io/csv/writer_impl.cu @@ -37,6 +37,7 @@ #include #include +#include #include #include @@ -211,10 +212,11 @@ struct column_to_strings_fn { (cudf::is_timestamp()) || (cudf::is_duration())); } - explicit column_to_strings_fn(csv_writer_options const& options, - rmm::mr::device_memory_resource* mr = nullptr, - rmm::cuda_stream_view stream = nullptr) - : options_(options), mr_(mr), stream_(stream) + explicit column_to_strings_fn( + csv_writer_options const& options, + rmm::cuda_stream_view stream = rmm::cuda_stream_default, + rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource()) + : options_(options), stream_(stream), mr_(mr) { } @@ -345,8 +347,8 @@ struct column_to_strings_fn { private: csv_writer_options const& options_; - rmm::mr::device_memory_resource* mr_; rmm::cuda_stream_view stream_; + rmm::mr::device_memory_resource* mr_; }; } // unnamed namespace @@ -495,7 +497,7 @@ void writer::impl::write(table_view const& table, // convert each chunk to CSV: // - column_to_strings_fn converter{options_, mr_}; + column_to_strings_fn converter{options_, stream, mr_}; for (auto&& sub_view : vector_views) { // Skip if the table has no rows if (sub_view.num_rows() == 0) continue; diff --git a/cpp/src/replace/nans.cu b/cpp/src/replace/nans.cu index b34b0928847..d6cf7d2c385 100644 --- a/cpp/src/replace/nans.cu +++ b/cpp/src/replace/nans.cu @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020, NVIDIA CORPORATION. + * Copyright (c) 2020-2021, NVIDIA CORPORATION. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -146,7 +146,7 @@ std::unique_ptr replace_nans(column_view const& input, rmm::mr::device_memory_resource* mr) { CUDF_FUNC_RANGE(); - return detail::replace_nans(input, replacement, 0, mr); + return detail::replace_nans(input, replacement, rmm::cuda_stream_default, mr); } std::unique_ptr replace_nans(column_view const& input, diff --git a/cpp/src/strings/substring.cu b/cpp/src/strings/substring.cu index f712b0cb6aa..e8da3120c38 100644 --- a/cpp/src/strings/substring.cu +++ b/cpp/src/strings/substring.cu @@ -402,8 +402,9 @@ std::unique_ptr slice_strings(strings_column_view const& strings, "Strings and delimiters column sizes do not match"); CUDF_FUNC_RANGE(); - auto delimiters_dev_view_ptr = cudf::column_device_view::create(delimiters.parent(), 0); - auto delimiters_dev_view = *delimiters_dev_view_ptr; + auto delimiters_dev_view_ptr = + cudf::column_device_view::create(delimiters.parent(), rmm::cuda_stream_default); + auto delimiters_dev_view = *delimiters_dev_view_ptr; return (delimiters_dev_view.nullable()) ? detail::slice_strings( strings, diff --git a/cpp/src/text/subword/subword_tokenize.cu b/cpp/src/text/subword/subword_tokenize.cu index 1639af0dbde..8c14f89d4d0 100644 --- a/cpp/src/text/subword/subword_tokenize.cu +++ b/cpp/src/text/subword/subword_tokenize.cu @@ -265,7 +265,7 @@ tokenizer_result subword_tokenize(cudf::strings_column_view const& strings, do_lower_case, do_truncate, max_rows_tensor, - 0, + rmm::cuda_stream_default, mr); } @@ -286,7 +286,7 @@ tokenizer_result subword_tokenize(cudf::strings_column_view const& strings, do_lower_case, do_truncate, max_rows_tensor, - 0, + rmm::cuda_stream_default, mr); } diff --git a/cpp/tests/copying/gather_struct_tests.cu b/cpp/tests/copying/gather_struct_tests.cu index a40e10d5e83..bcb4f83e7cb 100644 --- a/cpp/tests/copying/gather_struct_tests.cu +++ b/cpp/tests/copying/gather_struct_tests.cu @@ -189,7 +189,8 @@ TYPED_TEST(TypedStructGatherTest, TestGatherStructOfLists) cudf::detail::make_counting_transform_iterator(0, [](auto i) { return !(i % 3); })}; }; - auto lists_column = std::make_unique(cudf::column(lists_column_exemplar(), 0)); + auto lists_column = + std::make_unique(cudf::column(lists_column_exemplar(), rmm::cuda_stream_default)); // Assemble struct column. std::vector> vector_of_columns; @@ -242,7 +243,8 @@ TYPED_TEST(TypedStructGatherTest, TestGatherStructOfListsOfLists) cudf::detail::make_counting_transform_iterator(0, [](auto i) { return !(i % 3); })}; }; - auto lists_column = std::make_unique(cudf::column(lists_column_exemplar(), 0)); + auto lists_column = + std::make_unique(cudf::column(lists_column_exemplar(), rmm::cuda_stream_default)); // Assemble struct column. std::vector> vector_of_columns; diff --git a/cpp/tests/replace/replace_nulls_tests.cpp b/cpp/tests/replace/replace_nulls_tests.cpp index e969f53609e..f6937c29d04 100644 --- a/cpp/tests/replace/replace_nulls_tests.cpp +++ b/cpp/tests/replace/replace_nulls_tests.cpp @@ -168,8 +168,9 @@ TEST_F(ReplaceNullsStringsTest, SimpleReplaceScalar) { std::vector input{"", "", "", "", "", "", "", ""}; std::vector input_v{0, 0, 0, 0, 0, 0, 0, 0}; - std::unique_ptr repl = cudf::make_string_scalar("rep", 0, mr()); - repl->set_valid(true, 0); + std::unique_ptr repl = + cudf::make_string_scalar("rep", rmm::cuda_stream_default, mr()); + repl->set_valid(true, rmm::cuda_stream_default); std::vector expected{"rep", "rep", "rep", "rep", "rep", "rep", "rep", "rep"}; cudf::test::strings_column_wrapper input_w{input.begin(), input.end(), input_v.begin()}; diff --git a/cpp/tests/utilities/column_utilities.cu b/cpp/tests/utilities/column_utilities.cu index 5205124c129..f17446ca1dc 100644 --- a/cpp/tests/utilities/column_utilities.cu +++ b/cpp/tests/utilities/column_utilities.cu @@ -93,8 +93,8 @@ struct column_property_comparator { // recurse cudf::type_dispatcher(lhs_l.child().type(), column_property_comparator{}, - lhs_l.get_sliced_child(0), - rhs_l.get_sliced_child(0)); + lhs_l.get_sliced_child(rmm::cuda_stream_default), + rhs_l.get_sliced_child(rmm::cuda_stream_default)); } }; @@ -283,8 +283,9 @@ struct column_comparator_impl { // compare offsets, taking slicing into account // left side - size_type lhs_shift = cudf::detail::get_value(lhs_l.offsets(), lhs_l.offset(), 0); - auto lhs_offsets = thrust::make_transform_iterator( + size_type lhs_shift = + cudf::detail::get_value(lhs_l.offsets(), lhs_l.offset(), rmm::cuda_stream_default); + auto lhs_offsets = thrust::make_transform_iterator( lhs_l.offsets().begin() + lhs_l.offset(), [lhs_shift] __device__(size_type offset) { return offset - lhs_shift; }); auto lhs_valids = thrust::make_transform_iterator( @@ -294,8 +295,9 @@ struct column_comparator_impl { }); // right side - size_type rhs_shift = cudf::detail::get_value(rhs_l.offsets(), rhs_l.offset(), 0); - auto rhs_offsets = thrust::make_transform_iterator( + size_type rhs_shift = + cudf::detail::get_value(rhs_l.offsets(), rhs_l.offset(), rmm::cuda_stream_default); + auto rhs_offsets = thrust::make_transform_iterator( rhs_l.offsets().begin() + rhs_l.offset(), [rhs_shift] __device__(size_type offset) { return offset - rhs_shift; }); auto rhs_valids = thrust::make_transform_iterator( @@ -328,8 +330,8 @@ struct column_comparator_impl { differences, lhs, rhs, print_all_differences, depth); // recurse - auto lhs_child = lhs_l.get_sliced_child(0); - auto rhs_child = rhs_l.get_sliced_child(0); + auto lhs_child = lhs_l.get_sliced_child(rmm::cuda_stream_default); + auto rhs_child = rhs_l.get_sliced_child(rmm::cuda_stream_default); cudf::type_dispatcher(lhs_child.type(), column_comparator{}, lhs_child, @@ -518,7 +520,8 @@ std::string nested_offsets_to_string(NestedColumnView const& c, std::string cons size_type output_size = c.size() + 1; // the first offset value to normalize everything against - size_type first = cudf::detail::get_value(offsets, c.offset(), 0); + size_type first = + cudf::detail::get_value(offsets, c.offset(), rmm::cuda_stream_default); rmm::device_vector shifted_offsets(output_size); // normalize the offset values for the column offset @@ -687,7 +690,7 @@ struct column_view_printer { lists_column_view lcv(col); // propage slicing to the child if necessary - column_view child = lcv.get_sliced_child(0); + column_view child = lcv.get_sliced_child(rmm::cuda_stream_default); bool const is_sliced = lcv.offset() > 0 || child.offset() > 0; std::string tmp = diff --git a/cpp/tests/utilities_tests/span_tests.cu b/cpp/tests/utilities_tests/span_tests.cu index 24884c15f64..22e15809a2d 100644 --- a/cpp/tests/utilities_tests/span_tests.cu +++ b/cpp/tests/utilities_tests/span_tests.cu @@ -209,7 +209,7 @@ TEST(SpanTest, CanConstructFromDeviceContainers) { auto d_thrust_vector = thrust::device_vector(1); auto d_vector = rmm::device_vector(1); - auto d_uvector = rmm::device_uvector(1, 0); + auto d_uvector = rmm::device_uvector(1, rmm::cuda_stream_default); (void)device_span(d_thrust_vector); (void)device_span(d_vector);