diff --git a/cpp/benchmarks/column/concatenate.cpp b/cpp/benchmarks/column/concatenate.cpp index 67ea6129a74..99aa414fae3 100644 --- a/cpp/benchmarks/column/concatenate.cpp +++ b/cpp/benchmarks/column/concatenate.cpp @@ -22,6 +22,7 @@ #include #include +#include #include #include @@ -48,7 +49,7 @@ static void BM_concatenate(benchmark::State& state) CUDF_CHECK_CUDA(0); for (auto _ : state) { - cuda_event_timer raii(state, true, rmm::cuda_stream_default); + cuda_event_timer raii(state, true, cudf::default_stream_value); auto result = cudf::concatenate(column_views); } @@ -90,7 +91,7 @@ static void BM_concatenate_tables(benchmark::State& state) CUDF_CHECK_CUDA(0); for (auto _ : state) { - cuda_event_timer raii(state, true, rmm::cuda_stream_default); + cuda_event_timer raii(state, true, cudf::default_stream_value); auto result = cudf::concatenate(table_views); } @@ -149,7 +150,7 @@ static void BM_concatenate_strings(benchmark::State& state) CUDF_CHECK_CUDA(0); for (auto _ : state) { - cuda_event_timer raii(state, true, rmm::cuda_stream_default); + cuda_event_timer raii(state, true, cudf::default_stream_value); auto result = cudf::concatenate(column_views); } diff --git a/cpp/benchmarks/common/generate_input.cu b/cpp/benchmarks/common/generate_input.cu index b6a37453a13..e380a25a06b 100644 --- a/cpp/benchmarks/common/generate_input.cu +++ b/cpp/benchmarks/common/generate_input.cu @@ -26,9 +26,9 @@ #include #include #include +#include #include -#include #include #include @@ -206,7 +206,7 @@ struct random_value_fn()>> { } else { // Don't need a random seconds generator for sub-second intervals seconds_gen = [range_s](thrust::minstd_rand&, size_t size) { - rmm::device_uvector result(size, rmm::cuda_stream_default); + rmm::device_uvector result(size, cudf::default_stream_value); thrust::fill(thrust::device, result.begin(), result.end(), range_s.second.count()); return result; }; @@ -224,7 +224,7 @@ struct random_value_fn()>> { { auto const sec = seconds_gen(engine, size); auto const ns = nanoseconds_gen(engine, size); - rmm::device_uvector result(size, rmm::cuda_stream_default); + rmm::device_uvector result(size, cudf::default_stream_value); thrust::transform( thrust::device, sec.begin(), @@ -268,7 +268,7 @@ struct random_value_fn()>> { scale = numeric::scale_type{scale_dist(engine_scale)}; } auto const ints = dist(engine, size); - rmm::device_uvector result(size, rmm::cuda_stream_default); + rmm::device_uvector result(size, cudf::default_stream_value); // Clamp the generated random value to the specified range thrust::transform(thrust::device, ints.begin(), @@ -313,7 +313,7 @@ struct random_value_fn>> { random_value_fn(distribution_params const& desc) : dist{[valid_prob = desc.probability_true](thrust::minstd_rand& engine, size_t size) -> rmm::device_uvector { - rmm::device_uvector result(size, rmm::cuda_stream_default); + rmm::device_uvector result(size, cudf::default_stream_value); thrust::tabulate( thrust::device, result.begin(), result.end(), bool_generator(engine, valid_prob)); return result; @@ -365,7 +365,7 @@ rmm::device_uvector sample_indices_with_run_length(cudf::size_t return samples_indices[sample_idx]; }); rmm::device_uvector repeated_sample_indices(num_rows, - rmm::cuda_stream_default); + cudf::default_stream_value); thrust::copy(thrust::device, avg_repeated_sample_indices_iterator, avg_repeated_sample_indices_iterator + num_rows, @@ -403,8 +403,8 @@ std::unique_ptr create_random_column(data_profile const& profile, // Distribution for picking elements from the array of samples auto const avg_run_len = profile.get_avg_run_length(); - rmm::device_uvector data(0, rmm::cuda_stream_default); - rmm::device_uvector null_mask(0, rmm::cuda_stream_default); + rmm::device_uvector data(0, cudf::default_stream_value); + rmm::device_uvector null_mask(0, cudf::default_stream_value); if (cardinality == 0) { data = value_dist(engine, num_rows); @@ -413,8 +413,8 @@ std::unique_ptr create_random_column(data_profile const& profile, // generate n samples and gather. auto const sample_indices = sample_indices_with_run_length(avg_run_len, cardinality, num_rows, engine); - data = rmm::device_uvector(num_rows, rmm::cuda_stream_default); - null_mask = rmm::device_uvector(num_rows, rmm::cuda_stream_default); + data = rmm::device_uvector(num_rows, cudf::default_stream_value); + null_mask = rmm::device_uvector(num_rows, cudf::default_stream_value); thrust::gather( thrust::device, sample_indices.begin(), sample_indices.end(), samples.begin(), data.begin()); thrust::gather(thrust::device, @@ -493,12 +493,12 @@ std::unique_ptr create_random_utf8_string_column(data_profile cons auto valid_lengths = thrust::make_transform_iterator( thrust::make_zip_iterator(thrust::make_tuple(lengths.begin(), null_mask.begin())), valid_or_zero{}); - rmm::device_uvector offsets(num_rows + 1, rmm::cuda_stream_default); + rmm::device_uvector offsets(num_rows + 1, cudf::default_stream_value); thrust::exclusive_scan( thrust::device, valid_lengths, valid_lengths + lengths.size(), offsets.begin()); // offfsets are ready. auto chars_length = *thrust::device_pointer_cast(offsets.end() - 1); - rmm::device_uvector chars(chars_length, rmm::cuda_stream_default); + rmm::device_uvector chars(chars_length, cudf::default_stream_value); thrust::for_each_n(thrust::device, thrust::make_zip_iterator(offsets.begin(), offsets.begin() + 1), num_rows, diff --git a/cpp/benchmarks/common/random_distribution_factory.cuh b/cpp/benchmarks/common/random_distribution_factory.cuh index 0f508e9685b..3cfab858793 100644 --- a/cpp/benchmarks/common/random_distribution_factory.cuh +++ b/cpp/benchmarks/common/random_distribution_factory.cuh @@ -18,6 +18,8 @@ #include "generate_input.hpp" +#include + #include #include @@ -146,7 +148,7 @@ distribution_fn make_distribution(distribution_id dist_id, T lower_bound, T u case distribution_id::NORMAL: return [lower_bound, upper_bound, dist = make_normal_dist(lower_bound, upper_bound)]( thrust::minstd_rand& engine, size_t size) -> rmm::device_uvector { - rmm::device_uvector result(size, rmm::cuda_stream_default); + rmm::device_uvector result(size, cudf::default_stream_value); thrust::tabulate(thrust::device, result.begin(), result.end(), @@ -156,7 +158,7 @@ distribution_fn make_distribution(distribution_id dist_id, T lower_bound, T u case distribution_id::UNIFORM: return [lower_bound, upper_bound, dist = make_uniform_dist(lower_bound, upper_bound)]( thrust::minstd_rand& engine, size_t size) -> rmm::device_uvector { - rmm::device_uvector result(size, rmm::cuda_stream_default); + rmm::device_uvector result(size, cudf::default_stream_value); thrust::tabulate(thrust::device, result.begin(), result.end(), @@ -167,7 +169,7 @@ distribution_fn make_distribution(distribution_id dist_id, T lower_bound, T u // kind of exponential distribution from lower_bound to upper_bound. return [lower_bound, upper_bound, dist = geometric_distribution(lower_bound, upper_bound)]( thrust::minstd_rand& engine, size_t size) -> rmm::device_uvector { - rmm::device_uvector result(size, rmm::cuda_stream_default); + rmm::device_uvector result(size, cudf::default_stream_value); thrust::tabulate(thrust::device, result.begin(), result.end(), diff --git a/cpp/benchmarks/copying/copy_if_else.cpp b/cpp/benchmarks/copying/copy_if_else.cpp index 6f355118f49..82f4e15ecb0 100644 --- a/cpp/benchmarks/copying/copy_if_else.cpp +++ b/cpp/benchmarks/copying/copy_if_else.cpp @@ -19,6 +19,7 @@ #include #include +#include #include @@ -44,7 +45,7 @@ static void BM_copy_if_else(benchmark::State& state, bool nulls) cudf::column_view lhs(input->view().column(0)); for (auto _ : state) { - cuda_event_timer raii(state, true, rmm::cuda_stream_default); + cuda_event_timer raii(state, true, cudf::default_stream_value); cudf::copy_if_else(lhs, rhs, decision); } } diff --git a/cpp/benchmarks/copying/shift.cu b/cpp/benchmarks/copying/shift.cu index 87718029cb2..a849b7da58b 100644 --- a/cpp/benchmarks/copying/shift.cu +++ b/cpp/benchmarks/copying/shift.cu @@ -19,11 +19,12 @@ #include #include +#include template > std::unique_ptr make_scalar( T value = 0, - rmm::cuda_stream_view stream = rmm::cuda_stream_default, + rmm::cuda_stream_view stream = cudf::default_stream_value, rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource()) { auto s = new ScalarType(value, true, stream, mr); diff --git a/cpp/benchmarks/groupby/group_struct_keys.cpp b/cpp/benchmarks/groupby/group_struct_keys.cpp index 8398125db21..8e1cf59ee84 100644 --- a/cpp/benchmarks/groupby/group_struct_keys.cpp +++ b/cpp/benchmarks/groupby/group_struct_keys.cpp @@ -21,6 +21,7 @@ #include #include +#include #include @@ -87,7 +88,7 @@ void bench_groupby_struct_keys(nvbench::state& state) requests[0].aggregations.push_back(cudf::make_min_aggregation()); // Set up nvbench default stream - auto stream = rmm::cuda_stream_default; + auto stream = cudf::default_stream_value; state.set_cuda_stream(nvbench::make_cuda_stream_view(stream.value())); state.exec(nvbench::exec_tag::sync, diff --git a/cpp/benchmarks/hashing/hash.cpp b/cpp/benchmarks/hashing/hash.cpp index 9c0ef5b528d..d0dc5f94bca 100644 --- a/cpp/benchmarks/hashing/hash.cpp +++ b/cpp/benchmarks/hashing/hash.cpp @@ -20,6 +20,7 @@ #include #include +#include class HashBenchmark : public cudf::benchmark { }; @@ -34,7 +35,7 @@ static void BM_hash(benchmark::State& state, cudf::hash_id hid, contains_nulls h data->get_column(0).set_null_mask(rmm::device_buffer{}, 0); for (auto _ : state) { - cuda_event_timer raii(state, true, rmm::cuda_stream_default); + cuda_event_timer raii(state, true, cudf::default_stream_value); cudf::hash(data->view(), hid); } } diff --git a/cpp/benchmarks/io/text/multibyte_split.cpp b/cpp/benchmarks/io/text/multibyte_split.cpp index d274f79a77c..df928c73dd1 100644 --- a/cpp/benchmarks/io/text/multibyte_split.cpp +++ b/cpp/benchmarks/io/text/multibyte_split.cpp @@ -27,8 +27,7 @@ #include #include #include - -#include +#include #include #include @@ -106,7 +105,7 @@ static void BM_multibyte_split(benchmark::State& state) device_input.data(), device_input.size() * sizeof(char), cudaMemcpyDeviceToHost, - rmm::cuda_stream_default); + cudf::default_stream_value); auto temp_file_name = random_file_in_dir(temp_dir.path()); diff --git a/cpp/benchmarks/iterator/iterator.cu b/cpp/benchmarks/iterator/iterator.cu index 5eaaec23211..86032af4140 100644 --- a/cpp/benchmarks/iterator/iterator.cu +++ b/cpp/benchmarks/iterator/iterator.cu @@ -22,6 +22,7 @@ #include #include #include +#include #include @@ -54,7 +55,7 @@ inline auto reduce_by_cub(OutputIterator result, InputIterator d_in, int num_ite nullptr, temp_storage_bytes, d_in, result, num_items, cudf::DeviceSum{}, init); // Allocate temporary storage - rmm::device_buffer d_temp_storage(temp_storage_bytes, rmm::cuda_stream_default); + rmm::device_buffer d_temp_storage(temp_storage_bytes, cudf::default_stream_value); // Run reduction cub::DeviceReduce::Reduce( diff --git a/cpp/benchmarks/join/generate_input_tables.cuh b/cpp/benchmarks/join/generate_input_tables.cuh index 5df77ac4319..31cef581f22 100644 --- a/cpp/benchmarks/join/generate_input_tables.cuh +++ b/cpp/benchmarks/join/generate_input_tables.cuh @@ -17,9 +17,9 @@ #pragma once #include +#include #include -#include #include #include @@ -154,7 +154,7 @@ void generate_input_tables(key_type* const build_tbl, const int num_states = num_sms * std::max(num_blocks_init_build_tbl, num_blocks_init_probe_tbl) * block_size; - rmm::device_uvector devStates(num_states, rmm::cuda_stream_default); + rmm::device_uvector devStates(num_states, cudf::default_stream_value); init_curand<<<(num_states - 1) / block_size + 1, block_size>>>(devStates.data(), num_states); diff --git a/cpp/benchmarks/join/join_common.hpp b/cpp/benchmarks/join/join_common.hpp index a031b4e656d..6c1500cf1cf 100644 --- a/cpp/benchmarks/join/join_common.hpp +++ b/cpp/benchmarks/join/join_common.hpp @@ -28,6 +28,7 @@ #include #include #include +#include #include #include @@ -125,7 +126,7 @@ static void BM_join(state_type& state, Join JoinFunc) // Benchmark the inner join operation if constexpr (std::is_same_v and (not is_conditional)) { for (auto _ : state) { - cuda_event_timer raii(state, true, rmm::cuda_stream_default); + cuda_event_timer raii(state, true, cudf::default_stream_value); auto result = JoinFunc( probe_table, build_table, columns_to_join, columns_to_join, cudf::null_equality::UNEQUAL); @@ -152,7 +153,7 @@ static void BM_join(state_type& state, Join JoinFunc) cudf::ast::operation(cudf::ast::ast_operator::EQUAL, col_ref_left_0, col_ref_right_0); for (auto _ : state) { - cuda_event_timer raii(state, true, rmm::cuda_stream_default); + cuda_event_timer raii(state, true, cudf::default_stream_value); auto result = JoinFunc(probe_table, build_table, left_zero_eq_right_zero, cudf::null_equality::UNEQUAL); diff --git a/cpp/benchmarks/lists/copying/scatter_lists.cu b/cpp/benchmarks/lists/copying/scatter_lists.cu index 7f6d5cc5468..823693721a0 100644 --- a/cpp/benchmarks/lists/copying/scatter_lists.cu +++ b/cpp/benchmarks/lists/copying/scatter_lists.cu @@ -21,8 +21,8 @@ #include #include #include +#include -#include #include #include @@ -40,7 +40,7 @@ class ScatterLists : public cudf::benchmark { template void BM_lists_scatter(::benchmark::State& state) { - auto stream = rmm::cuda_stream_default; + auto stream = cudf::default_stream_value; auto mr = rmm::mr::get_current_device_resource(); const size_type base_size{(size_type)state.range(0)}; diff --git a/cpp/benchmarks/quantiles/quantiles.cpp b/cpp/benchmarks/quantiles/quantiles.cpp index 16e8abd4a57..dc4298a856d 100644 --- a/cpp/benchmarks/quantiles/quantiles.cpp +++ b/cpp/benchmarks/quantiles/quantiles.cpp @@ -19,6 +19,7 @@ #include #include +#include #include #include @@ -50,7 +51,7 @@ static void BM_quantiles(benchmark::State& state, bool nulls) thrust::seq, q.begin(), q.end(), [n_quantiles](auto i) { return i * (1.0f / n_quantiles); }); for (auto _ : state) { - cuda_event_timer raii(state, true, rmm::cuda_stream_default); + cuda_event_timer raii(state, true, cudf::default_stream_value); auto result = cudf::quantiles(input, q); // auto result = (stable) ? cudf::stable_sorted_order(input) : cudf::sorted_order(input); diff --git a/cpp/benchmarks/sort/rank.cpp b/cpp/benchmarks/sort/rank.cpp index 0a5c1844c69..3ae27e65e98 100644 --- a/cpp/benchmarks/sort/rank.cpp +++ b/cpp/benchmarks/sort/rank.cpp @@ -20,6 +20,7 @@ #include #include +#include class Rank : public cudf::benchmark { }; @@ -38,7 +39,7 @@ static void BM_rank(benchmark::State& state, bool nulls) cudf::column_view input{keys_table->get_column(0)}; for (auto _ : state) { - cuda_event_timer raii(state, true, rmm::cuda_stream_default); + cuda_event_timer raii(state, true, cudf::default_stream_value); auto result = cudf::rank(input, cudf::rank_method::FIRST, diff --git a/cpp/benchmarks/sort/sort.cpp b/cpp/benchmarks/sort/sort.cpp index d7c33e7170e..df047ea66df 100644 --- a/cpp/benchmarks/sort/sort.cpp +++ b/cpp/benchmarks/sort/sort.cpp @@ -19,6 +19,7 @@ #include #include +#include template class Sort : public cudf::benchmark { @@ -41,7 +42,7 @@ static void BM_sort(benchmark::State& state, bool nulls) cudf::table_view input{*input_table}; for (auto _ : state) { - cuda_event_timer raii(state, true, rmm::cuda_stream_default); + cuda_event_timer raii(state, true, cudf::default_stream_value); auto result = (stable) ? cudf::stable_sorted_order(input) : cudf::sorted_order(input); } diff --git a/cpp/benchmarks/sort/sort_strings.cpp b/cpp/benchmarks/sort/sort_strings.cpp index a58b9a4f6da..701b392f80b 100644 --- a/cpp/benchmarks/sort/sort_strings.cpp +++ b/cpp/benchmarks/sort/sort_strings.cpp @@ -20,6 +20,7 @@ #include #include +#include class Sort : public cudf::benchmark { }; @@ -31,7 +32,7 @@ static void BM_sort(benchmark::State& state) auto const table = create_random_table({cudf::type_id::STRING}, row_count{n_rows}); for (auto _ : state) { - cuda_event_timer raii(state, true, rmm::cuda_stream_default); + cuda_event_timer raii(state, true, cudf::default_stream_value); cudf::sort(table->view()); } } diff --git a/cpp/benchmarks/string/case.cpp b/cpp/benchmarks/string/case.cpp index daa22d25677..35ed825f769 100644 --- a/cpp/benchmarks/string/case.cpp +++ b/cpp/benchmarks/string/case.cpp @@ -20,6 +20,7 @@ #include #include +#include class StringCase : public cudf::benchmark { }; @@ -31,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, rmm::cuda_stream_default); + cuda_event_timer raii(state, true, cudf::default_stream_value); cudf::strings::to_lower(input); } diff --git a/cpp/benchmarks/string/combine.cpp b/cpp/benchmarks/string/combine.cpp index 85c48e18ce1..1396ea352ce 100644 --- a/cpp/benchmarks/string/combine.cpp +++ b/cpp/benchmarks/string/combine.cpp @@ -23,6 +23,7 @@ #include #include #include +#include class StringCombine : public cudf::benchmark { }; @@ -41,7 +42,7 @@ static void BM_combine(benchmark::State& state) cudf::string_scalar separator("+"); for (auto _ : state) { - cuda_event_timer raii(state, true, rmm::cuda_stream_default); + cuda_event_timer raii(state, true, cudf::default_stream_value); cudf::strings::concatenate(table->view(), separator); } diff --git a/cpp/benchmarks/string/contains.cpp b/cpp/benchmarks/string/contains.cpp index 6689e3611d1..1481fa72546 100644 --- a/cpp/benchmarks/string/contains.cpp +++ b/cpp/benchmarks/string/contains.cpp @@ -24,6 +24,7 @@ #include #include #include +#include class StringContains : public cudf::benchmark { }; @@ -86,7 +87,7 @@ static void BM_contains(benchmark::State& state, contains_type ct) auto pattern = patterns[pattern_index]; for (auto _ : state) { - cuda_event_timer raii(state, true, rmm::cuda_stream_default); + cuda_event_timer raii(state, true, cudf::default_stream_value); switch (ct) { case contains_type::contains: // contains_re and matches_re use the same main logic cudf::strings::contains_re(input, pattern); diff --git a/cpp/benchmarks/string/copy.cu b/cpp/benchmarks/string/copy.cu index 0280322a3a1..8bbaafa67af 100644 --- a/cpp/benchmarks/string/copy.cu +++ b/cpp/benchmarks/string/copy.cu @@ -23,6 +23,7 @@ #include #include #include +#include #include #include @@ -58,7 +59,7 @@ static void BM_copy(benchmark::State& state, copy_type ct) thrust::default_random_engine()); for (auto _ : state) { - cuda_event_timer raii(state, true, rmm::cuda_stream_default); + cuda_event_timer raii(state, true, cudf::default_stream_value); 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/factory.cu b/cpp/benchmarks/string/factory.cu index dde0b7e4424..7e407ab2d91 100644 --- a/cpp/benchmarks/string/factory.cu +++ b/cpp/benchmarks/string/factory.cu @@ -24,8 +24,8 @@ #include #include +#include -#include #include #include @@ -56,7 +56,7 @@ static void BM_factory(benchmark::State& state) cudf::type_id::STRING, distribution_id::NORMAL, 0, max_str_length); auto const table = create_random_table({cudf::type_id::STRING}, row_count{n_rows}, table_profile); auto d_column = cudf::column_device_view::create(table->view().column(0)); - rmm::device_uvector pairs(d_column->size(), rmm::cuda_stream_default); + rmm::device_uvector pairs(d_column->size(), cudf::default_stream_value); thrust::transform(thrust::device, d_column->pair_begin(), d_column->pair_end(), @@ -64,7 +64,7 @@ static void BM_factory(benchmark::State& state) string_view_to_pair{}); for (auto _ : state) { - cuda_event_timer raii(state, true, rmm::cuda_stream_default); + cuda_event_timer raii(state, true, cudf::default_stream_value); cudf::make_strings_column(pairs); } diff --git a/cpp/benchmarks/string/filter.cpp b/cpp/benchmarks/string/filter.cpp index 064b824619e..0bae967be6c 100644 --- a/cpp/benchmarks/string/filter.cpp +++ b/cpp/benchmarks/string/filter.cpp @@ -25,6 +25,7 @@ #include #include #include +#include #include #include @@ -49,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, rmm::cuda_stream_default); + cuda_event_timer raii(state, true, cudf::default_stream_value); 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.cpp b/cpp/benchmarks/string/find.cpp index aaa7bd29b31..1068143b16a 100644 --- a/cpp/benchmarks/string/find.cpp +++ b/cpp/benchmarks/string/find.cpp @@ -24,6 +24,7 @@ #include #include #include +#include #include @@ -45,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, rmm::cuda_stream_default); + cuda_event_timer raii(state, true, cudf::default_stream_value); switch (find_api) { case find: cudf::strings::find(input, target); break; case find_multi: diff --git a/cpp/benchmarks/string/repeat_strings.cpp b/cpp/benchmarks/string/repeat_strings.cpp index 835a437e3b5..1b57630098a 100644 --- a/cpp/benchmarks/string/repeat_strings.cpp +++ b/cpp/benchmarks/string/repeat_strings.cpp @@ -22,6 +22,7 @@ #include #include +#include static constexpr cudf::size_type default_repeat_times = 16; static constexpr cudf::size_type min_repeat_times = -16; @@ -55,7 +56,7 @@ static void BM_repeat_strings_scalar_times(benchmark::State& state) auto const strings_col = cudf::strings_column_view(table->view().column(0)); for ([[maybe_unused]] auto _ : state) { - [[maybe_unused]] cuda_event_timer raii(state, true, rmm::cuda_stream_default); + [[maybe_unused]] cuda_event_timer raii(state, true, cudf::default_stream_value); cudf::strings::repeat_strings(strings_col, default_repeat_times); } @@ -71,7 +72,7 @@ static void BM_repeat_strings_column_times(benchmark::State& state) auto const repeat_times_col = table->view().column(1); for ([[maybe_unused]] auto _ : state) { - [[maybe_unused]] cuda_event_timer raii(state, true, rmm::cuda_stream_default); + [[maybe_unused]] cuda_event_timer raii(state, true, cudf::default_stream_value); cudf::strings::repeat_strings(strings_col, repeat_times_col); } @@ -88,7 +89,7 @@ static void BM_compute_output_strings_sizes(benchmark::State& state) auto const repeat_times_col = table->view().column(1); for ([[maybe_unused]] auto _ : state) { - [[maybe_unused]] cuda_event_timer raii(state, true, rmm::cuda_stream_default); + [[maybe_unused]] cuda_event_timer raii(state, true, cudf::default_stream_value); cudf::strings::repeat_strings_output_sizes(strings_col, repeat_times_col); } @@ -107,7 +108,7 @@ static void BM_repeat_strings_column_times_precomputed_sizes(benchmark::State& s cudf::strings::repeat_strings_output_sizes(strings_col, repeat_times_col); for ([[maybe_unused]] auto _ : state) { - [[maybe_unused]] cuda_event_timer raii(state, true, rmm::cuda_stream_default); + [[maybe_unused]] cuda_event_timer raii(state, true, cudf::default_stream_value); cudf::strings::repeat_strings(strings_col, repeat_times_col, *sizes); } diff --git a/cpp/benchmarks/string/replace.cpp b/cpp/benchmarks/string/replace.cpp index 10f6e2a19ed..34f86aa1849 100644 --- a/cpp/benchmarks/string/replace.cpp +++ b/cpp/benchmarks/string/replace.cpp @@ -25,6 +25,7 @@ #include #include #include +#include #include @@ -48,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, rmm::cuda_stream_default); + cuda_event_timer raii(state, true, cudf::default_stream_value); 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.cpp b/cpp/benchmarks/string/replace_re.cpp index 148cbe678bd..caa60cc980d 100644 --- a/cpp/benchmarks/string/replace_re.cpp +++ b/cpp/benchmarks/string/replace_re.cpp @@ -24,6 +24,7 @@ #include #include +#include class StringReplace : public cudf::benchmark { }; @@ -42,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, rmm::cuda_stream_default); + cuda_event_timer raii(state, true, cudf::default_stream_value); 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.cpp b/cpp/benchmarks/string/split.cpp index 97eb0ba6dbf..6ef2e5013f5 100644 --- a/cpp/benchmarks/string/split.cpp +++ b/cpp/benchmarks/string/split.cpp @@ -23,6 +23,7 @@ #include #include #include +#include #include @@ -43,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, rmm::cuda_stream_default); + cuda_event_timer raii(state, true, cudf::default_stream_value); 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.cpp b/cpp/benchmarks/string/substring.cpp index a18462385fc..a7e1da4845e 100644 --- a/cpp/benchmarks/string/substring.cpp +++ b/cpp/benchmarks/string/substring.cpp @@ -25,6 +25,7 @@ #include #include #include +#include #include @@ -52,7 +53,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, rmm::cuda_stream_default); + cuda_event_timer raii(state, true, cudf::default_stream_value); 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.cpp b/cpp/benchmarks/string/translate.cpp index 2ed0ccceba6..87f5c3c7dbd 100644 --- a/cpp/benchmarks/string/translate.cpp +++ b/cpp/benchmarks/string/translate.cpp @@ -24,6 +24,7 @@ #include #include +#include #include @@ -53,7 +54,7 @@ static void BM_translate(benchmark::State& state, int entry_count) }); for (auto _ : state) { - cuda_event_timer raii(state, true, rmm::cuda_stream_default); + cuda_event_timer raii(state, true, cudf::default_stream_value); cudf::strings::translate(input, entries); } diff --git a/cpp/benchmarks/string/url_decode.cu b/cpp/benchmarks/string/url_decode.cu index 40bf2b090d4..a884bc8b587 100644 --- a/cpp/benchmarks/string/url_decode.cu +++ b/cpp/benchmarks/string/url_decode.cu @@ -24,6 +24,7 @@ #include #include #include +#include #include #include @@ -90,7 +91,7 @@ void BM_url_decode(benchmark::State& state, int esc_seq_pct) auto strings_view = cudf::strings_column_view(column->view()); for (auto _ : state) { - cuda_event_timer raii(state, true, rmm::cuda_stream_default); + cuda_event_timer raii(state, true, cudf::default_stream_value); auto result = cudf::strings::url_decode(strings_view); } diff --git a/cpp/benchmarks/synchronization/synchronization.hpp b/cpp/benchmarks/synchronization/synchronization.hpp index d972247c86d..e5882ff1c16 100644 --- a/cpp/benchmarks/synchronization/synchronization.hpp +++ b/cpp/benchmarks/synchronization/synchronization.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019-2020, NVIDIA CORPORATION. + * Copyright (c) 2019-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. @@ -28,12 +28,14 @@ * (RAII). In the following we show a minimal example of how to use this class. #include + #include static void sample_cuda_benchmark(benchmark::State& state) { for (auto _ : state){ - rmm::cuda_stream_view stream{}; // default stream, could be another stream + // default stream, could be another stream + rmm::cuda_stream_view stream{cudf::default_stream_value}; // Create (Construct) an object of this class. You HAVE to pass in the // benchmark::State object you are using. It measures the time from its @@ -63,6 +65,7 @@ #include #include +#include #include @@ -82,7 +85,7 @@ class cuda_event_timer { */ cuda_event_timer(benchmark::State& state, bool flush_l2_cache, - rmm::cuda_stream_view stream = rmm::cuda_stream_default); + rmm::cuda_stream_view stream = cudf::default_stream_value); // The user must provide a benchmark::State object to set // the timer so we disable the default c'tor. diff --git a/cpp/benchmarks/text/normalize.cpp b/cpp/benchmarks/text/normalize.cpp index 3b58a7dd187..08a91db0e11 100644 --- a/cpp/benchmarks/text/normalize.cpp +++ b/cpp/benchmarks/text/normalize.cpp @@ -20,6 +20,7 @@ #include #include +#include #include @@ -37,7 +38,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, rmm::cuda_stream_default); + cuda_event_timer raii(state, true, cudf::default_stream_value); nvtext::normalize_characters(input, to_lower); } diff --git a/cpp/benchmarks/text/normalize_spaces.cpp b/cpp/benchmarks/text/normalize_spaces.cpp index 1fe912e5740..bedb7ca5f83 100644 --- a/cpp/benchmarks/text/normalize_spaces.cpp +++ b/cpp/benchmarks/text/normalize_spaces.cpp @@ -21,6 +21,7 @@ #include #include +#include #include @@ -38,7 +39,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, rmm::cuda_stream_default); + cuda_event_timer raii(state, true, cudf::default_stream_value); nvtext::normalize_spaces(input); } diff --git a/cpp/benchmarks/text/tokenize.cpp b/cpp/benchmarks/text/tokenize.cpp index fea1973c026..8802efd79b2 100644 --- a/cpp/benchmarks/text/tokenize.cpp +++ b/cpp/benchmarks/text/tokenize.cpp @@ -23,6 +23,7 @@ #include #include +#include #include #include @@ -44,7 +45,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, rmm::cuda_stream_default); + cuda_event_timer raii(state, true, cudf::default_stream_value); switch (tt) { case tokenize_type::single: // single whitespace delimiter diff --git a/cpp/benchmarks/type_dispatcher/type_dispatcher.cu b/cpp/benchmarks/type_dispatcher/type_dispatcher.cu index 53dac455b04..b1d2498f0e6 100644 --- a/cpp/benchmarks/type_dispatcher/type_dispatcher.cu +++ b/cpp/benchmarks/type_dispatcher/type_dispatcher.cu @@ -24,8 +24,8 @@ #include #include #include +#include -#include #include #include @@ -188,10 +188,10 @@ void type_dispatcher_benchmark(::benchmark::State& state) std::vector h_vec(n_cols); std::vector h_vec_p(n_cols); std::transform(h_vec.begin(), h_vec.end(), h_vec_p.begin(), [source_size](auto& col) { - col.resize(source_size * sizeof(TypeParam), rmm::cuda_stream_default); + col.resize(source_size * sizeof(TypeParam), cudf::default_stream_value); return static_cast(col.data()); }); - rmm::device_uvector d_vec(n_cols, rmm::cuda_stream_default); + rmm::device_uvector d_vec(n_cols, cudf::default_stream_value); if (dispatching_type == NO_DISPATCHING) { CUDF_CUDA_TRY(cudaMemcpy( diff --git a/cpp/docs/DEVELOPER_GUIDE.md b/cpp/docs/DEVELOPER_GUIDE.md index 84f69f559a8..86443377dea 100644 --- a/cpp/docs/DEVELOPER_GUIDE.md +++ b/cpp/docs/DEVELOPER_GUIDE.md @@ -350,7 +350,7 @@ internal API in the `detail` namespace. The internal `detail` API has the same p public API, plus a `rmm::cuda_stream_view` parameter at the end with no default value. If the detail API also accepts a memory resource parameter, the stream parameter should be ideally placed just *before* the memory resource. The public API will call the detail API and provide -`rmm::cuda_stream_default`. The implementation should be wholly contained in the `detail` API +`cudf::default_stream_value`. The implementation should be wholly contained in the `detail` API definition and use only asynchronous versions of CUDA APIs with the stream parameter. In order to make the `detail` API callable from other libcudf functions, it should be exposed in a @@ -381,7 +381,7 @@ namespace detail{ void external_function(...){ CUDF_FUNC_RANGE(); // Generates an NVTX range for the lifetime of this function. - detail::external_function(..., rmm::cuda_stream_default); + detail::external_function(..., cudf::default_stream_value); } ``` diff --git a/cpp/docs/DOCUMENTATION.md b/cpp/docs/DOCUMENTATION.md index ebb52836577..f2de048d721 100644 --- a/cpp/docs/DOCUMENTATION.md +++ b/cpp/docs/DOCUMENTATION.md @@ -9,7 +9,7 @@ The following is the license header comment that should appear at the beginning ```c++ /* - * Copyright (c) 2021, NVIDIA CORPORATION. + * Copyright (c) 2021-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. @@ -235,7 +235,7 @@ Also, `@copydoc` is useful when documenting a `detail` function that differs onl */ std::vector segmented_count_set_bits(bitmask_type const* bitmask, std::vector const& indices, - rmm::cuda_stream_view stream = rmm::cuda_stream_default); + rmm::cuda_stream_view stream = cudf::default_stream_value); ``` Note, you must specify the whole signature of the function, including optional parameters, so that doxygen will be able to locate it. diff --git a/cpp/include/cudf/column/column.hpp b/cpp/include/cudf/column/column.hpp index 10a8848ef27..81ebd3bd459 100644 --- a/cpp/include/cudf/column/column.hpp +++ b/cpp/include/cudf/column/column.hpp @@ -19,6 +19,7 @@ #include #include +#include #include #include @@ -61,7 +62,7 @@ class column { * @param mr Device memory resource to use for all device memory allocations */ column(column const& other, - rmm::cuda_stream_view stream = rmm::cuda_stream_view{}, + rmm::cuda_stream_view stream = cudf::default_stream_value, rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource()); /** @@ -116,7 +117,7 @@ class column { * @param mr Device memory resource to use for all device memory allocations */ explicit column(column_view view, - rmm::cuda_stream_view stream = rmm::cuda_stream_default, + rmm::cuda_stream_view stream = cudf::default_stream_value, rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource()); /** @@ -173,12 +174,12 @@ class column { * @param new_null_count Optional, the count of null elements. If unknown, specify * `UNKNOWN_NULL_COUNT` to indicate that the null count should be computed on the first invocation * of `null_count()`. - * @param stream The stream on which to perform the allocation and copy. Uses the default CUDA + * @param stream The stream on which to perform the allocation and copy. Uses the default CUDF * stream if none is specified. */ void set_null_mask(rmm::device_buffer const& new_null_mask, size_type new_null_count = UNKNOWN_NULL_COUNT, - rmm::cuda_stream_view stream = rmm::cuda_stream_view{}); + rmm::cuda_stream_view stream = cudf::default_stream_value); /** * @brief Updates the count of null elements. diff --git a/cpp/include/cudf/column/column_device_view.cuh b/cpp/include/cudf/column/column_device_view.cuh index 1f31c21bff9..4f9a09fb621 100644 --- a/cpp/include/cudf/column/column_device_view.cuh +++ b/cpp/include/cudf/column/column_device_view.cuh @@ -24,6 +24,7 @@ #include #include #include +#include #include #include #include @@ -820,7 +821,7 @@ class alignas(16) column_device_view : public detail::column_device_view_base { *`source_view` available in device memory. */ static std::unique_ptr> create( - column_view source_view, rmm::cuda_stream_view stream = rmm::cuda_stream_default); + column_view source_view, rmm::cuda_stream_view stream = cudf::default_stream_value); /** * @brief Destroy the `column_device_view` object. @@ -972,7 +973,8 @@ class alignas(16) mutable_column_device_view : public detail::column_device_view */ static std::unique_ptr> - create(mutable_column_view source_view, rmm::cuda_stream_view stream = rmm::cuda_stream_default); + create(mutable_column_view source_view, + rmm::cuda_stream_view stream = cudf::default_stream_value); /** * @brief Returns pointer to the base device memory allocation casted to diff --git a/cpp/include/cudf/column/column_factories.hpp b/cpp/include/cudf/column/column_factories.hpp index 8ab1582e83e..49d2e7f1f5f 100644 --- a/cpp/include/cudf/column/column_factories.hpp +++ b/cpp/include/cudf/column/column_factories.hpp @@ -17,6 +17,7 @@ #include #include +#include #include #include @@ -73,7 +74,7 @@ std::unique_ptr make_numeric_column( data_type type, size_type size, mask_state state = mask_state::UNALLOCATED, - rmm::cuda_stream_view stream = rmm::cuda_stream_default, + rmm::cuda_stream_view stream = cudf::default_stream_value, rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource()); /** @@ -99,7 +100,7 @@ std::unique_ptr make_numeric_column( size_type size, B&& null_mask, size_type null_count = cudf::UNKNOWN_NULL_COUNT, - rmm::cuda_stream_view stream = rmm::cuda_stream_default, + rmm::cuda_stream_view stream = cudf::default_stream_value, rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource()) { CUDF_EXPECTS(is_numeric(type), "Invalid, non-numeric type."); @@ -130,7 +131,7 @@ std::unique_ptr make_fixed_point_column( data_type type, size_type size, mask_state state = mask_state::UNALLOCATED, - rmm::cuda_stream_view stream = rmm::cuda_stream_default, + rmm::cuda_stream_view stream = cudf::default_stream_value, rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource()); /** @@ -155,7 +156,7 @@ std::unique_ptr make_fixed_point_column( size_type size, B&& null_mask, size_type null_count = cudf::UNKNOWN_NULL_COUNT, - rmm::cuda_stream_view stream = rmm::cuda_stream_default, + rmm::cuda_stream_view stream = cudf::default_stream_value, rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource()) { CUDF_EXPECTS(is_fixed_point(type), "Invalid, non-fixed_point type."); @@ -187,7 +188,7 @@ std::unique_ptr make_timestamp_column( data_type type, size_type size, mask_state state = mask_state::UNALLOCATED, - rmm::cuda_stream_view stream = rmm::cuda_stream_default, + rmm::cuda_stream_view stream = cudf::default_stream_value, rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource()); /** @@ -213,7 +214,7 @@ std::unique_ptr make_timestamp_column( size_type size, B&& null_mask, size_type null_count = cudf::UNKNOWN_NULL_COUNT, - rmm::cuda_stream_view stream = rmm::cuda_stream_default, + rmm::cuda_stream_view stream = cudf::default_stream_value, rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource()) { CUDF_EXPECTS(is_timestamp(type), "Invalid, non-timestamp type."); @@ -245,7 +246,7 @@ std::unique_ptr make_duration_column( data_type type, size_type size, mask_state state = mask_state::UNALLOCATED, - rmm::cuda_stream_view stream = rmm::cuda_stream_default, + rmm::cuda_stream_view stream = cudf::default_stream_value, rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource()); /** @@ -271,7 +272,7 @@ std::unique_ptr make_duration_column( size_type size, B&& null_mask, size_type null_count = cudf::UNKNOWN_NULL_COUNT, - rmm::cuda_stream_view stream = rmm::cuda_stream_default, + rmm::cuda_stream_view stream = cudf::default_stream_value, rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource()) { CUDF_EXPECTS(is_duration(type), "Invalid, non-duration type."); @@ -303,7 +304,7 @@ std::unique_ptr make_fixed_width_column( data_type type, size_type size, mask_state state = mask_state::UNALLOCATED, - rmm::cuda_stream_view stream = rmm::cuda_stream_default, + rmm::cuda_stream_view stream = cudf::default_stream_value, rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource()); /** @@ -329,7 +330,7 @@ std::unique_ptr make_fixed_width_column( size_type size, B&& null_mask, size_type null_count = cudf::UNKNOWN_NULL_COUNT, - rmm::cuda_stream_view stream = rmm::cuda_stream_default, + rmm::cuda_stream_view stream = cudf::default_stream_value, rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource()) { CUDF_EXPECTS(is_fixed_width(type), "Invalid, non-fixed-width type."); @@ -368,7 +369,7 @@ std::unique_ptr make_fixed_width_column( */ std::unique_ptr make_strings_column( cudf::device_span const> strings, - rmm::cuda_stream_view stream = rmm::cuda_stream_default, + rmm::cuda_stream_view stream = cudf::default_stream_value, rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource()); /** @@ -400,7 +401,7 @@ std::unique_ptr make_strings_column( std::unique_ptr make_strings_column( cudf::device_span string_views, const string_view null_placeholder, - rmm::cuda_stream_view stream = rmm::cuda_stream_default, + rmm::cuda_stream_view stream = cudf::default_stream_value, rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource()); /** @@ -436,7 +437,7 @@ std::unique_ptr make_strings_column( cudf::device_span offsets, cudf::device_span null_mask = {}, size_type null_count = cudf::UNKNOWN_NULL_COUNT, - rmm::cuda_stream_view stream = rmm::cuda_stream_default, + rmm::cuda_stream_view stream = cudf::default_stream_value, rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource()); /** @@ -545,7 +546,7 @@ std::unique_ptr make_lists_column( std::unique_ptr child_column, size_type null_count, rmm::device_buffer&& null_mask, - rmm::cuda_stream_view stream = rmm::cuda_stream_default, + rmm::cuda_stream_view stream = cudf::default_stream_value, rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource()); /** @@ -576,7 +577,7 @@ std::unique_ptr make_structs_column( std::vector>&& child_columns, size_type null_count, rmm::device_buffer&& null_mask, - rmm::cuda_stream_view stream = rmm::cuda_stream_default, + rmm::cuda_stream_view stream = cudf::default_stream_value, rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource()); /** @@ -596,7 +597,7 @@ std::unique_ptr make_structs_column( std::unique_ptr make_column_from_scalar( scalar const& s, size_type size, - rmm::cuda_stream_view stream = rmm::cuda_stream_default, + rmm::cuda_stream_view stream = cudf::default_stream_value, rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource()); /** @@ -616,7 +617,7 @@ std::unique_ptr make_column_from_scalar( std::unique_ptr make_dictionary_from_scalar( scalar const& s, size_type size, - rmm::cuda_stream_view stream = rmm::cuda_stream_default, + rmm::cuda_stream_view stream = cudf::default_stream_value, rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource()); /** @} */ // end of group diff --git a/cpp/include/cudf/detail/binaryop.hpp b/cpp/include/cudf/detail/binaryop.hpp index 9fa31d0e01d..8deac88a645 100644 --- a/cpp/include/cudf/detail/binaryop.hpp +++ b/cpp/include/cudf/detail/binaryop.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2020, NVIDIA CORPORATION. + * Copyright (c) 2018-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. @@ -16,6 +16,7 @@ #pragma once #include +#include #include @@ -34,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 = rmm::cuda_stream_default, + rmm::cuda_stream_view stream = cudf::default_stream_value, rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource()); /** @@ -48,7 +49,7 @@ std::unique_ptr binary_operation( column_view const& rhs, binary_operator op, data_type output_type, - rmm::cuda_stream_view stream = rmm::cuda_stream_default, + rmm::cuda_stream_view stream = cudf::default_stream_value, rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource()); /** @@ -62,7 +63,7 @@ std::unique_ptr binary_operation( scalar const& rhs, binary_operator op, data_type output_type, - rmm::cuda_stream_view stream = rmm::cuda_stream_default, + rmm::cuda_stream_view stream = cudf::default_stream_value, rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource()); /** @@ -76,7 +77,7 @@ std::unique_ptr binary_operation( column_view const& rhs, binary_operator op, data_type output_type, - rmm::cuda_stream_view stream = rmm::cuda_stream_default, + rmm::cuda_stream_view stream = cudf::default_stream_value, 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 f7f5567cd76..08a37acead2 100644 --- a/cpp/include/cudf/detail/concatenate.hpp +++ b/cpp/include/cudf/detail/concatenate.hpp @@ -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. @@ -18,6 +18,7 @@ #include #include #include +#include #include #include @@ -34,7 +35,7 @@ namespace detail { */ std::unique_ptr concatenate( host_span columns_to_concat, - rmm::cuda_stream_view stream = rmm::cuda_stream_default, + rmm::cuda_stream_view stream = cudf::default_stream_value, rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource()); /** @@ -44,7 +45,7 @@ std::unique_ptr concatenate( */ std::unique_ptr concatenate( host_span tables_to_concat, - rmm::cuda_stream_view stream = rmm::cuda_stream_default, + rmm::cuda_stream_view stream = cudf::default_stream_value, 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 abd14fbda89..a2cbe8c5238 100644 --- a/cpp/include/cudf/detail/copy.hpp +++ b/cpp/include/cudf/detail/copy.hpp @@ -19,6 +19,7 @@ #include #include #include +#include #include #include @@ -76,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 = rmm::cuda_stream_default); + rmm::cuda_stream_view stream = cudf::default_stream_value); /** * @copydoc cudf::slice(column_view const&, std::initializer_list) * @@ -84,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 = rmm::cuda_stream_default); + rmm::cuda_stream_view stream = cudf::default_stream_value); /** * @copydoc cudf::slice(table_view const&, host_span) @@ -93,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 = rmm::cuda_stream_default); + rmm::cuda_stream_view stream = cudf::default_stream_value); /** * @copydoc cudf::slice(table_view const&, std::initializer_list) * @@ -101,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 = rmm::cuda_stream_default); + rmm::cuda_stream_view stream = cudf::default_stream_value); /** * @copydoc cudf::split(column_view const&, host_span) @@ -110,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 = rmm::cuda_stream_default); + rmm::cuda_stream_view stream = cudf::default_stream_value); /** * @copydoc cudf::split(column_view const&, std::initializer_list) * @@ -118,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 = rmm::cuda_stream_default); + rmm::cuda_stream_view stream = cudf::default_stream_value); /** * @copydoc cudf::split(table_view const&, host_span) @@ -127,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 = rmm::cuda_stream_default); + rmm::cuda_stream_view stream = cudf::default_stream_value); /** * @copydoc cudf::split(table_view const&, std::initializer_list) * @@ -135,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 = rmm::cuda_stream_default); + rmm::cuda_stream_view stream = cudf::default_stream_value); /** * @copydoc cudf::shift(column_view const&,size_type,scalar const&, @@ -147,7 +148,7 @@ std::unique_ptr shift( column_view const& input, size_type offset, scalar const& fill_value, - rmm::cuda_stream_view stream = rmm::cuda_stream_default, + rmm::cuda_stream_view stream = cudf::default_stream_value, rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource()); /** @@ -188,7 +189,7 @@ std::unique_ptr segmented_shift( device_span segment_offsets, size_type offset, scalar const& fill_value, - rmm::cuda_stream_view stream = rmm::cuda_stream_default, + rmm::cuda_stream_view stream = cudf::default_stream_value, rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource()); /** @@ -199,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 = rmm::cuda_stream_default, + rmm::cuda_stream_view stream = cudf::default_stream_value, rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource()); /** @@ -208,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 = rmm::cuda_stream_default, + rmm::cuda_stream_view stream = cudf::default_stream_value, rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource()); /** @@ -221,7 +222,7 @@ std::unique_ptr allocate_like( column_view const& input, size_type size, mask_allocation_policy mask_alloc = mask_allocation_policy::RETAIN, - rmm::cuda_stream_view stream = rmm::cuda_stream_default, + rmm::cuda_stream_view stream = cudf::default_stream_value, rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource()); /** @@ -234,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 = rmm::cuda_stream_default, + rmm::cuda_stream_view stream = cudf::default_stream_value, rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource()); /** @@ -247,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 = rmm::cuda_stream_default, + rmm::cuda_stream_view stream = cudf::default_stream_value, rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource()); /** @@ -260,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 = rmm::cuda_stream_default, + rmm::cuda_stream_view stream = cudf::default_stream_value, rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource()); /** @@ -273,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 = rmm::cuda_stream_default, + rmm::cuda_stream_view stream = cudf::default_stream_value, rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource()); /** @@ -286,7 +287,7 @@ std::unique_ptr
sample( size_type const n, sample_with_replacement replacement = sample_with_replacement::FALSE, int64_t const seed = 0, - rmm::cuda_stream_view stream = rmm::cuda_stream_default, + rmm::cuda_stream_view stream = cudf::default_stream_value, rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource()); /** @@ -297,7 +298,7 @@ std::unique_ptr
sample( std::unique_ptr get_element( column_view const& input, size_type index, - rmm::cuda_stream_view stream = rmm::cuda_stream_default, + rmm::cuda_stream_view stream = cudf::default_stream_value, rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource()); /** @@ -306,7 +307,7 @@ 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 = rmm::cuda_stream_default); + rmm::cuda_stream_view stream = cudf::default_stream_value); /** * @copydoc cudf::may_have_nonempty_nulls @@ -314,7 +315,7 @@ bool has_nonempty_nulls(column_view const& input, * @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 = rmm::cuda_stream_default); + rmm::cuda_stream_view stream = cudf::default_stream_value); } // namespace detail } // namespace cudf diff --git a/cpp/include/cudf/detail/copy_if.cuh b/cpp/include/cudf/detail/copy_if.cuh index ecaa4a30cf0..34fc2661418 100644 --- a/cpp/include/cudf/detail/copy_if.cuh +++ b/cpp/include/cudf/detail/copy_if.cuh @@ -28,6 +28,7 @@ #include #include #include +#include #include #include #include @@ -322,7 +323,7 @@ template std::unique_ptr
copy_if( table_view const& input, Filter filter, - rmm::cuda_stream_view stream = rmm::cuda_stream_default, + rmm::cuda_stream_view stream = cudf::default_stream_value, 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 ea3dfe8473f..9065ed83b32 100644 --- a/cpp/include/cudf/detail/copy_range.cuh +++ b/cpp/include/cudf/detail/copy_range.cuh @@ -21,6 +21,7 @@ #include #include #include +#include #include #include @@ -137,7 +138,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 = rmm::cuda_stream_default) + rmm::cuda_stream_view stream = cudf::default_stream_value) { CUDF_EXPECTS((target_begin <= target_end) && (target_begin >= 0) && (target_begin < target.size()) && (target_end <= target.size()), @@ -198,7 +199,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 = rmm::cuda_stream_default); + rmm::cuda_stream_view stream = cudf::default_stream_value); /** * @copydoc cudf::copy_range @@ -211,7 +212,7 @@ std::unique_ptr copy_range( size_type source_begin, size_type source_end, size_type target_begin, - rmm::cuda_stream_view stream = rmm::cuda_stream_default, + rmm::cuda_stream_view stream = cudf::default_stream_value, 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 650e28bc728..7a2545fbdcf 100644 --- a/cpp/include/cudf/detail/datetime.hpp +++ b/cpp/include/cudf/detail/datetime.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021, NVIDIA CORPORATION. + * Copyright (c) 2021-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. @@ -17,6 +17,7 @@ #pragma once #include +#include #include @@ -30,7 +31,7 @@ namespace detail { */ std::unique_ptr extract_year( cudf::column_view const& column, - rmm::cuda_stream_view stream = rmm::cuda_stream_default, + rmm::cuda_stream_view stream = cudf::default_stream_value, rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource()); /** @@ -40,7 +41,7 @@ std::unique_ptr extract_year( */ std::unique_ptr extract_month( cudf::column_view const& column, - rmm::cuda_stream_view stream = rmm::cuda_stream_default, + rmm::cuda_stream_view stream = cudf::default_stream_value, rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource()); /** @@ -50,7 +51,7 @@ std::unique_ptr extract_month( */ std::unique_ptr extract_day( cudf::column_view const& column, - rmm::cuda_stream_view stream = rmm::cuda_stream_default, + rmm::cuda_stream_view stream = cudf::default_stream_value, rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource()); /** @@ -60,7 +61,7 @@ std::unique_ptr extract_day( */ std::unique_ptr extract_weekday( cudf::column_view const& column, - rmm::cuda_stream_view stream = rmm::cuda_stream_default, + rmm::cuda_stream_view stream = cudf::default_stream_value, rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource()); /** @@ -70,7 +71,7 @@ std::unique_ptr extract_weekday( */ std::unique_ptr extract_hour( cudf::column_view const& column, - rmm::cuda_stream_view stream = rmm::cuda_stream_default, + rmm::cuda_stream_view stream = cudf::default_stream_value, rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource()); /** @@ -80,7 +81,7 @@ std::unique_ptr extract_hour( */ std::unique_ptr extract_minute( cudf::column_view const& column, - rmm::cuda_stream_view stream = rmm::cuda_stream_default, + rmm::cuda_stream_view stream = cudf::default_stream_value, rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource()); /** @@ -90,7 +91,7 @@ std::unique_ptr extract_minute( */ std::unique_ptr extract_second( cudf::column_view const& column, - rmm::cuda_stream_view stream = rmm::cuda_stream_default, + rmm::cuda_stream_view stream = cudf::default_stream_value, rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource()); /** @@ -100,7 +101,7 @@ std::unique_ptr extract_second( */ std::unique_ptr last_day_of_month( cudf::column_view const& column, - rmm::cuda_stream_view stream = rmm::cuda_stream_default, + rmm::cuda_stream_view stream = cudf::default_stream_value, rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource()); /** @@ -110,7 +111,7 @@ std::unique_ptr last_day_of_month( */ std::unique_ptr day_of_year( cudf::column_view const& column, - rmm::cuda_stream_view stream = rmm::cuda_stream_default, + rmm::cuda_stream_view stream = cudf::default_stream_value, rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource()); /** @@ -122,7 +123,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 = rmm::cuda_stream_default, + rmm::cuda_stream_view stream = cudf::default_stream_value, rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource()); /** @@ -134,7 +135,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 = rmm::cuda_stream_default, + rmm::cuda_stream_view stream = cudf::default_stream_value, rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource()); /** @@ -144,12 +145,12 @@ std::unique_ptr add_calendrical_months( */ std::unique_ptr is_leap_year( cudf::column_view const& column, - rmm::cuda_stream_view stream = rmm::cuda_stream_default, + rmm::cuda_stream_view stream = cudf::default_stream_value, 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 = rmm::cuda_stream_default, + rmm::cuda_stream_view stream = cudf::default_stream_value, 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 cfaf323ab12..f236fa7fd43 100644 --- a/cpp/include/cudf/detail/fill.hpp +++ b/cpp/include/cudf/detail/fill.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019-2020, NVIDIA CORPORATION. + * Copyright (c) 2019-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. @@ -18,6 +18,7 @@ #include #include +#include #include @@ -35,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 = rmm::cuda_stream_default); + rmm::cuda_stream_view stream = cudf::default_stream_value); /** * @copydoc cudf::fill @@ -47,7 +48,7 @@ std::unique_ptr fill( size_type begin, size_type end, scalar const& value, - rmm::cuda_stream_view stream = rmm::cuda_stream_default, + rmm::cuda_stream_view stream = cudf::default_stream_value, rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource()); } // namespace detail diff --git a/cpp/include/cudf/detail/gather.cuh b/cpp/include/cudf/detail/gather.cuh index 63a62beca58..8bb117c3dd0 100644 --- a/cpp/include/cudf/detail/gather.cuh +++ b/cpp/include/cudf/detail/gather.cuh @@ -32,6 +32,7 @@ #include #include #include +#include #include #include @@ -651,7 +652,7 @@ std::unique_ptr
gather( MapIterator gather_map_begin, MapIterator gather_map_end, out_of_bounds_policy bounds_policy = out_of_bounds_policy::DONT_CHECK, - rmm::cuda_stream_view stream = rmm::cuda_stream_default, + rmm::cuda_stream_view stream = cudf::default_stream_value, rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource()) { std::vector> destination_columns; diff --git a/cpp/include/cudf/detail/gather.hpp b/cpp/include/cudf/detail/gather.hpp index 01d9c64ba30..fccad73591e 100644 --- a/cpp/include/cudf/detail/gather.hpp +++ b/cpp/include/cudf/detail/gather.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019-2021, NVIDIA CORPORATION. + * Copyright (c) 2019-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. @@ -19,6 +19,7 @@ #include #include #include +#include #include #include @@ -65,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 = rmm::cuda_stream_default, + rmm::cuda_stream_view stream = cudf::default_stream_value, rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource()); /** @@ -80,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 = rmm::cuda_stream_default, + rmm::cuda_stream_view stream = cudf::default_stream_value, 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 5fb7379734f..faf92c996d1 100644 --- a/cpp/include/cudf/detail/groupby/group_replace_nulls.hpp +++ b/cpp/include/cudf/detail/groupby/group_replace_nulls.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021, NVIDIA CORPORATION. + * Copyright (c) 2021-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. @@ -19,6 +19,7 @@ #include #include #include +#include #include #include @@ -39,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 = rmm::cuda_stream_default, + rmm::cuda_stream_view stream = cudf::default_stream_value, 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 9958fa8f3a4..29522764dad 100644 --- a/cpp/include/cudf/detail/hashing.hpp +++ b/cpp/include/cudf/detail/hashing.hpp @@ -16,6 +16,7 @@ #pragma once #include +#include #include @@ -34,25 +35,25 @@ std::unique_ptr hash( table_view const& input, hash_id hash_function = hash_id::HASH_MURMUR3, uint32_t seed = cudf::DEFAULT_HASH_SEED, - rmm::cuda_stream_view stream = rmm::cuda_stream_default, + rmm::cuda_stream_view stream = cudf::default_stream_value, rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource()); std::unique_ptr murmur_hash3_32( table_view const& input, uint32_t seed = cudf::DEFAULT_HASH_SEED, - rmm::cuda_stream_view stream = rmm::cuda_stream_default, + rmm::cuda_stream_view stream = cudf::default_stream_value, rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource()); template