diff --git a/cpp/include/cudf_test/debug_utilities.hpp b/cpp/include/cudf_test/debug_utilities.hpp index e7f0b3f84239..6e26b065e652 100644 --- a/cpp/include/cudf_test/debug_utilities.hpp +++ b/cpp/include/cudf_test/debug_utilities.hpp @@ -12,7 +12,7 @@ #include #include -#include +#include namespace CUDF_EXPORT cudf { namespace test { @@ -27,8 +27,8 @@ namespace test { */ std::string to_string(cudf::column_view const& col, std::string const& delimiter, - rmm::cuda_stream_view stream = cudf::test::get_default_stream(), - cudf::memory_resources mr = cudf::get_current_device_resource_ref()); + cuda::stream_ref stream = cudf::test::get_default_stream(), + cudf::memory_resources mr = cudf::get_current_device_resource_ref()); /** * @brief Convert column values to a host vector of strings @@ -39,8 +39,8 @@ std::string to_string(cudf::column_view const& col, */ std::vector to_strings( cudf::column_view const& col, - rmm::cuda_stream_view stream = cudf::test::get_default_stream(), - cudf::memory_resources mr = cudf::get_current_device_resource_ref()); + cuda::stream_ref stream = cudf::test::get_default_stream(), + cudf::memory_resources mr = cudf::get_current_device_resource_ref()); /** * @brief Print a column view to an ostream @@ -51,9 +51,9 @@ std::vector to_strings( * @param mr Memory resources used for temporary device allocations */ void print(cudf::column_view const& col, - std::ostream& os = std::cout, - rmm::cuda_stream_view stream = cudf::test::get_default_stream(), - cudf::memory_resources mr = cudf::get_current_device_resource_ref()); + std::ostream& os = std::cout, + cuda::stream_ref stream = cudf::test::get_default_stream(), + cudf::memory_resources mr = cudf::get_current_device_resource_ref()); } // namespace test } // namespace CUDF_EXPORT cudf diff --git a/cpp/include/cudf_test/default_stream.hpp b/cpp/include/cudf_test/default_stream.hpp index 4e9b6e612eda..8254d3d99ece 100644 --- a/cpp/include/cudf_test/default_stream.hpp +++ b/cpp/include/cudf_test/default_stream.hpp @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: Copyright (c) 2022-2024, NVIDIA CORPORATION. + * SPDX-FileCopyrightText: Copyright (c) 2022-2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved. * SPDX-License-Identifier: Apache-2.0 */ @@ -7,7 +7,7 @@ #include -#include +#include namespace CUDF_EXPORT cudf { namespace test { @@ -26,7 +26,7 @@ namespace test { * * @return The default stream to use for tests. */ -rmm::cuda_stream_view const get_default_stream(); +cuda::stream_ref const get_default_stream(); } // namespace test } // namespace CUDF_EXPORT cudf diff --git a/cpp/include/cudf_test/print_utilities.cuh b/cpp/include/cudf_test/print_utilities.cuh index 484115f308e7..e8a11e9aff60 100644 --- a/cpp/include/cudf_test/print_utilities.cuh +++ b/cpp/include/cudf_test/print_utilities.cuh @@ -9,9 +9,8 @@ #include #include -#include - -#include +#include +#include #include #include @@ -115,7 +114,7 @@ CUDF_KERNEL void print_array_kernel(std::size_t count, int32_t width, char delim * @param args List of iterators to be printed */ template -void print_array(std::size_t count, rmm::cuda_stream_view stream, Ts... args) +void print_array(std::size_t count, cuda::stream_ref stream, Ts... args) { // The width to pad printed numbers to constexpr int32_t width = 6; @@ -125,7 +124,7 @@ void print_array(std::size_t count, rmm::cuda_stream_view stream, Ts... args) // TODO we want this to compile to nothing dependnig on compiler flag, rather than runtime if (std::getenv("CUDA_DBG_DUMP") != nullptr) { - detail::print_array_kernel<<<1, 1, 0, stream.value()>>>(count, width, delimiter, args...); + detail::print_array_kernel<<<1, 1, 0, stream.get()>>>(count, width, delimiter, args...); } } diff --git a/cpp/include/cudf_test/stream_checking_resource_adaptor.hpp b/cpp/include/cudf_test/stream_checking_resource_adaptor.hpp index d7115df0c666..ab1020b9409a 100644 --- a/cpp/include/cudf_test/stream_checking_resource_adaptor.hpp +++ b/cpp/include/cudf_test/stream_checking_resource_adaptor.hpp @@ -9,11 +9,10 @@ #include #include -#include #include #include -#include +#include #include #include @@ -76,7 +75,7 @@ class stream_checking_resource_adaptor final { std::size_t bytes, std::size_t alignment = rmm::CUDA_ALLOCATION_ALIGNMENT) { - verify_stream(rmm::cuda_stream_view{stream.get()}); + verify_stream(cuda::stream_ref{stream.get()}); return upstream_.allocate(stream, bytes, alignment); } @@ -85,7 +84,7 @@ class stream_checking_resource_adaptor final { std::size_t bytes, std::size_t alignment = rmm::CUDA_ALLOCATION_ALIGNMENT) noexcept { - verify_stream(rmm::cuda_stream_view{stream.get()}); + verify_stream(cuda::stream_ref{stream.get()}); upstream_.deallocate(stream, ptr, bytes, alignment); } @@ -116,13 +115,13 @@ class stream_checking_resource_adaptor final { * * @throws `std::runtime_error` if provided an invalid stream */ - void verify_stream(rmm::cuda_stream_view const stream) const + void verify_stream(cuda::stream_ref const stream) const { - auto cstream{stream.value()}; + auto cstream{stream.get()}; auto const invalid_stream = check_default_stream_ ? ((cstream == cudaStreamDefault) || (cstream == cudaStreamLegacy) || (cstream == cudaStreamPerThread)) - : (cstream != cudf::test::get_default_stream().value()); + : (cstream != cudf::test::get_default_stream().get()); if (invalid_stream) { if (error_on_invalid_stream_) { diff --git a/cpp/include/cudf_test/table_utilities.hpp b/cpp/include/cudf_test/table_utilities.hpp index 7393047f8f18..a1e50f86d4da 100644 --- a/cpp/include/cudf_test/table_utilities.hpp +++ b/cpp/include/cudf_test/table_utilities.hpp @@ -12,7 +12,7 @@ #include #include -#include +#include namespace CUDF_EXPORT cudf { namespace test::detail { @@ -41,8 +41,8 @@ void expect_table_properties_equal(cudf::table_view lhs, cudf::table_view rhs); */ void expect_tables_equal(cudf::table_view lhs, cudf::table_view rhs, - rmm::cuda_stream_view stream = cudf::test::get_default_stream(), - cudf::memory_resources mr = cudf::get_current_device_resource_ref()); + cuda::stream_ref stream = cudf::test::get_default_stream(), + cudf::memory_resources mr = cudf::get_current_device_resource_ref()); /** * @brief Verifies the equivalency of two tables. @@ -60,7 +60,7 @@ void expect_tables_equal(cudf::table_view lhs, */ void expect_tables_equivalent(cudf::table_view lhs, cudf::table_view rhs, - rmm::cuda_stream_view stream = cudf::test::get_default_stream(), + cuda::stream_ref stream = cudf::test::get_default_stream(), cudf::memory_resources mr = cudf::get_current_device_resource_ref()); } // namespace test::detail diff --git a/cpp/include/cudf_test/testing_main.hpp b/cpp/include/cudf_test/testing_main.hpp index 69a66ca568db..c6ceaf1552bc 100644 --- a/cpp/include/cudf_test/testing_main.hpp +++ b/cpp/include/cudf_test/testing_main.hpp @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: Copyright (c) 2020-2026, NVIDIA CORPORATION. + * SPDX-FileCopyrightText: Copyright (c) 2020-2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved. * SPDX-License-Identifier: Apache-2.0 */ @@ -15,7 +15,6 @@ #include #include -#include #include #include #include @@ -28,6 +27,7 @@ #include #include +#include #include diff --git a/cpp/tests/ast/transform_tests.cpp b/cpp/tests/ast/transform_tests.cpp index a7463a79c244..1446a94d27ed 100644 --- a/cpp/tests/ast/transform_tests.cpp +++ b/cpp/tests/ast/transform_tests.cpp @@ -49,7 +49,7 @@ struct executor_ast { static std::unique_ptr compute_column( cudf::table_view const& table, cudf::ast::expression const& expr, - rmm::cuda_stream_view stream = cudf::get_default_stream(), + cuda::stream_ref stream = cudf::get_default_stream(), rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()) { return cudf::compute_column(table, expr, stream, mr); @@ -60,7 +60,7 @@ struct executor_jit { static std::unique_ptr compute_column( cudf::table_view const& table, cudf::ast::expression const& expr, - rmm::cuda_stream_view stream = cudf::get_default_stream(), + cuda::stream_ref stream = cudf::get_default_stream(), rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()) { return cudf::compute_column_jit(table, expr, stream, mr); diff --git a/cpp/tests/bitmask/bitmask_tests.cpp b/cpp/tests/bitmask/bitmask_tests.cpp index 2d56a774c141..d671c5e61606 100644 --- a/cpp/tests/bitmask/bitmask_tests.cpp +++ b/cpp/tests/bitmask/bitmask_tests.cpp @@ -22,7 +22,6 @@ #include #include -#include #include diff --git a/cpp/tests/device_atomics/device_atomics_test.cu b/cpp/tests/device_atomics/device_atomics_test.cu index 90ef2f17533d..8f193eb378c0 100644 --- a/cpp/tests/device_atomics/device_atomics_test.cu +++ b/cpp/tests/device_atomics/device_atomics_test.cu @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: Copyright (c) 2021-2025, NVIDIA CORPORATION. + * SPDX-FileCopyrightText: Copyright (c) 2021-2025, NVIDIA CORPORATION & AFFILIATES. All rights reserved. * SPDX-License-Identifier: Apache-2.0 */ diff --git a/cpp/tests/interop/from_arrow_device_test.cpp b/cpp/tests/interop/from_arrow_device_test.cpp index df83837bb2e8..2dcca6d560c4 100644 --- a/cpp/tests/interop/from_arrow_device_test.cpp +++ b/cpp/tests/interop/from_arrow_device_test.cpp @@ -25,6 +25,7 @@ #include #include +#include #include #include @@ -791,14 +792,14 @@ TEST_F(FromArrowDeviceTest, StringViewType) NANOARROW_THROW_NOT_OK(ArrowArrayViewInitFromSchema(&view, &schema, nullptr)); NANOARROW_THROW_NOT_OK(ArrowArrayViewSetArray(&view, &input, nullptr)); - auto stream = cudf::get_default_stream(); - auto items = view.buffer_views[1].data.as_binary_view; - auto d_items = rmm::device_uvector(input.length, stream); + cuda::stream_ref stream = cudf::get_default_stream(); + auto items = view.buffer_views[1].data.as_binary_view; + auto d_items = rmm::device_uvector(input.length, stream); CUDF_CUDA_TRY(cudaMemcpyAsync(d_items.data(), items, input.length * sizeof(ArrowBinaryView), cudaMemcpyDefault, - stream.value())); + stream.get())); auto variadics = std::vector(); auto variadic_ptrs = std::vector(); for (auto i = 0L; i < view.n_variadic_buffers; ++i) { @@ -806,7 +807,7 @@ TEST_F(FromArrowDeviceTest, StringViewType) variadic_ptrs.push_back(static_cast(variadics.back().data())); } - stream.synchronize(); + stream.sync(); NANOARROW_THROW_NOT_OK(ArrowSchemaSetTypeStruct(&schema, 1)); NANOARROW_THROW_NOT_OK(ArrowSchemaInitFromType(schema.children[0], NANOARROW_TYPE_STRING_VIEW)); @@ -893,21 +894,21 @@ TEST_F(FromArrowDeviceTest, StringViewTypeWithProducerOwnedPrivateData) NANOARROW_THROW_NOT_OK(ArrowArrayViewSetArray(&view, input.get(), nullptr)); ASSERT_GT(view.n_variadic_buffers, 0); - auto stream = cudf::get_default_stream(); - auto items = view.buffer_views[1].data.as_binary_view; - auto d_items = rmm::device_uvector(input->length, stream); + cuda::stream_ref stream = cudf::get_default_stream(); + auto items = view.buffer_views[1].data.as_binary_view; + auto d_items = rmm::device_uvector(input->length, stream); CUDF_CUDA_TRY(cudaMemcpyAsync(d_items.data(), items, input->length * sizeof(ArrowBinaryView), cudaMemcpyDefault, - stream.value())); + stream.get())); auto variadics = std::vector(); auto variadic_ptrs = std::vector(); for (auto i = 0L; i < view.n_variadic_buffers; ++i) { variadics.emplace_back(view.variadic_buffers[i], view.variadic_buffer_sizes[i], stream); variadic_ptrs.push_back(static_cast(variadics.back().data())); } - stream.synchronize(); + stream.sync(); auto variadic_sizes = std::vector(); for (auto i = 0L; i < view.n_variadic_buffers; ++i) { diff --git a/cpp/tests/io/experimental/variant_extract_test.cpp b/cpp/tests/io/experimental/variant_extract_test.cpp index b969e69735ef..254dfd8b4c47 100644 --- a/cpp/tests/io/experimental/variant_extract_test.cpp +++ b/cpp/tests/io/experimental/variant_extract_test.cpp @@ -2340,7 +2340,7 @@ TEST_F(CastVariantStatusTest, SqlNullInputProducesRowNullStatus) // Mask row 1 SQL null auto null_mask = cudf::create_null_mask(2, cudf::mask_state::ALL_VALID, stream, cmr()); cudf::set_null_mask(static_cast(null_mask.data()), 1, 2, false); - stream.synchronize(); + stream.sync(); values_col->set_null_mask(std::move(null_mask), 1); auto status = make_status_buffer(values_col->size()); diff --git a/cpp/tests/io/json/json_quote_normalization_test.cpp b/cpp/tests/io/json/json_quote_normalization_test.cpp index e5373d4b3543..26237b85dbec 100644 --- a/cpp/tests/io/json/json_quote_normalization_test.cpp +++ b/cpp/tests/io/json/json_quote_normalization_test.cpp @@ -27,7 +27,7 @@ void run_test(std::string const& host_input, { auto stream_view = cudf::test::get_default_stream(); auto device_input = rmm::device_buffer(host_input.c_str(), host_input.size(), stream_view); - stream_view.synchronize(); + stream_view.sync(); // Preprocessing FST cudf::io::datasource::owning_buffer device_data(std::move(device_input)); @@ -39,8 +39,8 @@ void run_test(std::string const& host_input, device_data.data(), preprocessed_host_output.size(), cudaMemcpyDefault, - stream_view.value())) - stream_view.synchronize(); + stream_view.get())) + stream_view.sync(); CUDF_TEST_EXPECT_VECTOR_EQUAL( preprocessed_host_output, expected_host_output, preprocessed_host_output.size()); } diff --git a/cpp/tests/iterator/iterator_tests.cuh b/cpp/tests/iterator/iterator_tests.cuh index 4288bb3f2770..7a1f056dfd25 100644 --- a/cpp/tests/iterator/iterator_tests.cuh +++ b/cpp/tests/iterator/iterator_tests.cuh @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: Copyright (c) 2019-2026, NVIDIA CORPORATION. + * SPDX-FileCopyrightText: Copyright (c) 2019-2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved. * SPDX-License-Identifier: Apache-2.0 */ #pragma once diff --git a/cpp/tests/iterator/value_iterator_test_strings.cu b/cpp/tests/iterator/value_iterator_test_strings.cu index e050229960b1..7c337511025c 100644 --- a/cpp/tests/iterator/value_iterator_test_strings.cu +++ b/cpp/tests/iterator/value_iterator_test_strings.cu @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: Copyright (c) 2020-2026, NVIDIA CORPORATION. + * SPDX-FileCopyrightText: Copyright (c) 2020-2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved. * SPDX-License-Identifier: Apache-2.0 */ #include "iterator_tests.cuh" @@ -10,7 +10,6 @@ #include #include -#include #include #include diff --git a/cpp/tests/join/join_tests.cpp b/cpp/tests/join/join_tests.cpp index 943044fd134c..2132110ea2ef 100644 --- a/cpp/tests/join/join_tests.cpp +++ b/cpp/tests/join/join_tests.cpp @@ -29,7 +29,7 @@ #include #include -#include +#include #include #include diff --git a/cpp/tests/quantiles/percentile_approx_test.cpp b/cpp/tests/quantiles/percentile_approx_test.cpp index 6e1fb1f899f0..cc12da21ae1c 100644 --- a/cpp/tests/quantiles/percentile_approx_test.cpp +++ b/cpp/tests/quantiles/percentile_approx_test.cpp @@ -20,6 +20,7 @@ #include #include +#include namespace { struct percentile_approx_dispatch { @@ -60,7 +61,7 @@ void percentile_approx_test(cudf::column_view const& _keys, std::vector const& percentages, cudf::size_type ulps) { - auto stream = cudf::get_default_stream(); + cuda::stream_ref stream = cudf::get_default_stream(); bool is_cpu_cluster_computation_disabled[2] = {true, false}; for (int idx = 0; idx < 2; idx++) { cudf::tdigest::detail::is_cpu_cluster_computation_disabled = @@ -98,7 +99,7 @@ void percentile_approx_test(cudf::column_view const& _keys, aggregations.push_back(cudf::make_tdigest_aggregation(delta)); requests.push_back({values, std::move(aggregations)}); auto result = std::move(gb.aggregate(requests, stream).second[0].results[0]); - stream.synchronize(); + stream.sync(); return result; }; groupby_parts.push_back(cudf::type_dispatcher(values[v_idx].type(), @@ -118,7 +119,7 @@ void percentile_approx_test(cudf::column_view const& _keys, cudf::data_type{cudf::type_id::STRUCT}, stream); auto tbl = static_cast(scalar_result.get())->view(); - stream.synchronize(); + stream.sync(); std::vector> cols; std::transform( tbl.begin(), tbl.end(), std::back_inserter(cols), [](cudf::column_view const& col) { @@ -134,7 +135,7 @@ void percentile_approx_test(cudf::column_view const& _keys, delta, percentages, ulps)); - stream.synchronize(); + stream.sync(); } // second pass. run the percentile_approx with all the keys in one pass and make sure we get the @@ -165,7 +166,7 @@ void percentile_approx_test(cudf::column_view const& _keys, percentages.end()); cudf::tdigest::tdigest_column_view tdv(*(gb_result.second[0].results[0])); auto result = cudf::percentile_approx(tdv, g_percentages, stream); - stream.synchronize(); + stream.sync(); CUDF_TEST_EXPECT_COLUMNS_EQUIVALENT(*expected, *result); } @@ -173,13 +174,13 @@ void percentile_approx_test(cudf::column_view const& _keys, void simple_test(cudf::data_type input_type, std::vector> params) { - auto stream = cudf::get_default_stream(); - auto values = cudf::test::generate_standardized_percentile_distribution(input_type); + cuda::stream_ref stream = cudf::get_default_stream(); + auto values = cudf::test::generate_standardized_percentile_distribution(input_type); // all in the same group auto keys = cudf::make_fixed_width_column( cudf::data_type{cudf::type_id::INT32}, values->size(), cudf::mask_state::UNALLOCATED); CUDF_CUDA_TRY(cudaMemsetAsync( - keys->mutable_view().data(), 0, values->size() * sizeof(int32_t), stream.value())); + keys->mutable_view().data(), 0, values->size() * sizeof(int32_t), stream.get())); // runs both groupby and reduce paths std::for_each(params.begin(), params.end(), [&](std::pair const& params) { @@ -194,8 +195,8 @@ struct group_index { void grouped_test(cudf::data_type input_type, std::vector> params) { - auto stream = cudf::get_default_stream(); - auto values = cudf::test::generate_standardized_percentile_distribution(input_type); + cuda::stream_ref stream = cudf::get_default_stream(); + auto values = cudf::test::generate_standardized_percentile_distribution(input_type); // all in the same group auto keys = cudf::make_fixed_width_column( cudf::data_type{cudf::type_id::INT32}, values->size(), cudf::mask_state::UNALLOCATED); @@ -206,7 +207,7 @@ void grouped_test(cudf::data_type input_type, std::vector> p h_keys.data(), h_keys.size() * sizeof(int32_t), cudaMemcpyDefault, - stream.value())); + stream.get())); std::for_each(params.begin(), params.end(), [&](std::pair const& params) { percentile_approx_test( @@ -241,8 +242,8 @@ void simple_with_nulls_test(cudf::data_type input_type, std::vector> params) { - auto stream = cudf::get_default_stream(); - auto values = cudf::test::generate_standardized_percentile_distribution(input_type); + cuda::stream_ref stream = cudf::get_default_stream(); + auto values = cudf::test::generate_standardized_percentile_distribution(input_type); // all in the same group auto keys = cudf::make_fixed_width_column( cudf::data_type{cudf::type_id::INT32}, values->size(), cudf::mask_state::UNALLOCATED); @@ -253,7 +254,7 @@ void grouped_with_nulls_test(cudf::data_type input_type, std::vector #include -#include #include #include diff --git a/cpp/tests/row_operator/row_operator_tests.cu b/cpp/tests/row_operator/row_operator_tests.cu index 073c2dd58989..334d790016b5 100644 --- a/cpp/tests/row_operator/row_operator_tests.cu +++ b/cpp/tests/row_operator/row_operator_tests.cu @@ -17,10 +17,10 @@ #include #include -#include #include #include +#include #include template @@ -34,21 +34,21 @@ template std::unique_ptr self_comparison(cudf::table_view input, std::vector const& column_order, PhysicalElementComparator comparator, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, cudf::memory_resources mr); template std::unique_ptr two_table_comparison(cudf::table_view lhs, cudf::table_view rhs, std::vector const& column_order, PhysicalElementComparator comparator, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, cudf::memory_resources mr); template std::unique_ptr two_table_equality(cudf::table_view lhs, cudf::table_view rhs, std::vector const& column_order, PhysicalElementComparator comparator, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, cudf::memory_resources mr); template std::unique_ptr sorted_order( @@ -56,7 +56,7 @@ std::unique_ptr sorted_order( cudf::size_type num_rows, bool has_nested, PhysicalElementComparator comparator, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, cudf::memory_resources mr); TYPED_TEST(TypedTableViewTest, TestLexicographicalComparatorTwoTables) diff --git a/cpp/tests/row_operator/row_operator_tests_utilities.hpp b/cpp/tests/row_operator/row_operator_tests_utilities.hpp index 5b8f35558b40..1b6997d4c497 100644 --- a/cpp/tests/row_operator/row_operator_tests_utilities.hpp +++ b/cpp/tests/row_operator/row_operator_tests_utilities.hpp @@ -9,7 +9,7 @@ #include #include -#include +#include #include @@ -22,21 +22,21 @@ template std::unique_ptr self_comparison(cudf::table_view input, std::vector const& column_order, PhysicalElementComparator comparator, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, cudf::memory_resources mr); template std::unique_ptr two_table_comparison(cudf::table_view lhs, cudf::table_view rhs, std::vector const& column_order, PhysicalElementComparator comparator, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, cudf::memory_resources mr); template std::unique_ptr two_table_equality(cudf::table_view lhs, cudf::table_view rhs, std::vector const& column_order, PhysicalElementComparator comparator, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, cudf::memory_resources mr); template std::unique_ptr sorted_order( @@ -44,5 +44,5 @@ std::unique_ptr sorted_order( cudf::size_type num_rows, bool has_nested, PhysicalElementComparator comparator, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, cudf::memory_resources mr); diff --git a/cpp/tests/row_operator/self_comparison_utilities.cu b/cpp/tests/row_operator/self_comparison_utilities.cu index 898601ef62ea..3e29fe882342 100644 --- a/cpp/tests/row_operator/self_comparison_utilities.cu +++ b/cpp/tests/row_operator/self_comparison_utilities.cu @@ -8,10 +8,10 @@ #include #include -#include #include #include +#include #include // Including this declaration/defintion in two_table_comparison_utilities.cu causes @@ -21,7 +21,7 @@ template std::unique_ptr self_comparison(cudf::table_view input, std::vector const& column_order, PhysicalElementComparator comparator, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, cudf::memory_resources mr) { auto const table_comparator = @@ -55,11 +55,11 @@ template std::unique_ptr self_comparison( cudf::table_view input, std::vector const& column_order, physical_comparator_t comparator, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, cudf::memory_resources mr); template std::unique_ptr self_comparison( cudf::table_view input, std::vector const& column_order, sorting_comparator_t comparator, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, cudf::memory_resources mr); diff --git a/cpp/tests/row_operator/two_table_comparison_utilities.cu b/cpp/tests/row_operator/two_table_comparison_utilities.cu index 55eb526eb809..4f0f72807a49 100644 --- a/cpp/tests/row_operator/two_table_comparison_utilities.cu +++ b/cpp/tests/row_operator/two_table_comparison_utilities.cu @@ -10,9 +10,9 @@ #include #include -#include #include +#include #include #include #include @@ -22,7 +22,7 @@ std::unique_ptr two_table_comparison(cudf::table_view lhs, cudf::table_view rhs, std::vector const& column_order, PhysicalElementComparator comparator, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, cudf::memory_resources mr) { // TODO: lexicographic::two_table_comparator still allocates from the current device resource. @@ -60,14 +60,14 @@ template std::unique_ptr two_table_comparison const& column_order, physical_comparator_t comparator, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, cudf::memory_resources mr); template std::unique_ptr two_table_comparison( cudf::table_view lhs, cudf::table_view rhs, std::vector const& column_order, sorting_comparator_t comparator, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, cudf::memory_resources mr); template @@ -76,7 +76,7 @@ std::unique_ptr sorted_order( cudf::size_type num_rows, bool has_nested, PhysicalElementComparator comparator, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, cudf::memory_resources mr) { auto output = cudf::make_numeric_column(cudf::data_type(cudf::type_to_id()), @@ -112,12 +112,12 @@ template std::unique_ptr sorted_order( cudf::size_type num_rows, bool has_nested, physical_comparator_t comparator, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, cudf::memory_resources mr); template std::unique_ptr sorted_order( std::shared_ptr preprocessed_input, cudf::size_type num_rows, bool has_nested, sorting_comparator_t comparator, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, cudf::memory_resources mr); diff --git a/cpp/tests/row_operator/two_table_equality_utilities.cu b/cpp/tests/row_operator/two_table_equality_utilities.cu index 94deaf7e19e7..9ca782efe02b 100644 --- a/cpp/tests/row_operator/two_table_equality_utilities.cu +++ b/cpp/tests/row_operator/two_table_equality_utilities.cu @@ -8,9 +8,9 @@ #include #include -#include #include +#include #include template @@ -18,7 +18,7 @@ std::unique_ptr two_table_equality(cudf::table_view lhs, cudf::table_view rhs, std::vector const& column_order, PhysicalElementComparator comparator, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, cudf::memory_resources mr) { auto const table_comparator = @@ -62,12 +62,12 @@ template std::unique_ptr two_table_equality( cudf::table_view rhs, std::vector const& column_order, physical_equality_t comparator, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, cudf::memory_resources mr); template std::unique_ptr two_table_equality( cudf::table_view lhs, cudf::table_view rhs, std::vector const& column_order, nan_equality_t comparator, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, cudf::memory_resources mr); diff --git a/cpp/tests/scalar/scalar_device_view_test.cu b/cpp/tests/scalar/scalar_device_view_test.cu index b20f5812c8de..ead505280f33 100644 --- a/cpp/tests/scalar/scalar_device_view_test.cu +++ b/cpp/tests/scalar/scalar_device_view_test.cu @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: Copyright (c) 2019-2026, NVIDIA CORPORATION. + * SPDX-FileCopyrightText: Copyright (c) 2019-2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved. * SPDX-License-Identifier: Apache-2.0 */ diff --git a/cpp/tests/streams/pool_test.cu b/cpp/tests/streams/pool_test.cu index 49620c3e61fe..d788aff0b32c 100644 --- a/cpp/tests/streams/pool_test.cu +++ b/cpp/tests/streams/pool_test.cu @@ -9,8 +9,6 @@ #include -#include - class StreamPoolTest : public cudf::test::BaseFixture {}; CUDF_KERNEL void do_nothing_kernel() {} diff --git a/cpp/tests/table/table_view_tests.cu b/cpp/tests/table/table_view_tests.cu index 5979fe6689b2..7a02f24ca91c 100644 --- a/cpp/tests/table/table_view_tests.cu +++ b/cpp/tests/table/table_view_tests.cu @@ -18,9 +18,9 @@ #include #include -#include #include +#include #include #include @@ -33,7 +33,7 @@ void row_comparison(cudf::table_view input1, cudf::mutable_column_view output, std::vector const& column_order) { - rmm::cuda_stream_view stream{cudf::get_default_stream()}; + cuda::stream_ref stream{cudf::get_default_stream()}; auto const comparator = cudf::detail::row::lexicographic::two_table_comparator{ input1, input2, column_order, {}, stream}; diff --git a/cpp/tests/types/type_dispatcher_test.cu b/cpp/tests/types/type_dispatcher_test.cu index d32702c4b30e..5e443cbf2bcd 100644 --- a/cpp/tests/types/type_dispatcher_test.cu +++ b/cpp/tests/types/type_dispatcher_test.cu @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: Copyright (c) 2019-2026, NVIDIA CORPORATION. + * SPDX-FileCopyrightText: Copyright (c) 2019-2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved. * SPDX-License-Identifier: Apache-2.0 */ diff --git a/cpp/tests/utilities/debug_utilities.cu b/cpp/tests/utilities/debug_utilities.cu index 9241ce25a30e..0ddc8479f04a 100644 --- a/cpp/tests/utilities/debug_utilities.cu +++ b/cpp/tests/utilities/debug_utilities.cu @@ -39,9 +39,9 @@ namespace detail { */ std::string to_string(cudf::column_view const& col, std::string const& delimiter, - std::string const& indent = "", - rmm::cuda_stream_view stream = cudf::test::get_default_stream(), - cudf::memory_resources mr = cudf::get_current_device_resource_ref()); + std::string const& indent = "", + cuda::stream_ref stream = cudf::test::get_default_stream(), + cudf::memory_resources mr = cudf::get_current_device_resource_ref()); /** * @brief Formats a null mask as a string @@ -89,9 +89,9 @@ std::string to_string(std::vector const& null_mask, */ std::vector to_strings( cudf::column_view const& col, - std::string const& indent = "", - rmm::cuda_stream_view stream = cudf::test::get_default_stream(), - cudf::memory_resources mr = cudf::get_current_device_resource_ref()); + std::string const& indent = "", + cuda::stream_ref stream = cudf::test::get_default_stream(), + cudf::memory_resources mr = cudf::get_current_device_resource_ref()); } // namespace detail @@ -147,7 +147,7 @@ std::string get_nested_type_str(cudf::column_view const& view) template std::string nested_offsets_to_string(NestedColumnView const& c, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, cudf::memory_resources mr, std::string const& delimiter = ", ") { @@ -184,7 +184,7 @@ struct column_view_printer { void operator()(cudf::column_view const& col, std::vector& out, std::string const&, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, cudf::memory_resources mr) requires(is_numeric()) { @@ -213,7 +213,7 @@ struct column_view_printer { void operator()(cudf::column_view const& col, std::vector& out, std::string const& indent, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, cudf::memory_resources mr) requires(is_timestamp()) { @@ -243,7 +243,7 @@ struct column_view_printer { void operator()(cudf::column_view const& col, std::vector& out, std::string const&, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, cudf::memory_resources mr) requires(cudf::is_fixed_point()) { @@ -269,7 +269,7 @@ struct column_view_printer { void operator()(cudf::column_view const& col, std::vector& out, std::string const&, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, cudf::memory_resources mr) requires(std::is_same_v) { @@ -312,7 +312,7 @@ struct column_view_printer { void operator()(cudf::column_view const& col, std::vector& out, std::string const&, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, cudf::memory_resources mr) requires(std::is_same_v) { @@ -341,7 +341,7 @@ struct column_view_printer { void operator()(cudf::column_view const& col, std::vector& out, std::string const&, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, cudf::memory_resources mr) requires(is_duration()) { @@ -371,7 +371,7 @@ struct column_view_printer { void operator()(cudf::column_view const& col, std::vector& out, std::string const& indent, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, cudf::memory_resources mr) requires(std::is_same_v) { @@ -406,7 +406,7 @@ struct column_view_printer { void operator()(cudf::column_view const& col, std::vector& out, std::string const& indent, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, cudf::memory_resources mr) requires(std::is_same_v) { @@ -455,7 +455,7 @@ namespace detail { */ std::vector to_strings(cudf::column_view const& col, std::string const& indent, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, cudf::memory_resources mr) { std::vector reply; @@ -471,7 +471,7 @@ std::vector to_strings(cudf::column_view const& col, std::string to_string(cudf::column_view const& col, std::string const& delimiter, std::string const& indent, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, cudf::memory_resources mr) { std::ostringstream buffer; @@ -507,7 +507,7 @@ std::string to_string(std::vector const& null_mask, } // namespace detail std::vector to_strings(cudf::column_view const& col, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, cudf::memory_resources mr) { return detail::to_strings(col, "", stream, mr); @@ -515,7 +515,7 @@ std::vector to_strings(cudf::column_view const& col, std::string to_string(cudf::column_view const& col, std::string const& delimiter, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, cudf::memory_resources mr) { return detail::to_string(col, delimiter, "", stream, mr); @@ -528,7 +528,7 @@ std::string to_string(std::vector const& null_mask, size_type null void print(cudf::column_view const& col, std::ostream& os, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, cudf::memory_resources mr) { os << to_string(col, ",", stream, mr) << std::endl; diff --git a/cpp/tests/utilities/default_stream.cpp b/cpp/tests/utilities/default_stream.cpp index ca931d1eb9de..f6cff4c25b6a 100644 --- a/cpp/tests/utilities/default_stream.cpp +++ b/cpp/tests/utilities/default_stream.cpp @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: Copyright (c) 2023-2024, NVIDIA CORPORATION. + * SPDX-FileCopyrightText: Copyright (c) 2023-2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved. * SPDX-License-Identifier: Apache-2.0 */ @@ -10,7 +10,7 @@ namespace cudf { namespace test { -rmm::cuda_stream_view const get_default_stream() { return cudf::get_default_stream(); } +cuda::stream_ref const get_default_stream() { return cudf::get_default_stream(); } } // namespace test } // namespace cudf diff --git a/cpp/tests/utilities/identify_stream_usage.cpp b/cpp/tests/utilities/identify_stream_usage.cpp index 3ed3b410067f..8f141bd9e08d 100644 --- a/cpp/tests/utilities/identify_stream_usage.cpp +++ b/cpp/tests/utilities/identify_stream_usage.cpp @@ -6,8 +6,8 @@ #include #include -#include +#include #include #include @@ -48,7 +48,7 @@ namespace cudf { namespace test { #endif -rmm::cuda_stream_view const get_default_stream() +cuda::stream_ref const get_default_stream() { static rmm::cuda_stream stream{}; return stream; @@ -86,7 +86,7 @@ bool stream_is_invalid(cudaStream_t stream) { #ifdef STREAM_MODE_TESTING // In this mode the _only_ valid stream is the one returned by cudf::test::get_default_stream. - return (stream != cudf::test::get_default_stream().value()); + return (stream != cudf::test::get_default_stream().get()); #else // We explicitly list the possibilities rather than using // `cudf::get_default_stream().value()` because there is no guarantee that diff --git a/cpp/tests/utilities/roaring_bitmap_test.cpp b/cpp/tests/utilities/roaring_bitmap_test.cpp index 4d582d77f6aa..fbb07cc65137 100644 --- a/cpp/tests/utilities/roaring_bitmap_test.cpp +++ b/cpp/tests/utilities/roaring_bitmap_test.cpp @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: Copyright (c) 2026, NVIDIA CORPORATION. + * SPDX-FileCopyrightText: Copyright (c) 2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved. * SPDX-License-Identifier: Apache-2.0 */ @@ -12,7 +12,7 @@ #include #include -#include +#include #include @@ -47,8 +47,8 @@ TYPED_TEST(RoaringBitmapTest, Basics) } }(); - auto const stream = cudf::get_default_stream(); - auto const mr = cudf::get_current_device_resource_ref(); + cuda::stream_ref const stream = cudf::get_default_stream(); + auto const mr = cudf::get_current_device_resource_ref(); auto bitmap = cudf::roaring_bitmap(bitmap_type, serialized_bitmap_data); @@ -62,7 +62,7 @@ TYPED_TEST(RoaringBitmapTest, Basics) auto result_col = bitmap.contains_async(keys_col, stream, mr); auto results = cudf::detail::make_host_vector_async( cudf::device_span(result_col->view().template data(), num_keys), stream); - stream.synchronize(); + stream.sync(); EXPECT_TRUE(std::equal(results.begin(), results.end(), is_even)); } @@ -73,7 +73,7 @@ TYPED_TEST(RoaringBitmapTest, Basics) bitmap.contains_async(keys_col, result_col->mutable_view(), stream); auto results = cudf::detail::make_host_vector_async( cudf::device_span(result_col->view().template data(), num_keys), stream); - stream.synchronize(); + stream.sync(); EXPECT_TRUE(std::equal(results.begin(), results.end(), is_even)); } } diff --git a/cpp/tests/utilities/table_utilities.cu b/cpp/tests/utilities/table_utilities.cu index 1e370c23f8bd..24ce3935264b 100644 --- a/cpp/tests/utilities/table_utilities.cu +++ b/cpp/tests/utilities/table_utilities.cu @@ -16,7 +16,7 @@ void expect_table_properties_equal(cudf::table_view lhs, cudf::table_view rhs) void expect_tables_equal(cudf::table_view lhs, cudf::table_view rhs, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, cudf::memory_resources mr) { expect_table_properties_equal(lhs, rhs); @@ -31,7 +31,7 @@ void expect_tables_equal(cudf::table_view lhs, */ void expect_tables_equivalent(cudf::table_view lhs, cudf::table_view rhs, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, cudf::memory_resources mr) { auto num_columns = lhs.num_columns(); diff --git a/cpp/tests/utilities_tests/span_tests.cu b/cpp/tests/utilities_tests/span_tests.cu index bcbfa6a7c56f..33d2df410458 100644 --- a/cpp/tests/utilities_tests/span_tests.cu +++ b/cpp/tests/utilities_tests/span_tests.cu @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: Copyright (c) 2020-2026, NVIDIA CORPORATION. + * SPDX-FileCopyrightText: Copyright (c) 2020-2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved. * SPDX-License-Identifier: Apache-2.0 */ @@ -19,6 +19,7 @@ #include #include +#include #include #include @@ -407,8 +408,8 @@ TEST(HostDeviceSpanTest, CanCopySpan) TEST(HostDeviceSpanTest, CanSendToDevice) { - auto original_message = get_test_hostdevice_vector(); - auto stream = cudf::get_default_stream(); + auto original_message = get_test_hostdevice_vector(); + cuda::stream_ref stream = cudf::get_default_stream(); original_message.host_to_device_async(stream); @@ -417,8 +418,8 @@ TEST(HostDeviceSpanTest, CanSendToDevice) original_message.device_ptr(), original_message.size(), cudaMemcpyDefault, - stream.value()); - stream.synchronize(); + stream.get()); + stream.sync(); EXPECT_EQ(got_message, hello_world_message); } diff --git a/cpp/tests/wrappers/timestamps_test.cu b/cpp/tests/wrappers/timestamps_test.cu index b91444b6f614..675847959c30 100644 --- a/cpp/tests/wrappers/timestamps_test.cu +++ b/cpp/tests/wrappers/timestamps_test.cu @@ -20,7 +20,6 @@ #include #include -#include #include #include