From 18b6920294e5b6f586e69f60ad87c736fc2e6098 Mon Sep 17 00:00:00 2001 From: Vyas Ramasubramani Date: Wed, 12 Aug 2026 06:04:28 -0700 Subject: [PATCH 01/10] Use cuda::stream_ref for nested IO APIs --- cpp/include/cudf/column/column_factories.hpp | 12 ++- cpp/include/cudf/detail/structs/utilities.hpp | 19 ++--- cpp/include/cudf/io/avro.hpp | 2 +- cpp/include/cudf/io/csv.hpp | 4 +- cpp/include/cudf/io/data_sink.hpp | 6 +- cpp/include/cudf/io/datasource.hpp | 8 +- cpp/include/cudf/io/detail/avro.hpp | 6 +- cpp/include/cudf/io/detail/codec.hpp | 8 +- cpp/include/cudf/io/detail/csv.hpp | 8 +- cpp/include/cudf/io/detail/json.hpp | 14 ++-- cpp/include/cudf/io/detail/orc.hpp | 18 ++--- cpp/include/cudf/io/detail/parquet.hpp | 10 +-- cpp/include/cudf/io/detail/tokenize_json.hpp | 7 +- .../cudf/io/experimental/cudftable.hpp | 8 +- .../cudf/io/experimental/deletion_vectors.hpp | 10 +-- .../cudf/io/experimental/hybrid_scan.hpp | 25 +++--- .../io/experimental/hybrid_scan_multifile.hpp | 23 +++--- cpp/include/cudf/io/experimental/variant.hpp | 8 +- cpp/include/cudf/io/json.hpp | 8 +- cpp/include/cudf/io/orc.hpp | 12 +-- cpp/include/cudf/io/orc_metadata.hpp | 8 +- cpp/include/cudf/io/parquet.hpp | 16 ++-- cpp/include/cudf/io/parquet_io_utils.hpp | 11 +-- .../cudf/io/text/data_chunk_source.hpp | 2 +- .../cudf/io/text/detail/tile_state.hpp | 6 +- cpp/include/cudf/io/text/detail/trie.hpp | 9 ++- cpp/include/cudf/io/text/multibyte_split.hpp | 2 +- cpp/include/cudf/lists/combine.hpp | 4 +- cpp/include/cudf/lists/contains.hpp | 10 +-- cpp/include/cudf/lists/count_elements.hpp | 2 +- cpp/include/cudf/lists/detail/combine.hpp | 6 +- cpp/include/cudf/lists/detail/concatenate.hpp | 6 +- cpp/include/cudf/lists/detail/contains.hpp | 18 ++--- cpp/include/cudf/lists/detail/copying.hpp | 6 +- cpp/include/cudf/lists/detail/dremel.hpp | 4 +- cpp/include/cudf/lists/detail/extract.hpp | 6 +- cpp/include/cudf/lists/detail/gather.cuh | 14 ++-- .../cudf/lists/detail/interleave_columns.hpp | 6 +- .../lists/detail/lists_column_factories.hpp | 6 +- cpp/include/cudf/lists/detail/reverse.hpp | 4 +- cpp/include/cudf/lists/detail/scatter.cuh | 8 +- .../cudf/lists/detail/scatter_helper.cuh | 2 +- .../cudf/lists/detail/set_operations.hpp | 12 +-- cpp/include/cudf/lists/detail/sorting.hpp | 8 +- .../cudf/lists/detail/stream_compaction.hpp | 8 +- cpp/include/cudf/lists/explode.hpp | 8 +- cpp/include/cudf/lists/extract.hpp | 4 +- cpp/include/cudf/lists/filling.hpp | 6 +- cpp/include/cudf/lists/gather.hpp | 2 +- cpp/include/cudf/lists/lists_column_view.hpp | 4 +- cpp/include/cudf/lists/reverse.hpp | 2 +- cpp/include/cudf/lists/set_operations.hpp | 8 +- cpp/include/cudf/lists/sorting.hpp | 4 +- cpp/include/cudf/lists/stream_compaction.hpp | 6 +- cpp/include/cudf/scalar/scalar_factories.hpp | 4 +- cpp/include/cudf/strings/attributes.hpp | 6 +- cpp/include/cudf/strings/capitalize.hpp | 6 +- cpp/include/cudf/strings/case.hpp | 6 +- .../cudf/strings/char_types/char_types.hpp | 4 +- cpp/include/cudf/strings/combine.hpp | 10 +-- cpp/include/cudf/strings/contains.hpp | 10 +-- .../cudf/strings/convert/convert_booleans.hpp | 4 +- .../cudf/strings/convert/convert_datetime.hpp | 6 +- .../strings/convert/convert_durations.hpp | 4 +- .../strings/convert/convert_fixed_point.hpp | 6 +- .../cudf/strings/convert/convert_floats.hpp | 6 +- .../cudf/strings/convert/convert_integers.hpp | 14 ++-- .../cudf/strings/convert/convert_ipv4.hpp | 6 +- .../cudf/strings/convert/convert_lists.hpp | 2 +- .../cudf/strings/convert/convert_urls.hpp | 4 +- cpp/include/cudf/strings/convert/int_cast.hpp | 6 +- .../cudf/strings/detail/attributes.hpp | 4 +- .../cudf/strings/detail/char_tables.hpp | 10 +-- cpp/include/cudf/strings/detail/combine.hpp | 10 +-- .../cudf/strings/detail/concatenate.hpp | 6 +- .../cudf/strings/detail/converters.hpp | 28 +++---- .../cudf/strings/detail/copy_if_else.cuh | 6 +- .../cudf/strings/detail/copy_range.hpp | 6 +- cpp/include/cudf/strings/detail/copying.hpp | 8 +- cpp/include/cudf/strings/detail/fill.hpp | 6 +- cpp/include/cudf/strings/detail/find.hpp | 8 +- cpp/include/cudf/strings/detail/gather.cuh | 14 ++-- cpp/include/cudf/strings/detail/merge.hpp | 7 +- cpp/include/cudf/strings/detail/replace.hpp | 20 ++--- cpp/include/cudf/strings/detail/scan.hpp | 6 +- cpp/include/cudf/strings/detail/scatter.cuh | 6 +- .../cudf/strings/detail/strings_children.cuh | 20 ++--- .../detail/strings_column_factories.cuh | 6 +- cpp/include/cudf/strings/detail/utilities.hpp | 13 +-- cpp/include/cudf/strings/extract.hpp | 6 +- cpp/include/cudf/strings/find.hpp | 22 ++--- cpp/include/cudf/strings/find_multiple.hpp | 4 +- cpp/include/cudf/strings/findall.hpp | 4 +- cpp/include/cudf/strings/padding.hpp | 6 +- cpp/include/cudf/strings/repeat_strings.hpp | 6 +- cpp/include/cudf/strings/replace.hpp | 8 +- cpp/include/cudf/strings/replace_re.hpp | 4 +- cpp/include/cudf/strings/reverse.hpp | 2 +- cpp/include/cudf/strings/slice.hpp | 6 +- cpp/include/cudf/strings/split/partition.hpp | 4 +- cpp/include/cudf/strings/split/split.hpp | 10 +-- cpp/include/cudf/strings/split/split_re.hpp | 8 +- .../cudf/strings/strings_column_view.hpp | 8 +- cpp/include/cudf/strings/strip.hpp | 2 +- cpp/include/cudf/strings/translate.hpp | 4 +- cpp/include/cudf/strings/utilities.hpp | 4 +- cpp/include/cudf/strings/wrap.hpp | 2 +- .../cudf/structs/detail/concatenate.hpp | 4 +- cpp/include/cudf/structs/detail/scan.hpp | 6 +- .../cudf/structs/structs_column_view.hpp | 6 +- cpp/include/nvtext/byte_pair_encoding.hpp | 8 +- cpp/include/nvtext/deduplicate.hpp | 9 ++- cpp/include/nvtext/detail/tokenize.hpp | 12 +-- cpp/include/nvtext/edit_distance.hpp | 2 +- cpp/include/nvtext/generate_ngrams.hpp | 6 +- cpp/include/nvtext/jaccard.hpp | 2 +- cpp/include/nvtext/minhash.hpp | 8 +- cpp/include/nvtext/ngrams_tokenize.hpp | 2 +- cpp/include/nvtext/normalize.hpp | 10 ++- cpp/include/nvtext/replace.hpp | 4 +- cpp/include/nvtext/stemmer.hpp | 6 +- cpp/include/nvtext/tokenize.hpp | 18 ++--- cpp/include/nvtext/wordpiece_tokenize.hpp | 6 +- cpp/src/io/avro/avro_gpu.cu | 8 +- cpp/src/io/avro/avro_gpu.hpp | 6 +- cpp/src/io/avro/reader_impl.cu | 10 +-- cpp/src/io/comp/common_internal.hpp | 10 +-- cpp/src/io/comp/compression.cpp | 8 +- cpp/src/io/comp/compression.cu | 2 +- cpp/src/io/comp/compression.hpp | 4 +- cpp/src/io/comp/debrotli.cu | 10 +-- cpp/src/io/comp/decompression.cpp | 10 +-- cpp/src/io/comp/decompression.hpp | 6 +- cpp/src/io/comp/gpuinflate.cu | 20 ++--- cpp/src/io/comp/gpuinflate.hpp | 10 +-- cpp/src/io/comp/nvcomp_adapter.cpp | 38 ++++----- cpp/src/io/comp/nvcomp_adapter.cu | 12 +-- cpp/src/io/comp/nvcomp_adapter.cuh | 17 ++-- cpp/src/io/comp/nvcomp_adapter.hpp | 10 +-- cpp/src/io/comp/snap.cu | 6 +- cpp/src/io/comp/unsnap.cu | 11 ++- cpp/src/io/csv/csv_gpu.cu | 36 ++++----- cpp/src/io/csv/csv_gpu.hpp | 14 ++-- cpp/src/io/csv/durations.cu | 11 ++- cpp/src/io/csv/durations.hpp | 6 +- cpp/src/io/csv/reader_impl.cu | 31 ++++--- cpp/src/io/csv/writer_impl.cu | 14 ++-- cpp/src/io/cudftable.cpp | 9 ++- cpp/src/io/fst/logical_stack.cuh | 26 +++--- cpp/src/io/fst/lookup_tables.cuh | 12 +-- cpp/src/io/functions.cpp | 57 +++++++------ cpp/src/io/json/column_tree_construction.cu | 8 +- cpp/src/io/json/host_tree_algorithms.cu | 30 +++---- cpp/src/io/json/json_column.cu | 14 ++-- cpp/src/io/json/json_normalization.cu | 14 ++-- cpp/src/io/json/json_tree.cu | 44 +++++----- cpp/src/io/json/nested_json.hpp | 30 +++---- cpp/src/io/json/nested_json_gpu.cu | 16 ++-- cpp/src/io/json/parser_features.cpp | 8 +- cpp/src/io/json/process_tokens.cu | 2 +- cpp/src/io/json/read_json.cu | 28 +++---- cpp/src/io/json/read_json.hpp | 8 +- cpp/src/io/json/write_json.cpp | 24 +++--- cpp/src/io/json/write_json.cu | 10 +-- cpp/src/io/json/write_json.hpp | 19 ++--- cpp/src/io/orc/aggregate_orc_metadata.cpp | 8 +- cpp/src/io/orc/aggregate_orc_metadata.hpp | 6 +- cpp/src/io/orc/dict_enc.cu | 21 +++-- cpp/src/io/orc/orc.cpp | 4 +- cpp/src/io/orc/orc.hpp | 4 +- cpp/src/io/orc/orc_gpu.hpp | 43 +++++----- cpp/src/io/orc/reader_impl.cu | 14 ++-- cpp/src/io/orc/reader_impl.hpp | 16 ++-- cpp/src/io/orc/reader_impl_chunking.cu | 4 +- cpp/src/io/orc/reader_impl_decode.cu | 18 ++--- cpp/src/io/orc/reader_impl_helpers.cpp | 6 +- cpp/src/io/orc/reader_impl_helpers.hpp | 8 +- cpp/src/io/orc/stats_enc.cu | 15 ++-- cpp/src/io/orc/stripe_data.cu | 11 ++- cpp/src/io/orc/stripe_enc.cu | 40 +++++----- cpp/src/io/orc/stripe_init.cu | 23 +++--- cpp/src/io/orc/writer_impl.cu | 65 +++++++-------- cpp/src/io/orc/writer_impl.hpp | 14 ++-- cpp/src/io/parquet/bloom_filter_reader.cu | 12 +-- cpp/src/io/parquet/chunk_dict.cu | 18 ++--- cpp/src/io/parquet/decode_fixed.cu | 34 ++++---- cpp/src/io/parquet/decode_preprocess.cu | 12 +-- cpp/src/io/parquet/decode_pruned_pages.cu | 4 +- cpp/src/io/parquet/error.hpp | 10 +-- .../parquet/experimental/deletion_vectors.cu | 14 ++-- .../experimental/deletion_vectors_helpers.cu | 16 ++-- .../experimental/deletion_vectors_helpers.hpp | 16 ++-- .../experimental/dictionary_page_filter.cu | 80 +++++++++---------- .../io/parquet/experimental/hybrid_scan.cpp | 22 ++--- .../experimental/hybrid_scan_chunking.cu | 2 +- .../experimental/hybrid_scan_helpers.cpp | 8 +- .../experimental/hybrid_scan_helpers.hpp | 16 ++-- .../parquet/experimental/hybrid_scan_impl.cpp | 26 +++--- .../parquet/experimental/hybrid_scan_impl.hpp | 35 ++++---- .../experimental/hybrid_scan_multifile.cpp | 20 ++--- .../experimental/hybrid_scan_preprocess.cu | 17 ++-- .../parquet/experimental/page_index_filter.cu | 30 +++---- .../experimental/page_index_filter_utils.cu | 6 +- .../experimental/page_index_filter_utils.hpp | 7 +- .../parquet/experimental/variant_extract.cu | 20 ++--- .../parquet/expression_transform_helpers.cpp | 2 +- .../parquet/expression_transform_helpers.hpp | 4 +- .../io/parquet/io_utils/parquet_io_utils.cpp | 20 ++--- cpp/src/io/parquet/page_data.cu | 16 ++-- cpp/src/io/parquet/page_delta_decode.cu | 18 ++--- cpp/src/io/parquet/page_enc.cu | 58 +++++++------- cpp/src/io/parquet/page_hdr.cu | 16 ++-- cpp/src/io/parquet/page_string_decode.cu | 24 +++--- cpp/src/io/parquet/parquet_gpu.cuh | 8 +- cpp/src/io/parquet/parquet_gpu.hpp | 56 ++++++------- cpp/src/io/parquet/predicate_pushdown.cpp | 6 +- cpp/src/io/parquet/reader.cpp | 6 +- cpp/src/io/parquet/reader_impl.cpp | 6 +- cpp/src/io/parquet/reader_impl.hpp | 12 +-- cpp/src/io/parquet/reader_impl_chunking.cu | 4 +- cpp/src/io/parquet/reader_impl_chunking.hpp | 6 +- .../io/parquet/reader_impl_chunking_utils.cu | 24 +++--- .../io/parquet/reader_impl_chunking_utils.cuh | 25 +++--- .../io/parquet/reader_impl_dict_transcode.cu | 2 +- cpp/src/io/parquet/reader_impl_helpers.cpp | 2 +- cpp/src/io/parquet/reader_impl_helpers.hpp | 10 +-- cpp/src/io/parquet/reader_impl_preprocess.cu | 16 ++-- .../parquet/reader_impl_preprocess_utils.cu | 26 +++--- .../parquet/reader_impl_preprocess_utils.cuh | 19 +++-- cpp/src/io/parquet/stats_filter_helpers.cpp | 4 +- cpp/src/io/parquet/stats_filter_helpers.hpp | 14 ++-- cpp/src/io/parquet/writer_impl.cu | 52 ++++++------ cpp/src/io/parquet/writer_impl.hpp | 10 +-- cpp/src/io/parquet/writer_impl_helpers.cpp | 4 +- cpp/src/io/parquet/writer_impl_helpers.hpp | 4 +- cpp/src/io/statistics/column_statistics.cuh | 8 +- .../io/statistics/orc_column_statistics.cu | 6 +- .../statistics/parquet_column_statistics.cu | 6 +- cpp/src/io/statistics/statistics.cuh | 2 +- cpp/src/io/text/bgzip_data_chunk_source.cu | 16 ++-- .../io/text/data_chunk_source_factories.cpp | 14 ++-- cpp/src/io/text/multibyte_split.cu | 10 +-- cpp/src/io/utilities/column_buffer.cpp | 28 +++---- cpp/src/io/utilities/column_buffer.hpp | 42 +++++----- cpp/src/io/utilities/column_buffer_strings.cu | 2 +- cpp/src/io/utilities/column_utils.cuh | 6 +- cpp/src/io/utilities/data_casting.cu | 14 ++-- cpp/src/io/utilities/data_sink.cpp | 25 +++--- cpp/src/io/utilities/datasource.cpp | 37 +++------ cpp/src/io/utilities/hostdevice_span.hpp | 16 ++-- cpp/src/io/utilities/hostdevice_vector.hpp | 31 ++++--- cpp/src/io/utilities/output_builder.cuh | 18 ++--- cpp/src/io/utilities/string_parsing.hpp | 7 +- cpp/src/io/utilities/trie.cu | 4 +- cpp/src/io/utilities/trie.hpp | 6 +- cpp/src/io/utilities/type_inference.cu | 8 +- .../combine/concatenate_list_elements.cu | 14 ++-- cpp/src/lists/combine/concatenate_rows.cu | 10 +-- cpp/src/lists/contains.cu | 26 +++--- cpp/src/lists/copying/concatenate.cu | 6 +- cpp/src/lists/copying/copying.cu | 4 +- cpp/src/lists/copying/gather.cu | 7 +- cpp/src/lists/copying/scatter_helper.cu | 12 +-- cpp/src/lists/copying/segmented_gather.cu | 9 +-- cpp/src/lists/count_elements.cu | 8 +- cpp/src/lists/dremel.cu | 12 +-- cpp/src/lists/explode.cu | 28 +++---- cpp/src/lists/extract.cu | 18 ++--- cpp/src/lists/interleave_columns.cu | 14 ++-- cpp/src/lists/lists_column_factories.cu | 6 +- cpp/src/lists/lists_column_view.cu | 4 +- cpp/src/lists/reverse.cu | 6 +- cpp/src/lists/segmented_sort.cu | 12 +-- cpp/src/lists/sequences.cu | 16 ++-- cpp/src/lists/set_operations.cu | 18 ++--- .../stream_compaction/apply_boolean_mask.cu | 8 +- cpp/src/lists/stream_compaction/distinct.cu | 8 +- cpp/src/lists/utilities.cu | 6 +- cpp/src/lists/utilities.hpp | 10 +-- cpp/src/strings/attributes.cu | 22 ++--- cpp/src/strings/capitalize.cu | 25 +++--- cpp/src/strings/case.cu | 26 +++--- cpp/src/strings/char_types/char_types.cu | 13 ++- cpp/src/strings/combine/concatenate.cu | 12 +-- cpp/src/strings/combine/join.cu | 6 +- cpp/src/strings/combine/join_list_elements.cu | 12 +-- cpp/src/strings/contains.cu | 16 ++-- cpp/src/strings/convert/convert_booleans.cu | 12 +-- cpp/src/strings/convert/convert_datetime.cu | 22 ++--- cpp/src/strings/convert/convert_durations.cu | 20 ++--- .../strings/convert/convert_fixed_point.cu | 28 +++---- cpp/src/strings/convert/convert_floats.cu | 24 +++--- cpp/src/strings/convert/convert_hex.cu | 20 ++--- cpp/src/strings/convert/convert_integers.cu | 32 ++++---- cpp/src/strings/convert/convert_ipv4.cu | 17 ++-- cpp/src/strings/convert/convert_lists.cu | 6 +- cpp/src/strings/convert/convert_urls.cu | 16 ++-- cpp/src/strings/convert/int_cast.cu | 16 ++-- cpp/src/strings/copying/concatenate.cu | 22 ++--- cpp/src/strings/copying/copy_range.cu | 4 +- cpp/src/strings/copying/copying.cu | 6 +- cpp/src/strings/copying/shift.cu | 6 +- cpp/src/strings/count_matches.cu | 8 +- cpp/src/strings/count_matches.hpp | 6 +- cpp/src/strings/extract/extract.cu | 11 ++- cpp/src/strings/extract/extract_all.cu | 6 +- cpp/src/strings/filling/fill.cu | 7 +- cpp/src/strings/filter_chars.cu | 8 +- cpp/src/strings/like.cu | 18 ++--- cpp/src/strings/merge/merge.cu | 6 +- cpp/src/strings/padding.cu | 15 ++-- cpp/src/strings/positions.cu | 6 +- cpp/src/strings/positions.hpp | 6 +- cpp/src/strings/regex/gkexec.cpp | 7 +- cpp/src/strings/regex/glushkov.cuh | 5 +- cpp/src/strings/regex/regex.cuh | 5 +- cpp/src/strings/regex/regex_program_impl.h | 6 +- cpp/src/strings/regex/regexec.cpp | 7 +- cpp/src/strings/regex/utilities.cuh | 16 ++-- cpp/src/strings/repeat_strings.cu | 19 +++-- cpp/src/strings/replace/backref_re.cu | 8 +- cpp/src/strings/replace/backref_re.cuh | 5 +- cpp/src/strings/replace/find_replace.cu | 7 +- cpp/src/strings/replace/multi.cu | 12 +-- cpp/src/strings/replace/replace.cu | 16 ++-- cpp/src/strings/replace/replace_nulls.cu | 6 +- cpp/src/strings/replace/replace_re.cu | 6 +- cpp/src/strings/replace/replace_slice.cu | 9 +-- cpp/src/strings/reverse.cu | 8 +- cpp/src/strings/scan/scan_inclusive.cu | 10 +-- cpp/src/strings/search/contains_multiple.cu | 28 +++---- cpp/src/strings/search/count.cu | 6 +- cpp/src/strings/search/find.cu | 54 ++++++------- cpp/src/strings/search/find_instance.cu | 14 ++-- cpp/src/strings/search/find_multiple.cu | 6 +- cpp/src/strings/search/findall.cu | 11 +-- cpp/src/strings/slice.cu | 19 +++-- cpp/src/strings/split/partition.cu | 12 +-- cpp/src/strings/split/split.cu | 16 ++-- cpp/src/strings/split/split.cuh | 8 +- cpp/src/strings/split/split_part.cu | 10 +-- cpp/src/strings/split/split_re.cu | 27 +++---- cpp/src/strings/split/split_record.cu | 15 ++-- cpp/src/strings/strings_column_factories.cu | 18 ++--- cpp/src/strings/strings_column_view.cpp | 11 ++- cpp/src/strings/strings_scalar_factories.cpp | 6 +- cpp/src/strings/strip.cu | 8 +- cpp/src/strings/translate.cu | 8 +- cpp/src/strings/utilities.cu | 30 +++---- cpp/src/strings/wrap.cu | 8 +- cpp/src/structs/copying/concatenate.cu | 6 +- cpp/src/structs/scan/scan_inclusive.cu | 10 +-- cpp/src/structs/structs_column_factories.cu | 8 +- cpp/src/structs/structs_column_view.cpp | 4 +- cpp/src/structs/utilities.cu | 26 +++--- cpp/src/text/bpe/byte_pair_encoding.cu | 10 +-- cpp/src/text/bpe/byte_pair_encoding.cuh | 4 +- cpp/src/text/bpe/load_merge_pairs.cu | 28 +++---- cpp/src/text/deduplicate.cu | 26 +++--- cpp/src/text/detokenize.cu | 10 +-- cpp/src/text/edit_distance.cu | 10 +-- cpp/src/text/generate_ngrams.cu | 20 ++--- cpp/src/text/jaccard.cu | 28 +++---- cpp/src/text/minhash.cu | 65 +++++++-------- cpp/src/text/ngrams_tokenize.cu | 6 +- cpp/src/text/normalize.cu | 37 +++++---- cpp/src/text/normalize.cuh | 9 ++- cpp/src/text/replace.cu | 17 ++-- cpp/src/text/stemmer.cu | 18 ++--- cpp/src/text/tokenize.cu | 26 +++--- cpp/src/text/vocabulary_tokenize.cu | 24 +++--- cpp/src/text/wordpiece_tokenize.cu | 36 ++++----- cpp/tests/io/comp/comp_test.cpp | 4 +- cpp/tests/io/cudftable_test.cpp | 4 +- .../io/experimental/hybrid_scan_common.cpp | 14 ++-- .../io/experimental/hybrid_scan_common.hpp | 13 +-- .../io/experimental/hybrid_scan_composer.cpp | 10 +-- .../io/experimental/hybrid_scan_composer.hpp | 10 +-- .../hybrid_scan_multifile_composer.cpp | 8 +- .../hybrid_scan_multifile_composer.hpp | 8 +- .../hybrid_scan_multifile_filters_test.cpp | 4 +- .../io/experimental/hybrid_scan_test.cpp | 4 +- cpp/tests/io/fst/fst_test.cu | 13 +-- cpp/tests/io/fst/logical_stack_test.cu | 7 +- cpp/tests/io/io_test_utils.hpp | 12 +-- cpp/tests/io/json/json_tree.cpp | 12 +-- cpp/tests/io/json/json_tree_csr.cu | 18 ++--- cpp/tests/io/json/json_utils.cu | 10 +-- cpp/tests/io/json/json_utils.hpp | 9 ++- .../json_whitespace_normalization_test.cpp | 5 +- cpp/tests/io/json/nested_json_test.cpp | 22 ++--- cpp/tests/io/orc_chunked_reader_test.cu | 2 +- cpp/tests/io/parquet_chunked_reader_test.cu | 4 +- .../io/parquet_deletion_vectors_test.cpp | 11 ++- cpp/tests/io/parquet_writer_test.cpp | 16 ++-- cpp/tests/io/text/data_chunk_source_test.cpp | 16 ++-- cpp/tests/io/type_inference_test.cpp | 2 +- 397 files changed, 2488 insertions(+), 2532 deletions(-) diff --git a/cpp/include/cudf/column/column_factories.hpp b/cpp/include/cudf/column/column_factories.hpp index 24b3e5ebff37..55b86ec34ec4 100644 --- a/cpp/include/cudf/column/column_factories.hpp +++ b/cpp/include/cudf/column/column_factories.hpp @@ -11,8 +11,6 @@ #include #include -#include - #include #include @@ -368,7 +366,7 @@ std::unique_ptr make_fixed_width_column( */ std::unique_ptr make_strings_column( cudf::device_span const> strings, - 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()); /** @@ -388,7 +386,7 @@ std::unique_ptr make_strings_column( */ std::vector> make_strings_column_batch( std::vector const>> const& input, - 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()); /** @@ -420,7 +418,7 @@ std::vector> make_strings_column_batch( std::unique_ptr make_strings_column( cudf::device_span string_views, string_view const null_placeholder, - 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()); /** @@ -543,7 +541,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 = cudf::get_default_stream(), + cuda::stream_ref stream = cudf::get_default_stream(), rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()); /** @@ -577,7 +575,7 @@ std::unique_ptr create_structs_hierarchy( std::vector>&& child_columns, size_type null_count, rmm::device_buffer&& null_mask, - 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()); /** diff --git a/cpp/include/cudf/detail/structs/utilities.hpp b/cpp/include/cudf/detail/structs/utilities.hpp index a8302b984d21..088f8c6916a1 100644 --- a/cpp/include/cudf/detail/structs/utilities.hpp +++ b/cpp/include/cudf/detail/structs/utilities.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 */ #pragma once @@ -11,9 +11,10 @@ #include #include -#include #include +#include + namespace CUDF_EXPORT cudf { namespace structs::detail { @@ -71,7 +72,7 @@ struct temporary_nullable_data { * @return New column with concatenated results. */ std::vector> extract_ordered_struct_children( - host_span struct_cols, rmm::cuda_stream_view stream); + host_span struct_cols, cuda::stream_ref stream); /** * @brief Check whether the specified column is of type LIST, or any LISTs in its descendent @@ -166,7 +167,7 @@ class flattened_table { std::vector const& column_order, std::vector const& null_precedence, cudf::structs::detail::column_nullability nullability, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr); /** @@ -188,7 +189,7 @@ class flattened_table { bitmask_type const* null_mask, cudf::size_type null_count, std::unique_ptr&& input, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr); /** @@ -211,7 +212,7 @@ class flattened_table { [[nodiscard]] std::vector> superimpose_and_sanitize_nulls( host_span null_masks, std::vector> inputs, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr); /** @@ -232,7 +233,7 @@ class flattened_table { */ [[nodiscard]] std::vector> enforce_null_consistency( std::vector> columns, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr); /** @@ -258,7 +259,7 @@ class flattened_table { * to be kept alive. */ [[nodiscard]] std::pair push_down_nulls( - column_view const& input, rmm::cuda_stream_view stream, rmm::device_async_resource_ref mr); + column_view const& input, cuda::stream_ref stream, rmm::device_async_resource_ref mr); /** * @brief Push down nulls from columns of the input table into their children columns, using @@ -285,7 +286,7 @@ class flattened_table { * to be kept alive. */ [[nodiscard]] std::pair push_down_nulls( - table_view const& input, rmm::cuda_stream_view stream, rmm::device_async_resource_ref mr); + table_view const& input, cuda::stream_ref stream, rmm::device_async_resource_ref mr); /** * @brief Checks if a column or any of its children is a struct column with structs that are null. diff --git a/cpp/include/cudf/io/avro.hpp b/cpp/include/cudf/io/avro.hpp index 47cfbf249b94..28c332b512b8 100644 --- a/cpp/include/cudf/io/avro.hpp +++ b/cpp/include/cudf/io/avro.hpp @@ -216,7 +216,7 @@ class avro_reader_options_builder { */ table_with_metadata read_avro( avro_reader_options const& options, - 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()); /** @} */ // end of group diff --git a/cpp/include/cudf/io/csv.hpp b/cpp/include/cudf/io/csv.hpp index 7c3ab615786a..e8bf978f2b64 100644 --- a/cpp/include/cudf/io/csv.hpp +++ b/cpp/include/cudf/io/csv.hpp @@ -1349,7 +1349,7 @@ class csv_reader_options_builder { */ table_with_metadata read_csv( csv_reader_options options, - 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()); /** @} */ // end of group @@ -1753,7 +1753,7 @@ class csv_writer_options_builder { * @param stream CUDA stream used for device memory operations and kernel launches */ void write_csv(csv_writer_options const& options, - rmm::cuda_stream_view stream = cudf::get_default_stream()); + cuda::stream_ref stream = cudf::get_default_stream()); /// @cond struct is_supported_csv_write_type_fn { diff --git a/cpp/include/cudf/io/data_sink.hpp b/cpp/include/cudf/io/data_sink.hpp index 4922653f55f2..cd31a92bf97f 100644 --- a/cpp/include/cudf/io/data_sink.hpp +++ b/cpp/include/cudf/io/data_sink.hpp @@ -8,7 +8,7 @@ #include #include -#include +#include #include #include @@ -153,7 +153,7 @@ class data_sink { * @param size Number of bytes to write * @param stream CUDA stream to use */ - virtual void device_write(void const* gpu_data, size_t size, rmm::cuda_stream_view stream) + virtual void device_write(void const* gpu_data, size_t size, cuda::stream_ref stream) { CUDF_FAIL("data_sink classes that support device_write must override it."); } @@ -182,7 +182,7 @@ class data_sink { */ virtual std::future device_write_async(void const* gpu_data, size_t size, - rmm::cuda_stream_view stream) + cuda::stream_ref stream) { CUDF_FAIL("data_sink classes that support device_write_async must override it."); } diff --git a/cpp/include/cudf/io/datasource.hpp b/cpp/include/cudf/io/datasource.hpp index 67c44cee48aa..1c205d996837 100644 --- a/cpp/include/cudf/io/datasource.hpp +++ b/cpp/include/cudf/io/datasource.hpp @@ -10,7 +10,7 @@ #include #include -#include +#include #include #include @@ -254,7 +254,7 @@ class datasource { */ virtual std::unique_ptr device_read(size_t offset, size_t size, - rmm::cuda_stream_view stream) + cuda::stream_ref stream) { CUDF_FAIL("datasource classes that support device_read must override it."); } @@ -276,7 +276,7 @@ class datasource { * * @return The number of bytes read (can be smaller than size) */ - virtual size_t device_read(size_t offset, size_t size, uint8_t* dst, rmm::cuda_stream_view stream) + virtual size_t device_read(size_t offset, size_t size, uint8_t* dst, cuda::stream_ref stream) { CUDF_FAIL("datasource classes that support device_read must override it."); } @@ -307,7 +307,7 @@ class datasource { virtual std::future device_read_async(size_t offset, size_t size, uint8_t* dst, - rmm::cuda_stream_view stream) + cuda::stream_ref stream) { CUDF_FAIL("datasource classes that support device_read_async must override it."); } diff --git a/cpp/include/cudf/io/detail/avro.hpp b/cpp/include/cudf/io/detail/avro.hpp index 7db2b498ec5d..10a40078c150 100644 --- a/cpp/include/cudf/io/detail/avro.hpp +++ b/cpp/include/cudf/io/detail/avro.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 */ @@ -9,7 +9,7 @@ #include #include -#include +#include namespace cudf { namespace io::detail::avro { @@ -26,7 +26,7 @@ namespace io::detail::avro { */ table_with_metadata read_avro(std::unique_ptr&& source, avro_reader_options const& options, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr); } // namespace io::detail::avro diff --git a/cpp/include/cudf/io/detail/codec.hpp b/cpp/include/cudf/io/detail/codec.hpp index 11fb784b279a..24c5460768cd 100644 --- a/cpp/include/cudf/io/detail/codec.hpp +++ b/cpp/include/cudf/io/detail/codec.hpp @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: Copyright (c) 2025, NVIDIA CORPORATION. + * SPDX-FileCopyrightText: Copyright (c) 2025-2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved. * SPDX-License-Identifier: Apache-2.0 */ @@ -13,7 +13,7 @@ #include #include -#include +#include #include #include @@ -114,7 +114,7 @@ void compress(compression_type compression, device_span const> inputs, device_span const> outputs, device_span results, - rmm::cuda_stream_view stream); + cuda::stream_ref stream); /** * @brief Decompresses a host memory buffer. @@ -155,7 +155,7 @@ void decompress(compression_type compression, device_span results, size_t max_uncomp_chunk_size, size_t max_total_uncomp_size, - rmm::cuda_stream_view stream); + cuda::stream_ref stream); /** @} */ // end of group } // namespace io::detail diff --git a/cpp/include/cudf/io/detail/csv.hpp b/cpp/include/cudf/io/detail/csv.hpp index 397ff628e7df..1d1182528e60 100644 --- a/cpp/include/cudf/io/detail/csv.hpp +++ b/cpp/include/cudf/io/detail/csv.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 */ @@ -8,7 +8,7 @@ #include #include -#include +#include namespace cudf { namespace io::detail::csv { @@ -25,7 +25,7 @@ namespace io::detail::csv { */ table_with_metadata read_csv(std::unique_ptr&& source, csv_reader_options const& options, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr); /** @@ -41,7 +41,7 @@ void write_csv(data_sink* sink, table_view const& table, host_span column_names, csv_writer_options const& options, - rmm::cuda_stream_view stream); + cuda::stream_ref stream); } // namespace io::detail::csv } // namespace cudf diff --git a/cpp/include/cudf/io/detail/json.hpp b/cpp/include/cudf/io/detail/json.hpp index fa747bf1cbc1..1156a2d64933 100644 --- a/cpp/include/cudf/io/detail/json.hpp +++ b/cpp/include/cudf/io/detail/json.hpp @@ -10,7 +10,7 @@ #include #include -#include +#include namespace CUDF_EXPORT cudf { namespace io::json::detail { @@ -27,7 +27,7 @@ namespace io::json::detail { */ table_with_metadata read_json(host_span> sources, json_reader_options const& options, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr); /** @@ -42,7 +42,7 @@ table_with_metadata read_json(host_span> sources, */ json_reader_result read_json_with_diagnostics(host_span> sources, json_reader_options const& options, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr); /** @@ -58,7 +58,7 @@ json_reader_result read_json_with_diagnostics(host_span> sources, json_reader_options const& options, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr); /** @@ -72,7 +72,7 @@ json_reader_result_with_row_diagnostics read_json_with_row_diagnostics( void write_json(data_sink* sink, table_view const& table, json_writer_options const& options, - rmm::cuda_stream_view stream); + cuda::stream_ref stream); /** * @brief Normalize single quotes to double quotes using FST @@ -84,7 +84,7 @@ void write_json(data_sink* sink, */ void normalize_single_quotes(datasource::owning_buffer& indata, char delimiter, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr); /** @@ -104,7 +104,7 @@ std:: normalize_whitespace(device_span d_input, device_span col_offsets, device_span col_lengths, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr); } // namespace io::json::detail diff --git a/cpp/include/cudf/io/detail/orc.hpp b/cpp/include/cudf/io/detail/orc.hpp index 8a1dedf361d6..b2498a11507e 100644 --- a/cpp/include/cudf/io/detail/orc.hpp +++ b/cpp/include/cudf/io/detail/orc.hpp @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: Copyright (c) 2020-2024, NVIDIA CORPORATION. + * SPDX-FileCopyrightText: Copyright (c) 2020-2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved. * SPDX-License-Identifier: Apache-2.0 */ @@ -13,7 +13,7 @@ #include #include -#include +#include #include #include @@ -50,7 +50,7 @@ class reader { */ explicit reader(std::vector>&& sources, orc_reader_options const& options, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr); /** @@ -76,7 +76,7 @@ class chunked_reader { public: /** * @copydoc cudf::io::chunked_orc_reader::chunked_orc_reader(std::size_t, std::size_t, size_type, - * orc_reader_options const&, rmm::cuda_stream_view, rmm::device_async_resource_ref) + * orc_reader_options const&, cuda::stream_ref, rmm::device_async_resource_ref) * * @param sources Input `datasource` objects to read the dataset from */ @@ -85,11 +85,11 @@ class chunked_reader { size_type output_row_granularity, std::vector>&& sources, orc_reader_options const& options, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr); /** * @copydoc cudf::io::chunked_orc_reader::chunked_orc_reader(std::size_t, std::size_t, - * orc_reader_options const&, rmm::cuda_stream_view, rmm::device_async_resource_ref) + * orc_reader_options const&, cuda::stream_ref, rmm::device_async_resource_ref) * * @param sources Input `datasource` objects to read the dataset from */ @@ -97,7 +97,7 @@ class chunked_reader { std::size_t pass_read_limit, std::vector>&& sources, orc_reader_options const& options, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr); /** @@ -140,7 +140,7 @@ class writer { explicit writer(std::unique_ptr sink, orc_writer_options const& options, cudf::io::detail::single_write_mode mode, - rmm::cuda_stream_view stream); + cuda::stream_ref stream); /** * @brief Constructor with chunked writer options. @@ -153,7 +153,7 @@ class writer { explicit writer(std::unique_ptr sink, chunked_orc_writer_options const& options, cudf::io::detail::single_write_mode mode, - rmm::cuda_stream_view stream); + cuda::stream_ref stream); /** * @brief Destructor explicitly declared to avoid inlining in header diff --git a/cpp/include/cudf/io/detail/parquet.hpp b/cpp/include/cudf/io/detail/parquet.hpp index 3ec2090ad032..826f9b2bb605 100644 --- a/cpp/include/cudf/io/detail/parquet.hpp +++ b/cpp/include/cudf/io/detail/parquet.hpp @@ -16,7 +16,7 @@ #include #include -#include +#include #include #include @@ -60,7 +60,7 @@ class reader { explicit reader(std::vector>&& sources, std::vector&& parquet_metadatas, parquet_reader_options const& options, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr); /** @@ -147,7 +147,7 @@ class chunked_reader : private reader { std::vector>&& sources, std::vector&& parquet_metadatas, parquet_reader_options const& options, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr); /** @@ -190,7 +190,7 @@ class writer { explicit writer(std::vector> sinks, parquet_writer_options const& options, cudf::io::detail::single_write_mode mode, - rmm::cuda_stream_view stream); + cuda::stream_ref stream); /** * @brief Constructor for writer to handle chunked parquet options. @@ -205,7 +205,7 @@ class writer { explicit writer(std::vector> sinks, chunked_parquet_writer_options const& options, cudf::io::detail::single_write_mode mode, - rmm::cuda_stream_view stream); + cuda::stream_ref stream); /** * @brief Destructor explicitly-declared to avoid inlined in header diff --git a/cpp/include/cudf/io/detail/tokenize_json.hpp b/cpp/include/cudf/io/detail/tokenize_json.hpp index ab0900fd9147..dd9fc410cedb 100644 --- a/cpp/include/cudf/io/detail/tokenize_json.hpp +++ b/cpp/include/cudf/io/detail/tokenize_json.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 */ @@ -10,9 +10,10 @@ #include #include -#include #include +#include + namespace cudf::io::json { /// Type used to represent the atomic symbol type used within the finite-state machine @@ -123,7 +124,7 @@ namespace CUDF_EXPORT detail { std::pair, rmm::device_uvector> get_token_stream( device_span json_in, cudf::io::json_reader_options const& options, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr); } // namespace CUDF_EXPORT detail diff --git a/cpp/include/cudf/io/experimental/cudftable.hpp b/cpp/include/cudf/io/experimental/cudftable.hpp index 0fe71e0abcad..dad8d3e59363 100644 --- a/cpp/include/cudf/io/experimental/cudftable.hpp +++ b/cpp/include/cudf/io/experimental/cudftable.hpp @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: Copyright (c) 2025, NVIDIA CORPORATION. + * SPDX-FileCopyrightText: Copyright (c) 2025-2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved. * SPDX-License-Identifier: Apache-2.0 */ @@ -12,7 +12,7 @@ #include #include -#include +#include #include @@ -200,7 +200,7 @@ class cudftable_reader_options_builder { * @param stream CUDA stream used for device memory operations and kernel launches */ void write_cudftable(cudftable_writer_options const& options, - rmm::cuda_stream_view stream = cudf::get_default_stream()); + cuda::stream_ref stream = cudf::get_default_stream()); /** @} */ // end of group /** @@ -229,7 +229,7 @@ void write_cudftable(cudftable_writer_options const& options, */ packed_table read_cudftable( cudftable_reader_options const& options, - 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()); /** @} */ // end of group diff --git a/cpp/include/cudf/io/experimental/deletion_vectors.hpp b/cpp/include/cudf/io/experimental/deletion_vectors.hpp index fbab01669b67..d95030fc7966 100644 --- a/cpp/include/cudf/io/experimental/deletion_vectors.hpp +++ b/cpp/include/cudf/io/experimental/deletion_vectors.hpp @@ -84,7 +84,7 @@ class chunked_parquet_reader { std::size_t chunk_read_limit, parquet_reader_options const& options, deletion_vector_info const& deletion_vector_info, - 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()); /** @@ -112,7 +112,7 @@ class chunked_parquet_reader { std::size_t pass_read_limit, parquet_reader_options const& options, deletion_vector_info const& deletion_vector_info, - 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()); /** @@ -151,7 +151,7 @@ class chunked_parquet_reader { size_t _start_row; bool _is_unspecified_row_group_data; bool _are_retentions; - rmm::cuda_stream_view _stream; + cuda::stream_ref _stream; rmm::device_async_resource_ref _mr; rmm::device_async_resource_ref _table_mr; }; @@ -181,7 +181,7 @@ class chunked_parquet_reader { table_with_metadata read_parquet( parquet_reader_options const& options, deletion_vector_info const& deletion_vector_info, - 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()); /** @@ -196,7 +196,7 @@ table_with_metadata read_parquet( [[nodiscard]] size_t compute_num_deleted_rows( deletion_vector_info const& deletion_vector_info, cudf::size_type max_chunk_rows = std::numeric_limits::max(), - rmm::cuda_stream_view stream = cudf::get_default_stream()); + cuda::stream_ref stream = cudf::get_default_stream()); /** @} */ // end of group diff --git a/cpp/include/cudf/io/experimental/hybrid_scan.hpp b/cpp/include/cudf/io/experimental/hybrid_scan.hpp index 1d1c970a0b0f..74867200c517 100644 --- a/cpp/include/cudf/io/experimental/hybrid_scan.hpp +++ b/cpp/include/cudf/io/experimental/hybrid_scan.hpp @@ -12,9 +12,10 @@ #include #include -#include #include +#include + #include #include #include @@ -384,7 +385,7 @@ class hybrid_scan_reader { [[nodiscard]] std::vector filter_row_groups_with_stats( std::span row_group_indices, parquet_reader_options const& options, - rmm::cuda_stream_view stream) const; + cuda::stream_ref stream) const; /** * @brief Get byte ranges of bloom filters and dictionary pages (secondary filters) for row group @@ -417,7 +418,7 @@ class hybrid_scan_reader { std::span const> dictionary_page_data, std::span row_group_indices, parquet_reader_options const& options, - rmm::cuda_stream_view stream) const; + cuda::stream_ref stream) const; /** * @brief Filter the row groups using column chunk bloom filters @@ -435,7 +436,7 @@ class hybrid_scan_reader { std::span const> bloom_filter_data, std::span row_group_indices, parquet_reader_options const& options, - rmm::cuda_stream_view stream) const; + cuda::stream_ref stream) const; /** * @brief Builds a boolean (survival) column of size equal to the total number of rows in the row @@ -449,7 +450,7 @@ class hybrid_scan_reader { */ [[nodiscard]] std::unique_ptr build_all_true_row_mask( std::span row_group_indices, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) const; /** @@ -466,7 +467,7 @@ class hybrid_scan_reader { [[nodiscard]] std::unique_ptr build_row_mask_with_page_index_stats( std::span row_group_indices, parquet_reader_options const& options, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) const; /** @@ -498,7 +499,7 @@ class hybrid_scan_reader { cudf::mutable_column_view& row_mask, use_data_page_mask mask_data_pages, parquet_reader_options const& options, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) const; /** @@ -529,7 +530,7 @@ class hybrid_scan_reader { cudf::column_view const& row_mask, use_data_page_mask mask_data_pages, parquet_reader_options const& options, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) const; /** @@ -556,7 +557,7 @@ class hybrid_scan_reader { std::span row_group_indices, std::span const> column_chunk_data, parquet_reader_options const& options, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) const; /** * @brief Setup chunking information for filter columns and preprocess the input data pages @@ -581,7 +582,7 @@ class hybrid_scan_reader { use_data_page_mask mask_data_pages, std::span const> column_chunk_data, parquet_reader_options const& options, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) const; /** @@ -618,7 +619,7 @@ class hybrid_scan_reader { use_data_page_mask mask_data_pages, std::span const> column_chunk_data, parquet_reader_options const& options, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) const; /** @@ -652,7 +653,7 @@ class hybrid_scan_reader { std::span row_group_indices, std::span const> column_chunk_data, parquet_reader_options const& options, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) const; /** diff --git a/cpp/include/cudf/io/experimental/hybrid_scan_multifile.hpp b/cpp/include/cudf/io/experimental/hybrid_scan_multifile.hpp index a06383ba3c6b..73ef5406fd3f 100644 --- a/cpp/include/cudf/io/experimental/hybrid_scan_multifile.hpp +++ b/cpp/include/cudf/io/experimental/hybrid_scan_multifile.hpp @@ -13,9 +13,10 @@ #include #include -#include #include +#include + #include #include @@ -153,7 +154,7 @@ class hybrid_scan_multifile { [[nodiscard]] std::vector> filter_row_groups_with_stats( cudf::host_span const> row_group_indices, parquet_reader_options const& options, - rmm::cuda_stream_view stream) const; + cuda::stream_ref stream) const; /** * @brief Get byte ranges of bloom filters and dictionary pages (secondary filters) for row group @@ -182,7 +183,7 @@ class hybrid_scan_multifile { */ [[nodiscard]] std::unique_ptr build_all_true_row_mask( cudf::host_span const> row_group_indices, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) const; /** @@ -199,7 +200,7 @@ class hybrid_scan_multifile { [[nodiscard]] std::unique_ptr build_row_mask_with_page_index_stats( cudf::host_span const> row_group_indices, parquet_reader_options const& options, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) const; /** @@ -240,7 +241,7 @@ class hybrid_scan_multifile { cudf::mutable_column_view& row_mask, use_data_page_mask mask_data_pages, parquet_reader_options const& options, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) const; /** @@ -280,7 +281,7 @@ class hybrid_scan_multifile { cudf::column_view const& row_mask, use_data_page_mask mask_data_pages, parquet_reader_options const& options, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) const; /** @@ -310,7 +311,7 @@ class hybrid_scan_multifile { cudf::host_span const> row_group_indices, cudf::host_span const> column_chunk_data, parquet_reader_options const& options, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) const; /** @@ -338,7 +339,7 @@ class hybrid_scan_multifile { use_data_page_mask mask_data_pages, cudf::host_span const> column_chunk_data, parquet_reader_options const& options, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) const; /** @@ -380,7 +381,7 @@ class hybrid_scan_multifile { use_data_page_mask mask_data_pages, cudf::host_span const> column_chunk_data, parquet_reader_options const& options, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) const; /** @@ -416,7 +417,7 @@ class hybrid_scan_multifile { cudf::host_span const> row_group_indices, cudf::host_span const> column_chunk_data, parquet_reader_options const& options, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) const; /** @@ -481,7 +482,7 @@ class hybrid_scan_multifile { cudf::host_span const> dictionary_page_data, cudf::host_span const> row_group_indices, parquet_reader_options const& options, - rmm::cuda_stream_view stream) const; + cuda::stream_ref stream) const; private: std::unique_ptr _impl; diff --git a/cpp/include/cudf/io/experimental/variant.hpp b/cpp/include/cudf/io/experimental/variant.hpp index dca21e4c7da1..05165621419d 100644 --- a/cpp/include/cudf/io/experimental/variant.hpp +++ b/cpp/include/cudf/io/experimental/variant.hpp @@ -12,7 +12,7 @@ #include #include -#include +#include #include #include @@ -61,7 +61,7 @@ namespace io::parquet::experimental { [[nodiscard]] std::unique_ptr get_variant_field( column_view const& variant_column, std::string_view path, - 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()); /** @@ -84,7 +84,7 @@ namespace io::parquet::experimental { [[nodiscard]] std::unique_ptr cast_variant( column_view const& values, data_type desired_type, - 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()); /** @@ -107,7 +107,7 @@ namespace io::parquet::experimental { column_view const& variant_column, std::string_view path, data_type desired_type, - 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()); /** diff --git a/cpp/include/cudf/io/json.hpp b/cpp/include/cudf/io/json.hpp index 55ad8f894535..3d9f11fdf1a7 100644 --- a/cpp/include/cudf/io/json.hpp +++ b/cpp/include/cudf/io/json.hpp @@ -925,7 +925,7 @@ class json_reader_options_builder { */ table_with_metadata read_json( json_reader_options options, - 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()); /** @@ -1020,7 +1020,7 @@ struct json_reader_result_with_row_diagnostics { */ json_reader_result read_json_with_diagnostics( json_reader_options options, - 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()); /** @@ -1040,7 +1040,7 @@ json_reader_result read_json_with_diagnostics( */ json_reader_result_with_row_diagnostics read_json_with_row_diagnostics( json_reader_options options, - 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()); /** @} */ // end of group @@ -1449,7 +1449,7 @@ class json_writer_options_builder { * @param stream CUDA stream used for device memory operations and kernel launches */ void write_json(json_writer_options const& options, - rmm::cuda_stream_view stream = cudf::get_default_stream()); + cuda::stream_ref stream = cudf::get_default_stream()); /// @cond struct is_supported_json_write_type_fn { diff --git a/cpp/include/cudf/io/orc.hpp b/cpp/include/cudf/io/orc.hpp index 47eac12966a3..b0319c6ab770 100644 --- a/cpp/include/cudf/io/orc.hpp +++ b/cpp/include/cudf/io/orc.hpp @@ -463,7 +463,7 @@ class orc_reader_options_builder { */ table_with_metadata read_orc( orc_reader_options const& options, - 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()); /** @@ -533,7 +533,7 @@ class chunked_orc_reader { std::size_t pass_read_limit, size_type output_row_granularity, orc_reader_options const& options, - 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()); /** @@ -554,7 +554,7 @@ class chunked_orc_reader { std::size_t chunk_read_limit, std::size_t pass_read_limit, orc_reader_options const& options, - 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()); /** @@ -572,7 +572,7 @@ class chunked_orc_reader { explicit chunked_orc_reader( std::size_t chunk_read_limit, orc_reader_options const& options, - 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()); /** @@ -1077,7 +1077,7 @@ class orc_writer_options_builder { * @param stream CUDA stream used for device memory operations and kernel launches */ void write_orc(orc_writer_options const& options, - rmm::cuda_stream_view stream = cudf::get_default_stream()); + cuda::stream_ref stream = cudf::get_default_stream()); /** * @brief Builds settings to use for `write_orc_chunked()`. @@ -1514,7 +1514,7 @@ class orc_chunked_writer { * @param[in] stream CUDA stream used for device memory operations and kernel launches */ orc_chunked_writer(chunked_orc_writer_options const& options, - rmm::cuda_stream_view stream = cudf::get_default_stream()); + cuda::stream_ref stream = cudf::get_default_stream()); /** * @brief Writes table to output. diff --git a/cpp/include/cudf/io/orc_metadata.hpp b/cpp/include/cudf/io/orc_metadata.hpp index c20f4eb9fd6e..33613590f8a7 100644 --- a/cpp/include/cudf/io/orc_metadata.hpp +++ b/cpp/include/cudf/io/orc_metadata.hpp @@ -59,8 +59,8 @@ struct raw_orc_statistics { * * @return Column names and encoded ORC statistics */ -raw_orc_statistics read_raw_orc_statistics( - source_info const& src_info, rmm::cuda_stream_view stream = cudf::get_default_stream()); +raw_orc_statistics read_raw_orc_statistics(source_info const& src_info, + cuda::stream_ref stream = cudf::get_default_stream()); /** * @brief Monostate type alias for the statistics variant. @@ -212,7 +212,7 @@ struct parsed_orc_statistics { * @return Column names and decoded ORC statistics */ parsed_orc_statistics read_parsed_orc_statistics( - source_info const& src_info, rmm::cuda_stream_view stream = cudf::get_default_stream()); + source_info const& src_info, cuda::stream_ref stream = cudf::get_default_stream()); /** * @brief Schema of an ORC column, including the nested columns. @@ -373,7 +373,7 @@ class orc_metadata { * @return orc_metadata with ORC schema, number of rows and number of stripes. */ orc_metadata read_orc_metadata(source_info const& src_info, - rmm::cuda_stream_view stream = cudf::get_default_stream()); + cuda::stream_ref stream = cudf::get_default_stream()); /** @} */ // end of group } // namespace io diff --git a/cpp/include/cudf/io/parquet.hpp b/cpp/include/cudf/io/parquet.hpp index bbb7766dff76..4cad0aba032f 100644 --- a/cpp/include/cudf/io/parquet.hpp +++ b/cpp/include/cudf/io/parquet.hpp @@ -1008,7 +1008,7 @@ class parquet_reader_options_builder { */ table_with_metadata read_parquet( parquet_reader_options const& options, - 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()); /** @@ -1039,7 +1039,7 @@ table_with_metadata read_parquet( std::vector>&& sources, std::vector&& parquet_metadatas, parquet_reader_options const& options, - 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()); /** @@ -1077,7 +1077,7 @@ class chunked_parquet_reader { chunked_parquet_reader( std::size_t chunk_read_limit, parquet_reader_options const& options, - 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()); /** @@ -1101,7 +1101,7 @@ class chunked_parquet_reader { std::vector>&& sources, std::vector&& parquet_metadatas, parquet_reader_options const& options, - 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()); /** @@ -1127,7 +1127,7 @@ class chunked_parquet_reader { std::size_t chunk_read_limit, std::size_t pass_read_limit, parquet_reader_options const& options, - 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()); /** @@ -1158,7 +1158,7 @@ class chunked_parquet_reader { std::vector>&& sources, std::vector&& parquet_metadatas, parquet_reader_options const& options, - 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()); /** @@ -1957,7 +1957,7 @@ class parquet_writer_options_builder */ std::unique_ptr> write_parquet( - parquet_writer_options const& options, rmm::cuda_stream_view stream = cudf::get_default_stream()); + parquet_writer_options const& options, cuda::stream_ref stream = cudf::get_default_stream()); /** * @brief Merges multiple raw metadata blobs that were previously created by write_parquet @@ -2061,7 +2061,7 @@ class chunked_parquet_writer { * @param[in] stream CUDA stream used for device memory operations and kernel launches */ chunked_parquet_writer(chunked_parquet_writer_options const& options, - rmm::cuda_stream_view stream = cudf::get_default_stream()); + cuda::stream_ref stream = cudf::get_default_stream()); /** * @brief Default destructor. * This is added to not leak detail API diff --git a/cpp/include/cudf/io/parquet_io_utils.hpp b/cpp/include/cudf/io/parquet_io_utils.hpp index ca10c215dd5b..117f274f6ead 100644 --- a/cpp/include/cudf/io/parquet_io_utils.hpp +++ b/cpp/include/cudf/io/parquet_io_utils.hpp @@ -8,10 +8,11 @@ #include #include -#include #include #include +#include + #include #include #include @@ -127,7 +128,7 @@ std::tuple, std::future> fetch_byte_ranges_to_device_async(cudf::io::datasource& datasource, std::span byte_ranges, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr); /** @@ -149,7 +150,7 @@ std::tuple, fetch_byte_ranges_to_device_async( cudf::host_span const> datasources, cudf::host_span const> byte_ranges_per_source, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr); /** @@ -169,7 +170,7 @@ fetch_byte_ranges_to_device_async( std::pair, std::vector>> fetch_bloom_filters_to_device(cudf::io::datasource& datasource, cudf::host_span bloom_filter_byte_ranges, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr); /** @@ -191,7 +192,7 @@ std::pair, fetch_bloom_filters_to_device( cudf::host_span const> datasources, cudf::host_span const> bloom_filter_byte_ranges_per_source, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr); /** @} */ // end of group diff --git a/cpp/include/cudf/io/text/data_chunk_source.hpp b/cpp/include/cudf/io/text/data_chunk_source.hpp index a30bd43840d0..cc6350bbcd26 100644 --- a/cpp/include/cudf/io/text/data_chunk_source.hpp +++ b/cpp/include/cudf/io/text/data_chunk_source.hpp @@ -91,7 +91,7 @@ class data_chunk_reader { * relative to the specified @p stream */ virtual std::unique_ptr get_next_chunk(std::size_t size, - rmm::cuda_stream_view stream) = 0; + cuda::stream_ref stream) = 0; }; /** diff --git a/cpp/include/cudf/io/text/detail/tile_state.hpp b/cpp/include/cudf/io/text/detail/tile_state.hpp index 9ad239202b2b..caef18e0b46f 100644 --- a/cpp/include/cudf/io/text/detail/tile_state.hpp +++ b/cpp/include/cudf/io/text/detail/tile_state.hpp @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: Copyright (c) 2021-2024, NVIDIA CORPORATION. + * SPDX-FileCopyrightText: Copyright (c) 2021-2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved. * SPDX-License-Identifier: Apache-2.0 */ @@ -73,7 +73,7 @@ struct scan_tile_state { rmm::device_uvector tile_state_inclusive; scan_tile_state(cudf::size_type num_tiles, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) : tile_status(rmm::device_uvector>( num_tiles, stream, mr)), @@ -90,7 +90,7 @@ struct scan_tile_state { tile_state_inclusive.data()}; } - inline T get_inclusive_prefix(cudf::size_type tile_idx, rmm::cuda_stream_view stream) const + inline T get_inclusive_prefix(cudf::size_type tile_idx, cuda::stream_ref stream) const { auto const offset = (tile_idx + tile_status.size()) % tile_status.size(); return tile_state_inclusive.element(offset, stream); diff --git a/cpp/include/cudf/io/text/detail/trie.hpp b/cpp/include/cudf/io/text/detail/trie.hpp index cee08b53520f..321ff3b23591 100644 --- a/cpp/include/cudf/io/text/detail/trie.hpp +++ b/cpp/include/cudf/io/text/detail/trie.hpp @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: Copyright (c) 2021-2026, NVIDIA CORPORATION. + * SPDX-FileCopyrightText: Copyright (c) 2021-2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved. * SPDX-License-Identifier: Apache-2.0 */ @@ -10,9 +10,10 @@ #include #include -#include #include +#include + #include #include #include @@ -155,7 +156,7 @@ struct trie { * @return The trie. */ static trie create(std::string pattern, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { @@ -171,7 +172,7 @@ struct trie { * @return The trie. */ static trie create(std::vector const& patterns, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { std::vector tokens; diff --git a/cpp/include/cudf/io/text/multibyte_split.hpp b/cpp/include/cudf/io/text/multibyte_split.hpp index 7ee19f7665c4..bf86eb4c4f14 100644 --- a/cpp/include/cudf/io/text/multibyte_split.hpp +++ b/cpp/include/cudf/io/text/multibyte_split.hpp @@ -84,7 +84,7 @@ std::unique_ptr multibyte_split( data_chunk_source const& source, std::string_view delimiter, parse_options options = {}, - 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()); /** @} */ // end of group diff --git a/cpp/include/cudf/lists/combine.hpp b/cpp/include/cudf/lists/combine.hpp index b598d99c0a10..a75c7db1c23f 100644 --- a/cpp/include/cudf/lists/combine.hpp +++ b/cpp/include/cudf/lists/combine.hpp @@ -58,7 +58,7 @@ enum class concatenate_null_policy { IGNORE, NULLIFY_OUTPUT_ROW }; std::unique_ptr concatenate_rows( table_view const& input, concatenate_null_policy null_policy = concatenate_null_policy::IGNORE, - 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()); /** @@ -89,7 +89,7 @@ std::unique_ptr concatenate_rows( std::unique_ptr concatenate_list_elements( column_view const& input, concatenate_null_policy null_policy = concatenate_null_policy::IGNORE, - 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()); /** @} */ // end of group diff --git a/cpp/include/cudf/lists/contains.hpp b/cpp/include/cudf/lists/contains.hpp index 4c85e1264d53..57790d1c349d 100644 --- a/cpp/include/cudf/lists/contains.hpp +++ b/cpp/include/cudf/lists/contains.hpp @@ -42,7 +42,7 @@ namespace lists { std::unique_ptr contains( cudf::lists_column_view const& lists, cudf::scalar const& search_key, - 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()); /** @@ -66,7 +66,7 @@ std::unique_ptr contains( std::unique_ptr contains( cudf::lists_column_view const& lists, cudf::column_view const& search_keys, - 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()); /** @@ -88,7 +88,7 @@ std::unique_ptr contains( */ std::unique_ptr contains_nulls( cudf::lists_column_view const& lists, - 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()); /** @@ -132,7 +132,7 @@ std::unique_ptr index_of( cudf::lists_column_view const& lists, cudf::scalar const& search_key, duplicate_find_option find_option = duplicate_find_option::FIND_FIRST, - 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()); /** @@ -169,7 +169,7 @@ std::unique_ptr index_of( cudf::lists_column_view const& lists, cudf::column_view const& search_keys, duplicate_find_option find_option = duplicate_find_option::FIND_FIRST, - 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()); /** @} */ // end of group diff --git a/cpp/include/cudf/lists/count_elements.hpp b/cpp/include/cudf/lists/count_elements.hpp index ac898a9ddc60..43799454016a 100644 --- a/cpp/include/cudf/lists/count_elements.hpp +++ b/cpp/include/cudf/lists/count_elements.hpp @@ -44,7 +44,7 @@ namespace lists { */ std::unique_ptr count_elements( lists_column_view const& input, - 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()); /** @} */ // end of lists_elements group diff --git a/cpp/include/cudf/lists/detail/combine.hpp b/cpp/include/cudf/lists/detail/combine.hpp index 13b0b6685389..03c3d19f6069 100644 --- a/cpp/include/cudf/lists/detail/combine.hpp +++ b/cpp/include/cudf/lists/detail/combine.hpp @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: Copyright (c) 2021-2026, NVIDIA CORPORATION. + * SPDX-FileCopyrightText: Copyright (c) 2021-2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved. * SPDX-License-Identifier: Apache-2.0 */ #pragma once @@ -18,7 +18,7 @@ namespace lists::detail { */ std::unique_ptr concatenate_rows(table_view const& input, concatenate_null_policy null_policy, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr); /** @@ -28,7 +28,7 @@ std::unique_ptr concatenate_rows(table_view const& input, */ std::unique_ptr concatenate_list_elements(column_view const& input, concatenate_null_policy null_policy, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr); } // namespace lists::detail diff --git a/cpp/include/cudf/lists/detail/concatenate.hpp b/cpp/include/cudf/lists/detail/concatenate.hpp index dabb3553db18..62d58f0e71de 100644 --- a/cpp/include/cudf/lists/detail/concatenate.hpp +++ b/cpp/include/cudf/lists/detail/concatenate.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 */ #pragma once @@ -11,7 +11,7 @@ #include #include -#include +#include namespace cudf { namespace lists::detail { @@ -33,7 +33,7 @@ namespace lists::detail { * @return New column with concatenated results. */ std::unique_ptr concatenate(host_span columns, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr); } // namespace lists::detail diff --git a/cpp/include/cudf/lists/detail/contains.hpp b/cpp/include/cudf/lists/detail/contains.hpp index 32918302ffa1..915adffe1116 100644 --- a/cpp/include/cudf/lists/detail/contains.hpp +++ b/cpp/include/cudf/lists/detail/contains.hpp @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: Copyright (c) 2022-2026, NVIDIA CORPORATION. + * SPDX-FileCopyrightText: Copyright (c) 2022-2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved. * SPDX-License-Identifier: Apache-2.0 */ #pragma once @@ -15,48 +15,48 @@ namespace lists::detail { * @copydoc cudf::lists::index_of(cudf::lists_column_view const&, * cudf::scalar const&, * duplicate_find_option, - * rmm::cuda_stream_view stream, + * cuda::stream_ref stream, * rmm::device_async_resource_ref) */ std::unique_ptr index_of(cudf::lists_column_view const& lists, cudf::scalar const& search_key, cudf::lists::duplicate_find_option find_option, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr); /** * @copydoc cudf::lists::index_of(cudf::lists_column_view const&, * cudf::column_view const&, * duplicate_find_option, - * rmm::cuda_stream_view stream, + * cuda::stream_ref stream, * rmm::device_async_resource_ref) */ std::unique_ptr index_of(cudf::lists_column_view const& lists, cudf::column_view const& search_keys, cudf::lists::duplicate_find_option find_option, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr); /** * @copydoc cudf::lists::contains(cudf::lists_column_view const&, * cudf::scalar const&, - * rmm::cuda_stream_view stream, + * cuda::stream_ref stream, * rmm::device_async_resource_ref) */ std::unique_ptr contains(cudf::lists_column_view const& lists, cudf::scalar const& search_key, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr); /** * @copydoc cudf::lists::contains(cudf::lists_column_view const&, * cudf::column_view const&, - * rmm::cuda_stream_view stream, + * cuda::stream_ref stream, * rmm::device_async_resource_ref) */ std::unique_ptr contains(cudf::lists_column_view const& lists, cudf::column_view const& search_keys, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr); } // namespace lists::detail } // namespace cudf diff --git a/cpp/include/cudf/lists/detail/copying.hpp b/cpp/include/cudf/lists/detail/copying.hpp index d9a4e545d120..cb537cc364e2 100644 --- a/cpp/include/cudf/lists/detail/copying.hpp +++ b/cpp/include/cudf/lists/detail/copying.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 */ #pragma once @@ -7,7 +7,7 @@ #include #include -#include +#include namespace cudf { namespace lists::detail { @@ -34,7 +34,7 @@ namespace lists::detail { std::unique_ptr copy_slice(lists_column_view const& lists, size_type start, size_type end, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr); } // namespace lists::detail diff --git a/cpp/include/cudf/lists/detail/dremel.hpp b/cpp/include/cudf/lists/detail/dremel.hpp index 3caff2345bc1..d559dc3ad1d4 100644 --- a/cpp/include/cudf/lists/detail/dremel.hpp +++ b/cpp/include/cudf/lists/detail/dremel.hpp @@ -186,7 +186,7 @@ struct dremel_data { dremel_data get_dremel_data(column_view input, std::vector nullability, bool output_as_byte_array, - rmm::cuda_stream_view stream); + cuda::stream_ref stream); /** * @brief Get Dremel offsets, repetition levels, and modified definition levels to be used for @@ -204,6 +204,6 @@ dremel_data get_dremel_data(column_view input, dremel_data get_comparator_data(column_view input, std::vector nullability, bool output_as_byte_array, - rmm::cuda_stream_view stream); + cuda::stream_ref stream); } // namespace detail } // namespace cudf diff --git a/cpp/include/cudf/lists/detail/extract.hpp b/cpp/include/cudf/lists/detail/extract.hpp index cd7918715227..46358a81dbd1 100644 --- a/cpp/include/cudf/lists/detail/extract.hpp +++ b/cpp/include/cudf/lists/detail/extract.hpp @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: Copyright (c) 2022-2026, NVIDIA CORPORATION. + * SPDX-FileCopyrightText: Copyright (c) 2022-2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved. * SPDX-License-Identifier: Apache-2.0 */ #pragma once @@ -18,7 +18,7 @@ namespace lists::detail { */ std::unique_ptr extract_list_element(lists_column_view lists_column, size_type const index, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr); /** @@ -28,7 +28,7 @@ std::unique_ptr extract_list_element(lists_column_view lists_column, */ std::unique_ptr extract_list_element(lists_column_view lists_column, column_view const& indices, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr); } // namespace lists::detail diff --git a/cpp/include/cudf/lists/detail/gather.cuh b/cpp/include/cudf/lists/detail/gather.cuh index 274888b60019..7d9502dbdd07 100644 --- a/cpp/include/cudf/lists/detail/gather.cuh +++ b/cpp/include/cudf/lists/detail/gather.cuh @@ -13,11 +13,11 @@ #include #include -#include #include #include #include +#include #include namespace cudf { @@ -47,7 +47,7 @@ struct gather_data { * @copydoc cudf::make_gather_data(cudf::lists_column_view const& source_column, * MapItType gather_map, * size_type gather_map_size, - * rmm::cuda_stream_view stream, + * cuda::stream_ref stream, * rmm::device_async_resource_ref mr) * * @param prev_base_offsets The buffer backing the base offsets used in the gather map. We can @@ -59,7 +59,7 @@ gather_data make_gather_data(cudf::lists_column_view const& source_column, MapItType gather_map, size_type gather_map_size, rmm::device_uvector&& prev_base_offsets, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { // size of the gather map is the # of output rows @@ -240,7 +240,7 @@ template gather_data make_gather_data(cudf::lists_column_view const& source_column, MapItType gather_map, size_type gather_map_size, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { return make_gather_data( @@ -266,7 +266,7 @@ gather_data make_gather_data(cudf::lists_column_view const& source_column, */ std::unique_ptr gather_list_nested(lists_column_view const& list, gather_data& gd, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr); /** @@ -283,7 +283,7 @@ std::unique_ptr gather_list_nested(lists_column_view const& list, */ std::unique_ptr gather_list_leaf(column_view const& column, gather_data const& gd, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr); /** @@ -297,7 +297,7 @@ std::unique_ptr gather_list_leaf(column_view const& column, std::unique_ptr segmented_gather(lists_column_view const& source_column, lists_column_view const& gather_map_list, out_of_bounds_policy bounds_policy, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr); } // namespace detail diff --git a/cpp/include/cudf/lists/detail/interleave_columns.hpp b/cpp/include/cudf/lists/detail/interleave_columns.hpp index 00fef0f59079..2b9cc320dfae 100644 --- a/cpp/include/cudf/lists/detail/interleave_columns.hpp +++ b/cpp/include/cudf/lists/detail/interleave_columns.hpp @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: Copyright (c) 2021-2026, NVIDIA CORPORATION. + * SPDX-FileCopyrightText: Copyright (c) 2021-2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved. * SPDX-License-Identifier: Apache-2.0 */ #pragma once @@ -8,7 +8,7 @@ #include #include -#include +#include namespace cudf { namespace lists::detail { @@ -35,7 +35,7 @@ namespace lists::detail { */ std::unique_ptr interleave_columns(table_view const& input, bool has_null_mask, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr); } // namespace lists::detail diff --git a/cpp/include/cudf/lists/detail/lists_column_factories.hpp b/cpp/include/cudf/lists/detail/lists_column_factories.hpp index e13072341fe7..017adfb65590 100644 --- a/cpp/include/cudf/lists/detail/lists_column_factories.hpp +++ b/cpp/include/cudf/lists/detail/lists_column_factories.hpp @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: Copyright (c) 2021-2026, NVIDIA CORPORATION. + * SPDX-FileCopyrightText: Copyright (c) 2021-2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved. * SPDX-License-Identifier: Apache-2.0 */ #pragma once @@ -24,7 +24,7 @@ namespace lists::detail { */ std::unique_ptr make_lists_column_from_scalar(list_scalar const& value, size_type size, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr); /** @@ -46,7 +46,7 @@ std::unique_ptr make_empty_lists_column(data_type child_type); */ std::unique_ptr make_all_nulls_lists_column(size_type size, data_type child_type, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr); } // namespace lists::detail diff --git a/cpp/include/cudf/lists/detail/reverse.hpp b/cpp/include/cudf/lists/detail/reverse.hpp index a52101336abb..36c70f084026 100644 --- a/cpp/include/cudf/lists/detail/reverse.hpp +++ b/cpp/include/cudf/lists/detail/reverse.hpp @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: Copyright (c) 2022-2026, NVIDIA CORPORATION. + * SPDX-FileCopyrightText: Copyright (c) 2022-2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved. * SPDX-License-Identifier: Apache-2.0 */ #pragma once @@ -15,7 +15,7 @@ namespace lists::detail { * @param stream CUDA stream used for device memory operations and kernel launches */ std::unique_ptr reverse(lists_column_view const& input, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr); } // namespace lists::detail diff --git a/cpp/include/cudf/lists/detail/scatter.cuh b/cpp/include/cudf/lists/detail/scatter.cuh index d141adfaf973..7003d4e7f82e 100644 --- a/cpp/include/cudf/lists/detail/scatter.cuh +++ b/cpp/include/cudf/lists/detail/scatter.cuh @@ -40,7 +40,7 @@ rmm::device_uvector list_vector_from_column( cudf::lists_column_device_view const& lists_column, IndexIterator index_begin, IndexIterator index_end, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { auto n_rows = cuda::std::distance(index_begin, index_end); @@ -85,7 +85,7 @@ std::unique_ptr scatter_impl(rmm::device_uvector cons MapIterator scatter_map_end, column_view const& source, column_view const& target, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { CUDF_EXPECTS(have_same_types(source, target), "Mismatched column types."); @@ -164,7 +164,7 @@ std::unique_ptr scatter(column_view const& source, MapIterator scatter_map_begin, MapIterator scatter_map_end, column_view const& target, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { auto const num_rows = target.size(); @@ -219,7 +219,7 @@ std::unique_ptr scatter(scalar const& slr, MapIterator scatter_map_begin, MapIterator scatter_map_end, column_view const& target, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { auto const num_rows = target.size(); diff --git a/cpp/include/cudf/lists/detail/scatter_helper.cuh b/cpp/include/cudf/lists/detail/scatter_helper.cuh index 077ce7e3c21d..36bbb9ea68b5 100644 --- a/cpp/include/cudf/lists/detail/scatter_helper.cuh +++ b/cpp/include/cudf/lists/detail/scatter_helper.cuh @@ -125,7 +125,7 @@ std::unique_ptr build_lists_child_column_recursive( cudf::column_view const& list_offsets, cudf::lists_column_view const& source_lists_column_view, cudf::lists_column_view const& target_lists_column_view, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr); } // namespace detail diff --git a/cpp/include/cudf/lists/detail/set_operations.hpp b/cpp/include/cudf/lists/detail/set_operations.hpp index 61a2651bade8..a7045b947d47 100644 --- a/cpp/include/cudf/lists/detail/set_operations.hpp +++ b/cpp/include/cudf/lists/detail/set_operations.hpp @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: Copyright (c) 2022-2026, NVIDIA CORPORATION. + * SPDX-FileCopyrightText: Copyright (c) 2022-2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved. * SPDX-License-Identifier: Apache-2.0 */ @@ -10,7 +10,7 @@ #include #include -#include +#include namespace cudf { namespace lists::detail { @@ -22,7 +22,7 @@ std::unique_ptr have_overlap(lists_column_view const& lhs, lists_column_view const& rhs, null_equality nulls_equal, nan_equality nans_equal, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr); /** @@ -32,7 +32,7 @@ std::unique_ptr intersect_distinct(lists_column_view const& lhs, lists_column_view const& rhs, null_equality nulls_equal, nan_equality nans_equal, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr); /** @@ -42,7 +42,7 @@ std::unique_ptr union_distinct(lists_column_view const& lhs, lists_column_view const& rhs, null_equality nulls_equal, nan_equality nans_equal, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr); /** @@ -52,7 +52,7 @@ std::unique_ptr difference_distinct(lists_column_view const& lhs, lists_column_view const& rhs, null_equality nulls_equal, nan_equality nans_equal, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr); /** @} */ // end of group diff --git a/cpp/include/cudf/lists/detail/sorting.hpp b/cpp/include/cudf/lists/detail/sorting.hpp index ffe1f3550ee0..d616537c2d20 100644 --- a/cpp/include/cudf/lists/detail/sorting.hpp +++ b/cpp/include/cudf/lists/detail/sorting.hpp @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: Copyright (c) 2021-2026, NVIDIA CORPORATION. + * SPDX-FileCopyrightText: Copyright (c) 2021-2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved. * SPDX-License-Identifier: Apache-2.0 */ #pragma once @@ -7,7 +7,7 @@ #include #include -#include +#include namespace cudf { namespace lists::detail { @@ -18,7 +18,7 @@ namespace lists::detail { std::unique_ptr sort_lists(lists_column_view const& input, order column_order, null_order null_precedence, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr); /** @@ -27,7 +27,7 @@ std::unique_ptr sort_lists(lists_column_view const& input, std::unique_ptr stable_sort_lists(lists_column_view const& input, order column_order, null_order null_precedence, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr); } // namespace lists::detail diff --git a/cpp/include/cudf/lists/detail/stream_compaction.hpp b/cpp/include/cudf/lists/detail/stream_compaction.hpp index 4367a6501b1e..fdcab3ec8367 100644 --- a/cpp/include/cudf/lists/detail/stream_compaction.hpp +++ b/cpp/include/cudf/lists/detail/stream_compaction.hpp @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: Copyright (c) 2022-2026, NVIDIA CORPORATION. + * SPDX-FileCopyrightText: Copyright (c) 2022-2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved. * SPDX-License-Identifier: Apache-2.0 */ #pragma once @@ -21,18 +21,18 @@ namespace lists::detail { std::unique_ptr apply_mask(lists_column_view const& input, lists_column_view const& boolean_mask, cudf::detail::mask_type mask_kind, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr); /** * @copydoc cudf::lists::distinct(lists_column_view const&, null_equality, nan_equality, - * duplicate_keep_option, rmm::cuda_stream_view stream, rmm::device_async_resource_ref) + * duplicate_keep_option, cuda::stream_ref stream, rmm::device_async_resource_ref) */ std::unique_ptr distinct(lists_column_view const& input, null_equality nulls_equal, nan_equality nans_equal, duplicate_keep_option keep_option, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr); } // namespace lists::detail diff --git a/cpp/include/cudf/lists/explode.hpp b/cpp/include/cudf/lists/explode.hpp index 3fc433b3b1bf..365a48fb73bb 100644 --- a/cpp/include/cudf/lists/explode.hpp +++ b/cpp/include/cudf/lists/explode.hpp @@ -64,7 +64,7 @@ namespace CUDF_EXPORT cudf { std::unique_ptr explode( table_view const& input_table, size_type explode_column_idx, - 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()); /** @@ -110,7 +110,7 @@ std::unique_ptr
explode( std::unique_ptr
explode_position( table_view const& input_table, size_type explode_column_idx, - 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()); /** @@ -154,7 +154,7 @@ std::unique_ptr
explode_position( std::unique_ptr
explode_outer( table_view const& input_table, size_type explode_column_idx, - 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()); /** @@ -200,7 +200,7 @@ std::unique_ptr
explode_outer( std::unique_ptr
explode_outer_position( table_view const& input_table, size_type explode_column_idx, - 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()); /** @} */ // end of group diff --git a/cpp/include/cudf/lists/extract.hpp b/cpp/include/cudf/lists/extract.hpp index d91e7100fadc..8c50e67a249d 100644 --- a/cpp/include/cudf/lists/extract.hpp +++ b/cpp/include/cudf/lists/extract.hpp @@ -59,7 +59,7 @@ namespace lists { std::unique_ptr extract_list_element( lists_column_view const& lists_column, size_type index, - 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()); /** @@ -100,7 +100,7 @@ std::unique_ptr extract_list_element( std::unique_ptr extract_list_element( lists_column_view const& lists_column, column_view const& indices, - 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()); /** @} */ // end of group diff --git a/cpp/include/cudf/lists/filling.hpp b/cpp/include/cudf/lists/filling.hpp index 65b3f930fba9..7062be53b5fd 100644 --- a/cpp/include/cudf/lists/filling.hpp +++ b/cpp/include/cudf/lists/filling.hpp @@ -9,7 +9,7 @@ #include #include -#include +#include #include @@ -59,7 +59,7 @@ namespace lists { std::unique_ptr sequences( column_view const& starts, column_view const& sizes, - 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()); /** @@ -101,7 +101,7 @@ std::unique_ptr sequences( column_view const& starts, column_view const& steps, column_view const& sizes, - 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()); /** @} */ // end of group diff --git a/cpp/include/cudf/lists/gather.hpp b/cpp/include/cudf/lists/gather.hpp index 21925eff38ee..b74f328fbd62 100644 --- a/cpp/include/cudf/lists/gather.hpp +++ b/cpp/include/cudf/lists/gather.hpp @@ -67,7 +67,7 @@ std::unique_ptr segmented_gather( lists_column_view const& source_column, lists_column_view const& gather_map_list, out_of_bounds_policy bounds_policy = out_of_bounds_policy::DONT_CHECK, - 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()); /** @} */ // end of group diff --git a/cpp/include/cudf/lists/lists_column_view.hpp b/cpp/include/cudf/lists/lists_column_view.hpp index 7147462449c5..12b3640aeb0e 100644 --- a/cpp/include/cudf/lists/lists_column_view.hpp +++ b/cpp/include/cudf/lists/lists_column_view.hpp @@ -8,7 +8,7 @@ #include #include -#include +#include /** * @file @@ -99,7 +99,7 @@ class lists_column_view : private column_view { * @param stream CUDA stream used for device memory operations and kernel launches * @return A sliced child column view */ - [[nodiscard]] column_view get_sliced_child(rmm::cuda_stream_view stream) const; + [[nodiscard]] column_view get_sliced_child(cuda::stream_ref stream) const; /** * @brief Return first offset (accounting for column offset) diff --git a/cpp/include/cudf/lists/reverse.hpp b/cpp/include/cudf/lists/reverse.hpp index ab14c353cdf3..4eff83bcc4fd 100644 --- a/cpp/include/cudf/lists/reverse.hpp +++ b/cpp/include/cudf/lists/reverse.hpp @@ -42,7 +42,7 @@ namespace lists { */ std::unique_ptr reverse( lists_column_view const& input, - 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()); /** @} */ // end of doxygen group diff --git a/cpp/include/cudf/lists/set_operations.hpp b/cpp/include/cudf/lists/set_operations.hpp index 53f73c3083d3..8efb647eaf4f 100644 --- a/cpp/include/cudf/lists/set_operations.hpp +++ b/cpp/include/cudf/lists/set_operations.hpp @@ -54,7 +54,7 @@ std::unique_ptr have_overlap( lists_column_view const& rhs, null_equality nulls_equal = null_equality::EQUAL, nan_equality nans_equal = nan_equality::ALL_EQUAL, - 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()); /** @@ -91,7 +91,7 @@ std::unique_ptr intersect_distinct( lists_column_view const& rhs, null_equality nulls_equal = null_equality::EQUAL, nan_equality nans_equal = nan_equality::ALL_EQUAL, - 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()); /** @@ -128,7 +128,7 @@ std::unique_ptr union_distinct( lists_column_view const& rhs, null_equality nulls_equal = null_equality::EQUAL, nan_equality nans_equal = nan_equality::ALL_EQUAL, - 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()); /** @@ -165,7 +165,7 @@ std::unique_ptr difference_distinct( lists_column_view const& rhs, null_equality nulls_equal = null_equality::EQUAL, nan_equality nans_equal = nan_equality::ALL_EQUAL, - 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()); /** @} */ // end of group diff --git a/cpp/include/cudf/lists/sorting.hpp b/cpp/include/cudf/lists/sorting.hpp index 6708e9c02938..ac7b7e6c9a66 100644 --- a/cpp/include/cudf/lists/sorting.hpp +++ b/cpp/include/cudf/lists/sorting.hpp @@ -49,7 +49,7 @@ std::unique_ptr sort_lists( lists_column_view const& source_column, order column_order, null_order null_precedence, - 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()); /** @@ -62,7 +62,7 @@ std::unique_ptr stable_sort_lists( lists_column_view const& source_column, order column_order, null_order null_precedence, - 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()); /** @} */ // end of group diff --git a/cpp/include/cudf/lists/stream_compaction.hpp b/cpp/include/cudf/lists/stream_compaction.hpp index 821c275857dd..56fb806c307e 100644 --- a/cpp/include/cudf/lists/stream_compaction.hpp +++ b/cpp/include/cudf/lists/stream_compaction.hpp @@ -55,7 +55,7 @@ namespace lists { std::unique_ptr apply_boolean_mask( lists_column_view const& input, lists_column_view const& boolean_mask, - 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()); /** @@ -92,7 +92,7 @@ std::unique_ptr apply_boolean_mask( std::unique_ptr apply_deletion_mask( lists_column_view const& input, lists_column_view const& deletion_mask, - 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()); /** @@ -121,7 +121,7 @@ std::unique_ptr distinct( null_equality nulls_equal = null_equality::EQUAL, nan_equality nans_equal = nan_equality::ALL_EQUAL, duplicate_keep_option keep_option = duplicate_keep_option::KEEP_ANY, - 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()); /** @} */ // end of group diff --git a/cpp/include/cudf/scalar/scalar_factories.hpp b/cpp/include/cudf/scalar/scalar_factories.hpp index 633ee505cb73..efc1de56b64d 100644 --- a/cpp/include/cudf/scalar/scalar_factories.hpp +++ b/cpp/include/cudf/scalar/scalar_factories.hpp @@ -8,8 +8,6 @@ #include #include -#include - #include #include @@ -107,7 +105,7 @@ std::unique_ptr make_fixed_width_scalar( */ std::unique_ptr make_string_scalar( std::string const& string, - 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()); /** diff --git a/cpp/include/cudf/strings/attributes.hpp b/cpp/include/cudf/strings/attributes.hpp index c856cfe798a9..001d34ca8212 100644 --- a/cpp/include/cudf/strings/attributes.hpp +++ b/cpp/include/cudf/strings/attributes.hpp @@ -39,7 +39,7 @@ namespace strings { */ std::unique_ptr count_characters( strings_column_view const& input, - 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()); /** @@ -59,7 +59,7 @@ std::unique_ptr count_characters( */ std::unique_ptr count_bytes( strings_column_view const& input, - 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()); /** @@ -81,7 +81,7 @@ std::unique_ptr count_bytes( */ std::unique_ptr code_points( strings_column_view const& input, - 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()); /** @} */ // end of strings_apis group diff --git a/cpp/include/cudf/strings/capitalize.hpp b/cpp/include/cudf/strings/capitalize.hpp index 7b04459bb00e..ea1a638def9a 100644 --- a/cpp/include/cudf/strings/capitalize.hpp +++ b/cpp/include/cudf/strings/capitalize.hpp @@ -53,7 +53,7 @@ namespace strings { std::unique_ptr capitalize( strings_column_view const& input, string_scalar const& delimiters = string_scalar("", true, cudf::get_default_stream()), - 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()); /** @@ -86,7 +86,7 @@ std::unique_ptr capitalize( std::unique_ptr title( strings_column_view const& input, string_character_types sequence_type = string_character_types::ALPHA, - 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()); /** @@ -115,7 +115,7 @@ std::unique_ptr title( */ std::unique_ptr is_title( strings_column_view const& input, - 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()); /** @} */ // end of doxygen group diff --git a/cpp/include/cudf/strings/case.hpp b/cpp/include/cudf/strings/case.hpp index 2e15ab3c519e..e17f0c075fae 100644 --- a/cpp/include/cudf/strings/case.hpp +++ b/cpp/include/cudf/strings/case.hpp @@ -36,7 +36,7 @@ namespace strings { */ std::unique_ptr to_lower( strings_column_view const& strings, - 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()); /** @@ -55,7 +55,7 @@ std::unique_ptr to_lower( */ std::unique_ptr to_upper( strings_column_view const& strings, - 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()); /** @@ -75,7 +75,7 @@ std::unique_ptr to_upper( */ std::unique_ptr swapcase( strings_column_view const& strings, - 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()); /** @} */ // end of doxygen group diff --git a/cpp/include/cudf/strings/char_types/char_types.hpp b/cpp/include/cudf/strings/char_types/char_types.hpp index 6011a67eef44..4559800583ce 100644 --- a/cpp/include/cudf/strings/char_types/char_types.hpp +++ b/cpp/include/cudf/strings/char_types/char_types.hpp @@ -58,7 +58,7 @@ std::unique_ptr all_characters_of_type( strings_column_view const& input, string_character_types types, string_character_types verify_types = string_character_types::ALL_TYPES, - 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()); /** @@ -106,7 +106,7 @@ std::unique_ptr filter_characters_of_type( string_character_types types_to_remove, string_scalar const& replacement = string_scalar(""), string_character_types types_to_keep = string_character_types::ALL_TYPES, - 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()); /** @} */ // end of doxygen group diff --git a/cpp/include/cudf/strings/combine.hpp b/cpp/include/cudf/strings/combine.hpp index 585148db4d35..10ea39cecbea 100644 --- a/cpp/include/cudf/strings/combine.hpp +++ b/cpp/include/cudf/strings/combine.hpp @@ -70,7 +70,7 @@ std::unique_ptr join_strings( strings_column_view const& input, string_scalar const& separator = string_scalar(""), string_scalar const& narep = string_scalar("", false), - 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()); /** @@ -138,7 +138,7 @@ std::unique_ptr concatenate( string_scalar const& separator_narep = string_scalar("", false), string_scalar const& col_narep = string_scalar("", false), separator_on_nulls separate_nulls = separator_on_nulls::YES, - 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()); /** @@ -193,7 +193,7 @@ std::unique_ptr concatenate( string_scalar const& separator = string_scalar(""), string_scalar const& narep = string_scalar("", false), separator_on_nulls separate_nulls = separator_on_nulls::YES, - 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()); /** @@ -260,7 +260,7 @@ std::unique_ptr join_list_elements( string_scalar const& string_narep = string_scalar("", false), separator_on_nulls separate_nulls = separator_on_nulls::YES, output_if_empty_list empty_list_policy = output_if_empty_list::EMPTY_STRING, - 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()); /** @@ -319,7 +319,7 @@ std::unique_ptr join_list_elements( string_scalar const& narep = string_scalar("", false), separator_on_nulls separate_nulls = separator_on_nulls::YES, output_if_empty_list empty_list_policy = output_if_empty_list::EMPTY_STRING, - 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()); /** @} */ // end of doxygen group diff --git a/cpp/include/cudf/strings/contains.hpp b/cpp/include/cudf/strings/contains.hpp index c4bffa261b3e..23b5ee518b51 100644 --- a/cpp/include/cudf/strings/contains.hpp +++ b/cpp/include/cudf/strings/contains.hpp @@ -50,7 +50,7 @@ struct regex_program; std::unique_ptr contains_re( strings_column_view const& input, regex_program const& prog, - 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()); /** @@ -78,7 +78,7 @@ std::unique_ptr contains_re( std::unique_ptr matches_re( strings_column_view const& input, regex_program const& prog, - 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()); /** @@ -106,7 +106,7 @@ std::unique_ptr matches_re( std::unique_ptr count_re( strings_column_view const& input, regex_program const& prog, - 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()); /** @@ -156,7 +156,7 @@ std::unique_ptr like( strings_column_view const& input, std::string_view const& pattern, std::string_view const& escape_character = "", - 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()); /** @@ -196,7 +196,7 @@ std::unique_ptr like( strings_column_view const& input, strings_column_view const& patterns, string_scalar const& escape_character = string_scalar(""), - 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()); /** @} */ // end of doxygen group diff --git a/cpp/include/cudf/strings/convert/convert_booleans.hpp b/cpp/include/cudf/strings/convert/convert_booleans.hpp index f5403bd3086b..3df04726b0b6 100644 --- a/cpp/include/cudf/strings/convert/convert_booleans.hpp +++ b/cpp/include/cudf/strings/convert/convert_booleans.hpp @@ -36,7 +36,7 @@ namespace strings { std::unique_ptr to_booleans( strings_column_view const& input, string_scalar const& true_string, - 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()); /** @@ -58,7 +58,7 @@ std::unique_ptr from_booleans( column_view const& booleans, string_scalar const& true_string, string_scalar const& false_string, - 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()); /** @} */ // end of doxygen group diff --git a/cpp/include/cudf/strings/convert/convert_datetime.hpp b/cpp/include/cudf/strings/convert/convert_datetime.hpp index 4a2a1f218654..9f73ae692d5a 100644 --- a/cpp/include/cudf/strings/convert/convert_datetime.hpp +++ b/cpp/include/cudf/strings/convert/convert_datetime.hpp @@ -80,7 +80,7 @@ std::unique_ptr to_timestamps( strings_column_view const& input, data_type timestamp_type, std::string_view format, - 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()); /** @@ -130,7 +130,7 @@ std::unique_ptr to_timestamps( std::unique_ptr is_timestamp( strings_column_view const& input, std::string_view format, - 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()); /** @@ -245,7 +245,7 @@ std::unique_ptr from_timestamps( std::string_view format = "%Y-%m-%dT%H:%M:%SZ", strings_column_view const& names = strings_column_view(column_view{ data_type{type_id::STRING}, 0, nullptr, nullptr, 0}), - 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()); /** @} */ // end of doxygen group diff --git a/cpp/include/cudf/strings/convert/convert_durations.hpp b/cpp/include/cudf/strings/convert/convert_durations.hpp index 47bfb3ed8236..a05c2e431995 100644 --- a/cpp/include/cudf/strings/convert/convert_durations.hpp +++ b/cpp/include/cudf/strings/convert/convert_durations.hpp @@ -68,7 +68,7 @@ std::unique_ptr to_durations( strings_column_view const& input, data_type duration_type, std::string_view format, - 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()); /** @@ -119,7 +119,7 @@ std::unique_ptr to_durations( std::unique_ptr from_durations( column_view const& durations, std::string_view format = "%D days %H:%M:%S", - 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()); /** @} */ // end of doxygen group diff --git a/cpp/include/cudf/strings/convert/convert_fixed_point.hpp b/cpp/include/cudf/strings/convert/convert_fixed_point.hpp index af387e5f31d4..516d4259157d 100644 --- a/cpp/include/cudf/strings/convert/convert_fixed_point.hpp +++ b/cpp/include/cudf/strings/convert/convert_fixed_point.hpp @@ -54,7 +54,7 @@ namespace strings { std::unique_ptr to_fixed_point( strings_column_view const& input, data_type output_type, - 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()); /** @@ -84,7 +84,7 @@ std::unique_ptr to_fixed_point( */ std::unique_ptr from_fixed_point( column_view const& input, - 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()); /** @@ -116,7 +116,7 @@ std::unique_ptr from_fixed_point( std::unique_ptr is_fixed_point( strings_column_view const& input, data_type decimal_type = data_type{type_id::DECIMAL64}, - 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()); /** @} */ // end of doxygen group diff --git a/cpp/include/cudf/strings/convert/convert_floats.hpp b/cpp/include/cudf/strings/convert/convert_floats.hpp index 202a3dbfa8eb..c773bbe489ba 100644 --- a/cpp/include/cudf/strings/convert/convert_floats.hpp +++ b/cpp/include/cudf/strings/convert/convert_floats.hpp @@ -40,7 +40,7 @@ namespace strings { std::unique_ptr to_floats( strings_column_view const& strings, data_type output_type, - 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()); /** @@ -63,7 +63,7 @@ std::unique_ptr to_floats( */ std::unique_ptr from_floats( column_view const& floats, - 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()); /** @@ -89,7 +89,7 @@ std::unique_ptr from_floats( */ std::unique_ptr is_float( strings_column_view const& input, - 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()); /** @} */ // end of doxygen group diff --git a/cpp/include/cudf/strings/convert/convert_integers.hpp b/cpp/include/cudf/strings/convert/convert_integers.hpp index 304b6beccb98..3e85da5dca58 100644 --- a/cpp/include/cudf/strings/convert/convert_integers.hpp +++ b/cpp/include/cudf/strings/convert/convert_integers.hpp @@ -47,7 +47,7 @@ namespace strings { std::unique_ptr to_integers( strings_column_view const& input, data_type output_type, - 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()); /** @@ -68,7 +68,7 @@ std::unique_ptr to_integers( */ std::unique_ptr from_integers( column_view const& integers, - 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()); /** @@ -97,7 +97,7 @@ std::unique_ptr from_integers( */ std::unique_ptr is_integer( strings_column_view const& input, - 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()); /** @@ -131,7 +131,7 @@ std::unique_ptr is_integer( std::unique_ptr is_integer( strings_column_view const& input, data_type int_type, - 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()); /** @@ -161,7 +161,7 @@ std::unique_ptr is_integer( std::unique_ptr hex_to_integers( strings_column_view const& input, data_type output_type, - 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()); /** @@ -188,7 +188,7 @@ std::unique_ptr hex_to_integers( */ std::unique_ptr is_hex( strings_column_view const& input, - 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()); /** @@ -221,7 +221,7 @@ std::unique_ptr is_hex( */ std::unique_ptr integers_to_hex( column_view const& input, - 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()); /** @} */ // end of doxygen group diff --git a/cpp/include/cudf/strings/convert/convert_ipv4.hpp b/cpp/include/cudf/strings/convert/convert_ipv4.hpp index ab0287fd439e..f88b301d7672 100644 --- a/cpp/include/cudf/strings/convert/convert_ipv4.hpp +++ b/cpp/include/cudf/strings/convert/convert_ipv4.hpp @@ -44,7 +44,7 @@ namespace strings { */ std::unique_ptr ipv4_to_integers( strings_column_view const& input, - 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()); /** @@ -67,7 +67,7 @@ std::unique_ptr ipv4_to_integers( */ std::unique_ptr integers_to_ipv4( column_view const& integers, - 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()); /** @@ -94,7 +94,7 @@ std::unique_ptr integers_to_ipv4( */ std::unique_ptr is_ipv4( strings_column_view const& input, - 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()); /** @} */ // end of doxygen group diff --git a/cpp/include/cudf/strings/convert/convert_lists.hpp b/cpp/include/cudf/strings/convert/convert_lists.hpp index 304b5448e655..25dcc2e8613d 100644 --- a/cpp/include/cudf/strings/convert/convert_lists.hpp +++ b/cpp/include/cudf/strings/convert/convert_lists.hpp @@ -54,7 +54,7 @@ std::unique_ptr format_list_column( string_scalar const& na_rep = string_scalar(""), strings_column_view const& separators = strings_column_view(column_view{ data_type{type_id::STRING}, 0, nullptr, nullptr, 0}), - 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()); /** @} */ // end of doxygen group diff --git a/cpp/include/cudf/strings/convert/convert_urls.hpp b/cpp/include/cudf/strings/convert/convert_urls.hpp index bbfb14811cc1..915e8947a475 100644 --- a/cpp/include/cudf/strings/convert/convert_urls.hpp +++ b/cpp/include/cudf/strings/convert/convert_urls.hpp @@ -38,7 +38,7 @@ namespace strings { */ std::unique_ptr url_encode( strings_column_view const& input, - 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()); /** @@ -61,7 +61,7 @@ std::unique_ptr url_encode( */ std::unique_ptr url_decode( strings_column_view const& input, - 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()); /** @} */ // end of doxygen group diff --git a/cpp/include/cudf/strings/convert/int_cast.hpp b/cpp/include/cudf/strings/convert/int_cast.hpp index 6cf12318507c..9a45618ff932 100644 --- a/cpp/include/cudf/strings/convert/int_cast.hpp +++ b/cpp/include/cudf/strings/convert/int_cast.hpp @@ -71,7 +71,7 @@ std::unique_ptr cast_to_integer( strings_column_view const& input, data_type output_type, endian swap = endian::LITTLE, - 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()); /** @@ -106,7 +106,7 @@ std::unique_ptr cast_to_integer( std::unique_ptr cast_from_integer( column_view const& integers, endian swap = endian::LITTLE, - 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()); /** @@ -120,7 +120,7 @@ std::unique_ptr cast_from_integer( * if the input column is not castable to an integer. */ std::optional integer_cast_type( - strings_column_view const& input, rmm::cuda_stream_view stream = cudf::get_default_stream()); + strings_column_view const& input, cuda::stream_ref stream = cudf::get_default_stream()); /** @} */ // end of doxygen group } // namespace strings diff --git a/cpp/include/cudf/strings/detail/attributes.hpp b/cpp/include/cudf/strings/detail/attributes.hpp index 5a5ca50392cf..88077e215f96 100644 --- a/cpp/include/cudf/strings/detail/attributes.hpp +++ b/cpp/include/cudf/strings/detail/attributes.hpp @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: Copyright (c) 2025, NVIDIA CORPORATION. + * SPDX-FileCopyrightText: Copyright (c) 2025-2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved. * SPDX-License-Identifier: Apache-2.0 */ #pragma once @@ -16,7 +16,7 @@ namespace detail { * @copydoc cudf::strings::count_characters */ std::unique_ptr count_characters(strings_column_view const& input, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr); } // namespace detail diff --git a/cpp/include/cudf/strings/detail/char_tables.hpp b/cpp/include/cudf/strings/detail/char_tables.hpp index d61c1783cd23..8756d35fd083 100644 --- a/cpp/include/cudf/strings/detail/char_tables.hpp +++ b/cpp/include/cudf/strings/detail/char_tables.hpp @@ -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 @@ -8,7 +8,7 @@ #include #include -#include +#include #include @@ -29,7 +29,7 @@ using character_flags_table_type = std::uint8_t; * @return Device memory pointer to character flags table. */ character_flags_table_type const* get_character_flags_table( - rmm::cuda_stream_view stream = cudf::get_default_stream()); + cuda::stream_ref stream = cudf::get_default_stream()); // utilities to dissect a character-table flag CUDF_HOST_DEVICE constexpr uint8_t IS_DECIMAL(uint8_t x) { return ((x) & (1 << 0)); } @@ -62,7 +62,7 @@ using character_cases_table_type = uint16_t; * @return Device memory pointer to character cases table. */ character_cases_table_type const* get_character_cases_table( - rmm::cuda_stream_view stream = cudf::get_default_stream()); + cuda::stream_ref stream = cudf::get_default_stream()); /** * @brief Case mapping structure for special characters. @@ -91,7 +91,7 @@ struct special_case_mapping { * @return Device memory pointer to the special case mapping table */ special_case_mapping const* get_special_case_mapping_table( - rmm::cuda_stream_view stream = cudf::get_default_stream()); + cuda::stream_ref stream = cudf::get_default_stream()); /** * @brief Get the special mapping table index for a given code-point. diff --git a/cpp/include/cudf/strings/detail/combine.hpp b/cpp/include/cudf/strings/detail/combine.hpp index 11527e892a6e..36646837a144 100644 --- a/cpp/include/cudf/strings/detail/combine.hpp +++ b/cpp/include/cudf/strings/detail/combine.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 */ #pragma once @@ -12,7 +12,7 @@ #include #include -#include +#include namespace cudf { namespace strings::detail { @@ -27,7 +27,7 @@ std::unique_ptr concatenate(table_view const& strings_columns, string_scalar const& separator, string_scalar const& narep, separator_on_nulls separate_nulls, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr); /** @@ -39,7 +39,7 @@ std::unique_ptr concatenate(table_view const& strings_columns, std::unique_ptr join_strings(strings_column_view const& strings, string_scalar const& separator, string_scalar const& narep, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr); /** @@ -53,7 +53,7 @@ std::unique_ptr join_list_elements(lists_column_view const& lists_string string_scalar const& narep, separator_on_nulls separate_nulls, output_if_empty_list empty_list_policy, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr); } // namespace strings::detail diff --git a/cpp/include/cudf/strings/detail/concatenate.hpp b/cpp/include/cudf/strings/detail/concatenate.hpp index b6643cc41491..99beb89075bc 100644 --- a/cpp/include/cudf/strings/detail/concatenate.hpp +++ b/cpp/include/cudf/strings/detail/concatenate.hpp @@ -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 @@ -11,7 +11,7 @@ #include #include -#include +#include namespace cudf { namespace strings::detail { @@ -32,7 +32,7 @@ namespace strings::detail { * @return New column with concatenated results. */ std::unique_ptr concatenate(host_span columns, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr); } // namespace strings::detail diff --git a/cpp/include/cudf/strings/detail/converters.hpp b/cpp/include/cudf/strings/detail/converters.hpp index 8f87cb8f6d4b..faaab2cbf5f5 100644 --- a/cpp/include/cudf/strings/detail/converters.hpp +++ b/cpp/include/cudf/strings/detail/converters.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 */ #pragma once @@ -9,7 +9,7 @@ #include #include -#include +#include namespace cudf { namespace strings::detail { @@ -21,7 +21,7 @@ namespace strings::detail { */ std::unique_ptr to_integers(strings_column_view const& strings, data_type output_type, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr); /** @@ -30,7 +30,7 @@ std::unique_ptr to_integers(strings_column_view const& strings, * @param stream CUDA stream used for device memory operations and kernel launches. */ std::unique_ptr from_integers(column_view const& integers, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr); /** @@ -40,7 +40,7 @@ std::unique_ptr from_integers(column_view const& integers, */ std::unique_ptr to_floats(strings_column_view const& strings, data_type output_type, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr); /** @@ -49,7 +49,7 @@ std::unique_ptr to_floats(strings_column_view const& strings, * @param stream CUDA stream used for device memory operations and kernel launches. */ std::unique_ptr from_floats(column_view const& floats, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr); /** @@ -60,7 +60,7 @@ std::unique_ptr from_floats(column_view const& floats, */ std::unique_ptr to_booleans(strings_column_view const& strings, string_scalar const& true_string, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr); /** @@ -72,7 +72,7 @@ std::unique_ptr to_booleans(strings_column_view const& strings, std::unique_ptr from_booleans(column_view const& booleans, string_scalar const& true_string, string_scalar const& false_string, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr); /** @@ -84,7 +84,7 @@ std::unique_ptr from_booleans(column_view const& booleans, std::unique_ptr to_timestamps(strings_column_view const& strings, data_type timestamp_type, std::string_view format, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr); /** @@ -96,7 +96,7 @@ std::unique_ptr to_timestamps(strings_column_view const& strings, std::unique_ptr from_timestamps(column_view const& timestamps, std::string_view format, strings_column_view const& names, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr); /** @@ -108,7 +108,7 @@ std::unique_ptr from_timestamps(column_view const& timestamps, std::unique_ptr to_durations(strings_column_view const& strings, data_type duration_type, std::string_view format, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr); /** @@ -119,7 +119,7 @@ std::unique_ptr to_durations(strings_column_view const& strings, */ std::unique_ptr from_durations(column_view const& durations, std::string_view format, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr); /** @@ -129,7 +129,7 @@ std::unique_ptr from_durations(column_view const& durations, */ std::unique_ptr to_fixed_point(strings_column_view const& strings, data_type output_type, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr); /** @@ -138,7 +138,7 @@ std::unique_ptr to_fixed_point(strings_column_view const& strings, * @param stream CUDA stream used for device memory operations and kernel launches. */ std::unique_ptr from_fixed_point(column_view const& integers, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr); } // namespace strings::detail diff --git a/cpp/include/cudf/strings/detail/copy_if_else.cuh b/cpp/include/cudf/strings/detail/copy_if_else.cuh index 55c2359bf7e6..f28b618a797a 100644 --- a/cpp/include/cudf/strings/detail/copy_if_else.cuh +++ b/cpp/include/cudf/strings/detail/copy_if_else.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 @@ -9,13 +9,13 @@ #include #include -#include #include #include #include #include #include +#include #include namespace cudf { @@ -48,7 +48,7 @@ std::unique_ptr copy_if_else(StringIterLeft lhs_begin, StringIterLeft lhs_end, StringIterRight rhs_begin, Filter filter_fn, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { auto strings_count = std::distance(lhs_begin, lhs_end); diff --git a/cpp/include/cudf/strings/detail/copy_range.hpp b/cpp/include/cudf/strings/detail/copy_range.hpp index 5ea1babe8c06..242fc664bcae 100644 --- a/cpp/include/cudf/strings/detail/copy_range.hpp +++ b/cpp/include/cudf/strings/detail/copy_range.hpp @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: Copyright (c) 2024-2026, NVIDIA CORPORATION. + * SPDX-FileCopyrightText: Copyright (c) 2024-2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved. * SPDX-License-Identifier: Apache-2.0 */ #pragma once @@ -8,7 +8,7 @@ #include #include -#include +#include namespace cudf { namespace strings::detail { @@ -41,7 +41,7 @@ std::unique_ptr copy_range(strings_column_view const& source, size_type source_begin, size_type source_end, size_type target_begin, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr); } // namespace strings::detail diff --git a/cpp/include/cudf/strings/detail/copying.hpp b/cpp/include/cudf/strings/detail/copying.hpp index c872cf8a8281..f300bd739200 100644 --- a/cpp/include/cudf/strings/detail/copying.hpp +++ b/cpp/include/cudf/strings/detail/copying.hpp @@ -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 @@ -10,7 +10,7 @@ #include #include -#include +#include namespace cudf { namespace strings::detail { @@ -41,7 +41,7 @@ namespace strings::detail { std::unique_ptr copy_slice(strings_column_view const& strings, size_type start, size_type end, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr); /** @@ -68,7 +68,7 @@ std::unique_ptr copy_slice(strings_column_view const& strings, std::unique_ptr shift(strings_column_view const& input, size_type offset, scalar const& fill_value, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr); } // namespace strings::detail diff --git a/cpp/include/cudf/strings/detail/fill.hpp b/cpp/include/cudf/strings/detail/fill.hpp index fe0665c1ac3d..d2e5a9701b03 100644 --- a/cpp/include/cudf/strings/detail/fill.hpp +++ b/cpp/include/cudf/strings/detail/fill.hpp @@ -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 @@ -10,7 +10,7 @@ #include #include -#include +#include namespace cudf { namespace strings::detail { @@ -35,7 +35,7 @@ std::unique_ptr fill(strings_column_view const& strings, size_type begin, size_type end, string_scalar const& value, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr); } // namespace strings::detail diff --git a/cpp/include/cudf/strings/detail/find.hpp b/cpp/include/cudf/strings/detail/find.hpp index 81791d04fd47..b36a808370e4 100644 --- a/cpp/include/cudf/strings/detail/find.hpp +++ b/cpp/include/cudf/strings/detail/find.hpp @@ -13,7 +13,7 @@ namespace cudf::strings::detail { */ std::unique_ptr contains(strings_column_view const& input, string_scalar const& target, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr); /** @@ -21,7 +21,7 @@ std::unique_ptr contains(strings_column_view const& input, */ std::unique_ptr starts_with(strings_column_view const& input, string_scalar const& target, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr); /** @@ -29,7 +29,7 @@ std::unique_ptr starts_with(strings_column_view const& input, */ std::unique_ptr ends_with(strings_column_view const& input, string_scalar const& target, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr); /** @@ -37,7 +37,7 @@ std::unique_ptr ends_with(strings_column_view const& input, */ std::unique_ptr count(strings_column_view const& input, string_scalar const& target, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr); } // namespace cudf::strings::detail diff --git a/cpp/include/cudf/strings/detail/gather.cuh b/cpp/include/cudf/strings/detail/gather.cuh index 759448ac58a7..691ab8ca2a39 100644 --- a/cpp/include/cudf/strings/detail/gather.cuh +++ b/cpp/include/cudf/strings/detail/gather.cuh @@ -18,13 +18,13 @@ #include #include -#include #include #include #include #include #include +#include #include #include #include @@ -222,7 +222,7 @@ template std::unique_ptr gather(strings_column_view const& strings, MapIterator begin, MapIterator end, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { auto const output_count = std::distance(begin, end); @@ -272,7 +272,7 @@ std::unique_ptr gather(strings_column_view const& strings, gather_chars_fn_string_parallel<<>>( + stream.get()>>>( d_strings->begin(), d_out_chars, offsets_view, begin, output_count); } else { // Threshold is based on empirical data on H100. @@ -285,7 +285,7 @@ std::unique_ptr gather(strings_column_view const& strings, auto const grid_size = cudf::util::div_rounding_up_safe( static_cast(output_count), static_cast(strings_per_threadblock)); gather_chars_fn_char_parallel - <<>>( + <<>>( d_strings->begin(), d_out_chars, offsets_view, begin, output_count); } else { // Iterator over the character column of input strings to gather @@ -315,7 +315,7 @@ std::unique_ptr gather(strings_column_view const& strings, out_chars_itr, sizes_itr, output_count, - stream.value()); + stream.get()); // Allocate temporary storage auto d_temp_storage = rmm::device_buffer(temp_storage_bytes, stream, mr); @@ -327,7 +327,7 @@ std::unique_ptr gather(strings_column_view const& strings, out_chars_itr, sizes_itr, output_count, - stream.value()); + stream.get()); } } @@ -366,7 +366,7 @@ std::unique_ptr gather(strings_column_view const& strings, MapIterator begin, MapIterator end, bool nullify_out_of_bounds, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { if (nullify_out_of_bounds) return gather(strings, begin, end, stream, mr); diff --git a/cpp/include/cudf/strings/detail/merge.hpp b/cpp/include/cudf/strings/detail/merge.hpp index 83ef86a83682..c989717b66f4 100644 --- a/cpp/include/cudf/strings/detail/merge.hpp +++ b/cpp/include/cudf/strings/detail/merge.hpp @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: Copyright (c) 2024-2026, NVIDIA CORPORATION. + * SPDX-FileCopyrightText: Copyright (c) 2024-2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved. * SPDX-License-Identifier: Apache-2.0 */ #pragma once @@ -8,9 +8,10 @@ #include #include -#include #include +#include + namespace cudf { namespace strings::detail { /** @@ -26,7 +27,7 @@ namespace strings::detail { std::unique_ptr merge(strings_column_view const& lhs, strings_column_view const& rhs, cudf::detail::index_vector const& row_order, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr); } // namespace strings::detail diff --git a/cpp/include/cudf/strings/detail/replace.hpp b/cpp/include/cudf/strings/detail/replace.hpp index aa783ac4225f..09976ce9e0ea 100644 --- a/cpp/include/cudf/strings/detail/replace.hpp +++ b/cpp/include/cudf/strings/detail/replace.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 */ #pragma once @@ -10,30 +10,30 @@ #include #include -#include +#include namespace cudf { namespace strings::detail { /** * @copydoc cudf::strings::replace(strings_column_view const&, string_scalar const&, - * string_scalar const&, int32_t, rmm::cuda_stream_view, rmm::device_async_resource_ref) + * string_scalar const&, int32_t, cuda::stream_ref, rmm::device_async_resource_ref) */ std::unique_ptr replace(strings_column_view const& strings, string_scalar const& target, string_scalar const& repl, int32_t maxrepl, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr); /** * @copydoc cudf::strings::replace_multiple(strings_column_view const&, strings_column_view const&, - * strings_column_view const&, rmm::cuda_stream_view, rmm::device_async_resource_ref) + * strings_column_view const&, cuda::stream_ref, rmm::device_async_resource_ref) */ std::unique_ptr replace_mutiple(strings_column_view const& strings, strings_column_view const& targets, strings_column_view const& repls, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr); /** @@ -56,18 +56,18 @@ std::unique_ptr replace_mutiple(strings_column_view const& strings, */ std::unique_ptr replace_nulls(strings_column_view const& strings, string_scalar const& repl, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr); /** * @copydoc cudf::strings::replace_slice(strings_column_view const&, string_scalar const&, - * size_type, size_type, rmm::cuda_stream_view, rmm::device_async_resource_ref) + * size_type, size_type, cuda::stream_ref, rmm::device_async_resource_ref) */ std::unique_ptr replace_slice(strings_column_view const& strings, string_scalar const& repl, size_type start, size_type stop, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr); /** @@ -85,7 +85,7 @@ std::unique_ptr find_and_replace_all( cudf::strings_column_view const& input, cudf::strings_column_view const& values_to_replace, cudf::strings_column_view const& replacement_values, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr); } // namespace strings::detail diff --git a/cpp/include/cudf/strings/detail/scan.hpp b/cpp/include/cudf/strings/detail/scan.hpp index 4b7a0f425c49..a8bb071ae291 100644 --- a/cpp/include/cudf/strings/detail/scan.hpp +++ b/cpp/include/cudf/strings/detail/scan.hpp @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: Copyright (c) 2023-2026, NVIDIA CORPORATION. + * SPDX-FileCopyrightText: Copyright (c) 2023-2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved. * SPDX-License-Identifier: Apache-2.0 */ #pragma once @@ -8,7 +8,7 @@ #include #include -#include +#include namespace cudf { namespace strings::detail { @@ -28,7 +28,7 @@ namespace strings::detail { template std::unique_ptr scan_inclusive(column_view const& input, bitmask_type const* mask, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr); } // namespace strings::detail diff --git a/cpp/include/cudf/strings/detail/scatter.cuh b/cpp/include/cudf/strings/detail/scatter.cuh index a377d6587cbe..2c0b288c7b9b 100644 --- a/cpp/include/cudf/strings/detail/scatter.cuh +++ b/cpp/include/cudf/strings/detail/scatter.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 @@ -11,12 +11,12 @@ #include #include -#include #include #include #include #include +#include #include #include @@ -53,7 +53,7 @@ std::unique_ptr scatter(SourceIterator begin, SourceIterator end, MapIterator scatter_map, strings_column_view const& target, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { if (target.is_empty()) return make_empty_column(type_id::STRING); diff --git a/cpp/include/cudf/strings/detail/strings_children.cuh b/cpp/include/cudf/strings/detail/strings_children.cuh index d15e5fa199f1..4962ce813ed9 100644 --- a/cpp/include/cudf/strings/detail/strings_children.cuh +++ b/cpp/include/cudf/strings/detail/strings_children.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 @@ -17,12 +17,12 @@ #include #include -#include #include #include #include #include +#include #include #include @@ -64,7 +64,7 @@ rmm::device_uvector make_chars_buffer(column_view const& offsets, int64_t chars_size, IndexPairIterator begin, size_type strings_count, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { auto chars_data = rmm::device_uvector(chars_size, stream, mr); @@ -89,7 +89,7 @@ rmm::device_uvector make_chars_buffer(column_view const& offsets, size_t temp_storage_bytes = 0; CUDF_CUDA_TRY(cub::DeviceMemcpy::Batched( - nullptr, temp_storage_bytes, src_ptrs, dst_ptrs, src_sizes, strings_count, stream.value())); + nullptr, temp_storage_bytes, src_ptrs, dst_ptrs, src_sizes, strings_count, stream.get())); rmm::device_buffer d_temp_storage(temp_storage_bytes, stream); CUDF_CUDA_TRY(cub::DeviceMemcpy::Batched(d_temp_storage.data(), temp_storage_bytes, @@ -97,7 +97,7 @@ rmm::device_uvector make_chars_buffer(column_view const& offsets, dst_ptrs, src_sizes, strings_count, - stream.value())); + stream.get())); return chars_data; } @@ -122,7 +122,7 @@ template std::pair, int64_t> make_offsets_child_column( InputIterator begin, InputIterator end, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { auto constexpr size_type_max = static_cast(std::numeric_limits::max()); @@ -223,7 +223,7 @@ template auto make_strings_children(SizeAndExecuteFunction size_and_exec_fn, size_type exec_size, size_type strings_count, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { // This is called twice -- once for computing sizes and once for writing chars. @@ -231,8 +231,8 @@ auto make_strings_children(SizeAndExecuteFunction size_and_exec_fn, auto for_each_fn = [exec_size, stream](SizeAndExecuteFunction& size_and_exec_fn) { auto constexpr block_size = 256; auto grid = cudf::detail::grid_1d{exec_size, block_size}; - strings_children_kernel<<>>(size_and_exec_fn, - exec_size); + strings_children_kernel<<>>(size_and_exec_fn, + exec_size); }; // Compute the output sizes @@ -303,7 +303,7 @@ auto make_strings_children(SizeAndExecuteFunction size_and_exec_fn, template auto make_strings_children(SizeAndExecuteFunction size_and_exec_fn, size_type strings_count, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { return make_strings_children(size_and_exec_fn, strings_count, strings_count, stream, mr); diff --git a/cpp/include/cudf/strings/detail/strings_column_factories.cuh b/cpp/include/cudf/strings/detail/strings_column_factories.cuh index d98cb994415d..0afa4c60952a 100644 --- a/cpp/include/cudf/strings/detail/strings_column_factories.cuh +++ b/cpp/include/cudf/strings/detail/strings_column_factories.cuh @@ -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 */ #pragma once @@ -12,12 +12,12 @@ #include #include -#include #include #include #include #include +#include #include namespace cudf { @@ -44,7 +44,7 @@ using string_index_pair = cuda::std::pair; template std::unique_ptr make_strings_column(IndexPairIterator begin, IndexPairIterator end, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { CUDF_FUNC_RANGE(); diff --git a/cpp/include/cudf/strings/detail/utilities.hpp b/cpp/include/cudf/strings/detail/utilities.hpp index dd99d2232bb4..7fa02f214a7a 100644 --- a/cpp/include/cudf/strings/detail/utilities.hpp +++ b/cpp/include/cudf/strings/detail/utilities.hpp @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: Copyright (c) 2019-2025, NVIDIA CORPORATION. + * SPDX-FileCopyrightText: Copyright (c) 2019-2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved. * SPDX-License-Identifier: Apache-2.0 */ #pragma once @@ -11,9 +11,10 @@ #include #include -#include #include +#include + namespace CUDF_EXPORT cudf { namespace strings::detail { @@ -32,7 +33,7 @@ namespace strings::detail { */ std::unique_ptr create_offsets_child_column(int64_t chars_bytes, size_type count, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr); /** @@ -45,7 +46,7 @@ std::unique_ptr create_offsets_child_column(int64_t chars_bytes, */ rmm::device_uvector create_string_vector_from_column( cudf::strings_column_view const strings, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr); /** @@ -83,7 +84,7 @@ bool is_large_strings_enabled(); */ int64_t get_offset_value(cudf::column_view const& offsets, size_type index, - rmm::cuda_stream_view stream); + cuda::stream_ref stream); /** * @brief Return the first and last offset in the given strings column @@ -95,7 +96,7 @@ int64_t get_offset_value(cudf::column_view const& offsets, * @return First and last offset values */ std::pair get_first_and_last_offset(cudf::strings_column_view const& input, - rmm::cuda_stream_view stream); + cuda::stream_ref stream); } // namespace strings::detail } // namespace CUDF_EXPORT cudf diff --git a/cpp/include/cudf/strings/extract.hpp b/cpp/include/cudf/strings/extract.hpp index 8b43988b55d7..91b31a4075bf 100644 --- a/cpp/include/cudf/strings/extract.hpp +++ b/cpp/include/cudf/strings/extract.hpp @@ -54,7 +54,7 @@ struct regex_program; std::unique_ptr
extract( strings_column_view const& input, regex_program const& prog, - 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()); /** @@ -90,7 +90,7 @@ std::unique_ptr
extract( std::unique_ptr extract_all_record( strings_column_view const& input, regex_program const& prog, - 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()); /** @@ -120,7 +120,7 @@ std::unique_ptr extract_single( strings_column_view const& input, regex_program const& prog, size_type group, - 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()); /** @} */ // end of doxygen group diff --git a/cpp/include/cudf/strings/find.hpp b/cpp/include/cudf/strings/find.hpp index 73adb5bcc336..3e81c0679f99 100644 --- a/cpp/include/cudf/strings/find.hpp +++ b/cpp/include/cudf/strings/find.hpp @@ -49,7 +49,7 @@ std::unique_ptr find( string_scalar const& target, size_type start = 0, size_type stop = -1, - 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()); /** @@ -80,7 +80,7 @@ std::unique_ptr rfind( string_scalar const& target, size_type start = 0, size_type stop = -1, - 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()); /** @@ -107,7 +107,7 @@ std::unique_ptr find( strings_column_view const& input, strings_column_view const& target, size_type start = 0, - 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()); /** @@ -140,7 +140,7 @@ std::unique_ptr find_instance( strings_column_view const& input, string_scalar const& target, size_type instance = 0, - 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()); /** @@ -161,7 +161,7 @@ std::unique_ptr find_instance( std::unique_ptr contains( strings_column_view const& input, string_scalar const& target, - 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()); /** @@ -186,7 +186,7 @@ std::unique_ptr contains( std::unique_ptr contains( strings_column_view const& input, strings_column_view const& targets, - 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()); /** @@ -208,7 +208,7 @@ std::unique_ptr contains( std::unique_ptr starts_with( strings_column_view const& input, string_scalar const& target, - 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()); /** @@ -234,7 +234,7 @@ std::unique_ptr starts_with( std::unique_ptr starts_with( strings_column_view const& input, strings_column_view const& targets, - 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()); /** @@ -256,7 +256,7 @@ std::unique_ptr starts_with( std::unique_ptr ends_with( strings_column_view const& input, string_scalar const& target, - 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()); /** @@ -282,7 +282,7 @@ std::unique_ptr ends_with( std::unique_ptr ends_with( strings_column_view const& input, strings_column_view const& targets, - 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()); /** @@ -310,7 +310,7 @@ std::unique_ptr ends_with( std::unique_ptr count( strings_column_view const& input, string_scalar const& target, - 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()); /** @} */ // end of doxygen group diff --git a/cpp/include/cudf/strings/find_multiple.hpp b/cpp/include/cudf/strings/find_multiple.hpp index c81d38480a1d..f4c946939cdb 100644 --- a/cpp/include/cudf/strings/find_multiple.hpp +++ b/cpp/include/cudf/strings/find_multiple.hpp @@ -51,7 +51,7 @@ namespace strings { std::unique_ptr
contains_multiple( strings_column_view const& input, strings_column_view const& targets, - 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()); /** @@ -83,7 +83,7 @@ std::unique_ptr
contains_multiple( std::unique_ptr find_multiple( strings_column_view const& input, strings_column_view const& targets, - 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()); /** @} */ // end of doxygen group diff --git a/cpp/include/cudf/strings/findall.hpp b/cpp/include/cudf/strings/findall.hpp index 514892529977..abc1a466c608 100644 --- a/cpp/include/cudf/strings/findall.hpp +++ b/cpp/include/cudf/strings/findall.hpp @@ -56,7 +56,7 @@ struct regex_program; std::unique_ptr findall( strings_column_view const& input, regex_program const& prog, - 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()); /** @@ -85,7 +85,7 @@ std::unique_ptr findall( std::unique_ptr find_re( strings_column_view const& input, regex_program const& prog, - 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()); /** @} */ // end of doxygen group diff --git a/cpp/include/cudf/strings/padding.hpp b/cpp/include/cudf/strings/padding.hpp index 53a63acb1da9..99ef506ca6a8 100644 --- a/cpp/include/cudf/strings/padding.hpp +++ b/cpp/include/cudf/strings/padding.hpp @@ -52,7 +52,7 @@ std::unique_ptr pad( size_type width, side_type side = side_type::RIGHT, std::string_view fill_char = " ", - 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()); /** @@ -82,7 +82,7 @@ std::unique_ptr pad( std::unique_ptr zfill( strings_column_view const& input, size_type width, - 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()); /** @@ -115,7 +115,7 @@ std::unique_ptr zfill( std::unique_ptr zfill_by_widths( strings_column_view const& input, column_view const& widths, - 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()); /** @} */ // end of doxygen group diff --git a/cpp/include/cudf/strings/repeat_strings.hpp b/cpp/include/cudf/strings/repeat_strings.hpp index 8252f5c64091..603c2287b14b 100644 --- a/cpp/include/cudf/strings/repeat_strings.hpp +++ b/cpp/include/cudf/strings/repeat_strings.hpp @@ -50,7 +50,7 @@ namespace strings { std::unique_ptr repeat_string( string_scalar const& input, size_type repeat_times, - 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()); /** @@ -81,7 +81,7 @@ std::unique_ptr repeat_string( std::unique_ptr repeat_strings( strings_column_view const& input, size_type repeat_times, - 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()); /** @@ -118,7 +118,7 @@ std::unique_ptr repeat_strings( std::unique_ptr repeat_strings( strings_column_view const& input, column_view const& repeat_times, - 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()); /** @} */ // end of doxygen group diff --git a/cpp/include/cudf/strings/replace.hpp b/cpp/include/cudf/strings/replace.hpp index 5533baf38730..d4f4dcc4425b 100644 --- a/cpp/include/cudf/strings/replace.hpp +++ b/cpp/include/cudf/strings/replace.hpp @@ -60,7 +60,7 @@ std::unique_ptr replace( string_scalar const& target, string_scalar const& repl, cudf::size_type maxrepl = -1, - 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()); /** @@ -102,7 +102,7 @@ std::unique_ptr replace_slice( string_scalar const& repl = string_scalar(""), size_type start = 0, size_type stop = -1, - 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()); /** @@ -138,7 +138,7 @@ std::unique_ptr replace( strings_column_view const& input, strings_column_view const& targets, strings_column_view const& repls, - 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()); /** @@ -184,7 +184,7 @@ std::unique_ptr replace_multiple( strings_column_view const& input, strings_column_view const& targets, strings_column_view const& repls, - 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()); /** @} */ // end of doxygen group diff --git a/cpp/include/cudf/strings/replace_re.hpp b/cpp/include/cudf/strings/replace_re.hpp index cf848d38f5e2..d5934c081640 100644 --- a/cpp/include/cudf/strings/replace_re.hpp +++ b/cpp/include/cudf/strings/replace_re.hpp @@ -50,7 +50,7 @@ std::unique_ptr replace_re( regex_program const& prog, string_scalar const& replacement = string_scalar(""), std::optional max_replace_count = std::nullopt, - 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()); /** @@ -75,7 +75,7 @@ std::unique_ptr replace_with_backrefs( strings_column_view const& input, regex_program const& prog, std::string_view replacement, - 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()); } // namespace strings diff --git a/cpp/include/cudf/strings/reverse.hpp b/cpp/include/cudf/strings/reverse.hpp index 5113ec4692c8..14abae4326fe 100644 --- a/cpp/include/cudf/strings/reverse.hpp +++ b/cpp/include/cudf/strings/reverse.hpp @@ -39,7 +39,7 @@ namespace strings { */ std::unique_ptr reverse( strings_column_view const& input, - 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()); /** @} */ // end of doxygen group diff --git a/cpp/include/cudf/strings/slice.hpp b/cpp/include/cudf/strings/slice.hpp index d1fc50473262..f4a31f0c2873 100644 --- a/cpp/include/cudf/strings/slice.hpp +++ b/cpp/include/cudf/strings/slice.hpp @@ -65,7 +65,7 @@ slice_strings(strings_column_view const& input, numeric_scalar const& start = numeric_scalar(0, false), numeric_scalar const& stop = numeric_scalar(0, false), numeric_scalar const& step = numeric_scalar(1), - 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()); /** @@ -102,7 +102,7 @@ std::unique_ptr slice_strings( std::optional start, std::optional stop = std::nullopt, std::optional step = std::nullopt, - 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()); /** @@ -147,7 +147,7 @@ std::unique_ptr slice_strings( strings_column_view const& input, column_view const& starts, column_view const& stops, - 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()); /** @} */ // end of doxygen group diff --git a/cpp/include/cudf/strings/split/partition.hpp b/cpp/include/cudf/strings/split/partition.hpp index 915ef2f7342c..71329cb5120f 100644 --- a/cpp/include/cudf/strings/split/partition.hpp +++ b/cpp/include/cudf/strings/split/partition.hpp @@ -52,7 +52,7 @@ namespace strings { std::unique_ptr
partition( strings_column_view const& input, string_scalar const& delimiter = string_scalar(""), - 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()); /** @@ -86,7 +86,7 @@ std::unique_ptr
partition( std::unique_ptr
rpartition( strings_column_view const& input, string_scalar const& delimiter = string_scalar(""), - 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()); /** @} */ // end of doxygen group diff --git a/cpp/include/cudf/strings/split/split.hpp b/cpp/include/cudf/strings/split/split.hpp index 783806c5bd05..d4eabd22e22b 100644 --- a/cpp/include/cudf/strings/split/split.hpp +++ b/cpp/include/cudf/strings/split/split.hpp @@ -48,7 +48,7 @@ std::unique_ptr
split( strings_column_view const& strings_column, string_scalar const& delimiter = string_scalar(""), size_type maxsplit = -1, - 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()); /** @@ -78,7 +78,7 @@ std::unique_ptr
rsplit( strings_column_view const& strings_column, string_scalar const& delimiter = string_scalar(""), size_type maxsplit = -1, - 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()); /** @@ -152,7 +152,7 @@ std::unique_ptr split_record( strings_column_view const& strings, string_scalar const& delimiter = string_scalar(""), size_type maxsplit = -1, - 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()); /** @@ -231,7 +231,7 @@ std::unique_ptr rsplit_record( strings_column_view const& strings, string_scalar const& delimiter = string_scalar(""), size_type maxsplit = -1, - 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()); /** @@ -254,7 +254,7 @@ std::unique_ptr split_part( strings_column_view const& input, string_scalar const& delimiter = string_scalar(""), size_type index = 0, - 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()); /** @} */ // end of doxygen group diff --git a/cpp/include/cudf/strings/split/split_re.hpp b/cpp/include/cudf/strings/split/split_re.hpp index 8ecf6b343ae7..8419df582cf5 100644 --- a/cpp/include/cudf/strings/split/split_re.hpp +++ b/cpp/include/cudf/strings/split/split_re.hpp @@ -75,7 +75,7 @@ std::unique_ptr
split_re( strings_column_view const& input, regex_program const& prog, size_type maxsplit = -1, - 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()); /** @@ -131,7 +131,7 @@ std::unique_ptr
rsplit_re( strings_column_view const& input, regex_program const& prog, size_type maxsplit = -1, - 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()); /** @@ -189,7 +189,7 @@ std::unique_ptr split_record_re( strings_column_view const& input, regex_program const& prog, size_type maxsplit = -1, - 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()); /** @@ -249,7 +249,7 @@ std::unique_ptr rsplit_record_re( strings_column_view const& input, regex_program const& prog, size_type maxsplit = -1, - 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()); /** @} */ // end of doxygen group diff --git a/cpp/include/cudf/strings/strings_column_view.hpp b/cpp/include/cudf/strings/strings_column_view.hpp index 558e24f3acbe..44a59538c46a 100644 --- a/cpp/include/cudf/strings/strings_column_view.hpp +++ b/cpp/include/cudf/strings/strings_column_view.hpp @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: Copyright (c) 2019-2025, NVIDIA CORPORATION. + * SPDX-FileCopyrightText: Copyright (c) 2019-2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved. * SPDX-License-Identifier: Apache-2.0 */ #pragma once @@ -86,7 +86,7 @@ class strings_column_view : private column_view { * @param stream CUDA stream used for device memory operations and kernel launches * @return Number of bytes in the chars child column */ - [[nodiscard]] int64_t chars_size(rmm::cuda_stream_view stream) const; + [[nodiscard]] int64_t chars_size(cuda::stream_ref stream) const; /** * @brief Return an iterator for the chars child column. @@ -99,7 +99,7 @@ class strings_column_view : private column_view { * * @return Iterator pointing to the first char byte. */ - [[nodiscard]] chars_iterator chars_begin(rmm::cuda_stream_view) const noexcept; + [[nodiscard]] chars_iterator chars_begin(cuda::stream_ref) const noexcept; /** * @brief Return an end iterator for the offsets child column. @@ -110,7 +110,7 @@ class strings_column_view : private column_view { * @param stream CUDA stream used for device memory operations and kernel launches * @return Iterator pointing 1 past the last char byte. */ - [[nodiscard]] chars_iterator chars_end(rmm::cuda_stream_view stream) const; + [[nodiscard]] chars_iterator chars_end(cuda::stream_ref stream) const; }; //! Strings column APIs. diff --git a/cpp/include/cudf/strings/strip.hpp b/cpp/include/cudf/strings/strip.hpp index f5e1f00b54f8..b208d7d4a637 100644 --- a/cpp/include/cudf/strings/strip.hpp +++ b/cpp/include/cudf/strings/strip.hpp @@ -57,7 +57,7 @@ std::unique_ptr strip( strings_column_view const& input, side_type side = side_type::BOTH, string_scalar const& to_strip = string_scalar(""), - 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()); /** @} */ // end of doxygen group diff --git a/cpp/include/cudf/strings/translate.hpp b/cpp/include/cudf/strings/translate.hpp index cc3cde7dcc50..a271ee376c27 100644 --- a/cpp/include/cudf/strings/translate.hpp +++ b/cpp/include/cudf/strings/translate.hpp @@ -48,7 +48,7 @@ namespace strings { std::unique_ptr translate( strings_column_view const& input, std::vector> const& chars_table, - 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()); /** @@ -95,7 +95,7 @@ std::unique_ptr filter_characters( std::vector> characters_to_filter, filter_type keep_characters = filter_type::KEEP, string_scalar const& replacement = string_scalar(""), - 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()); /** @} */ // end of doxygen group diff --git a/cpp/include/cudf/strings/utilities.hpp b/cpp/include/cudf/strings/utilities.hpp index 39afb3d53a63..972ba6d5a185 100644 --- a/cpp/include/cudf/strings/utilities.hpp +++ b/cpp/include/cudf/strings/utilities.hpp @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: Copyright (c) 2024, NVIDIA CORPORATION. + * SPDX-FileCopyrightText: Copyright (c) 2024-2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved. * SPDX-License-Identifier: Apache-2.0 */ #pragma once @@ -21,7 +21,7 @@ namespace strings { */ rmm::device_uvector create_string_vector_from_column( cudf::strings_column_view const strings, - 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()); /** diff --git a/cpp/include/cudf/strings/wrap.hpp b/cpp/include/cudf/strings/wrap.hpp index c3c59e8e0086..2aac624294bb 100644 --- a/cpp/include/cudf/strings/wrap.hpp +++ b/cpp/include/cudf/strings/wrap.hpp @@ -58,7 +58,7 @@ namespace strings { std::unique_ptr wrap( strings_column_view const& input, size_type width, - 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()); /** @} */ // end of doxygen group diff --git a/cpp/include/cudf/structs/detail/concatenate.hpp b/cpp/include/cudf/structs/detail/concatenate.hpp index 04f918bdd03b..dc9c1e499cd8 100644 --- a/cpp/include/cudf/structs/detail/concatenate.hpp +++ b/cpp/include/cudf/structs/detail/concatenate.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 */ #pragma once @@ -38,7 +38,7 @@ namespace structs::detail { * @return New column with concatenated results. */ std::unique_ptr concatenate(host_span columns, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr); } // namespace structs::detail diff --git a/cpp/include/cudf/structs/detail/scan.hpp b/cpp/include/cudf/structs/detail/scan.hpp index 2bdc7028e075..056d62b1aaba 100644 --- a/cpp/include/cudf/structs/detail/scan.hpp +++ b/cpp/include/cudf/structs/detail/scan.hpp @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: Copyright (c) 2023-2026, NVIDIA CORPORATION. + * SPDX-FileCopyrightText: Copyright (c) 2023-2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved. * SPDX-License-Identifier: Apache-2.0 */ #pragma once @@ -8,7 +8,7 @@ #include #include -#include +#include namespace cudf { namespace structs::detail { @@ -26,7 +26,7 @@ namespace structs::detail { */ template std::unique_ptr scan_inclusive(column_view const& input, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr); } // namespace structs::detail diff --git a/cpp/include/cudf/structs/structs_column_view.hpp b/cpp/include/cudf/structs/structs_column_view.hpp index 5d71cd8f2cd5..75e084c15732 100644 --- a/cpp/include/cudf/structs/structs_column_view.hpp +++ b/cpp/include/cudf/structs/structs_column_view.hpp @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: Copyright (c) 2022-2026, NVIDIA CORPORATION. + * SPDX-FileCopyrightText: Copyright (c) 2022-2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved. * SPDX-License-Identifier: Apache-2.0 */ #pragma once @@ -8,7 +8,7 @@ #include #include -#include +#include /** * @file @@ -85,7 +85,7 @@ class structs_column_view : public column_view { * @return The child column sliced relative to the parent's offset and size */ [[nodiscard]] column_view get_sliced_child( - int index, rmm::cuda_stream_view stream = cudf::get_default_stream()) const; + int index, cuda::stream_ref stream = cudf::get_default_stream()) const; }; // class structs_column_view; /** @} */ // end of group } // namespace CUDF_EXPORT cudf diff --git a/cpp/include/nvtext/byte_pair_encoding.hpp b/cpp/include/nvtext/byte_pair_encoding.hpp index db89951c7a88..51da654d045c 100644 --- a/cpp/include/nvtext/byte_pair_encoding.hpp +++ b/cpp/include/nvtext/byte_pair_encoding.hpp @@ -39,7 +39,7 @@ struct bpe_merge_pairs { * @param mr Device memory resource used to allocate the device memory */ bpe_merge_pairs(std::unique_ptr&& input, - 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()); /** @@ -50,7 +50,7 @@ struct bpe_merge_pairs { * @param mr Device memory resource used to allocate the device memory */ bpe_merge_pairs(cudf::strings_column_view const& input, - 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()); ~bpe_merge_pairs(); @@ -88,7 +88,7 @@ struct bpe_merge_pairs { */ std::unique_ptr load_merge_pairs( cudf::strings_column_view const& merge_pairs, - 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()); /** @@ -122,7 +122,7 @@ std::unique_ptr byte_pair_encoding( cudf::strings_column_view const& input, bpe_merge_pairs const& merges_pairs, cudf::string_scalar const& separator = cudf::string_scalar(" "), - 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()); /** @} */ // end of group diff --git a/cpp/include/nvtext/deduplicate.hpp b/cpp/include/nvtext/deduplicate.hpp index 155950f9b0c8..8b5b57530276 100644 --- a/cpp/include/nvtext/deduplicate.hpp +++ b/cpp/include/nvtext/deduplicate.hpp @@ -9,9 +9,10 @@ #include #include -#include #include +#include + //! NVText APIs namespace CUDF_EXPORT nvtext { /** @@ -40,7 +41,7 @@ namespace CUDF_EXPORT nvtext { std::unique_ptr> build_suffix_array( cudf::strings_column_view const& input, cudf::size_type min_width, - 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()); /** @@ -67,7 +68,7 @@ std::unique_ptr resolve_duplicates( cudf::strings_column_view const& input, cudf::device_span indices, cudf::size_type min_width, - 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()); /** @@ -98,7 +99,7 @@ std::unique_ptr resolve_duplicates_pair( cudf::strings_column_view const& input2, cudf::device_span indices2, cudf::size_type min_width, - 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()); /** @} */ // end of group diff --git a/cpp/include/nvtext/detail/tokenize.hpp b/cpp/include/nvtext/detail/tokenize.hpp index 23bfca532cef..8f9df14624fa 100644 --- a/cpp/include/nvtext/detail/tokenize.hpp +++ b/cpp/include/nvtext/detail/tokenize.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 */ #pragma once @@ -10,7 +10,7 @@ #include #include -#include +#include namespace nvtext { namespace detail { @@ -22,7 +22,7 @@ namespace detail { */ std::unique_ptr tokenize(cudf::strings_column_view const& strings, cudf::string_scalar const& delimiter, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr); /** @@ -33,7 +33,7 @@ std::unique_ptr tokenize(cudf::strings_column_view const& strings, */ std::unique_ptr tokenize(cudf::strings_column_view const& strings, cudf::strings_column_view const& delimiters, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr); /** @@ -44,7 +44,7 @@ std::unique_ptr tokenize(cudf::strings_column_view const& strings, */ std::unique_ptr count_tokens(cudf::strings_column_view const& strings, cudf::string_scalar const& delimiter, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr); /** @@ -55,7 +55,7 @@ std::unique_ptr count_tokens(cudf::strings_column_view const& stri */ std::unique_ptr count_tokens(cudf::strings_column_view const& strings, cudf::strings_column_view const& delimiters, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr); } // namespace detail diff --git a/cpp/include/nvtext/edit_distance.hpp b/cpp/include/nvtext/edit_distance.hpp index a11d5f6e968d..7d1e74e4b2b3 100644 --- a/cpp/include/nvtext/edit_distance.hpp +++ b/cpp/include/nvtext/edit_distance.hpp @@ -52,7 +52,7 @@ namespace CUDF_EXPORT nvtext { std::unique_ptr edit_distance( cudf::strings_column_view const& input, cudf::strings_column_view const& targets, - 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()); /** @} */ // end of group diff --git a/cpp/include/nvtext/generate_ngrams.hpp b/cpp/include/nvtext/generate_ngrams.hpp index 6ad5fd026757..77d0c06d3547 100644 --- a/cpp/include/nvtext/generate_ngrams.hpp +++ b/cpp/include/nvtext/generate_ngrams.hpp @@ -50,7 +50,7 @@ std::unique_ptr generate_ngrams( cudf::strings_column_view const& input, cudf::size_type ngrams, cudf::string_scalar const& separator, - 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()); /** @@ -79,7 +79,7 @@ std::unique_ptr generate_ngrams( std::unique_ptr generate_character_ngrams( cudf::strings_column_view const& input, cudf::size_type ngrams = 2, - 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()); /** @@ -116,7 +116,7 @@ std::unique_ptr hash_character_ngrams( cudf::strings_column_view const& input, cudf::size_type ngrams = 5, uint32_t seed = 0, - 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()); /** @} */ // end of group diff --git a/cpp/include/nvtext/jaccard.hpp b/cpp/include/nvtext/jaccard.hpp index ebab6e9d5719..35ead2976b84 100644 --- a/cpp/include/nvtext/jaccard.hpp +++ b/cpp/include/nvtext/jaccard.hpp @@ -64,7 +64,7 @@ std::unique_ptr jaccard_index( cudf::strings_column_view const& input1, cudf::strings_column_view const& input2, cudf::size_type width, - 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()); /** @} */ // end of group diff --git a/cpp/include/nvtext/minhash.hpp b/cpp/include/nvtext/minhash.hpp index eea777f1e2fb..cba5377f1d34 100644 --- a/cpp/include/nvtext/minhash.hpp +++ b/cpp/include/nvtext/minhash.hpp @@ -65,7 +65,7 @@ std::unique_ptr minhash( cudf::device_span parameter_a, cudf::device_span parameter_b, cudf::size_type width, - 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()); /** @@ -112,7 +112,7 @@ std::unique_ptr minhash64( cudf::device_span parameter_a, cudf::device_span parameter_b, cudf::size_type width, - 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()); /** @@ -159,7 +159,7 @@ std::unique_ptr minhash_ngrams( uint32_t seed, cudf::device_span parameter_a, cudf::device_span parameter_b, - 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()); /** @@ -206,7 +206,7 @@ std::unique_ptr minhash64_ngrams( uint64_t seed, cudf::device_span parameter_a, cudf::device_span parameter_b, - 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()); /** @} */ // end of group diff --git a/cpp/include/nvtext/ngrams_tokenize.hpp b/cpp/include/nvtext/ngrams_tokenize.hpp index 4ce1fdb1ba23..1ce8024f806f 100644 --- a/cpp/include/nvtext/ngrams_tokenize.hpp +++ b/cpp/include/nvtext/ngrams_tokenize.hpp @@ -72,7 +72,7 @@ std::unique_ptr ngrams_tokenize( cudf::size_type ngrams, cudf::string_scalar const& delimiter, cudf::string_scalar const& separator, - 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()); /** @} */ // end of group diff --git a/cpp/include/nvtext/normalize.hpp b/cpp/include/nvtext/normalize.hpp index e52b9eb46503..8d5af661097a 100644 --- a/cpp/include/nvtext/normalize.hpp +++ b/cpp/include/nvtext/normalize.hpp @@ -10,6 +10,8 @@ #include #include +#include + //! NVText APIs namespace CUDF_EXPORT nvtext { /** @@ -44,7 +46,7 @@ namespace CUDF_EXPORT nvtext { */ std::unique_ptr normalize_spaces( cudf::strings_column_view const& input, - 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()); /** @@ -94,7 +96,7 @@ struct character_normalizer { */ character_normalizer(bool do_lower_case, cudf::strings_column_view const& special_tokens, - 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()); ~character_normalizer(); @@ -123,7 +125,7 @@ std::unique_ptr create_character_normalizer( bool do_lower_case, cudf::strings_column_view const& special_tokens = cudf::strings_column_view(cudf::column_view{ cudf::data_type{cudf::type_id::STRING}, 0, nullptr, nullptr, 0}), - 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()); /** @@ -154,7 +156,7 @@ std::unique_ptr create_character_normalizer( std::unique_ptr normalize_characters( cudf::strings_column_view const& input, character_normalizer const& normalizer, - 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()); /** @} */ // end of group diff --git a/cpp/include/nvtext/replace.hpp b/cpp/include/nvtext/replace.hpp index d8dade94df7e..ce7c96956f45 100644 --- a/cpp/include/nvtext/replace.hpp +++ b/cpp/include/nvtext/replace.hpp @@ -79,7 +79,7 @@ std::unique_ptr replace_tokens( cudf::strings_column_view const& targets, cudf::strings_column_view const& replacements, cudf::string_scalar const& delimiter = cudf::string_scalar{""}, - 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()); /** @@ -128,7 +128,7 @@ std::unique_ptr filter_tokens( cudf::size_type min_token_length, cudf::string_scalar const& replacement = cudf::string_scalar{""}, cudf::string_scalar const& delimiter = cudf::string_scalar{""}, - 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()); /** @} */ // end of group diff --git a/cpp/include/nvtext/stemmer.hpp b/cpp/include/nvtext/stemmer.hpp index fec1c4ff9ebd..242e712a7ce2 100644 --- a/cpp/include/nvtext/stemmer.hpp +++ b/cpp/include/nvtext/stemmer.hpp @@ -71,7 +71,7 @@ std::unique_ptr is_letter( cudf::strings_column_view const& input, letter_type ltype, cudf::size_type character_index, - 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()); /** @@ -124,7 +124,7 @@ std::unique_ptr is_letter( cudf::strings_column_view const& input, letter_type ltype, cudf::column_view const& indices, - 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()); /** @@ -158,7 +158,7 @@ std::unique_ptr is_letter( */ std::unique_ptr porter_stemmer_measure( cudf::strings_column_view const& input, - 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()); /** @} */ // end of group diff --git a/cpp/include/nvtext/tokenize.hpp b/cpp/include/nvtext/tokenize.hpp index 7fe7ac500e1c..a16a4fd9862d 100644 --- a/cpp/include/nvtext/tokenize.hpp +++ b/cpp/include/nvtext/tokenize.hpp @@ -51,7 +51,7 @@ namespace CUDF_EXPORT nvtext { std::unique_ptr tokenize( cudf::strings_column_view const& input, cudf::string_scalar const& delimiter = cudf::string_scalar{""}, - 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()); /** @@ -87,7 +87,7 @@ std::unique_ptr tokenize( std::unique_ptr tokenize( cudf::strings_column_view const& input, cudf::strings_column_view const& delimiters, - 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()); /** @@ -118,7 +118,7 @@ std::unique_ptr tokenize( std::unique_ptr count_tokens( cudf::strings_column_view const& input, cudf::string_scalar const& delimiter = cudf::string_scalar{""}, - 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()); /** @@ -150,7 +150,7 @@ std::unique_ptr count_tokens( std::unique_ptr count_tokens( cudf::strings_column_view const& input, cudf::strings_column_view const& delimiters, - 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()); /** @@ -176,7 +176,7 @@ std::unique_ptr count_tokens( */ std::unique_ptr character_tokenize( cudf::strings_column_view const& input, - 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()); /** @@ -217,7 +217,7 @@ std::unique_ptr detokenize( cudf::strings_column_view const& input, cudf::column_view const& row_indices, cudf::string_scalar const& separator = cudf::string_scalar(" "), - 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()); /** @@ -239,7 +239,7 @@ struct tokenize_vocabulary { * @param mr Device memory resource used to allocate the returned column's device memory */ tokenize_vocabulary(cudf::strings_column_view const& input, - 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()); ~tokenize_vocabulary(); @@ -262,7 +262,7 @@ struct tokenize_vocabulary { */ std::unique_ptr load_vocabulary( cudf::strings_column_view const& input, - 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()); /** @@ -295,7 +295,7 @@ std::unique_ptr tokenize_with_vocabulary( tokenize_vocabulary const& vocabulary, cudf::string_scalar const& delimiter, cudf::size_type default_id = -1, - 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()); /** @} */ // end of tokenize group diff --git a/cpp/include/nvtext/wordpiece_tokenize.hpp b/cpp/include/nvtext/wordpiece_tokenize.hpp index 422a05012ce8..b1047132be35 100644 --- a/cpp/include/nvtext/wordpiece_tokenize.hpp +++ b/cpp/include/nvtext/wordpiece_tokenize.hpp @@ -37,7 +37,7 @@ struct wordpiece_vocabulary { * @param mr Device memory resource used to allocate the returned column's device memory */ wordpiece_vocabulary(cudf::strings_column_view const& input, - 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()); ~wordpiece_vocabulary(); @@ -60,7 +60,7 @@ struct wordpiece_vocabulary { */ std::unique_ptr load_wordpiece_vocabulary( cudf::strings_column_view const& input, - 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()); /** @@ -107,7 +107,7 @@ std::unique_ptr wordpiece_tokenize( cudf::strings_column_view const& input, wordpiece_vocabulary const& vocabulary, cudf::size_type max_words_per_row = 0, - 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()); /** @} */ // end of tokenize group diff --git a/cpp/src/io/avro/avro_gpu.cu b/cpp/src/io/avro/avro_gpu.cu index 4a0929c0484e..b5778ac97a0d 100644 --- a/cpp/src/io/avro/avro_gpu.cu +++ b/cpp/src/io/avro/avro_gpu.cu @@ -1,11 +1,11 @@ /* - * 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 */ #include "avro_gpu.hpp" #include "io/utilities/block_utils.cuh" -#include +#include using cudf::device_span; @@ -415,14 +415,14 @@ void DecodeAvroColumnData(device_span blocks, uint8_t const* avro_data, uint32_t schema_len, uint32_t min_row_size, - rmm::cuda_stream_view stream) + cuda::stream_ref stream) { // num_warps warps per threadblock dim3 const dim_block(32, num_warps); // 1 warp per datablock, num_warps datablocks per threadblock dim3 const dim_grid((blocks.size() + num_warps - 1) / num_warps, 1); - gpuDecodeAvroColumnData<<>>( + gpuDecodeAvroColumnData<<>>( blocks, schema, global_dictionary, avro_data, schema_len, min_row_size); CUDF_CUDA_TRY(cudaGetLastError()); } diff --git a/cpp/src/io/avro/avro_gpu.hpp b/cpp/src/io/avro/avro_gpu.hpp index dc429699bd80..7165dd5347e9 100644 --- a/cpp/src/io/avro/avro_gpu.hpp +++ b/cpp/src/io/avro/avro_gpu.hpp @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: Copyright (c) 2019-2023, NVIDIA CORPORATION. + * SPDX-FileCopyrightText: Copyright (c) 2019-2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved. * SPDX-License-Identifier: Apache-2.0 */ #pragma once @@ -8,7 +8,7 @@ #include -#include +#include namespace cudf { namespace io { @@ -43,7 +43,7 @@ void DecodeAvroColumnData(cudf::device_span blocks, uint8_t const* avro_data, uint32_t schema_len, uint32_t min_row_size, - rmm::cuda_stream_view stream); + cuda::stream_ref stream); } // namespace gpu } // namespace avro diff --git a/cpp/src/io/avro/reader_impl.cu b/cpp/src/io/avro/reader_impl.cu index 3c522dc658b7..b52461a31337 100644 --- a/cpp/src/io/avro/reader_impl.cu +++ b/cpp/src/io/avro/reader_impl.cu @@ -22,11 +22,11 @@ #include #include -#include #include #include #include +#include #include #include @@ -179,7 +179,7 @@ class metadata : public file_metadata { rmm::device_buffer decompress_data(datasource& source, metadata& meta, rmm::device_buffer const& comp_block_data, - rmm::cuda_stream_view stream) + cuda::stream_ref stream) { if (meta.codec == "deflate") { auto inflate_in = @@ -343,7 +343,7 @@ std::vector decode_data(metadata& meta, size_t num_rows, std::vector> const& selection, std::vector const& column_types, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { auto out_buffers = std::vector(); @@ -455,7 +455,7 @@ std::vector decode_data(metadata& meta, table_with_metadata read_avro(std::unique_ptr&& source, avro_reader_options const& options, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { auto skip_rows = options.get_skip_rows(); @@ -554,7 +554,7 @@ table_with_metadata read_avro(std::unique_ptr&& source, d_global_dict_data = cudf::detail::make_device_uvector_async( h_global_dict_data, stream, cudf::get_current_device_resource_ref()); - stream.synchronize(); + stream.wait(); } auto out_buffers = decode_data(meta, diff --git a/cpp/src/io/comp/common_internal.hpp b/cpp/src/io/comp/common_internal.hpp index 48ee8b1558e2..4477b0c28080 100644 --- a/cpp/src/io/comp/common_internal.hpp +++ b/cpp/src/io/comp/common_internal.hpp @@ -73,7 +73,7 @@ struct sorted_codec_parameters { [[nodiscard]] sorted_codec_parameters sort_decompression_tasks( device_span const> inputs, device_span const> outputs, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr); /** @@ -96,7 +96,7 @@ struct sorted_codec_parameters { host_engine_state host_state, size_t auto_mode_threshold, size_t hybrid_mode_cost_ratio, - rmm::cuda_stream_view stream); + cuda::stream_ref stream); /** * @brief Sorts input and output spans for compression by output size in descending order @@ -114,7 +114,7 @@ struct sorted_codec_parameters { [[nodiscard]] sorted_codec_parameters sort_compression_tasks( device_span const> inputs, device_span const> outputs, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr); /** @@ -137,7 +137,7 @@ struct sorted_codec_parameters { host_engine_state host_state, size_t auto_mode_threshold, size_t hybrid_mode_cost_ratio, - rmm::cuda_stream_view stream); + cuda::stream_ref stream); /** * @brief Copies results back to their original positions using the ordering map @@ -153,6 +153,6 @@ struct sorted_codec_parameters { void copy_results_to_original_order(device_span sorted_results, device_span original_results, device_span order, - rmm::cuda_stream_view stream); + cuda::stream_ref stream); } // namespace cudf::io::detail diff --git a/cpp/src/io/comp/compression.cpp b/cpp/src/io/comp/compression.cpp index 133ee485daaf..d55efe0fe144 100644 --- a/cpp/src/io/comp/compression.cpp +++ b/cpp/src/io/comp/compression.cpp @@ -292,7 +292,7 @@ void device_compress(compression_type compression, device_span const> inputs, device_span const> outputs, device_span results, - rmm::cuda_stream_view stream) + cuda::stream_ref stream) { CUDF_FUNC_RANGE(); if (compression == compression_type::NONE or inputs.empty()) { return; } @@ -314,7 +314,7 @@ void host_compress(compression_type compression, device_span const> inputs, device_span const> outputs, device_span results, - rmm::cuda_stream_view stream) + cuda::stream_ref stream) { CUDF_FUNC_RANGE(); if (compression == compression_type::NONE or inputs.empty()) { return; } @@ -322,7 +322,7 @@ void host_compress(compression_type compression, auto const num_chunks = inputs.size(); auto const h_inputs = cudf::detail::make_host_vector_async(inputs, stream); auto const h_outputs = cudf::detail::make_host_vector_async(outputs, stream); - stream.synchronize(); + stream.wait(); auto h_results = cudf::detail::make_pinned_vector(results, stream); @@ -425,7 +425,7 @@ void compress(compression_type compression, device_span const> inputs, device_span const> outputs, device_span results, - rmm::cuda_stream_view stream) + cuda::stream_ref stream) { CUDF_FUNC_RANGE(); diff --git a/cpp/src/io/comp/compression.cu b/cpp/src/io/comp/compression.cu index 882c70123918..231170427815 100644 --- a/cpp/src/io/comp/compression.cu +++ b/cpp/src/io/comp/compression.cu @@ -19,7 +19,7 @@ namespace cudf::io::detail { writer_compression_statistics collect_compression_statistics( device_span const> inputs, device_span results, - rmm::cuda_stream_view stream) + cuda::stream_ref stream) { // bytes_written on success auto const output_size_successful = thrust::transform_reduce( diff --git a/cpp/src/io/comp/compression.hpp b/cpp/src/io/comp/compression.hpp index 311edae99300..ecec78074aa8 100644 --- a/cpp/src/io/comp/compression.hpp +++ b/cpp/src/io/comp/compression.hpp @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: Copyright (c) 2024-2025, NVIDIA CORPORATION. + * SPDX-FileCopyrightText: Copyright (c) 2024-2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved. * SPDX-License-Identifier: Apache-2.0 */ @@ -47,7 +47,7 @@ namespace io::detail { [[nodiscard]] writer_compression_statistics collect_compression_statistics( device_span const> inputs, device_span results, - rmm::cuda_stream_view stream); + cuda::stream_ref stream); } // namespace io::detail } // namespace CUDF_EXPORT cudf diff --git a/cpp/src/io/comp/debrotli.cu b/cpp/src/io/comp/debrotli.cu index 1c647d7e38af..5ba36a7ebb98 100644 --- a/cpp/src/io/comp/debrotli.cu +++ b/cpp/src/io/comp/debrotli.cu @@ -53,7 +53,7 @@ THE SOFTWARE. #include #include -#include +#include namespace cudf::io::detail { @@ -2083,7 +2083,7 @@ size_t get_gpu_debrotli_scratch_size(int max_num_inputs) void gpu_debrotli(device_span const> inputs, device_span const> outputs, device_span results, - rmm::cuda_stream_view stream) + cuda::stream_ref stream) { // Scratch memory for decompressing rmm::device_uvector scratch( @@ -2095,12 +2095,12 @@ void gpu_debrotli(device_span const> inputs, auto const fb_heap_size = (uint32_t)((scratch.size() - sizeof(brotli_dictionary_s)) & ~0xf); - CUDF_CUDA_TRY(cudaMemsetAsync(scratch.data(), 0, 2 * sizeof(uint32_t), stream.value())); + CUDF_CUDA_TRY(cudaMemsetAsync(scratch.data(), 0, 2 * sizeof(uint32_t), stream.get())); // NOTE: The 128KB dictionary copy can have a relatively large overhead since source isn't // page-locked CUDF_CUDA_TRY(cudf::detail::memcpy_async( scratch.data() + fb_heap_size, get_brotli_dictionary(), sizeof(brotli_dictionary_s), stream)); - gpu_debrotli_kernel<<>>( + gpu_debrotli_kernel<<>>( inputs, outputs, results, scratch.data(), fb_heap_size); CUDF_CUDA_TRY(cudaGetLastError()); #if DUMP_FB_HEAP @@ -2110,7 +2110,7 @@ void gpu_debrotli(device_span const> inputs, while (cur < fb_heap_size && !(cur & 3)) { CUDF_CUDA_TRY( cudf::detail::memcpy_async(&dump[0], scratch.data() + cur, 2 * sizeof(uint32_t), stream)); - stream.synchronize(); + stream.wait(); printf("@%d: next = %d, size = %d\n", cur, dump[0], dump[1]); cur = (dump[0] > cur) ? dump[0] : 0xffff'ffffu; } diff --git a/cpp/src/io/comp/decompression.cpp b/cpp/src/io/comp/decompression.cpp index 1ea9553e395d..b0f6fff918a3 100644 --- a/cpp/src/io/comp/decompression.cpp +++ b/cpp/src/io/comp/decompression.cpp @@ -520,7 +520,7 @@ void device_decompress(compression_type compression, device_span results, size_t max_uncomp_chunk_size, size_t max_total_uncomp_size, - rmm::cuda_stream_view stream) + cuda::stream_ref stream) { CUDF_FUNC_RANGE(); if (compression == compression_type::NONE or inputs.empty()) { return; } @@ -549,7 +549,7 @@ void host_decompress(compression_type compression, device_span const> inputs, device_span const> outputs, device_span results, - rmm::cuda_stream_view stream) + cuda::stream_ref stream) { CUDF_FUNC_RANGE(); if (compression == compression_type::NONE or inputs.empty()) { return; } @@ -557,7 +557,7 @@ void host_decompress(compression_type compression, auto const num_chunks = inputs.size(); auto const h_inputs = cudf::detail::make_host_vector_async(inputs, stream); auto const h_outputs = cudf::detail::make_host_vector_async(outputs, stream); - stream.synchronize(); + stream.wait(); std::vector> tasks; auto const num_streams = @@ -645,7 +645,7 @@ size_t get_uncompressed_size(compression_type compression, host_span const> inputs, size_t max_uncomp_chunk_size, size_t max_total_uncomp_size, - rmm::cuda_stream_view stream) + cuda::stream_ref stream) { if (compression == compression_type::NONE or get_host_engine_state(compression) == host_engine_state::ON) { @@ -765,7 +765,7 @@ void decompress(compression_type compression, device_span results, size_t max_uncomp_chunk_size, size_t max_total_uncomp_size, - rmm::cuda_stream_view stream) + cuda::stream_ref stream) { CUDF_FUNC_RANGE(); diff --git a/cpp/src/io/comp/decompression.hpp b/cpp/src/io/comp/decompression.hpp index 526e5306f22d..52ca761a4546 100644 --- a/cpp/src/io/comp/decompression.hpp +++ b/cpp/src/io/comp/decompression.hpp @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: Copyright (c) 2018-2025, NVIDIA CORPORATION. + * SPDX-FileCopyrightText: Copyright (c) 2018-2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved. * SPDX-License-Identifier: Apache-2.0 */ @@ -52,7 +52,7 @@ struct decompression_info { device_span const> inputs, size_t max_uncomp_chunk_size, size_t max_total_uncomp_size, - rmm::cuda_stream_view stream); + cuda::stream_ref stream); /** * @brief Checks if the decompression scratch size can be computed using the extended API of the @@ -72,7 +72,7 @@ struct decompression_info { */ void get_snappy_uncompressed_size(device_span const> inputs, device_span uncompressed_sizes, - rmm::cuda_stream_view stream); + cuda::stream_ref stream); } // namespace io::detail } // namespace CUDF_EXPORT cudf diff --git a/cpp/src/io/comp/gpuinflate.cu b/cpp/src/io/comp/gpuinflate.cu index e642a97c7795..36ac6ff2e346 100644 --- a/cpp/src/io/comp/gpuinflate.cu +++ b/cpp/src/io/comp/gpuinflate.cu @@ -40,7 +40,6 @@ Mark Adler madler@alumni.caltech.edu #include #include -#include #include #include @@ -48,6 +47,7 @@ Mark Adler madler@alumni.caltech.edu #include #include #include +#include #include #include #include @@ -1200,7 +1200,7 @@ class cost_model { sorted_codec_parameters sort_tasks(device_span const> inputs, device_span const> outputs, task_type task_type, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { CUDF_FUNC_RANGE(); @@ -1251,7 +1251,7 @@ sorted_codec_parameters sort_tasks(device_span const> size_t auto_mode_threshold, size_t hybrid_mode_cost_ratio, task_type task, - rmm::cuda_stream_view stream) + cuda::stream_ref stream) { CUDF_FUNC_RANGE(); if (host_state == host_engine_state::OFF or inputs.empty()) { return 0; } @@ -1306,12 +1306,12 @@ void gpuinflate(device_span const> inputs, device_span const> outputs, device_span results, gzip_header_included parse_hdr, - rmm::cuda_stream_view stream) + cuda::stream_ref stream) { constexpr int block_size = 128; // Threads per block if (inputs.size() > 0) { inflate_kernel_no_racecheck - <<>>(inputs, outputs, results, parse_hdr); + <<>>(inputs, outputs, results, parse_hdr); CUDF_CUDA_TRY(cudaGetLastError()); } } @@ -1319,7 +1319,7 @@ void gpuinflate(device_span const> inputs, sorted_codec_parameters sort_decompression_tasks( device_span const> inputs, device_span const> outputs, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { return sort_tasks(inputs, outputs, task_type::DECOMPRESSION, stream, mr); @@ -1327,7 +1327,7 @@ sorted_codec_parameters sort_decompression_tasks( sorted_codec_parameters sort_compression_tasks(device_span const> inputs, device_span const> outputs, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { return sort_tasks(inputs, outputs, task_type::COMPRESSION, stream, mr); @@ -1336,7 +1336,7 @@ sorted_codec_parameters sort_compression_tasks(device_span sorted_results, device_span original_results, device_span order, - rmm::cuda_stream_view stream) + cuda::stream_ref stream) { thrust::scatter(rmm::exec_policy_nosync(stream, cudf::get_current_device_resource_ref()), sorted_results.begin(), @@ -1350,7 +1350,7 @@ size_t split_compression_tasks(device_span const> inp host_engine_state host_state, size_t auto_mode_threshold, size_t hybrid_mode_cost_ratio, - rmm::cuda_stream_view stream) + cuda::stream_ref stream) { return split_tasks(inputs, outputs, @@ -1366,7 +1366,7 @@ size_t split_decompression_tasks(device_span const> i host_engine_state host_state, size_t auto_mode_threshold, size_t hybrid_mode_cost_ratio, - rmm::cuda_stream_view stream) + cuda::stream_ref stream) { return split_tasks(inputs, outputs, diff --git a/cpp/src/io/comp/gpuinflate.hpp b/cpp/src/io/comp/gpuinflate.hpp index 2fbf7b86a29d..a9015b55f384 100644 --- a/cpp/src/io/comp/gpuinflate.hpp +++ b/cpp/src/io/comp/gpuinflate.hpp @@ -12,7 +12,7 @@ #include #include -#include +#include #include @@ -37,7 +37,7 @@ void gpuinflate(device_span const> inputs, device_span const> outputs, device_span results, gzip_header_included parse_hdr, - rmm::cuda_stream_view stream); + cuda::stream_ref stream); /** * @brief Interface for decompressing Snappy-compressed data @@ -54,7 +54,7 @@ CUDF_EXPORT void gpu_unsnap(device_span const> inputs, device_span const> outputs, device_span results, - rmm::cuda_stream_view stream); + cuda::stream_ref stream); /** * @brief Computes the size of temporary memory for Brotli decompression @@ -81,7 +81,7 @@ CUDF_EXPORT void gpu_debrotli(device_span const> inputs, device_span const> outputs, device_span results, - rmm::cuda_stream_view stream); + cuda::stream_ref stream); /** * @brief Interface for compressing data with Snappy @@ -97,6 +97,6 @@ void gpu_debrotli(device_span const> inputs, void gpu_snap(device_span const> inputs, device_span const> outputs, device_span results, - rmm::cuda_stream_view stream); + cuda::stream_ref stream); } // namespace cudf::io::detail diff --git a/cpp/src/io/comp/nvcomp_adapter.cpp b/cpp/src/io/comp/nvcomp_adapter.cpp index f1e0dc545652..b07f440bf663 100644 --- a/cpp/src/io/comp/nvcomp_adapter.cpp +++ b/cpp/src/io/comp/nvcomp_adapter.cpp @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: Copyright (c) 2022-2026, NVIDIA CORPORATION. + * SPDX-FileCopyrightText: Copyright (c) 2022-2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved. * SPDX-License-Identifier: Apache-2.0 */ @@ -142,7 +142,7 @@ auto batched_decompress_async(compression_type compression, size_t temp_bytes, void* const* device_uncompressed_chunk_ptrs, nvcompStatus_t* device_statuses, - rmm::cuda_stream_view stream) + cuda::stream_ref stream) { switch (compression) { case compression_type::SNAPPY: { @@ -161,7 +161,7 @@ auto batched_decompress_async(compression_type compression, device_uncompressed_chunk_ptrs, opts, device_statuses, - stream.value()); + stream.get()); } case compression_type::ZSTD: return nvcompBatchedZstdDecompressAsync(device_compressed_chunk_ptrs, @@ -174,7 +174,7 @@ auto batched_decompress_async(compression_type compression, device_uncompressed_chunk_ptrs, nvcompBatchedZstdDecompressDefaultOpts, device_statuses, - stream.value()); + stream.get()); case compression_type::DEFLATE: return nvcompBatchedDeflateDecompressAsync(device_compressed_chunk_ptrs, device_compressed_chunk_bytes, @@ -186,7 +186,7 @@ auto batched_decompress_async(compression_type compression, device_uncompressed_chunk_ptrs, nvcompBatchedDeflateDecompressDefaultOpts, device_statuses, - stream.value()); + stream.get()); case compression_type::LZ4: return nvcompBatchedLZ4DecompressAsync(device_compressed_chunk_ptrs, device_compressed_chunk_bytes, @@ -198,7 +198,7 @@ auto batched_decompress_async(compression_type compression, device_uncompressed_chunk_ptrs, nvcompBatchedLZ4DecompressDefaultOpts, device_statuses, - stream.value()); + stream.get()); case compression_type::GZIP: return nvcompBatchedGzipDecompressAsync(device_compressed_chunk_ptrs, device_compressed_chunk_bytes, @@ -210,7 +210,7 @@ auto batched_decompress_async(compression_type compression, device_uncompressed_chunk_ptrs, nvcompBatchedGzipDecompressDefaultOpts, device_statuses, - stream.value()); + stream.get()); default: UNSUPPORTED_COMPRESSION(compression); } } @@ -284,7 +284,7 @@ void batched_compress_async(compression_type compression, void* const* device_compressed_ptrs, size_t* device_compressed_bytes, nvcompStatus_t* device_nvcomp_statuses, - rmm::cuda_stream_view stream) + cuda::stream_ref stream) { nvcompStatus_t nvcomp_status = nvcompStatus_t::nvcompSuccess; switch (compression) { @@ -299,7 +299,7 @@ void batched_compress_async(compression_type compression, device_compressed_bytes, nvcompBatchedSnappyCompressDefaultOpts, device_nvcomp_statuses, - stream.value()); + stream.get()); break; case compression_type::DEFLATE: nvcomp_status = nvcompBatchedDeflateCompressAsync(device_uncompressed_ptrs, @@ -312,7 +312,7 @@ void batched_compress_async(compression_type compression, device_compressed_bytes, nvcompBatchedDeflateCompressDefaultOpts, device_nvcomp_statuses, - stream.value()); + stream.get()); break; case compression_type::ZSTD: nvcomp_status = nvcompBatchedZstdCompressAsync(device_uncompressed_ptrs, @@ -325,7 +325,7 @@ void batched_compress_async(compression_type compression, device_compressed_bytes, nvcompBatchedZstdCompressDefaultOpts, device_nvcomp_statuses, - stream.value()); + stream.get()); break; case compression_type::LZ4: nvcomp_status = nvcompBatchedLZ4CompressAsync(device_uncompressed_ptrs, @@ -338,7 +338,7 @@ void batched_compress_async(compression_type compression, device_compressed_bytes, nvcompBatchedLZ4CompressDefaultOpts, device_nvcomp_statuses, - stream.value()); + stream.get()); break; default: UNSUPPORTED_COMPRESSION(compression); } @@ -463,7 +463,7 @@ size_t batched_decompress_temp_size_ex(compression_type compression, device_span input_data_sizes, size_t max_uncomp_chunk_size, size_t max_total_uncomp_size, - rmm::cuda_stream_view stream) + cuda::stream_ref stream) { if (is_batched_decompress_temp_size_ex_supported(compression)) { size_t temp_size = 0; @@ -477,7 +477,7 @@ size_t batched_decompress_temp_size_ex(compression_type compression, &temp_size, max_total_uncomp_size, d_statuses.data(), - stream.value()); + stream.get()); if (nvcomp_status == nvcompStatus_t::nvcompSuccess) { auto const h_statuses = cudf::detail::make_host_vector(d_statuses, stream); auto const are_all_success = @@ -517,7 +517,7 @@ size_t batched_decompress_temp_size_ex(compression_type compression, device_span const> inputs, size_t max_uncomp_chunk_size, size_t max_total_uncomp_size, - rmm::cuda_stream_view stream) + cuda::stream_ref stream) { auto const [d_input_ptrs, d_input_sizes] = create_get_temp_size_args(inputs, stream); @@ -531,7 +531,7 @@ void batched_decompress(compression_type compression, device_span results, size_t max_uncomp_chunk_size, size_t max_total_uncomp_size, - rmm::cuda_stream_view stream) + cuda::stream_ref stream) { CUDF_EXPECTS(inputs.size() > 0, "inputs must be non-empty"); CUDF_EXPECTS(inputs.size() == outputs.size(), "inputs and outputs must have the same size"); @@ -566,7 +566,7 @@ void batched_decompress(compression_type compression, scratch.size(), nvcomp_args.output_data_ptrs.data(), nvcomp_statuses.data(), - stream.value()); + stream.get()); CHECK_NVCOMP_STATUS(nvcomp_status); update_compression_results(nvcomp_statuses, actual_uncompressed_data_sizes, results, stream); @@ -616,7 +616,7 @@ void batched_compress(compression_type compression, device_span const> inputs, device_span const> outputs, device_span results, - rmm::cuda_stream_view stream) + cuda::stream_ref stream) { CUDF_EXPECTS(inputs.size() > 0, "inputs must be non-empty"); CUDF_EXPECTS(inputs.size() == outputs.size(), "inputs and outputs must have the same size"); @@ -651,7 +651,7 @@ void batched_compress(compression_type compression, nvcomp_args.output_data_ptrs.data(), actual_compressed_data_sizes.data(), nvcomp_statuses.data(), - stream.value()); + stream.get()); update_compression_results(nvcomp_statuses, actual_compressed_data_sizes, results, stream); } diff --git a/cpp/src/io/comp/nvcomp_adapter.cu b/cpp/src/io/comp/nvcomp_adapter.cu index e5c97c25ebb8..46dae04ae9be 100644 --- a/cpp/src/io/comp/nvcomp_adapter.cu +++ b/cpp/src/io/comp/nvcomp_adapter.cu @@ -18,7 +18,7 @@ namespace cudf::io::detail::nvcomp { batched_args create_batched_nvcomp_args(device_span const> inputs, device_span const> outputs, - rmm::cuda_stream_view stream) + cuda::stream_ref stream) { auto const num_comp_chunks = inputs.size(); rmm::device_uvector input_data_ptrs(num_comp_chunks, stream); @@ -51,7 +51,7 @@ batched_args create_batched_nvcomp_args(device_span c } std::pair, rmm::device_uvector> create_get_temp_size_args( - device_span const> inputs, rmm::cuda_stream_view stream) + device_span const> inputs, cuda::stream_ref stream) { rmm::device_uvector input_data_ptrs(inputs.size(), stream); rmm::device_uvector input_data_sizes(inputs.size(), stream); @@ -70,7 +70,7 @@ std::pair, rmm::device_uvector> create_ void update_compression_results(device_span nvcomp_stats, device_span actual_output_sizes, device_span results, - rmm::cuda_stream_view stream) + cuda::stream_ref stream) { thrust::transform_if( rmm::exec_policy_nosync(stream, cudf::get_current_device_resource_ref()), @@ -90,7 +90,7 @@ void update_compression_results(device_span nvcomp_stats, void update_compression_results(device_span actual_output_sizes, device_span results, - rmm::cuda_stream_view stream) + cuda::stream_ref stream) { thrust::transform_if( rmm::exec_policy_nosync(stream, cudf::get_current_device_resource_ref()), @@ -105,7 +105,7 @@ void update_compression_results(device_span actual_output_sizes, void skip_unsupported_inputs(device_span input_sizes, device_span results, std::optional max_valid_input_size, - rmm::cuda_stream_view stream) + cuda::stream_ref stream) { if (max_valid_input_size.has_value()) { auto status_size_it = cuda::make_zip_iterator(input_sizes.begin(), results.begin()); @@ -124,7 +124,7 @@ void skip_unsupported_inputs(device_span input_sizes, } } std::pair max_chunk_and_total_input_size(device_span input_sizes, - rmm::cuda_stream_view stream) + cuda::stream_ref stream) { auto const max = thrust::reduce(rmm::exec_policy_nosync(stream, cudf::get_current_device_resource_ref()), diff --git a/cpp/src/io/comp/nvcomp_adapter.cuh b/cpp/src/io/comp/nvcomp_adapter.cuh index e3057c8d5ee0..989d81024e8e 100644 --- a/cpp/src/io/comp/nvcomp_adapter.cuh +++ b/cpp/src/io/comp/nvcomp_adapter.cuh @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: Copyright (c) 2022-2025, NVIDIA CORPORATION. + * SPDX-FileCopyrightText: Copyright (c) 2022-2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved. * SPDX-License-Identifier: Apache-2.0 */ @@ -9,9 +9,10 @@ #include -#include #include +#include + #include #include @@ -34,13 +35,13 @@ struct batched_args { */ batched_args create_batched_nvcomp_args(device_span const> inputs, device_span const> outputs, - rmm::cuda_stream_view stream); + cuda::stream_ref stream); /** * @brief Prepares device arrays of input pointers and sizes for use with nvCOMP temp size APIs. */ std::pair, rmm::device_uvector> create_get_temp_size_args( - device_span const> inputs, rmm::cuda_stream_view stream); + device_span const> inputs, cuda::stream_ref stream); /** * @brief Convert nvcomp statuses and output sizes into cuIO compression results. @@ -48,14 +49,14 @@ std::pair, rmm::device_uvector> create_ void update_compression_results(device_span nvcomp_stats, device_span actual_output_sizes, device_span results, - rmm::cuda_stream_view stream); + cuda::stream_ref stream); /** * @brief Fill the result array based on the actual output sizes. */ void update_compression_results(device_span actual_output_sizes, device_span results, - rmm::cuda_stream_view stream); + cuda::stream_ref stream); /** * @brief Mark unsupported input chunks for skipping. @@ -63,12 +64,12 @@ void update_compression_results(device_span actual_output_sizes, void skip_unsupported_inputs(device_span input_sizes, device_span results, std::optional max_valid_input_size, - rmm::cuda_stream_view stream); + cuda::stream_ref stream); /** * @brief Returns the size of the largest input chunk and the total input size. */ std::pair max_chunk_and_total_input_size(device_span input_sizes, - rmm::cuda_stream_view stream); + cuda::stream_ref stream); } // namespace cudf::io::detail::nvcomp diff --git a/cpp/src/io/comp/nvcomp_adapter.hpp b/cpp/src/io/comp/nvcomp_adapter.hpp index 8c701f99234d..a64154586fc1 100644 --- a/cpp/src/io/comp/nvcomp_adapter.hpp +++ b/cpp/src/io/comp/nvcomp_adapter.hpp @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: Copyright (c) 2022-2025, NVIDIA CORPORATION. + * SPDX-FileCopyrightText: Copyright (c) 2022-2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved. * SPDX-License-Identifier: Apache-2.0 */ @@ -11,7 +11,7 @@ #include #include -#include +#include #include @@ -33,7 +33,7 @@ void batched_decompress(compression_type compression, device_span results, size_t max_uncomp_chunk_size, size_t max_total_uncomp_size, - rmm::cuda_stream_view stream); + cuda::stream_ref stream); /** * @brief Return the amount of temporary space required in bytes for a given decompression @@ -73,7 +73,7 @@ size_t batched_decompress_temp_size(compression_type compression, device_span const> inputs, size_t max_uncomp_chunk_size, size_t max_total_uncomp_size, - rmm::cuda_stream_view stream); + cuda::stream_ref stream); [[nodiscard]] bool is_batched_decompress_temp_size_ex_supported(compression_type compression); @@ -132,6 +132,6 @@ void batched_compress(compression_type compression, device_span const> inputs, device_span const> outputs, device_span results, - rmm::cuda_stream_view stream); + cuda::stream_ref stream); } // namespace cudf::io::detail::nvcomp diff --git a/cpp/src/io/comp/snap.cu b/cpp/src/io/comp/snap.cu index 306f08998f9d..f9c599b6be7a 100644 --- a/cpp/src/io/comp/snap.cu +++ b/cpp/src/io/comp/snap.cu @@ -6,7 +6,7 @@ #include "gpuinflate.hpp" #include "io/utilities/block_utils.cuh" -#include +#include namespace cudf::io::detail { constexpr int hash_bits = 12; @@ -313,12 +313,12 @@ CUDF_KERNEL void __launch_bounds__(128) void gpu_snap(device_span const> inputs, device_span const> outputs, device_span results, - rmm::cuda_stream_view stream) + cuda::stream_ref stream) { dim3 dim_block(128, 1); // 4 warps per stream, 1 stream per block dim3 dim_grid(inputs.size(), 1); if (inputs.size() > 0) { - snap_kernel_no_racecheck<<>>(inputs, outputs, results); + snap_kernel_no_racecheck<<>>(inputs, outputs, results); CUDF_CUDA_TRY(cudaGetLastError()); } } diff --git a/cpp/src/io/comp/unsnap.cu b/cpp/src/io/comp/unsnap.cu index f81e4c425dd3..0189ecadcb77 100644 --- a/cpp/src/io/comp/unsnap.cu +++ b/cpp/src/io/comp/unsnap.cu @@ -10,9 +10,8 @@ #include #include -#include - #include +#include namespace cudf::io::detail { constexpr int32_t batch_size = (1 << 5); @@ -711,7 +710,7 @@ CUDF_KERNEL void __launch_bounds__(block_size) void gpu_unsnap(device_span const> inputs, device_span const> outputs, device_span results, - rmm::cuda_stream_view stream) + cuda::stream_ref stream) { if (inputs.empty()) { return; } @@ -719,7 +718,7 @@ void gpu_unsnap(device_span const> inputs, dim3 dim_grid(inputs.size(), 1); // TODO: Check max grid dimensions vs max expected count unsnap_kernel_no_racecheck<128> - <<>>(inputs, outputs, results); + <<>>(inputs, outputs, results); CUDF_CUDA_TRY(cudaGetLastError()); } @@ -751,7 +750,7 @@ CUDF_KERNEL void get_snappy_uncompressed_size_kernel( void get_snappy_uncompressed_size(device_span const> inputs, device_span uncompressed_sizes, - rmm::cuda_stream_view stream) + cuda::stream_ref stream) { if (inputs.empty()) { return; } @@ -759,7 +758,7 @@ void get_snappy_uncompressed_size(device_span const> auto const num_blocks = cudf::util::div_rounding_up_safe(inputs.size(), threads_per_block); - get_snappy_uncompressed_size_kernel<<>>( + get_snappy_uncompressed_size_kernel<<>>( inputs, uncompressed_sizes); CUDF_CUDA_TRY(cudaGetLastError()); } diff --git a/cpp/src/io/csv/csv_gpu.cu b/cpp/src/io/csv/csv_gpu.cu index ef24422400b9..32b9f56cd865 100644 --- a/cpp/src/io/csv/csv_gpu.cu +++ b/cpp/src/io/csv/csv_gpu.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 */ @@ -24,11 +24,11 @@ #include #include -#include #include #include #include +#include #include #include #include @@ -802,7 +802,7 @@ CUDF_KERNEL void __launch_bounds__(rowofs_block_dim) size_t __host__ count_blank_rows(cudf::io::parse_options_view const& opts, device_span data, device_span row_offsets, - rmm::cuda_stream_view stream) + cuda::stream_ref stream) { auto const newline = opts.skipblanklines ? opts.terminator : opts.comment; auto const comment = opts.comment != '\0' ? opts.comment : newline; @@ -820,7 +820,7 @@ size_t __host__ count_blank_rows(cudf::io::parse_options_view const& opts, device_span __host__ remove_blank_rows(cudf::io::parse_options_view const& options, device_span data, device_span row_offsets, - rmm::cuda_stream_view stream) + cuda::stream_ref stream) { size_t d_size = data.size(); auto const newline = options.skipblanklines ? options.terminator : options.comment; @@ -843,7 +843,7 @@ cudf::detail::host_vector detect_column_types( device_span const column_flags, device_span const row_starts, size_t const num_active_columns, - rmm::cuda_stream_view stream) + cuda::stream_ref stream) { // Calculate actual block count to use based on records count int const block_size = csvparse_block_dim; @@ -852,7 +852,7 @@ cudf::detail::host_vector detect_column_types( auto d_stats = cudf::detail::make_zeroed_device_uvector_async( num_active_columns, stream, cudf::get_current_device_resource_ref()); - data_type_detection<<>>( + data_type_detection<<>>( options, data, column_flags, row_starts, d_stats); CUDF_CUDA_TRY(cudaGetLastError()); @@ -868,22 +868,22 @@ void decode_row_column_data(cudf::io::parse_options_view const& options, device_span valids, device_span valid_counts, device_span is_quoted_flags, - rmm::cuda_stream_view stream) + cuda::stream_ref stream) { // Calculate actual block count to use based on records count auto const block_size = csvparse_block_dim; auto const num_rows = row_offsets.size() - 1; auto const grid_size = cudf::util::div_rounding_up_safe(num_rows, block_size); - convert_csv_to_cudf<<>>(options, - data, - column_flags, - row_offsets, - dtypes, - columns, - valids, - valid_counts, - is_quoted_flags); + convert_csv_to_cudf<<>>(options, + data, + column_flags, + row_offsets, + dtypes, + columns, + valids, + valid_counts, + is_quoted_flags); CUDF_CUDA_TRY(cudaGetLastError()); } @@ -898,12 +898,12 @@ uint32_t __host__ gather_row_offsets(parse_options_view const& options, size_t byte_range_start, size_t byte_range_end, size_t skip_rows, - rmm::cuda_stream_view stream) + cuda::stream_ref stream) { uint32_t dim_grid = 1 + (chunk_size / rowofs_block_bytes); auto ctxtree = rmm::device_uvector(dim_grid * bk_ctxtree_size, stream); - gather_row_offsets_gpu<<>>( + gather_row_offsets_gpu<<>>( row_ctx, ctxtree, offsets_out, diff --git a/cpp/src/io/csv/csv_gpu.hpp b/cpp/src/io/csv/csv_gpu.hpp index 85e7051bcccc..c4b4563962f4 100644 --- a/cpp/src/io/csv/csv_gpu.hpp +++ b/cpp/src/io/csv/csv_gpu.hpp @@ -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 */ @@ -10,7 +10,7 @@ #include #include -#include +#include using cudf::device_span; @@ -149,7 +149,7 @@ uint32_t gather_row_offsets(cudf::io::parse_options_view const& options, size_t byte_range_start, size_t byte_range_end, size_t skip_rows, - rmm::cuda_stream_view stream); + cuda::stream_ref stream); /** * Count the number of blank rows in the given row offset array @@ -162,7 +162,7 @@ uint32_t gather_row_offsets(cudf::io::parse_options_view const& options, size_t count_blank_rows(cudf::io::parse_options_view const& options, device_span data, device_span row_offsets, - rmm::cuda_stream_view stream); + cuda::stream_ref stream); /** * Remove blank rows in the given row offset array @@ -175,7 +175,7 @@ size_t count_blank_rows(cudf::io::parse_options_view const& options, device_span remove_blank_rows(cudf::io::parse_options_view const& options, device_span data, device_span row_offsets, - rmm::cuda_stream_view stream); + cuda::stream_ref stream); /** * @brief Launches kernel for detecting possible dtype of each column of data @@ -195,7 +195,7 @@ cudf::detail::host_vector detect_column_types( device_span column_flags, device_span row_offsets, size_t const num_active_columns, - rmm::cuda_stream_view stream); + cuda::stream_ref stream); /** * @brief Launches kernel for decoding row-column data @@ -221,7 +221,7 @@ void decode_row_column_data(cudf::io::parse_options_view const& options, device_span valids, device_span valid_counts, device_span is_quoted, - rmm::cuda_stream_view stream); + cuda::stream_ref stream); } // namespace gpu } // namespace csv diff --git a/cpp/src/io/csv/durations.cu b/cpp/src/io/csv/durations.cu index 02988ac4870c..8c282dc7e8a1 100644 --- a/cpp/src/io/csv/durations.cu +++ b/cpp/src/io/csv/durations.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 @@ -13,10 +13,9 @@ #include #include -#include - #include #include +#include #include #include @@ -164,7 +163,7 @@ struct duration_to_string_fn : public duration_to_string_size_fn { struct dispatch_from_durations_fn { template std::unique_ptr operator()(column_view const& durations, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) const requires(cudf::is_duration()) { @@ -202,7 +201,7 @@ struct dispatch_from_durations_fn { // non-duration types throw an exception template std::unique_ptr operator()(column_view const&, - rmm::cuda_stream_view, + cuda::stream_ref, rmm::device_async_resource_ref) const requires(not cudf::is_duration()) { @@ -213,7 +212,7 @@ struct dispatch_from_durations_fn { } // namespace std::unique_ptr pandas_format_durations(column_view const& durations, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { size_type strings_count = durations.size(); diff --git a/cpp/src/io/csv/durations.hpp b/cpp/src/io/csv/durations.hpp index 538cd45bc773..00dfa9caafc1 100644 --- a/cpp/src/io/csv/durations.hpp +++ b/cpp/src/io/csv/durations.hpp @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: Copyright (c) 2021-2024, NVIDIA CORPORATION. + * SPDX-FileCopyrightText: Copyright (c) 2021-2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved. * SPDX-License-Identifier: Apache-2.0 */ @@ -8,7 +8,7 @@ #include #include -#include +#include #include @@ -18,7 +18,7 @@ namespace detail { namespace csv { std::unique_ptr pandas_format_durations(column_view const& durations, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr); } // namespace csv diff --git a/cpp/src/io/csv/reader_impl.cu b/cpp/src/io/csv/reader_impl.cu index 9990f39f3d72..98caa3984001 100644 --- a/cpp/src/io/csv/reader_impl.cu +++ b/cpp/src/io/csv/reader_impl.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 */ @@ -39,11 +39,11 @@ #include #include -#include #include #include #include +#include #include #include @@ -89,7 +89,7 @@ class selected_rows_offsets { : all{std::move(data)}, selected{selected_span} { } - explicit selected_rows_offsets(rmm::cuda_stream_view stream) : all{0, stream}, selected{all} {} + explicit selected_rows_offsets(cuda::stream_ref stream) : all{0, stream}, selected{all} {} operator device_span() const { return selected; } void shrink(size_t size) @@ -201,7 +201,7 @@ std::vector get_column_names(std::vector const& row, } template -void erase_except_last(C& container, rmm::cuda_stream_view stream) +void erase_except_last(C& container, cuda::stream_ref stream) { cudf::detail::device_single_thread( [span = device_span{container}] __device__() mutable { @@ -251,7 +251,7 @@ std::pair, selected_rows_offsets> load_data_and_gather size_t skip_rows, int64_t num_rows, bool load_whole_file, - rmm::cuda_stream_view stream) + cuda::stream_ref stream) { constexpr size_t max_chunk_bytes = 64 * 1024 * 1024; // 64MB @@ -445,7 +445,7 @@ std::pair, selected_rows_offsets> select_data_and_row_ csv_reader_options const& reader_opts, std::vector& header, parse_options const& parse_opts, - rmm::cuda_stream_view stream) + cuda::stream_ref stream) { auto range_offset = reader_opts.get_byte_range_offset(); auto range_size = reader_opts.get_byte_range_size(); @@ -581,7 +581,7 @@ void infer_column_types(parse_options const& parse_opts, int32_t num_records, data_type timestamp_type, host_span column_types, - rmm::cuda_stream_view stream) + cuda::stream_ref stream) { if (num_records == 0) { for (auto col_idx = 0u; col_idx < column_flags.size(); ++col_idx) { @@ -605,7 +605,7 @@ void infer_column_types(parse_options const& parse_opts, row_offsets, num_inferred_columns, stream); - stream.synchronize(); + stream.wait(); auto inf_col_idx = 0; for (auto col_idx = 0u; col_idx < column_flags.size(); ++col_idx) { @@ -652,7 +652,7 @@ decode_result decode_data(parse_options const& parse_opts, int32_t num_records, int32_t num_actual_columns, int32_t num_active_columns, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { // Alloc output; columns' data memory is still expected for empty dataframe @@ -720,7 +720,7 @@ cudf::detail::host_vector determine_column_types( int32_t num_records, host_span column_flags, cudf::size_type num_active_columns, - rmm::cuda_stream_view stream) + cuda::stream_ref stream) { std::vector column_types(column_flags.size()); @@ -760,7 +760,7 @@ cudf::detail::host_vector determine_column_types( table_with_metadata read_csv(cudf::io::datasource* source, csv_reader_options const& reader_opts, parse_options const& parse_opts, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { std::vector header; @@ -991,7 +991,7 @@ table_with_metadata read_csv(cudf::io::datasource* source, auto const num_tasks = cudf::util::div_rounding_up_safe(num_string_cols, cols_per_task); auto streams = cudf::detail::fork_streams(stream, num_tasks); - auto process_string_column = [&](size_t str_col_idx, rmm::cuda_stream_view col_stream) { + auto process_string_column = [&](size_t str_col_idx, cuda::stream_ref col_stream) { auto const col_idx = string_col_indices[str_col_idx]; auto const is_quoted = device_span(is_quoted_flags[str_col_idx]); auto* buffer = &out_buffers[col_idx]; @@ -1107,7 +1107,7 @@ table_with_metadata read_csv(cudf::io::datasource* source, */ cudf::detail::trie create_na_trie(char quotechar, csv_reader_options const& reader_opts, - rmm::cuda_stream_view stream) + cuda::stream_ref stream) { // Default values to recognize as null values static std::vector const default_na_values{"", @@ -1144,8 +1144,7 @@ cudf::detail::trie create_na_trie(char quotechar, return cudf::detail::create_serialized_trie(na_values, stream); } -parse_options make_parse_options(csv_reader_options const& reader_opts, - rmm::cuda_stream_view stream) +parse_options make_parse_options(csv_reader_options const& reader_opts, cuda::stream_ref stream) { auto parse_opts = parse_options{}; @@ -1206,7 +1205,7 @@ parse_options make_parse_options(csv_reader_options const& reader_opts, table_with_metadata read_csv(std::unique_ptr&& source, csv_reader_options const& options, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { auto parse_options = make_parse_options(options, stream); diff --git a/cpp/src/io/csv/writer_impl.cu b/cpp/src/io/csv/writer_impl.cu index 63407408eb2e..1f393bc66b0d 100644 --- a/cpp/src/io/csv/writer_impl.cu +++ b/cpp/src/io/csv/writer_impl.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 */ @@ -32,9 +32,9 @@ #include #include -#include #include +#include #include #include #include @@ -114,7 +114,7 @@ struct escape_strings_fn { struct column_to_strings_fn { explicit column_to_strings_fn(csv_writer_options const& options, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) : options_(options), stream_(stream), mr_(mr) { @@ -255,7 +255,7 @@ struct column_to_strings_fn { private: csv_writer_options const& options_; - rmm::cuda_stream_view stream_; + cuda::stream_ref stream_; rmm::device_async_resource_ref mr_; }; } // unnamed namespace @@ -266,7 +266,7 @@ void write_chunked_begin(data_sink* out_sink, table_view const& table, host_span user_column_names, csv_writer_options const& options, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { if (options.is_enabled_include_header()) { @@ -332,7 +332,7 @@ void write_chunked_begin(data_sink* out_sink, void write_chunked(data_sink* out_sink, strings_column_view const& str_column_view, csv_writer_options const& options, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { // algorithm outline: @@ -403,7 +403,7 @@ void write_csv(data_sink* out_sink, table_view const& table, host_span user_column_names, csv_writer_options const& options, - rmm::cuda_stream_view stream) + cuda::stream_ref stream) { // write header: column names separated by delimiter: // (even for tables with no rows) diff --git a/cpp/src/io/cudftable.cpp b/cpp/src/io/cudftable.cpp index 01cdeff5da07..09d4fcd3de02 100644 --- a/cpp/src/io/cudftable.cpp +++ b/cpp/src/io/cudftable.cpp @@ -13,9 +13,10 @@ #include #include -#include #include +#include + namespace cudf::io::experimental { namespace detail { @@ -65,7 +66,7 @@ static_assert(sizeof(cudftable_header) == 32); } // anonymous namespace -void write_cudftable(data_sink* sink, table_view const& input, rmm::cuda_stream_view stream) +void write_cudftable(data_sink* sink, table_view const& input, cuda::stream_ref stream) { auto const packed = cudf::pack(input, stream, cudf::get_current_device_resource_ref()); @@ -89,7 +90,7 @@ void write_cudftable(data_sink* sink, table_view const& input, rmm::cuda_stream_ } packed_table read_cudftable(datasource* source, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { auto const header_size = sizeof(cudftable_header); @@ -121,7 +122,7 @@ packed_table read_cudftable(datasource* source, auto host_buffer = source->host_read(data_offset, header.data_length); CUDF_CUDA_TRY(cudf::detail::memcpy_async( packed.gpu_data->data(), host_buffer->data(), header.data_length, stream)); - stream.synchronize(); + stream.wait(); } auto unpacked_view = cudf::unpack(packed); diff --git a/cpp/src/io/fst/logical_stack.cuh b/cpp/src/io/fst/logical_stack.cuh index 2c4e01b84177..054f2845d33b 100644 --- a/cpp/src/io/fst/logical_stack.cuh +++ b/cpp/src/io/fst/logical_stack.cuh @@ -305,7 +305,7 @@ void sparse_stack_op_to_top_of_stack(StackSymbolItT d_symbols, StackSymbolT const empty_stack_symbol, StackSymbolT const read_symbol, std::size_t const num_symbols_out, - rmm::cuda_stream_view stream) + cuda::stream_ref stream) { rmm::device_buffer temp_storage{}; @@ -381,7 +381,7 @@ void sparse_stack_op_to_top_of_stack(StackSymbolItT d_symbols, cuda::make_transform_output_iterator(fake_key_segment_it, detail::ModToTargetTypeOpT{}), num_symbols_in, - stream)); + stream.get())); CUDF_CUDA_TRY(cub::DeviceScan::InclusiveScanByKey( nullptr, scan_by_key_bytes, @@ -391,7 +391,7 @@ void sparse_stack_op_to_top_of_stack(StackSymbolItT d_symbols, detail::AddStackLevelFromStackOp{symbol_to_stack_op}, num_symbols_in, cuda::std::equal_to{}, - stream)); + stream.get())); stack_level_scan_bytes = std::max(gen_segments_scan_bytes, scan_by_key_bytes); } else { CUDF_CUDA_TRY(cub::DeviceScan::InclusiveScan( @@ -401,7 +401,7 @@ void sparse_stack_op_to_top_of_stack(StackSymbolItT d_symbols, d_kv_operations.Current(), detail::AddStackLevelFromStackOp{symbol_to_stack_op}, num_symbols_in, - stream)); + stream.get())); } // Getting temporary storage requirements for the stable radix sort (sorting by stack level of the @@ -413,7 +413,7 @@ void sparse_stack_op_to_top_of_stack(StackSymbolItT d_symbols, num_symbols_in, begin_bit, end_bit, - stream)); + stream.get())); // Getting temporary storage requirements for the scan to match pop operations with the latest // push of the same level @@ -424,7 +424,7 @@ void sparse_stack_op_to_top_of_stack(StackSymbolItT d_symbols, kv_ops_scan_out, detail::PopulatePopWithPush{symbol_to_stack_op}, num_symbols_in, - stream)); + stream.get())); // Getting temporary storage requirements for the scan to propagate top-of-stack for spots that // didn't push or pop @@ -436,7 +436,7 @@ void sparse_stack_op_to_top_of_stack(StackSymbolItT d_symbols, detail::PropagateLastWrite{read_symbol}, empty_stack_symbol, num_symbols_out, - stream)); + stream.get())); // Scratch memory required by the algorithms auto total_temp_storage_bytes = std::max({stack_level_scan_bytes, @@ -480,7 +480,7 @@ void sparse_stack_op_to_top_of_stack(StackSymbolItT d_symbols, cuda::make_transform_output_iterator(key_segments.data(), detail::ModToTargetTypeOpT{}), num_symbols_in, - stream)); + stream.get())); CUDF_CUDA_TRY(cub::DeviceScan::InclusiveScanByKey( temp_storage.data(), total_temp_storage_bytes, @@ -490,7 +490,7 @@ void sparse_stack_op_to_top_of_stack(StackSymbolItT d_symbols, detail::AddStackLevelFromStackOp{symbol_to_stack_op}, num_symbols_in, cuda::std::equal_to{}, - stream)); + stream.get())); } else { CUDF_CUDA_TRY(cub::DeviceScan::InclusiveScan( temp_storage.data(), @@ -499,7 +499,7 @@ void sparse_stack_op_to_top_of_stack(StackSymbolItT d_symbols, d_kv_operations.Current(), detail::AddStackLevelFromStackOp{symbol_to_stack_op}, num_symbols_in, - stream)); + stream.get())); } // Check if the last element of d_kv_operations is 0. If not, then we have a problem. @@ -519,7 +519,7 @@ void sparse_stack_op_to_top_of_stack(StackSymbolItT d_symbols, num_symbols_in, begin_bit, end_bit, - stream)); + stream.get())); // transform_iterator that remaps all operations on stack level 0 to the empty stack symbol kv_ops_scan_in = {reinterpret_cast(d_kv_operations_unsigned.Current()), @@ -534,7 +534,7 @@ void sparse_stack_op_to_top_of_stack(StackSymbolItT d_symbols, kv_ops_scan_out, detail::PopulatePopWithPush{symbol_to_stack_op}, num_symbols_in, - stream)); + stream.get())); // Fill the output tape with read-symbol thrust::fill(rmm::exec_policy_nosync(stream, cudf::get_current_device_resource_ref()), @@ -565,7 +565,7 @@ void sparse_stack_op_to_top_of_stack(StackSymbolItT d_symbols, detail::PropagateLastWrite{read_symbol}, empty_stack_symbol, num_symbols_out, - stream)); + stream.get())); } } // namespace cudf::io::fst diff --git a/cpp/src/io/fst/lookup_tables.cuh b/cpp/src/io/fst/lookup_tables.cuh index e7aa4af942bd..5020765cc016 100644 --- a/cpp/src/io/fst/lookup_tables.cuh +++ b/cpp/src/io/fst/lookup_tables.cuh @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: Copyright (c) 2022-2026, NVIDIA CORPORATION. + * SPDX-FileCopyrightText: Copyright (c) 2022-2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved. * SPDX-License-Identifier: Apache-2.0 */ @@ -844,7 +844,7 @@ class Dfa { Dfa(SymbolGroupIdInitT const& sgid_lut_init, TransitionTableInitT const& transition_table_init, TranslationTableInitT const& translation_table_init, - rmm::cuda_stream_view stream) + cuda::stream_ref stream) : init_data{single_item, stream} { *init_data.host_ptr() = {sgid_lut_init, transition_table_init, translation_table_init}; @@ -886,7 +886,7 @@ class Dfa { TransducedIndexOutItT d_out_idx_it, TransducedCountOutItT d_num_transduced_out_it, uint32_t const seed_state, - rmm::cuda_stream_view stream) + cuda::stream_ref stream) { std::size_t temp_storage_bytes = 0; rmm::device_buffer temp_storage{}; @@ -899,7 +899,7 @@ class Dfa { d_out_idx_it, d_num_transduced_out_it, seed_state, - stream); + stream.get()); if (temp_storage.size() < temp_storage_bytes) { temp_storage.resize(temp_storage_bytes, stream); @@ -914,7 +914,7 @@ class Dfa { d_out_idx_it, d_num_transduced_out_it, seed_state, - stream); + stream.get()); } private: @@ -944,7 +944,7 @@ template ( sgid_lut_init, transition_table_init, translation_table_init, stream); diff --git a/cpp/src/io/functions.cpp b/cpp/src/io/functions.cpp index 5322cb40fc99..a63fc897d2a0 100644 --- a/cpp/src/io/functions.cpp +++ b/cpp/src/io/functions.cpp @@ -216,7 +216,7 @@ std::vector> make_datasinks(sink_info const& info) } // namespace table_with_metadata read_avro(avro_reader_options const& options, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { namespace avro = cudf::io::detail::avro; @@ -231,7 +231,7 @@ table_with_metadata read_avro(avro_reader_options const& options, } table_with_metadata read_json(json_reader_options options, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { CUDF_FUNC_RANGE(); @@ -246,7 +246,7 @@ table_with_metadata read_json(json_reader_options options, } json_reader_result read_json_with_diagnostics(json_reader_options options, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { CUDF_FUNC_RANGE(); @@ -261,7 +261,7 @@ json_reader_result read_json_with_diagnostics(json_reader_options options, } json_reader_result_with_row_diagnostics read_json_with_row_diagnostics( - json_reader_options options, rmm::cuda_stream_view stream, rmm::device_async_resource_ref mr) + json_reader_options options, cuda::stream_ref stream, rmm::device_async_resource_ref mr) { CUDF_FUNC_RANGE(); @@ -274,7 +274,7 @@ json_reader_result_with_row_diagnostics read_json_with_row_diagnostics( return json::detail::read_json_with_row_diagnostics(datasources, options, stream, mr); } -void write_json(json_writer_options const& options, rmm::cuda_stream_view stream) +void write_json(json_writer_options const& options, cuda::stream_ref stream) { auto sinks = make_datasinks(options.get_sink()); CUDF_EXPECTS(sinks.size() == 1, "Multiple sinks not supported for JSON writing"); @@ -287,7 +287,7 @@ void write_json(json_writer_options const& options, rmm::cuda_stream_view stream } table_with_metadata read_csv(csv_reader_options options, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { CUDF_FUNC_RANGE(); @@ -308,7 +308,7 @@ table_with_metadata read_csv(csv_reader_options options, } // Freeform API wraps the detail writer class API -void write_csv(csv_writer_options const& options, rmm::cuda_stream_view stream) +void write_csv(csv_writer_options const& options, cuda::stream_ref stream) { using namespace cudf::io::detail; @@ -345,8 +345,7 @@ bool is_supported_write_orc(compression_type compression) detail::is_compression_supported(compression)); } -raw_orc_statistics read_raw_orc_statistics(source_info const& src_info, - rmm::cuda_stream_view stream) +raw_orc_statistics read_raw_orc_statistics(source_info const& src_info, cuda::stream_ref stream) { // Get source to read statistics from std::unique_ptr source; @@ -419,7 +418,7 @@ column_statistics::column_statistics(orc::detail::column_statistics&& cs) } parsed_orc_statistics read_parsed_orc_statistics(source_info const& src_info, - rmm::cuda_stream_view stream) + cuda::stream_ref stream) { auto const raw_stats = read_raw_orc_statistics(src_info, stream); @@ -472,7 +471,7 @@ orc_column_schema make_orc_column_schema(host_span(chunk_read_limit, pass_read_limit, @@ -534,7 +533,7 @@ chunked_orc_reader::chunked_orc_reader(std::size_t chunk_read_limit, chunked_orc_reader::chunked_orc_reader(std::size_t chunk_read_limit, std::size_t pass_read_limit, orc_reader_options const& options, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) : reader{std::make_unique(chunk_read_limit, pass_read_limit, @@ -547,7 +546,7 @@ chunked_orc_reader::chunked_orc_reader(std::size_t chunk_read_limit, chunked_orc_reader::chunked_orc_reader(std::size_t chunk_read_limit, orc_reader_options const& options, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) : chunked_orc_reader(chunk_read_limit, 0UL, options, stream, mr) { @@ -583,7 +582,7 @@ orc_chunked_writer::~orc_chunked_writer() = default; * @copydoc cudf::io::orc_chunked_writer::orc_chunked_writer */ orc_chunked_writer::orc_chunked_writer(chunked_orc_writer_options const& options, - rmm::cuda_stream_view stream) + cuda::stream_ref stream) { namespace io_detail = cudf::io::detail; @@ -643,7 +642,7 @@ bool is_supported_write_parquet(compression_type compression) } table_with_metadata read_parquet(parquet_reader_options const& options, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { CUDF_FUNC_RANGE(); @@ -658,7 +657,7 @@ table_with_metadata read_parquet(parquet_reader_options const& options, table_with_metadata read_parquet(std::vector>&& datasources, std::vector&& parquet_metadatas, parquet_reader_options const& options, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { CUDF_FUNC_RANGE(); @@ -734,7 +733,7 @@ table_input_metadata::table_input_metadata(table_metadata const& metadata) * @copydoc cudf::io::write_parquet */ std::unique_ptr> write_parquet(parquet_writer_options const& options, - rmm::cuda_stream_view stream) + cuda::stream_ref stream) { namespace io_detail = cudf::io::detail; @@ -756,7 +755,7 @@ chunked_parquet_reader::chunked_parquet_reader() = default; */ chunked_parquet_reader::chunked_parquet_reader(std::size_t chunk_read_limit, parquet_reader_options const& options, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) : reader{std::make_unique( chunk_read_limit, @@ -777,7 +776,7 @@ chunked_parquet_reader::chunked_parquet_reader( std::vector>&& datasources, std::vector&& parquet_metadatas, parquet_reader_options const& options, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) : reader{std::make_unique( chunk_read_limit, @@ -796,7 +795,7 @@ chunked_parquet_reader::chunked_parquet_reader( chunked_parquet_reader::chunked_parquet_reader(std::size_t chunk_read_limit, std::size_t pass_read_limit, parquet_reader_options const& options, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) : reader{std::make_unique(chunk_read_limit, pass_read_limit, @@ -817,7 +816,7 @@ chunked_parquet_reader::chunked_parquet_reader( std::vector>&& datasources, std::vector&& parquet_metadatas, parquet_reader_options const& options, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) : reader{std::make_unique(chunk_read_limit, pass_read_limit, @@ -860,7 +859,7 @@ chunked_parquet_writer::chunked_parquet_writer() = default; * @copydoc cudf::io::chunked_parquet_writer::chunked_parquet_writer */ chunked_parquet_writer::chunked_parquet_writer(chunked_parquet_writer_options const& options, - rmm::cuda_stream_view stream) + cuda::stream_ref stream) { namespace io_detail = cudf::io::detail; @@ -1285,16 +1284,16 @@ namespace experimental { // Forward declarations for detail functions namespace detail { -void write_cudftable(data_sink* sink, table_view const& input, rmm::cuda_stream_view stream); +void write_cudftable(data_sink* sink, table_view const& input, cuda::stream_ref stream); packed_table read_cudftable(datasource* source, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr); } // namespace detail /** * @copydoc cudf::io::experimental::write_cudftable */ -void write_cudftable(cudftable_writer_options const& options, rmm::cuda_stream_view stream) +void write_cudftable(cudftable_writer_options const& options, cuda::stream_ref stream) { CUDF_FUNC_RANGE(); @@ -1308,7 +1307,7 @@ void write_cudftable(cudftable_writer_options const& options, rmm::cuda_stream_v * @copydoc cudf::io::experimental::read_cudftable */ packed_table read_cudftable(cudftable_reader_options const& options, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { CUDF_FUNC_RANGE(); diff --git a/cpp/src/io/json/column_tree_construction.cu b/cpp/src/io/json/column_tree_construction.cu index 1b1b70d4ef72..619db5d6604f 100644 --- a/cpp/src/io/json/column_tree_construction.cu +++ b/cpp/src/io/json/column_tree_construction.cu @@ -13,13 +13,13 @@ #include #include -#include #include #include #include #include #include +#include #include #include #include @@ -33,9 +33,9 @@ using row_offset_t = size_type; #ifdef CSR_DEBUG_PRINT template -void print(device_span d_vec, std::string name, rmm::cuda_stream_view stream) +void print(device_span d_vec, std::string name, cuda::stream_ref stream) { - stream.synchronize(); + stream.wait(); auto h_vec = cudf::detail::make_std_vector(d_vec, stream); std::cout << name << " = "; for (auto e : h_vec) { @@ -99,7 +99,7 @@ std::tuple reduce_to_column_tree( device_span row_offsets, bool is_array_of_arrays, NodeIndexT row_array_parent_col_id, - rmm::cuda_stream_view stream) + cuda::stream_ref stream) { CUDF_FUNC_RANGE(); diff --git a/cpp/src/io/json/host_tree_algorithms.cu b/cpp/src/io/json/host_tree_algorithms.cu index 83da6b68c761..c1ba3a5f5bbd 100644 --- a/cpp/src/io/json/host_tree_algorithms.cu +++ b/cpp/src/io/json/host_tree_algorithms.cu @@ -19,7 +19,6 @@ #include #include -#include #include #include @@ -27,6 +26,7 @@ #include #include #include +#include #include #include #include @@ -59,7 +59,7 @@ rmm::device_uvector get_values_column_indices(TreeDepthT const row_a tree_meta_t const& d_tree, device_span col_ids, size_type const num_columns, - rmm::cuda_stream_view stream) + cuda::stream_ref stream) { auto [level2_nodes, level2_indices] = get_array_children_indices( row_array_children_level, d_tree.node_levels, d_tree.parent_node_ids, stream); @@ -86,7 +86,7 @@ std::vector copy_strings_to_host_sync( device_span input, device_span node_range_begin, device_span node_range_end, - rmm::cuda_stream_view stream) + cuda::stream_ref stream) { auto const num_strings = node_range_begin.size(); rmm::device_uvector string_offsets(num_strings, stream); @@ -131,7 +131,7 @@ std::vector copy_strings_to_host_sync( d_offsets.begin()); auto const h_offsets = cudf::detail::make_host_vector_async( cudf::device_span(d_offsets.data(), d_offsets.size()), stream); - stream.synchronize(); + stream.wait(); // build std::string vector from chars and offsets std::vector host_data; @@ -166,7 +166,7 @@ rmm::device_uvector is_all_nulls_each_column(device_span tree_meta_t const& tree, device_span col_ids, cudf::io::json_reader_options const& options, - rmm::cuda_stream_view stream) + cuda::stream_ref stream) { auto const num_nodes = col_ids.size(); auto const num_cols = d_column_tree.node_categories.size(); @@ -201,7 +201,7 @@ rmm::device_uvector is_all_nulls_each_column(device_span NodeIndexT get_row_array_parent_col_id(device_span col_ids, bool is_enabled_lines, - rmm::cuda_stream_view stream) + cuda::stream_ref stream) { if (col_ids.empty()) { return parent_node_sentinel; } @@ -254,7 +254,7 @@ struct build_tree_result { { } - explicit build_tree_result(rmm::cuda_stream_view stream) + explicit build_tree_result(cuda::stream_ref stream) : build_tree_result{cudf::detail::make_host_vector(0, stream), cudf::detail::make_host_vector(0, stream), {}, @@ -281,7 +281,7 @@ struct build_tree_result { NodeIndexT row_array_parent_col_id, bool is_array_of_arrays, cudf::io::json_reader_options const& options, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr); void scatter_offsets(tree_meta_t const& tree, @@ -293,7 +293,7 @@ void scatter_offsets(tree_meta_t const& tree, host_span ignore_vals, host_span is_mixed, hashmap_of_device_columns const& columns, - rmm::cuda_stream_view stream); + cuda::stream_ref stream); std::map unified_schema(cudf::io::json_reader_options const& options) { @@ -352,7 +352,7 @@ void make_device_json_column(device_span input, bool is_array_of_arrays, bool collect_schema_mismatch_rows, cudf::io::json_reader_options const& options, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { bool const is_enabled_lines = options.is_enabled_lines(); @@ -445,7 +445,7 @@ void make_device_json_column(device_span input, cudf::detail::make_pinned_vector_async(d_column_tree.parent_node_ids, stream); auto const h_node_categories = cudf::detail::make_pinned_vector_async(tree.node_categories, stream); - stream.synchronize(); + stream.wait(); std::map> rows_by_top_level_column; for (size_type node_id = 0; node_id < static_cast(h_col_ids.size()); ++node_id) { @@ -506,7 +506,7 @@ void make_device_json_column(device_span input, NodeIndexT row_array_parent_col_id, bool is_array_of_arrays, cudf::io::json_reader_options const& options, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { bool const is_enabled_lines = options.is_enabled_lines(); @@ -520,7 +520,7 @@ void make_device_json_column(device_span input, cudf::detail::make_host_vector_async(d_column_tree.node_range_begin, stream); auto const max_row_offsets = cudf::detail::make_host_vector_async(d_max_row_offsets, stream); auto num_columns = d_unique_col_ids.size(); - stream.synchronize(); + stream.wait(); auto to_json_col_type = [](auto category) { switch (category) { @@ -1002,7 +1002,7 @@ void scatter_offsets(tree_meta_t const& tree, host_span ignore_vals, host_span is_mixed_pruned, hashmap_of_device_columns const& columns, - rmm::cuda_stream_view stream) + cuda::stream_ref stream) { auto const num_nodes = col_ids.size(); auto const num_columns = d_column_tree.node_categories.size(); @@ -1164,7 +1164,7 @@ void scatter_offsets(tree_meta_t const& tree, cuda::maximum{}); } } - stream.synchronize(); + stream.wait(); } } // namespace cudf::io::json::detail diff --git a/cpp/src/io/json/json_column.cu b/cpp/src/io/json/json_column.cu index 8a8a65a49c20..1ce481815005 100644 --- a/cpp/src/io/json/json_column.cu +++ b/cpp/src/io/json/json_column.cu @@ -18,7 +18,6 @@ #include #include -#include #include #include @@ -26,6 +25,7 @@ #include #include #include +#include #include #include #include @@ -56,7 +56,7 @@ auto print_vec = [](auto const& cpu, auto const name, auto converter) { void print_tree(host_span input, tree_meta_t const& d_gpu_tree, - rmm::cuda_stream_view stream) + cuda::stream_ref stream) { print_vec( cudf::detail::make_host_vector(d_gpu_tree.node_categories, stream), "node_categories", to_cat); @@ -97,7 +97,7 @@ reduce_to_column_tree(tree_meta_t const& tree, device_span row_offsets, bool is_array_of_arrays, NodeIndexT const row_array_parent_col_id, - rmm::cuda_stream_view stream) + cuda::stream_ref stream) { CUDF_FUNC_RANGE(); @@ -288,7 +288,7 @@ std::pair, std::vector> device_json_co cudf::io::parse_options const& options, bool prune_columns, std::optional schema, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { CUDF_FUNC_RANGE(); @@ -513,7 +513,7 @@ namespace { table_with_metadata device_parse_nested_json_impl( device_span d_input, cudf::io::json_reader_options const& options, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr, std::vector* mismatched_columns_out, std::vector* mismatched_rows_out = nullptr) @@ -743,7 +743,7 @@ table_with_metadata device_parse_nested_json_impl( table_with_metadata device_parse_nested_json(device_span d_input, cudf::io::json_reader_options const& options, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { CUDF_FUNC_RANGE(); @@ -755,7 +755,7 @@ device_parse_nested_json_result device_parse_nested_json_with_diagnostics( device_span d_input, cudf::io::json_reader_options const& options, bool collect_schema_mismatch_rows, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { CUDF_FUNC_RANGE(); diff --git a/cpp/src/io/json/json_normalization.cu b/cpp/src/io/json/json_normalization.cu index b0256e464611..f244f8868705 100644 --- a/cpp/src/io/json/json_normalization.cu +++ b/cpp/src/io/json/json_normalization.cu @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: Copyright (c) 2024-2026, NVIDIA CORPORATION. + * SPDX-FileCopyrightText: Copyright (c) 2024-2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved. * SPDX-License-Identifier: Apache-2.0 */ @@ -13,7 +13,6 @@ #include #include -#include #include #include @@ -23,6 +22,7 @@ #include #include #include +#include #include #include #include @@ -295,7 +295,7 @@ namespace detail { void normalize_single_quotes(datasource::owning_buffer& indata, char delimiter, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { CUDF_FUNC_RANGE(); @@ -328,7 +328,7 @@ std:: normalize_whitespace(device_span d_input, device_span col_offsets, device_span col_lengths, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { /* @@ -376,7 +376,7 @@ std:: output_it, inbuf_lengths.begin(), inbuf_lengths_size, - stream.value()); + stream.get()); rmm::device_buffer temp_storage(temp_storage_bytes, stream); cub::DeviceCopy::Batched(temp_storage.data(), temp_storage_bytes, @@ -384,7 +384,7 @@ std:: output_it, inbuf_lengths.begin(), inbuf_lengths_size, - stream.value()); + stream.get()); } // whitespace normalization : get the indices of the unquoted whitespace characters @@ -443,7 +443,7 @@ std:: inbuf_offsets.begin(), 0); - stream.synchronize(); + stream.wait(); return std::tuple{std::move(inbuf), std::move(inbuf_offsets), std::move(inbuf_lengths)}; } diff --git a/cpp/src/io/json/json_tree.cu b/cpp/src/io/json/json_tree.cu index 043c6feb2f9f..87273aca5ced 100644 --- a/cpp/src/io/json/json_tree.cu +++ b/cpp/src/io/json/json_tree.cu @@ -19,7 +19,6 @@ #include #include -#include #include #include #include @@ -32,6 +31,7 @@ #include #include #include +#include #include #include #include @@ -161,7 +161,7 @@ struct checked_token_level_output { */ template std::pair, rmm::device_uvector> stable_sorted_key_order( - cudf::device_span keys, rmm::cuda_stream_view stream) + cudf::device_span keys, cuda::stream_ref stream) { CUDF_FUNC_RANGE(); @@ -192,7 +192,7 @@ std::pair, rmm::device_uvector> stable_s keys.size(), 0, sizeof(KeyType) * 8, - stream.value()); + stream.get()); return std::pair{keys_buffer.Current() == keys_buffer1.data() ? std::move(keys_buffer1) : std::move(keys_buffer2), @@ -210,7 +210,7 @@ std::pair, rmm::device_uvector> stable_s */ void propagate_first_sibling_to_other(cudf::device_span node_levels, cudf::device_span parent_node_ids, - rmm::cuda_stream_view stream) + cuda::stream_ref stream) { CUDF_FUNC_RANGE(); auto [sorted_node_levels, sorted_order] = stable_sorted_key_order(node_levels, stream); @@ -230,7 +230,7 @@ void propagate_first_sibling_to_other(cudf::device_span node_l tree_meta_t get_tree_representation(device_span tokens, device_span token_indices, bool is_strict_nested_boundaries, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { CUDF_FUNC_RANGE(); @@ -529,7 +529,7 @@ std::pair> remapped_field_nodes_after_uni device_span d_input, tree_meta_t const& d_tree, device_span keys, - rmm::cuda_stream_view stream) + cuda::stream_ref stream) { size_t num_keys = keys.size(); if (num_keys == 0) { return {num_keys, rmm::device_uvector(num_keys, stream)}; } @@ -592,14 +592,14 @@ std::pair> remapped_field_nodes_after_uni {}, {}, rmm::mr::polymorphic_allocator{}, - stream.value()}; + stream.get()}; auto const counting_iter = cuda::counting_iterator{0}; rmm::device_uvector found_keys(num_keys, stream); key_set.insert_and_find_async(counting_iter, counting_iter + num_keys, found_keys.begin(), cuda::make_discard_iterator(), - stream.value()); + stream.get()); // set.size will synchronize the stream before return. return {key_set.size(stream), std::move(found_keys)}; } @@ -620,7 +620,7 @@ std::pair> remapped_field_nodes_after_uni rmm::device_uvector hash_node_type_with_field_name(device_span d_input, tree_meta_t const& d_tree, bool is_enabled_experimental, - rmm::cuda_stream_view stream) + cuda::stream_ref stream) { CUDF_FUNC_RANGE(); @@ -669,12 +669,12 @@ rmm::device_uvector hash_node_type_with_field_name(device_span{}, - stream.value()}; + stream.get()}; key_set.insert_if_async(counting_iter, counting_iter + num_nodes, cuda::counting_iterator{0}, // stencil is_field_name_node, - stream.value()); + stream.get()); // experimental feature: utf8 field name support // parse_data on field names, @@ -692,13 +692,13 @@ rmm::device_uvector hash_node_type_with_field_name(device_span{}, - stream.value()}; + stream.get()}; }; if (!is_enabled_experimental) { return std::pair{false, make_map(size_type{0})}; } // get all unique field node ids for utf8 decoding auto num_keys = static_cast(key_set.size(stream)); rmm::device_uvector keys(num_keys, stream); - key_set.retrieve_all(keys.data(), stream.value()); + key_set.retrieve_all(keys.data(), stream.get()); auto [num_unique_fields, found_keys] = remapped_field_nodes_after_unicode_decode(d_input, d_tree, keys, stream); @@ -748,7 +748,7 @@ std::pair, rmm::device_uvector> get_array_children_indices(TreeDepthT row_array_children_level, device_span node_levels, device_span parent_node_ids, - rmm::cuda_stream_view stream) + cuda::stream_ref stream) { // array children level: (level 2 for values, level 1 for values-JSONLines format) // copy nodes id of level 1's children (level 2) @@ -801,7 +801,7 @@ std::pair, rmm::device_uvector> hash_n device_span parent_node_ids, bool is_array_of_arrays, bool is_enabled_lines, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { CUDF_FUNC_RANGE(); @@ -912,16 +912,16 @@ std::pair, rmm::device_uvector> hash_n {}, {}, rmm::mr::polymorphic_allocator{}, - stream.value()}; + stream.get()}; // insert and convert node ids to unique set ids auto nodes_itr = cuda::counting_iterator{0}; - auto const num_columns = key_set.insert(nodes_itr, nodes_itr + num_nodes, stream.value()); + auto const num_columns = key_set.insert(nodes_itr, nodes_itr + num_nodes, stream.get()); rmm::device_uvector unique_keys(num_columns, stream); rmm::device_uvector col_id(num_nodes, stream, mr); - key_set.find_async(nodes_itr, nodes_itr + num_nodes, col_id.begin(), stream.value()); - std::ignore = key_set.retrieve_all(unique_keys.begin(), stream.value()); + key_set.find_async(nodes_itr, nodes_itr + num_nodes, col_id.begin(), stream.get()); + std::ignore = key_set.retrieve_all(unique_keys.begin(), stream.get()); return {std::move(col_id), std::move(unique_keys)}; } @@ -953,7 +953,7 @@ std::pair, rmm::device_uvector> gene bool is_array_of_arrays, bool is_enabled_lines, bool is_enabled_experimental, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { CUDF_FUNC_RANGE(); @@ -1024,7 +1024,7 @@ rmm::device_uvector compute_row_offsets(rmm::device_uvector d_input, bool is_array_of_arrays, bool is_enabled_lines, bool is_enabled_experimental, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { CUDF_FUNC_RANGE(); diff --git a/cpp/src/io/json/nested_json.hpp b/cpp/src/io/json/nested_json.hpp index de9368a6bb74..4804d8cdf492 100644 --- a/cpp/src/io/json/nested_json.hpp +++ b/cpp/src/io/json/nested_json.hpp @@ -185,7 +185,7 @@ struct device_json_column { * @param stream The CUDA stream to which kernels are dispatched * @param mr Optional, resource with which to allocate */ - device_json_column(rmm::cuda_stream_view stream, rmm::device_async_resource_ref mr) + device_json_column(cuda::stream_ref stream, rmm::device_async_resource_ref mr) : string_offsets(0, stream), string_lengths(0, stream), child_offsets(0, stream, mr), @@ -238,7 +238,7 @@ std::tuple reduce_to_column_tree( device_span row_offsets, bool is_array_of_arrays, NodeIndexT row_array_parent_col_id, - rmm::cuda_stream_view stream); + cuda::stream_ref stream); } // namespace detail } // namespace experimental @@ -266,7 +266,7 @@ void get_stack_context(device_span json_in, SymbolT* d_top_of_stack, stack_behavior_t stack_behavior, SymbolT delimiter, - rmm::cuda_stream_view stream); + cuda::stream_ref stream); /** * @brief Post-processes a token stream that may contain tokens from invalid lines. Expects that the @@ -281,7 +281,7 @@ CUDF_EXPORT std::pair, rmm::device_uvector> process_token_stream( device_span tokens, device_span token_indices, - rmm::cuda_stream_view stream); + cuda::stream_ref stream); /** * @brief Validate the tokens conforming to behavior given in options. @@ -297,7 +297,7 @@ void validate_token_stream(device_span d_input, device_span tokens, device_span token_indices, cudf::io::json_reader_options const& options, - rmm::cuda_stream_view stream); + cuda::stream_ref stream); /** * @brief Parses the given JSON string and generates a tree representation of the given input. @@ -314,7 +314,7 @@ CUDF_EXPORT tree_meta_t get_tree_representation(device_span tokens, device_span token_indices, bool is_strict_nested_boundaries, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr); /** @@ -339,7 +339,7 @@ records_orient_tree_traversal(device_span d_input, bool is_array_of_arrays, bool is_enabled_lines, bool is_enabled_experimental, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr); /** @@ -360,7 +360,7 @@ std::pair, rmm::device_uvector> get_array_children_indices(TreeDepthT row_array_children_level, device_span node_levels, device_span parent_node_ids, - rmm::cuda_stream_view stream); + cuda::stream_ref stream); /** * @brief Reduces node tree representation to column tree representation. @@ -385,7 +385,7 @@ reduce_to_column_tree(tree_meta_t const& tree, device_span row_offsets, bool is_array_of_arrays, NodeIndexT const row_array_parent_col_id, - rmm::cuda_stream_view stream); + cuda::stream_ref stream); /** * @brief Constructs `d_json_column` from node tree representation * Newly constructed columns are insert into `root`'s children. @@ -414,7 +414,7 @@ void make_device_json_column(device_span input, bool is_array_of_arrays, bool collect_schema_mismatch_rows, cudf::io::json_reader_options const& options, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr); /** @@ -425,7 +425,7 @@ void make_device_json_column(device_span input, * @param stream The CUDA stream to which kernels are dispatched */ cudf::io::parse_options parsing_options(cudf::io::json_reader_options const& options, - rmm::cuda_stream_view stream); + cuda::stream_ref stream); /** * @brief Parses the given JSON string and generates table from the given input. @@ -441,7 +441,7 @@ cudf::io::parse_options parsing_options(cudf::io::json_reader_options const& opt CUDF_EXPORT table_with_metadata device_parse_nested_json(device_span input, cudf::io::json_reader_options const& options, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr); /** @@ -470,7 +470,7 @@ device_parse_nested_json_result device_parse_nested_json_with_diagnostics( device_span input, cudf::io::json_reader_options const& options, bool collect_schema_mismatch_rows, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr); /** @@ -482,7 +482,7 @@ device_parse_nested_json_result device_parse_nested_json_with_diagnostics( * @return The empty column */ std::unique_ptr make_empty_column(schema_element const& schema, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr); /** @@ -496,7 +496,7 @@ std::unique_ptr make_empty_column(schema_element const& schema, */ std::unique_ptr make_all_nulls_column(schema_element const& schema, size_type num_rows, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr); /** diff --git a/cpp/src/io/json/nested_json_gpu.cu b/cpp/src/io/json/nested_json_gpu.cu index 2d35da95baba..75d2517ccbbe 100644 --- a/cpp/src/io/json/nested_json_gpu.cu +++ b/cpp/src/io/json/nested_json_gpu.cu @@ -1421,7 +1421,7 @@ void get_stack_context(device_span json_in, SymbolT* d_top_of_stack, stack_behavior_t stack_behavior, SymbolT delimiter, - rmm::cuda_stream_view stream) + cuda::stream_ref stream) { check_input_size(json_in.size()); @@ -1506,7 +1506,7 @@ void get_stack_context(device_span json_in, std::pair, rmm::device_uvector> process_token_stream( device_span tokens, device_span token_indices, - rmm::cuda_stream_view stream) + cuda::stream_ref stream) { CUDF_FUNC_RANGE(); // Instantiate FST for post-processing the token stream to remove all tokens that belong to an @@ -1560,7 +1560,7 @@ std::pair, rmm::device_uvector> pr std::pair, rmm::device_uvector> get_token_stream( device_span json_in, cudf::io::json_reader_options const& options, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { check_input_size(json_in.size()); @@ -1616,7 +1616,7 @@ std::pair, rmm::device_uvector> ge stream); // Make sure memory of the FST's lookup tables isn't freed before the FST completes - stream.synchronize(); + stream.wait(); } constexpr auto max_translation_table_size = @@ -1694,7 +1694,7 @@ void make_json_column(json_column& root_column, device_span d_input, cudf::io::json_reader_options const& options, bool include_quote_char, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { // Range of encapsulating function that parses to internal columnar data representation @@ -1708,7 +1708,7 @@ void make_json_column(json_column& root_column, auto token_indices_gpu = cudf::detail::make_host_vector_async(d_token_indices_gpu, stream); // Make sure tokens have been copied to the host - stream.synchronize(); + stream.wait(); // Whether this token is the valid token to begin the JSON document with auto is_valid_root_token = [](PdaTokenT const token) { @@ -2075,7 +2075,7 @@ void make_json_column(json_column& root_column, * @param stream The CUDA stream to which kernels are dispatched */ cudf::io::parse_options parsing_options(cudf::io::json_reader_options const& options, - rmm::cuda_stream_view stream) + cuda::stream_ref stream) { auto parse_opts = cudf::io::parse_options{',', '\n', '\"', '.'}; @@ -2096,7 +2096,7 @@ std::pair, std::vector> json_column_to device_span d_input, cudf::io::json_reader_options const& options, std::optional schema, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { // Range of orchestrating/encapsulating function diff --git a/cpp/src/io/json/parser_features.cpp b/cpp/src/io/json/parser_features.cpp index a502fed7897a..b4bf5a7f9a11 100644 --- a/cpp/src/io/json/parser_features.cpp +++ b/cpp/src/io/json/parser_features.cpp @@ -59,7 +59,7 @@ void json_reader_options::set_dtypes(schema_element types) namespace cudf::io::json::detail { /// Created an empty column of the specified schema struct empty_column_functor { - rmm::cuda_stream_view stream; + cuda::stream_ref stream; rmm::device_async_resource_ref mr; template ())> @@ -102,7 +102,7 @@ struct empty_column_functor { }; std::unique_ptr make_empty_column(schema_element const& schema, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { return cudf::type_dispatcher(schema.type, empty_column_functor{stream, mr}, schema); @@ -110,7 +110,7 @@ std::unique_ptr make_empty_column(schema_element const& schema, /// Created all null column of the specified schema struct allnull_column_functor { - rmm::cuda_stream_view stream; + cuda::stream_ref stream; rmm::device_async_resource_ref mr; private: @@ -195,7 +195,7 @@ struct allnull_column_functor { std::unique_ptr make_all_nulls_column(schema_element const& schema, size_type num_rows, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { return cudf::type_dispatcher(schema.type, allnull_column_functor{stream, mr}, schema, num_rows); diff --git a/cpp/src/io/json/process_tokens.cu b/cpp/src/io/json/process_tokens.cu index 275b83b6cbc8..432b9195eeae 100644 --- a/cpp/src/io/json/process_tokens.cu +++ b/cpp/src/io/json/process_tokens.cu @@ -74,7 +74,7 @@ void validate_token_stream(device_span d_input, device_span tokens, device_span token_indices, cudf::io::json_reader_options const& options, - rmm::cuda_stream_view stream) + cuda::stream_ref stream) { CUDF_FUNC_RANGE(); if (!options.is_strict_validation()) { return; } diff --git a/cpp/src/io/json/read_json.cu b/cpp/src/io/json/read_json.cu index 9c85aa1c29c9..31724b783745 100644 --- a/cpp/src/io/json/read_json.cu +++ b/cpp/src/io/json/read_json.cu @@ -174,13 +174,13 @@ class compressed_host_buffer_source final : public datasource { std::future device_read_async(std::size_t offset, std::size_t size, uint8_t* dst, - rmm::cuda_stream_view stream) override + cuda::stream_ref stream) override { auto& thread_pool = pools::tpool(); return thread_pool.submit_task([this, offset, size, dst, stream] { auto hbuf = host_read(offset, size); CUDF_CUDA_TRY(cudf::detail::memcpy_async(dst, hbuf->data(), hbuf->size(), stream)); - stream.synchronize(); + stream.wait(); return hbuf->size(); }); } @@ -255,7 +255,7 @@ std::size_t get_batch_size(std::size_t chunk_size) */ size_type find_first_delimiter(device_span d_data, char const delimiter, - rmm::cuda_stream_view stream) + cuda::stream_ref stream) { auto const first_delimiter_position = thrust::find(rmm::exec_policy_nosync(stream, cudf::get_current_device_resource_ref()), @@ -294,7 +294,7 @@ std::pair, std::optional>> get_record_range_raw_input(host_span> sources, json_reader_options const& reader_opts, - rmm::cuda_stream_view stream) + cuda::stream_ref stream) { CUDF_FUNC_RANGE(); @@ -475,7 +475,7 @@ get_record_range_raw_input(host_span> sources, std::pair> read_batch( host_span> sources, json_reader_options const& reader_opts, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr, read_json_diagnostics* diagnostics_out = nullptr) { @@ -492,7 +492,7 @@ std::pair> read_batch( reader_opts.get_delimiter(), stream, cudf::get_current_device_resource_ref()); - stream.synchronize(); + stream.wait(); } // Helper: parse one buffer, optionally appending schema-mismatch diagnostics. The two call sites @@ -519,7 +519,7 @@ std::pair> read_batch( reader_opts.get_delimiter(), stream, cudf::get_current_device_resource_ref()); - stream.synchronize(); + stream.wait(); } buffer = cudf::device_span( reinterpret_cast(owning_buffers.second.value().data()), @@ -540,7 +540,7 @@ std::pair> read_batch( */ table_with_metadata read_json_impl(host_span> sources, json_reader_options const& reader_opts, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr, read_json_diagnostics* diagnostics_out = nullptr) { @@ -747,7 +747,7 @@ device_span ingest_raw_input(device_span buffer, std::size_t range_offset, std::size_t range_size, char delimiter, - rmm::cuda_stream_view stream) + cuda::stream_ref stream) { CUDF_FUNC_RANGE(); // We append a line delimiter between two files to make sure the last line of file i and the first @@ -821,7 +821,7 @@ device_span ingest_raw_input(device_span buffer, d_delimiter_map.data(), buffer.data()); } - stream.synchronize(); + stream.wait(); if (thread_tasks.size()) { auto const bytes_read = std::accumulate( @@ -843,7 +843,7 @@ namespace { // batch reads, entries are accumulated across batches and deduplicated below. table_with_metadata read_json_dispatch(host_span> sources, json_reader_options const& reader_opts, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr, read_json_diagnostics* diagnostics_out) { @@ -881,7 +881,7 @@ table_with_metadata read_json_dispatch(host_span> so table_with_metadata read_json(host_span> sources, json_reader_options const& reader_opts, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { CUDF_FUNC_RANGE(); @@ -890,7 +890,7 @@ table_with_metadata read_json(host_span> sources, json_reader_result read_json_with_diagnostics(host_span> sources, json_reader_options const& reader_opts, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { CUDF_FUNC_RANGE(); @@ -904,7 +904,7 @@ json_reader_result read_json_with_diagnostics(host_span> sources, json_reader_options const& reader_opts, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { CUDF_FUNC_RANGE(); diff --git a/cpp/src/io/json/read_json.hpp b/cpp/src/io/json/read_json.hpp index 5bde80fe958e..09fdec9110d8 100644 --- a/cpp/src/io/json/read_json.hpp +++ b/cpp/src/io/json/read_json.hpp @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: Copyright (c) 2022-2026, NVIDIA CORPORATION. + * SPDX-FileCopyrightText: Copyright (c) 2022-2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved. * SPDX-License-Identifier: Apache-2.0 */ @@ -12,7 +12,7 @@ #include #include -#include +#include #include @@ -43,7 +43,7 @@ device_span ingest_raw_input(device_span buffer, size_t range_offset, size_t range_size, char delimiter, - rmm::cuda_stream_view stream); + cuda::stream_ref stream); /** * @brief Reads and returns the entire data set in batches. @@ -57,7 +57,7 @@ device_span ingest_raw_input(device_span buffer, */ table_with_metadata read_json(host_span> sources, json_reader_options const& reader_opts, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr); } // namespace io::json::detail diff --git a/cpp/src/io/json/write_json.cpp b/cpp/src/io/json/write_json.cpp index 17e9dacd55f8..8b73f5641a51 100644 --- a/cpp/src/io/json/write_json.cpp +++ b/cpp/src/io/json/write_json.cpp @@ -43,7 +43,7 @@ namespace cudf::io::json::detail { std::unique_ptr make_strings_column_from_host(host_span host_strings, - rmm::cuda_stream_view stream) + cuda::stream_ref stream) { std::string const host_chars = std::accumulate(host_strings.begin(), host_strings.end(), std::string("")); @@ -65,7 +65,7 @@ std::unique_ptr make_strings_column_from_host(host_span make_column_names_column(host_span column_names, size_type num_columns, - rmm::cuda_stream_view stream) + cuda::stream_ref stream) { std::vector unescaped_column_names; if (column_names.empty()) { @@ -93,7 +93,7 @@ std::unique_ptr make_column_names_column(host_span timestamp_to_strings(column_view const& column, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { auto format = [&]() { @@ -114,7 +114,7 @@ std::unique_ptr timestamp_to_strings(column_view const& column, } std::unique_ptr duration_to_strings(column_view const& column, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { auto duration_string = cudf::io::detail::csv::pandas_format_durations(column, stream, mr); @@ -131,7 +131,7 @@ std::unique_ptr duration_to_strings(column_view const& column, std::unique_ptr string_to_strings(column_view const& column, bool escaped_utf8, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { auto d_column = column_device_view::create(column, stream); @@ -147,7 +147,7 @@ std::unique_ptr string_to_strings(column_view const& column, std::unique_ptr leaf_column_to_strings(column_view const& column, json_writer_options const& options, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { if (column.type().id() == type_id::STRING) { @@ -187,7 +187,7 @@ host_span child_column_names( struct column_to_strings_fn { explicit column_to_strings_fn(json_writer_options const& options, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) : options_(options), stream_(stream), @@ -319,7 +319,7 @@ struct column_to_strings_fn { private: json_writer_options const& options_; - rmm::cuda_stream_view stream_; + cuda::stream_ref stream_; rmm::device_async_resource_ref mr_; string_scalar const narep; string_scalar const struct_value_separator; @@ -334,7 +334,7 @@ void write_chunked(data_sink* out_sink, strings_column_view const& str_column_view, int skip_last_chars, json_writer_options const&, - rmm::cuda_stream_view stream) + cuda::stream_ref stream) { CUDF_FUNC_RANGE(); CUDF_EXPECTS(str_column_view.size() > 0, "Unexpected empty strings column."); @@ -356,7 +356,7 @@ void write_chunked(data_sink* out_sink, void write_json_uncompressed(data_sink* out_sink, table_view const& table, json_writer_options const& options, - rmm::cuda_stream_view stream) + cuda::stream_ref stream) { CUDF_FUNC_RANGE(); std::vector user_column_names = [&]() { @@ -446,13 +446,13 @@ void write_json_uncompressed(data_sink* out_sink, void write_json(data_sink* out_sink, table_view const& table, json_writer_options const& options, - rmm::cuda_stream_view stream) + cuda::stream_ref stream) { if (options.get_compression() != compression_type::NONE) { std::vector hbuf; auto hbuf_sink_ptr = data_sink::create(&hbuf); write_json_uncompressed(hbuf_sink_ptr.get(), table, options, stream); - stream.synchronize(); + stream.wait(); auto comp_hbuf = cudf::io::detail::compress( options.get_compression(), host_span(reinterpret_cast(hbuf.data()), hbuf.size())); diff --git a/cpp/src/io/json/write_json.cu b/cpp/src/io/json/write_json.cu index 3603012ca61e..9d49d31d93bb 100644 --- a/cpp/src/io/json/write_json.cu +++ b/cpp/src/io/json/write_json.cu @@ -35,13 +35,13 @@ #include #include -#include #include #include #include #include #include +#include #include #include #include @@ -159,7 +159,7 @@ struct escape_strings_fn { std::unique_ptr make_strings_column(size_type size, size_type null_count, rmm::device_buffer null_mask, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { if (size == 0) { // empty begets empty @@ -181,7 +181,7 @@ std::unique_ptr make_escaped_json_strings(column_device_view const& d_co rmm::device_buffer null_mask, bool append_colon, bool escaped_utf8, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { return escape_strings_fn{d_column, append_colon, escaped_utf8}.make_strings_column( @@ -269,7 +269,7 @@ std::unique_ptr struct_to_strings(table_view const& strings_columns, string_view const value_separator, string_scalar const& narep, bool include_nulls, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { CUDF_FUNC_RANGE(); @@ -443,7 +443,7 @@ std::unique_ptr join_list_of_strings(lists_column_view const& lists_stri string_view const list_suffix, string_view const element_separator, string_view const element_narep, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { CUDF_FUNC_RANGE(); diff --git a/cpp/src/io/json/write_json.hpp b/cpp/src/io/json/write_json.hpp index 0b8f2362d741..ffa5ecb90213 100644 --- a/cpp/src/io/json/write_json.hpp +++ b/cpp/src/io/json/write_json.hpp @@ -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 */ @@ -10,9 +10,10 @@ #include #include -#include #include +#include + #include namespace cudf { @@ -30,20 +31,20 @@ std::unique_ptr make_escaped_json_strings(column_device_view const& d_co rmm::device_buffer null_mask, bool append_colon, bool escaped_utf8, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr); std::unique_ptr string_to_strings(column_view const& column, bool escaped_utf8, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr); std::unique_ptr timestamp_to_strings(column_view const& column, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr); std::unique_ptr duration_to_strings(column_view const& column, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr); std::unique_ptr struct_to_strings(table_view const& strings_columns, @@ -54,7 +55,7 @@ std::unique_ptr struct_to_strings(table_view const& strings_columns, string_view value_separator, string_scalar const& narep, bool include_nulls, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr); std::unique_ptr join_list_of_strings(lists_column_view const& lists_strings, @@ -62,12 +63,12 @@ std::unique_ptr join_list_of_strings(lists_column_view const& lists_stri string_view list_suffix, string_view element_separator, string_view element_narep, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr); std::unique_ptr leaf_column_to_strings(column_view const& column, json_writer_options const& options, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr); } // namespace io::json::detail diff --git a/cpp/src/io/orc/aggregate_orc_metadata.cpp b/cpp/src/io/orc/aggregate_orc_metadata.cpp index a45224617775..5bf0a810135c 100644 --- a/cpp/src/io/orc/aggregate_orc_metadata.cpp +++ b/cpp/src/io/orc/aggregate_orc_metadata.cpp @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: Copyright (c) 2021-2026, NVIDIA CORPORATION. + * SPDX-FileCopyrightText: Copyright (c) 2021-2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved. * SPDX-License-Identifier: Apache-2.0 */ @@ -86,7 +86,7 @@ void add_column_to_mapping(std::map>& selected * @brief Create a metadata object from each element in the source vector */ auto metadatas_from_sources(std::vector> const& sources, - rmm::cuda_stream_view stream) + cuda::stream_ref stream) { std::vector metadatas; metadatas.reserve(sources.size()); @@ -116,7 +116,7 @@ size_type aggregate_orc_metadata::calc_num_stripes() const } aggregate_orc_metadata::aggregate_orc_metadata( - std::vector> const& sources, rmm::cuda_stream_view stream) + std::vector> const& sources, cuda::stream_ref stream) : per_file_metadata(metadatas_from_sources(sources, stream)), num_rows(calc_num_rows()), num_stripes(calc_num_stripes()) @@ -149,7 +149,7 @@ aggregate_orc_metadata::select_stripes( std::vector> const& user_specified_stripes, int64_t skip_rows, std::optional const& num_read_rows, - rmm::cuda_stream_view stream) + cuda::stream_ref stream) { CUDF_EXPECTS((skip_rows == 0 and not num_read_rows.has_value()) or user_specified_stripes.empty(), "Can't use both the row selection and the stripe selection"); diff --git a/cpp/src/io/orc/aggregate_orc_metadata.hpp b/cpp/src/io/orc/aggregate_orc_metadata.hpp index d2b5c4bf5b36..534aaca39405 100644 --- a/cpp/src/io/orc/aggregate_orc_metadata.hpp +++ b/cpp/src/io/orc/aggregate_orc_metadata.hpp @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: Copyright (c) 2021-2025, NVIDIA CORPORATION. + * SPDX-FileCopyrightText: Copyright (c) 2021-2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved. * SPDX-License-Identifier: Apache-2.0 */ @@ -51,7 +51,7 @@ class aggregate_orc_metadata { bool row_grp_idx_present{true}; aggregate_orc_metadata(std::vector> const& sources, - rmm::cuda_stream_view stream); + cuda::stream_ref stream); aggregate_orc_metadata(aggregate_orc_metadata const&) = delete; aggregate_orc_metadata& operator=(aggregate_orc_metadata const&) = delete; @@ -121,7 +121,7 @@ class aggregate_orc_metadata { std::vector> const& user_specified_stripes, int64_t skip_rows, std::optional const& num_read_rows, - rmm::cuda_stream_view stream); + cuda::stream_ref stream); /** * @brief Filters ORC file to a selection of columns, based on their paths in the file. diff --git a/cpp/src/io/orc/dict_enc.cu b/cpp/src/io/orc/dict_enc.cu index 2b8c474e0ee2..c9e18e29764b 100644 --- a/cpp/src/io/orc/dict_enc.cu +++ b/cpp/src/io/orc/dict_enc.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 */ @@ -11,7 +11,7 @@ #include #include -#include +#include namespace cudf::io::orc::detail { @@ -47,7 +47,7 @@ void rowgroup_char_counts(device_2dspan counts, device_span orc_columns, device_2dspan rowgroup_bounds, device_span str_col_indexes, - rmm::cuda_stream_view stream) + cuda::stream_ref stream) { if (rowgroup_bounds.count() == 0) { return; } @@ -62,7 +62,7 @@ void rowgroup_char_counts(device_2dspan counts, cudf::util::div_rounding_up_unsafe(num_rowgroups, block_size) * str_col_indexes.size(); - rowgroup_char_counts_kernel<<>>( + rowgroup_char_counts_kernel<<>>( counts, orc_columns, rowgroup_bounds, str_col_indexes); CUDF_CUDA_TRY(cudaGetLastError()); } @@ -226,33 +226,32 @@ CUDF_KERNEL void __launch_bounds__(block_size) void populate_dictionary_hash_maps(device_2dspan dictionaries, device_span columns, - rmm::cuda_stream_view stream) + cuda::stream_ref stream) { if (dictionaries.count() == 0) { return; } constexpr int block_size = 256; populate_dictionary_hash_maps_kernel - <<>>(dictionaries, columns); + <<>>(dictionaries, columns); CUDF_CUDA_TRY(cudaGetLastError()); } -void collect_map_entries(device_2dspan dictionaries, - rmm::cuda_stream_view stream) +void collect_map_entries(device_2dspan dictionaries, cuda::stream_ref stream) { if (dictionaries.count() == 0) { return; } constexpr int block_size = 1024; collect_map_entries_kernel - <<>>(dictionaries); + <<>>(dictionaries); CUDF_CUDA_TRY(cudaGetLastError()); } void get_dictionary_indices(device_2dspan dictionaries, device_span columns, - rmm::cuda_stream_view stream) + cuda::stream_ref stream) { if (dictionaries.count() == 0) { return; } constexpr int block_size = 1024; get_dictionary_indices_kernel - <<>>(dictionaries, columns); + <<>>(dictionaries, columns); CUDF_CUDA_TRY(cudaGetLastError()); } diff --git a/cpp/src/io/orc/orc.cpp b/cpp/src/io/orc/orc.cpp index 03ebffef76c1..26c782ba66ab 100644 --- a/cpp/src/io/orc/orc.cpp +++ b/cpp/src/io/orc/orc.cpp @@ -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 */ @@ -465,7 +465,7 @@ host_span orc_decompressor::decompress_blocks(host_spansize(); auto const max_ps_size = std::min(len, static_cast(256)); diff --git a/cpp/src/io/orc/orc.hpp b/cpp/src/io/orc/orc.hpp index 051ff0b39850..9575c163e634 100644 --- a/cpp/src/io/orc/orc.hpp +++ b/cpp/src/io/orc/orc.hpp @@ -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 */ @@ -599,7 +599,7 @@ class metadata { std::vector stripe_info; public: - explicit metadata(datasource* const src, rmm::cuda_stream_view stream); + explicit metadata(datasource* const src, cuda::stream_ref stream); metadata(metadata const&) = delete; metadata& operator=(metadata const&) = delete; diff --git a/cpp/src/io/orc/orc_gpu.hpp b/cpp/src/io/orc/orc_gpu.hpp index 7f3ba3f96737..be40df5598d7 100644 --- a/cpp/src/io/orc/orc_gpu.hpp +++ b/cpp/src/io/orc/orc_gpu.hpp @@ -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 */ @@ -17,10 +17,10 @@ #include #include -#include #include #include +#include namespace cudf::io::orc::detail { @@ -198,7 +198,7 @@ struct stripe_dictionary { * @param stream CUDA stream used for device memory operations and kernel launches */ void initialize_dictionary_hash_maps(device_2dspan dictionaries, - rmm::cuda_stream_view stream); + cuda::stream_ref stream); /** * @brief Populates the hash maps with unique values from the stripe. @@ -209,7 +209,7 @@ void initialize_dictionary_hash_maps(device_2dspan dictionari */ void populate_dictionary_hash_maps(device_2dspan dictionaries, device_span columns, - rmm::cuda_stream_view stream); + cuda::stream_ref stream); /** * @brief Stores the indices of the hash map entries in the dictionary data buffer. @@ -217,8 +217,7 @@ void populate_dictionary_hash_maps(device_2dspan dictionaries * @param dictionaries Dictionary descriptors * @param stream CUDA stream used for device memory operations and kernel launches */ -void collect_map_entries(device_2dspan dictionaries, - rmm::cuda_stream_view stream); +void collect_map_entries(device_2dspan dictionaries, cuda::stream_ref stream); /** * @brief Stores the corresponding dictionary indices for each row in the column. @@ -229,7 +228,7 @@ void collect_map_entries(device_2dspan dictionaries, */ void get_dictionary_indices(device_2dspan dictionaries, device_span columns, - rmm::cuda_stream_view stream); + cuda::stream_ref stream); constexpr uint32_t encode_block_size = 512; @@ -247,7 +246,7 @@ void parse_compressed_stripe_data(compressed_stream_info* strm_info, int32_t num_streams, uint64_t compression_block_size, uint32_t log2maxcr, - rmm::cuda_stream_view stream); + cuda::stream_ref stream); /** * @brief Launches kernel for re-assembling decompressed blocks into a single contiguous block @@ -258,7 +257,7 @@ void parse_compressed_stripe_data(compressed_stream_info* strm_info, */ void post_decompression_reassemble(compressed_stream_info* strm_info, int32_t num_streams, - rmm::cuda_stream_view stream); + cuda::stream_ref stream); /** * @brief Launches kernel for constructing rowgroup from index streams @@ -280,7 +279,7 @@ void parse_row_group_index(row_group* row_groups, size_type num_stripes, size_type rowidx_stride, bool use_base_stride, - rmm::cuda_stream_view stream); + cuda::stream_ref stream); /** * @brief Launches kernel for decoding NULLs and building string dictionary index tables @@ -297,7 +296,7 @@ void decode_nulls_and_string_dictionaries(column_desc* chunks, size_type num_columns, size_type num_stripes, int64_t first_row, - rmm::cuda_stream_view stream); + cuda::stream_ref stream); /** * @brief Launches kernel for decoding column data @@ -326,7 +325,7 @@ void decode_column_data(column_desc* chunks, size_type rowidx_stride, size_t level, size_type* error_count, - rmm::cuda_stream_view stream); + cuda::stream_ref stream); /** * @brief Launches kernel for encoding column data @@ -337,7 +336,7 @@ void decode_column_data(column_desc* chunks, */ void encode_orc_column_data(device_2dspan chunks, device_2dspan streams, - rmm::cuda_stream_view stream); + cuda::stream_ref stream); /** * @brief Launches kernel for encoding column dictionaries @@ -356,7 +355,7 @@ void encode_stripe_dictionaries(stripe_dictionary const* stripes, size_type num_string_columns, size_type num_stripes, device_2dspan enc_streams, - rmm::cuda_stream_view stream); + cuda::stream_ref stream); /** * @brief Launches kernel for compacting chunked column data prior to compression @@ -367,7 +366,7 @@ void encode_stripe_dictionaries(stripe_dictionary const* stripes, */ void compact_orc_data_streams(device_2dspan strm_desc, device_2dspan enc_streams, - rmm::cuda_stream_view stream); + cuda::stream_ref stream); /** * @brief Launches kernel(s) for compressing data streams @@ -397,7 +396,7 @@ std::optional compress_orc_data_streams( device_2dspan strm_desc, device_2dspan enc_streams, device_span comp_res, - rmm::cuda_stream_view stream); + cuda::stream_ref stream); /** * @brief Counts the number of characters in each rowgroup of each string column. @@ -412,7 +411,7 @@ void rowgroup_char_counts(device_2dspan counts, device_span orc_columns, device_2dspan rowgroup_bounds, device_span str_col_indexes, - rmm::cuda_stream_view stream); + cuda::stream_ref stream); /** * @brief Converts sizes of decimal elements to offsets within the rowgroup. @@ -426,7 +425,7 @@ void rowgroup_char_counts(device_2dspan counts, */ void decimal_sizes_to_offsets(device_2dspan rg_bounds, std::map>& elem_sizes, - rmm::cuda_stream_view stream); + cuda::stream_ref stream); /** * @brief Launches kernels to initialize statistics collection @@ -439,7 +438,7 @@ void decimal_sizes_to_offsets(device_2dspan rg_bounds, void orc_init_statistics_groups(statistics_group* groups, stats_column_desc const* cols, device_2dspan rowgroup_bounds, - rmm::cuda_stream_view stream); + cuda::stream_ref stream); /** * @brief Launches kernels to return statistics buffer offsets and sizes @@ -452,7 +451,7 @@ void orc_init_statistics_groups(statistics_group* groups, void orc_init_statistics_buffersize(statistics_merge_group* groups, statistics_chunk const* chunks, uint32_t statistics_count, - rmm::cuda_stream_view stream); + cuda::stream_ref stream); /** * @brief Launches kernel to encode statistics in ORC protobuf format @@ -467,7 +466,7 @@ void orc_encode_statistics(uint8_t* blob_bfr, statistics_merge_group* groups, statistics_chunk const* chunks, uint32_t statistics_count, - rmm::cuda_stream_view stream); + cuda::stream_ref stream); /** * @brief Number of set bits in pushdown masks, per rowgroup. @@ -480,6 +479,6 @@ void orc_encode_statistics(uint8_t* blob_bfr, void reduce_pushdown_masks(device_span orc_columns, device_2dspan rowgroup_bounds, device_2dspan set_counts, - rmm::cuda_stream_view stream); + cuda::stream_ref stream); } // namespace cudf::io::orc::detail diff --git a/cpp/src/io/orc/reader_impl.cu b/cpp/src/io/orc/reader_impl.cu index 4fe0b33b2d4d..e10f8508009f 100644 --- a/cpp/src/io/orc/reader_impl.cu +++ b/cpp/src/io/orc/reader_impl.cu @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: Copyright (c) 2019-2025, NVIDIA CORPORATION. + * SPDX-FileCopyrightText: Copyright (c) 2019-2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved. * SPDX-License-Identifier: Apache-2.0 */ @@ -123,7 +123,7 @@ table_metadata reader_impl::get_meta_with_user_data() reader_impl::reader_impl(std::vector>&& sources, orc_reader_options const& options, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) : reader_impl::reader_impl(0UL, 0UL, std::move(sources), options, stream, mr) { @@ -133,7 +133,7 @@ reader_impl::reader_impl(std::size_t chunk_read_limit, std::size_t pass_read_limit, std::vector>&& sources, orc_reader_options const& options, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) : reader_impl::reader_impl(chunk_read_limit, pass_read_limit, @@ -150,7 +150,7 @@ reader_impl::reader_impl(std::size_t chunk_read_limit, size_type output_row_granularity, std::vector>&& sources, orc_reader_options const& options, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) : _stream(stream), _mr(mr), @@ -196,7 +196,7 @@ chunked_reader::chunked_reader(std::size_t chunk_read_limit, std::size_t pass_read_limit, std::vector>&& sources, orc_reader_options const& options, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) : _impl{std::make_unique( chunk_read_limit, pass_read_limit, std::move(sources), options, stream, mr)} @@ -208,7 +208,7 @@ chunked_reader::chunked_reader(std::size_t chunk_read_limit, size_type output_row_granularity, std::vector>&& sources, orc_reader_options const& options, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) : _impl{std::make_unique(chunk_read_limit, pass_read_limit, @@ -228,7 +228,7 @@ table_with_metadata chunked_reader::read_chunk() const { return _impl->read_chun reader::reader(std::vector>&& sources, orc_reader_options const& options, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) : _impl{std::make_unique(std::move(sources), options, stream, mr)} { diff --git a/cpp/src/io/orc/reader_impl.hpp b/cpp/src/io/orc/reader_impl.hpp index b5447c7c9f31..c85a6468dae7 100644 --- a/cpp/src/io/orc/reader_impl.hpp +++ b/cpp/src/io/orc/reader_impl.hpp @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: Copyright (c) 2019-2025, NVIDIA CORPORATION. + * SPDX-FileCopyrightText: Copyright (c) 2019-2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved. * SPDX-License-Identifier: Apache-2.0 */ @@ -13,7 +13,7 @@ #include #include -#include +#include #include @@ -43,30 +43,30 @@ class reader_impl { */ explicit reader_impl(std::vector>&& sources, orc_reader_options const& options, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr); /** * @copydoc cudf::io::orc::detail::chunked_reader::chunked_reader(std::size_t, std::size_t, - * orc_reader_options const&, rmm::cuda_stream_view, rmm::device_async_resource_ref) + * orc_reader_options const&, cuda::stream_ref, rmm::device_async_resource_ref) */ explicit reader_impl(std::size_t chunk_read_limit, std::size_t pass_read_limit, std::vector>&& sources, orc_reader_options const& options, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr); /** * @copydoc cudf::io::orc::detail::chunked_reader::chunked_reader(std::size_t, std::size_t, - * size_type, orc_reader_options const&, rmm::cuda_stream_view, rmm::device_async_resource_ref) + * size_type, orc_reader_options const&, cuda::stream_ref, rmm::device_async_resource_ref) */ explicit reader_impl(std::size_t chunk_read_limit, std::size_t pass_read_limit, size_type output_row_granularity, std::vector>&& sources, orc_reader_options const& options, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr); reader_impl(reader_impl const&) = delete; @@ -158,7 +158,7 @@ class reader_impl { */ table_metadata get_meta_with_user_data(); - rmm::cuda_stream_view const _stream; + cuda::stream_ref const _stream; rmm::device_async_resource_ref const _mr; // Reader configs. diff --git a/cpp/src/io/orc/reader_impl_chunking.cu b/cpp/src/io/orc/reader_impl_chunking.cu index c60e1f6c0906..e4ceaf9aa1ec 100644 --- a/cpp/src/io/orc/reader_impl_chunking.cu +++ b/cpp/src/io/orc/reader_impl_chunking.cu @@ -507,7 +507,7 @@ void reader_impl::load_next_stripe_data(read_mode mode) // Instead, it may use some other stream(s) to sync the H->D memcpy. // As such, we need to make sure the device buffers in `lvl_stripe_data` are ready first. if (!stream_synchronized) { - _stream.synchronize(); + _stream.wait(); stream_synchronized = true; } device_read_tasks.emplace_back( @@ -528,7 +528,7 @@ void reader_impl::load_next_stripe_data(read_mode mode) CUDF_CUDA_TRY( cudf::detail::memcpy_async(dev_dst, host_buffer->data(), host_buffer->size(), _stream)); } - _stream.synchronize(); + _stream.wait(); for (auto& task : device_read_tasks) { // if there were device reads CUDF_EXPECTS(task.first.get() == task.second, "Unexpected discrepancy in bytes read."); diff --git a/cpp/src/io/orc/reader_impl_decode.cu b/cpp/src/io/orc/reader_impl_decode.cu index 69c6e656654c..f2b4f46c1ee6 100644 --- a/cpp/src/io/orc/reader_impl_decode.cu +++ b/cpp/src/io/orc/reader_impl_decode.cu @@ -24,13 +24,13 @@ #include #include -#include #include #include #include #include #include +#include #include #include #include @@ -78,7 +78,7 @@ rmm::device_buffer decompress_stripe_data( cudf::detail::hostdevice_2dvector& row_groups, size_type row_index_stride, bool use_base_stride, - rmm::cuda_stream_view stream) + cuda::stream_ref stream) { // Whether we have the comppression info precomputed. auto const compinfo_ready = not compinfo_map.empty(); @@ -282,7 +282,7 @@ rmm::device_buffer decompress_stripe_data( */ void update_null_mask(cudf::detail::hostdevice_2dvector& chunks, host_span out_buffers, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { auto const num_stripes = chunks.size().first; @@ -315,7 +315,7 @@ void update_null_mask(cudf::detail::hostdevice_2dvector& chunks, stream); auto merged_null_mask = cudf::detail::create_null_mask( - parent_mask_len, mask_state::ALL_NULL, rmm::cuda_stream_view(stream), mr); + parent_mask_len, mask_state::ALL_NULL, cuda::stream_ref(stream), mr); auto merged_mask = static_cast(merged_null_mask.data()); uint32_t* dst_idx_ptr = dst_idx.data(); // Copy child valid bits from child column to valid indexes, this will merge both child @@ -374,7 +374,7 @@ void decode_stream_data(int64_t num_dicts, cudf::detail::hostdevice_2dvector& chunks, cudf::detail::device_2dspan row_groups, std::vector& out_buffers, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { auto const num_stripes = chunks.size().first; @@ -440,7 +440,7 @@ void decode_stream_data(int64_t num_dicts, */ void scan_null_counts(cudf::detail::hostdevice_2dvector const& chunks, uint32_t* d_prefix_sums, - rmm::cuda_stream_view stream) + cuda::stream_ref stream) { auto const num_stripes = chunks.size().first; if (num_stripes == 0) return; @@ -477,7 +477,7 @@ void scan_null_counts(cudf::detail::hostdevice_2dvector const& chun thrust::inclusive_scan(thrust::seq, psums, psums + num_stripes, psums); }); // `prefix_sums_to_update` goes out of scope, copy has to be done before we return - stream.synchronize(); + stream.wait(); } /** @@ -594,7 +594,7 @@ struct list_buffer_data { }; // Generates offsets for list buffer from number of elements in a row. -void generate_offsets_for_list(host_span buff_data, rmm::cuda_stream_view stream) +void generate_offsets_for_list(host_span buff_data, cuda::stream_ref stream) { for (auto& list_data : buff_data) { thrust::exclusive_scan(rmm::exec_policy_nosync(stream, cudf::get_current_device_resource_ref()), @@ -624,7 +624,7 @@ void generate_offsets_for_list(host_span buff_data, rmm::cuda_ std::vector find_table_splits(table_view const& input, size_type segment_length, std::size_t size_limit, - rmm::cuda_stream_view stream) + cuda::stream_ref stream) { if (size_limit == 0) { return std::vector{range{0, static_cast(input.num_rows())}}; diff --git a/cpp/src/io/orc/reader_impl_helpers.cpp b/cpp/src/io/orc/reader_impl_helpers.cpp index 4e431898b443..53fd40654b38 100644 --- a/cpp/src/io/orc/reader_impl_helpers.cpp +++ b/cpp/src/io/orc/reader_impl_helpers.cpp @@ -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 */ @@ -15,7 +15,7 @@ std::unique_ptr create_empty_column(size_type orc_col_id, bool use_np_dtypes, data_type timestamp_type, column_name_info& schema_info, - rmm::cuda_stream_view stream) + cuda::stream_ref stream) { schema_info.name = metadata.column_name(0, orc_col_id); auto const kind = metadata.get_col_type(orc_col_id).kind; @@ -107,7 +107,7 @@ column_buffer assemble_buffer(size_type orc_col_id, aggregate_orc_metadata const& metadata, column_hierarchy const& selected_columns, std::vector>& col_buffers, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { auto const col_id = col_meta.orc_col_map[level][orc_col_id]; diff --git a/cpp/src/io/orc/reader_impl_helpers.hpp b/cpp/src/io/orc/reader_impl_helpers.hpp index 6189388644e0..83c4fbc34f01 100644 --- a/cpp/src/io/orc/reader_impl_helpers.hpp +++ b/cpp/src/io/orc/reader_impl_helpers.hpp @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: Copyright (c) 2019-2025, NVIDIA CORPORATION. + * SPDX-FileCopyrightText: Copyright (c) 2019-2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved. * SPDX-License-Identifier: Apache-2.0 */ @@ -9,7 +9,7 @@ #include "io/orc/orc.hpp" #include "io/utilities/column_buffer.hpp" -#include +#include #include #include @@ -122,7 +122,7 @@ std::unique_ptr create_empty_column(size_type orc_col_id, bool use_np_dtypes, data_type timestamp_type, column_name_info& schema_info, - rmm::cuda_stream_view stream); + cuda::stream_ref stream); /** * @brief Assemble the buffer with child columns. @@ -133,7 +133,7 @@ column_buffer assemble_buffer(size_type orc_col_id, aggregate_orc_metadata const& metadata, column_hierarchy const& selected_columns, std::vector>& col_buffers, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr); } // namespace cudf::io::orc::detail diff --git a/cpp/src/io/orc/stats_enc.cu b/cpp/src/io/orc/stats_enc.cu index 40871ed89571..48e031e0a94e 100644 --- a/cpp/src/io/orc/stats_enc.cu +++ b/cpp/src/io/orc/stats_enc.cu @@ -9,9 +9,8 @@ #include #include -#include - #include +#include namespace cudf::io::orc::detail { @@ -442,14 +441,14 @@ CUDF_KERNEL void __launch_bounds__(encode_threads_per_block) void orc_init_statistics_groups(statistics_group* groups, stats_column_desc const* cols, device_2dspan rowgroup_bounds, - rmm::cuda_stream_view stream) + cuda::stream_ref stream) { auto const num_blocks = cudf::util::div_rounding_up_safe(rowgroup_bounds.size().first, init_groups_per_block) * rowgroup_bounds.size().second; dim3 dim_block(init_threads_per_group, init_groups_per_block); - gpu_init_statistics_groups<<>>( + gpu_init_statistics_groups<<>>( groups, cols, rowgroup_bounds); CUDF_CUDA_TRY(cudaGetLastError()); } @@ -465,10 +464,10 @@ void orc_init_statistics_groups(statistics_group* groups, void orc_init_statistics_buffersize(statistics_merge_group* groups, statistics_chunk const* chunks, uint32_t statistics_count, - rmm::cuda_stream_view stream) + cuda::stream_ref stream) { gpu_init_statistics_buffersize - <<<1, block_size, 0, stream.value()>>>(groups, chunks, statistics_count); + <<<1, block_size, 0, stream.get()>>>(groups, chunks, statistics_count); CUDF_CUDA_TRY(cudaGetLastError()); } @@ -485,12 +484,12 @@ void orc_encode_statistics(uint8_t* blob_bfr, statistics_merge_group* groups, statistics_chunk const* chunks, uint32_t statistics_count, - rmm::cuda_stream_view stream) + cuda::stream_ref stream) { auto const num_blocks = cudf::util::div_rounding_up_safe(statistics_count, encode_chunks_per_block); dim3 dim_block(encode_threads_per_chunk, encode_chunks_per_block); - gpu_encode_statistics<<>>( + gpu_encode_statistics<<>>( blob_bfr, groups, chunks, statistics_count); CUDF_CUDA_TRY(cudaGetLastError()); } diff --git a/cpp/src/io/orc/stripe_data.cu b/cpp/src/io/orc/stripe_data.cu index f1b381c11dd6..5c131dcf3435 100644 --- a/cpp/src/io/orc/stripe_data.cu +++ b/cpp/src/io/orc/stripe_data.cu @@ -9,10 +9,9 @@ #include -#include - #include #include +#include namespace cudf::io::orc::detail { @@ -2065,12 +2064,12 @@ void __host__ decode_nulls_and_string_dictionaries(column_desc* chunks, size_type num_columns, size_type num_stripes, int64_t first_row, - rmm::cuda_stream_view stream) + cuda::stream_ref stream) { dim3 dim_grid(num_columns * num_stripes, 2); decode_nulls_and_string_dictionaries_kernel - <<>>( + <<>>( chunks, global_dictionary, num_columns, num_stripes, first_row); CUDF_CUDA_TRY(cudaGetLastError()); } @@ -2102,10 +2101,10 @@ void __host__ decode_column_data(column_desc* chunks, size_type rowidx_stride, size_t level, size_type* error_count, - rmm::cuda_stream_view stream) + cuda::stream_ref stream) { auto const num_blocks = num_columns * (num_rowgroups > 0 ? num_rowgroups : num_stripes); - decode_column_data_kernel<<>>( + decode_column_data_kernel<<>>( chunks, global_dictionary, tz_table, row_groups, first_row, rowidx_stride, level, error_count); CUDF_CUDA_TRY(cudaGetLastError()); } diff --git a/cpp/src/io/orc/stripe_enc.cu b/cpp/src/io/orc/stripe_enc.cu index 95f984fba60c..4deeef5733e6 100644 --- a/cpp/src/io/orc/stripe_enc.cu +++ b/cpp/src/io/orc/stripe_enc.cu @@ -19,12 +19,12 @@ #include #include -#include #include #include #include #include +#include #include #include @@ -1312,11 +1312,11 @@ CUDF_KERNEL void decimal_sizes_to_offsets_kernel(device_2dspan chunks, device_2dspan streams, - rmm::cuda_stream_view stream) + cuda::stream_ref stream) { auto const num_blocks = chunks.size().first * chunks.size().second; encode_column_data_kernel - <<>>(chunks, streams); + <<>>(chunks, streams); CUDF_CUDA_TRY(cudaGetLastError()); } @@ -1326,18 +1326,18 @@ void encode_stripe_dictionaries(stripe_dictionary const* stripes, size_type num_string_columns, size_type num_stripes, device_2dspan enc_streams, - rmm::cuda_stream_view stream) + cuda::stream_ref stream) { constexpr int block_size = 512; // 512 threads per dictionary dim3 dim_grid(num_string_columns * num_stripes, 2); encode_string_dictionaries_kernel - <<>>(stripes, columns, chunks, enc_streams); + <<>>(stripes, columns, chunks, enc_streams); CUDF_CUDA_TRY(cudaGetLastError()); } void compact_orc_data_streams(device_2dspan strm_desc, device_2dspan enc_streams, - rmm::cuda_stream_view stream) + cuda::stream_ref stream) { auto const num_rowgroups = enc_streams.size().second; auto const num_streams = strm_desc.size().second; @@ -1353,7 +1353,7 @@ void compact_orc_data_streams(device_2dspan strm_desc, auto const num_blocks = cudf::util::div_rounding_up_unsafe(num_stripes, compact_streams_block_size) * strm_desc.size().second; - init_batched_memcpy_kernel<<>>( + init_batched_memcpy_kernel<<>>( strm_desc, enc_streams, srcs, dsts, lengths); CUDF_CUDA_TRY(cudaGetLastError()); @@ -1373,26 +1373,26 @@ std::optional compress_orc_data_streams( device_2dspan strm_desc, device_2dspan enc_streams, device_span comp_res, - rmm::cuda_stream_view stream) + cuda::stream_ref stream) { rmm::device_uvector> comp_in(num_compressed_blocks, stream); rmm::device_uvector> comp_out(num_compressed_blocks, stream); size_t const num_blocks = strm_desc.size().first * strm_desc.size().second; - init_compression_blocks_kernel<<>>(strm_desc, - enc_streams, - comp_in, - comp_out, - comp_res, - compressed_data, - comp_blk_size, - max_comp_blk_size, - comp_block_align); + init_compression_blocks_kernel<<>>(strm_desc, + enc_streams, + comp_in, + comp_out, + comp_res, + compressed_data, + comp_blk_size, + max_comp_blk_size, + comp_block_align); CUDF_CUDA_TRY(cudaGetLastError()); cudf::io::detail::compress(compression, comp_in, comp_out, comp_res, stream); - compact_compressed_blocks_kernel<<>>( + compact_compressed_blocks_kernel<<>>( strm_desc, comp_in, comp_out, comp_res, compressed_data, comp_blk_size, max_comp_blk_size); CUDF_CUDA_TRY(cudaGetLastError()); @@ -1405,7 +1405,7 @@ std::optional compress_orc_data_streams( void decimal_sizes_to_offsets(device_2dspan rg_bounds, std::map>& elem_sizes, - rmm::cuda_stream_view stream) + cuda::stream_ref stream) { if (rg_bounds.count() == 0) return; @@ -1424,7 +1424,7 @@ void decimal_sizes_to_offsets(device_2dspan rg_bounds, // number of rowgroups * number of decimal columns auto const num_blocks = elem_sizes.size() * rg_bounds.size().first; decimal_sizes_to_offsets_kernel - <<>>(rg_bounds, d_sizes); + <<>>(rg_bounds, d_sizes); CUDF_CUDA_TRY(cudaGetLastError()); } diff --git a/cpp/src/io/orc/stripe_init.cu b/cpp/src/io/orc/stripe_init.cu index d5514ffb5a53..185bf6c66535 100644 --- a/cpp/src/io/orc/stripe_init.cu +++ b/cpp/src/io/orc/stripe_init.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 */ @@ -9,10 +9,9 @@ #include #include -#include - #include #include +#include #include #include @@ -549,11 +548,11 @@ void __host__ parse_compressed_stripe_data(compressed_stream_info* strm_info, int32_t num_streams, uint64_t compression_block_size, uint32_t log2maxcr, - rmm::cuda_stream_view stream) + cuda::stream_ref stream) { auto const num_blocks = (num_streams + 3) >> 2; // 1 stream per warp, 4 warps per block if (num_blocks > 0) { - parse_compressed_stripe_data_kernel<<>>( + parse_compressed_stripe_data_kernel<<>>( strm_info, num_streams, compression_block_size, log2maxcr); CUDF_CUDA_TRY(cudaGetLastError()); } @@ -561,12 +560,12 @@ void __host__ parse_compressed_stripe_data(compressed_stream_info* strm_info, void __host__ post_decompression_reassemble(compressed_stream_info* strm_info, int32_t num_streams, - rmm::cuda_stream_view stream) + cuda::stream_ref stream) { auto const num_blocks = (num_streams + 3) >> 2; // 1 stream per warp, 4 warps per block if (num_blocks > 0) { - post_decompression_reassemble_kernel<<>>(strm_info, - num_streams); + post_decompression_reassemble_kernel<<>>(strm_info, + num_streams); CUDF_CUDA_TRY(cudaGetLastError()); } } @@ -578,10 +577,10 @@ void __host__ parse_row_group_index(row_group* row_groups, size_type num_stripes, size_type rowidx_stride, bool use_base_stride, - rmm::cuda_stream_view stream) + cuda::stream_ref stream) { auto const num_blocks = num_columns * num_stripes; - parse_row_group_index_kernel<<>>( + parse_row_group_index_kernel<<>>( row_groups, strm_info, chunks, num_columns, num_stripes, rowidx_stride, use_base_stride); CUDF_CUDA_TRY(cudaGetLastError()); } @@ -589,12 +588,12 @@ void __host__ parse_row_group_index(row_group* row_groups, void __host__ reduce_pushdown_masks(device_span columns, device_2dspan rowgroups, device_2dspan valid_counts, - rmm::cuda_stream_view stream) + cuda::stream_ref stream) { auto const num_blocks = columns.size() * rowgroups.size().first; // 1 block per rowgroup constexpr int block_size = 128; reduce_pushdown_masks_kernel - <<>>(columns, rowgroups, valid_counts); + <<>>(columns, rowgroups, valid_counts); CUDF_CUDA_TRY(cudaGetLastError()); } diff --git a/cpp/src/io/orc/writer_impl.cu b/cpp/src/io/orc/writer_impl.cu index ff690289cb5c..ad890ed86fe8 100644 --- a/cpp/src/io/orc/writer_impl.cu +++ b/cpp/src/io/orc/writer_impl.cu @@ -28,7 +28,6 @@ #include #include -#include #include #include #include @@ -42,6 +41,7 @@ #include #include #include +#include #include #include #include @@ -383,7 +383,7 @@ CUDF_KERNEL void copy_string_data(char* string_pool, } // namespace intermediate_statistics::intermediate_statistics(orc_table_view const& table, - rmm::cuda_stream_view stream) + cuda::stream_ref stream) : stripe_stat_chunks(0, stream) { std::transform( @@ -395,7 +395,7 @@ intermediate_statistics::intermediate_statistics(orc_table_view const& table, void persisted_statistics::persist(uint64_t num_table_rows, single_write_mode write_mode, intermediate_statistics&& intermediate_stats, - rmm::cuda_stream_view stream) + cuda::stream_ref stream) { col_types = std::move(intermediate_stats.col_types); num_rows += num_table_rows; @@ -427,7 +427,7 @@ void persisted_statistics::persist(uint64_t num_table_rows, // approach for now, but it is possible something fancier with breaking up each thread into // copying x bytes instead of a single string is the better method since we are dealing in // min/max strings they almost certainly will not be uniform length. - copy_string_data<<>>( + copy_string_data<<>>( string_pool.data(), offsets.data(), intermediate_stats.stripe_stat_chunks.data(), @@ -454,7 +454,7 @@ namespace { file_segmentation calculate_segmentation(host_span columns, hostdevice_2dvector&& rowgroup_bounds, stripe_size_limits max_stripe_size, - rmm::cuda_stream_view stream) + cuda::stream_ref stream) { // Number of stripes is not known in advance. Only reserve a single element to use pinned memory // resource if at all enabled. @@ -697,9 +697,7 @@ orc_streams create_streams(host_span columns, } std::vector> calculate_aligned_rowgroup_bounds( - orc_table_view const& orc_table, - file_segmentation const& segmentation, - rmm::cuda_stream_view stream) + orc_table_view const& orc_table, file_segmentation const& segmentation, cuda::stream_ref stream) { if (segmentation.num_rowgroups() == 0) return {}; @@ -881,7 +879,7 @@ std::pair> encode_columns( file_segmentation const& segmentation, orc_streams const& streams, uint32_t uncomp_block_align, - rmm::cuda_stream_view stream) + cuda::stream_ref stream) { CUDF_EXPECTS(uncomp_block_align > 0 and extent_alignment % uncomp_block_align == 0, "Internal ORC writer error: extent alignment is not a multiple of the codec's chunk " @@ -1163,7 +1161,7 @@ std::vector gather_stripes(size_t num_index_streams, host_2dspan extents, encoded_data* enc_data, hostdevice_2dvector* strm_desc, - rmm::cuda_stream_view stream) + cuda::stream_ref stream) { if (segmentation.num_stripes() == 0) { return {}; } @@ -1282,7 +1280,7 @@ std::vector gather_stripes(size_t num_index_streams, void set_stat_desc_leaf_cols(device_span columns, device_span stat_desc, - rmm::cuda_stream_view stream) + cuda::stream_ref stream) { thrust::for_each(rmm::exec_policy_nosync(stream, cudf::get_current_device_resource_ref()), cuda::counting_iterator{0}, @@ -1294,7 +1292,7 @@ cudf::detail::hostdevice_vector allocate_and_encode_blobs( cudf::detail::hostdevice_vector& stats_merge_groups, device_span stat_chunks, int num_stat_blobs, - rmm::cuda_stream_view stream) + cuda::stream_ref stream) { // figure out the buffer size needed for protobuf format orc_init_statistics_buffersize( @@ -1351,7 +1349,7 @@ cudf::detail::hostdevice_vector allocate_and_encode_blobs( intermediate_statistics gather_statistic_blobs(statistics_freq const stats_freq, orc_table_view const& orc_table, file_segmentation const& segmentation, - rmm::cuda_stream_view stream) + cuda::stream_ref stream) { auto const num_rowgroup_blobs = segmentation.rowgroups.count(); auto const num_stripe_blobs = segmentation.num_stripes() * orc_table.num_columns(); @@ -1473,7 +1471,7 @@ intermediate_statistics gather_statistic_blobs(statistics_freq const stats_freq, */ encoded_footer_statistics finish_statistic_blobs(Footer const& footer, persisted_statistics& per_chunk_stats, - rmm::cuda_stream_view stream) + cuda::stream_ref stream) { auto stripe_size_iter = thrust::make_transform_iterator(per_chunk_stats.stripe_stat_merge.begin(), [](auto const& s) { return s.size(); }); @@ -1759,7 +1757,7 @@ std::future write_data_stream(stripe_stream const& strm_desc, orc_streams* streams, compression_type compression, std::unique_ptr const& out_sink, - rmm::cuda_stream_view stream) + cuda::stream_ref stream) { auto const length = strm_desc.stream_size; (*streams)[enc_stream.ids[strm_desc.stream_type]].length = length; @@ -1819,13 +1817,13 @@ void pushdown_lists_null_mask(orc_column_view const& col, device_span d_columns, bitmask_type const* parent_pd_mask, device_span out_mask, - rmm::cuda_stream_view stream) + cuda::stream_ref stream) { // Set all bits - correct unless there's a mismatch between offsets and null mask CUDF_CUDA_TRY(cudaMemsetAsync(static_cast(out_mask.data()), 255, out_mask.size() * sizeof(bitmask_type), - stream.value())); + stream.get())); // Reset bits where a null list element has rows in the child column thrust::for_each_n( @@ -1859,8 +1857,7 @@ struct pushdown_null_masks { cudf::detail::host_vector masks; }; -pushdown_null_masks init_pushdown_null_masks(orc_table_view& orc_table, - rmm::cuda_stream_view stream) +pushdown_null_masks init_pushdown_null_masks(orc_table_view& orc_table, cuda::stream_ref stream) { auto mask_ptrs = cudf::detail::make_empty_host_vector(orc_table.num_columns(), stream); @@ -1949,7 +1946,7 @@ struct device_stack { orc_table_view make_orc_table_view(table_view const& table, table_device_view const& d_table, table_input_metadata const& table_meta, - rmm::cuda_stream_view stream) + cuda::stream_ref stream) { std::vector orc_columns; std::vector str_col_indexes; @@ -2053,7 +2050,7 @@ orc_table_view make_orc_table_view(table_view const& table, hostdevice_2dvector calculate_rowgroup_bounds(orc_table_view const& orc_table, size_type rowgroup_size, - rmm::cuda_stream_view stream) + cuda::stream_ref stream) { auto const num_rowgroups = cudf::util::div_rounding_up_unsafe(orc_table.num_rows(), rowgroup_size); @@ -2103,7 +2100,7 @@ hostdevice_2dvector calculate_rowgroup_bounds(orc_table_view cons // returns host vector of per-rowgroup sizes encoder_decimal_info decimal_chunk_sizes(orc_table_view& orc_table, file_segmentation const& segmentation, - rmm::cuda_stream_view stream) + cuda::stream_ref stream) { std::map> elem_sizes; // Compute per-element offsets (within each row group) on the device @@ -2204,7 +2201,7 @@ std::unique_ptr make_table_meta(table_view const& input) // results to the corresponding orc_column_view. The owning host vector is returned. auto set_rowgroup_char_counts(orc_table_view& orc_table, device_2dspan rowgroup_bounds, - rmm::cuda_stream_view stream) + cuda::stream_ref stream) { auto const num_rowgroups = rowgroup_bounds.size().first; auto const num_str_cols = orc_table.num_string_columns(); @@ -2236,7 +2233,7 @@ struct stripe_dictionaries { std::vector> order_owner; // dictionary order owner, per stripe // Should be called after encoding is complete to deallocate the dictionary buffers. - void on_encode_complete(rmm::cuda_stream_view stream) + void on_encode_complete(cuda::stream_ref stream) { data_owner.clear(); index_owner.clear(); @@ -2268,7 +2265,7 @@ struct string_rows_less { stripe_dictionaries build_dictionaries(orc_table_view& orc_table, file_segmentation const& segmentation, bool sort_dictionaries, - rmm::cuda_stream_view stream) + cuda::stream_ref stream) { // Variable to keep track of the current total map storage size size_t total_map_storage_size = 0; @@ -2293,7 +2290,7 @@ stripe_dictionaries build_dictionaries(orc_table_view& orc_table, // Create a single bulk storage to use for all sub-dictionaries auto map_storage = std::make_unique( - total_map_storage_size, rmm::mr::polymorphic_allocator{}, stream.value()); + total_map_storage_size, rmm::mr::polymorphic_allocator{}, stream.get()); // Initialize stripe dictionaries for (auto col_idx : orc_table.string_column_indices) { @@ -2320,7 +2317,7 @@ stripe_dictionaries build_dictionaries(orc_table_view& orc_table, } stripe_dicts.host_to_device_async(stream); - map_storage->initialize_async({KEY_SENTINEL, VALUE_SENTINEL}, {stream.value()}); + map_storage->initialize_async({KEY_SENTINEL, VALUE_SENTINEL}, {stream.get()}); populate_dictionary_hash_maps(stripe_dicts, orc_table.d_columns, stream); // Copy the entry counts and char counts from the device to the host stripe_dicts.device_to_host(stream); @@ -2371,7 +2368,7 @@ stripe_dictionaries build_dictionaries(orc_table_view& orc_table, get_dictionary_indices(stripe_dicts, orc_table.d_columns, stream); // synchronize to ensure the copy is complete before we clear `map_slots` - stream.synchronize(); + stream.wait(); // deallocate hash map storage, unused after this point map_storage.reset(); @@ -2442,7 +2439,7 @@ struct stripe_stream_size_less { }; [[nodiscard]] uint32_t find_largest_stream_size(device_2dspan ss, - rmm::cuda_stream_view stream) + cuda::stream_ref stream) { auto const longest_stream = thrust::max_element(rmm::exec_policy_nosync(stream, cudf::get_current_device_resource_ref()), @@ -2486,7 +2483,7 @@ auto convert_table_to_orc_data(table_view const& input, bool collect_compression_stats, single_write_mode write_mode, data_sink const& out_sink, - rmm::cuda_stream_view stream) + cuda::stream_ref stream) { auto const input_tview = table_device_view::create(input, stream); @@ -2642,7 +2639,7 @@ auto convert_table_to_orc_data(table_view const& input, writer::impl::impl(std::unique_ptr sink, orc_writer_options const& options, single_write_mode mode, - rmm::cuda_stream_view stream) + cuda::stream_ref stream) : _stream(stream), _max_stripe_size{options.get_stripe_size_bytes(), options.get_stripe_size_rows()}, _row_index_stride{options.get_row_index_stride()}, @@ -2665,7 +2662,7 @@ writer::impl::impl(std::unique_ptr sink, writer::impl::impl(std::unique_ptr sink, chunked_orc_writer_options const& options, single_write_mode mode, - rmm::cuda_stream_view stream) + cuda::stream_ref stream) : _stream(stream), _max_stripe_size{options.get_stripe_size_bytes(), options.get_stripe_size_rows()}, _row_index_stride{options.get_row_index_stride()}, @@ -3009,7 +3006,7 @@ void writer::impl::close() writer::writer(std::unique_ptr sink, orc_writer_options const& options, single_write_mode mode, - rmm::cuda_stream_view stream) + cuda::stream_ref stream) : _impl(std::make_unique(std::move(sink), options, mode, stream)) { } @@ -3018,7 +3015,7 @@ writer::writer(std::unique_ptr sink, writer::writer(std::unique_ptr sink, chunked_orc_writer_options const& options, single_write_mode mode, - rmm::cuda_stream_view stream) + cuda::stream_ref stream) : _impl(std::make_unique(std::move(sink), options, mode, stream)) { } diff --git a/cpp/src/io/orc/writer_impl.hpp b/cpp/src/io/orc/writer_impl.hpp index a3196efc52ca..dbc2ff249b37 100644 --- a/cpp/src/io/orc/writer_impl.hpp +++ b/cpp/src/io/orc/writer_impl.hpp @@ -18,10 +18,10 @@ #include #include -#include #include #include +#include #include #include @@ -137,9 +137,9 @@ struct stripe_size_limits { * */ struct intermediate_statistics { - explicit intermediate_statistics(rmm::cuda_stream_view stream) : stripe_stat_chunks(0, stream) {} + explicit intermediate_statistics(cuda::stream_ref stream) : stripe_stat_chunks(0, stream) {} - intermediate_statistics(orc_table_view const& table, rmm::cuda_stream_view stream); + intermediate_statistics(orc_table_view const& table, cuda::stream_ref stream); intermediate_statistics(std::vector rb, rmm::device_uvector sc, @@ -181,7 +181,7 @@ struct persisted_statistics { void persist(uint64_t num_table_rows, single_write_mode write_mode, intermediate_statistics&& intermediate_stats, - rmm::cuda_stream_view stream); + cuda::stream_ref stream); std::vector> stripe_stat_chunks; std::vector> stripe_stat_merge; @@ -227,7 +227,7 @@ class writer::impl { explicit impl(std::unique_ptr sink, orc_writer_options const& options, single_write_mode mode, - rmm::cuda_stream_view stream); + cuda::stream_ref stream); /** * @brief Constructor with chunked writer options. @@ -240,7 +240,7 @@ class writer::impl { explicit impl(std::unique_ptr sink, chunked_orc_writer_options const& options, single_write_mode mode, - rmm::cuda_stream_view stream); + cuda::stream_ref stream); /** * @brief Destructor to complete any incomplete write and release resources. @@ -315,7 +315,7 @@ class writer::impl { private: // CUDA stream. - rmm::cuda_stream_view const _stream; + cuda::stream_ref const _stream; // Writer options. stripe_size_limits const _max_stripe_size; diff --git a/cpp/src/io/parquet/bloom_filter_reader.cu b/cpp/src/io/parquet/bloom_filter_reader.cu index 3418c8ca9ada..c844a4913ea5 100644 --- a/cpp/src/io/parquet/bloom_filter_reader.cu +++ b/cpp/src/io/parquet/bloom_filter_reader.cu @@ -22,12 +22,12 @@ #include #include -#include #include #include #include #include +#include #include #include @@ -71,7 +71,7 @@ struct bloom_filter_caster { std::unique_ptr query_bloom_filter(cudf::size_type equality_col_idx, cudf::data_type dtype, ast::literal const* const literal, - rmm::cuda_stream_view stream) const + cuda::stream_ref stream) const requires(not std::is_same_v and not(cudf::is_compound() and not std::is_same_v)) { @@ -151,7 +151,7 @@ struct bloom_filter_caster { std::unique_ptr operator()(cudf::size_type equality_col_idx, cudf::data_type dtype, ast::literal const* const literal, - rmm::cuda_stream_view stream) const + cuda::stream_ref stream) const { // Boolean, List, Struct, Dictionary types are not supported if constexpr (std::is_same_v or @@ -183,7 +183,7 @@ class bloom_filter_expression_converter : public equality_literals_collector { ast::expression const& expr, cudf::host_span output_dtypes, cudf::host_span const> equality_literals, - rmm::cuda_stream_view stream) + cuda::stream_ref stream) : _equality_literals{equality_literals}, _always_true_scalar{std::make_unique>(true, true, stream)}, _always_true{std::make_unique(*_always_true_scalar)} @@ -326,7 +326,7 @@ aggregate_reader_metadata::read_bloom_filters( host_span const> row_group_indices, host_span column_schemas, size_type total_row_groups, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) const { // Descriptors for all the chunks that make up the selected columns @@ -408,7 +408,7 @@ std::optional>> aggregate_reader_metadata::ap host_span output_dtypes, host_span bloom_filter_col_schemas, std::reference_wrapper filter, - rmm::cuda_stream_view stream) const + cuda::stream_ref stream) const { // Number of input table columns auto const num_input_columns = static_cast(output_dtypes.size()); diff --git a/cpp/src/io/parquet/chunk_dict.cu b/cpp/src/io/parquet/chunk_dict.cu index dddd82c5b303..1c2f1acf3e93 100644 --- a/cpp/src/io/parquet/chunk_dict.cu +++ b/cpp/src/io/parquet/chunk_dict.cu @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: Copyright (c) 2021-2026, NVIDIA CORPORATION. + * SPDX-FileCopyrightText: Copyright (c) 2021-2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved. * SPDX-License-Identifier: Apache-2.0 */ @@ -478,45 +478,45 @@ CUDF_KERNEL void __launch_bounds__(DEFAULT_BLOCK_SIZE) void populate_chunk_hash_maps(device_span const map_storage, cudf::detail::device_2dspan frags, - rmm::cuda_stream_view stream) + cuda::stream_ref stream) { dim3 const dim_grid(frags.size().second, frags.size().first); populate_chunk_hash_maps_kernel - <<>>(map_storage, frags); + <<>>(map_storage, frags); CUDF_CUDA_TRY(cudaGetLastError()); } void collect_map_entries(device_span const map_storage, device_span chunks, cudf::detail::device_2dspan frags, - rmm::cuda_stream_view stream) + cuda::stream_ref stream) { constexpr int block_size = 1024; static_assert(block_size >= MAX_FRAGMENTS_PER_CHUNK, "block_size must be >= MAX_FRAGMENTS_PER_CHUNK so one BlockScan thread backs " "each histogram bucket."); collect_map_entries_kernel - <<>>(map_storage, chunks, frags); + <<>>(map_storage, chunks, frags); CUDF_CUDA_TRY(cudaGetLastError()); } void get_dictionary_indices(device_span const map_storage, cudf::detail::device_2dspan frags, - rmm::cuda_stream_view stream) + cuda::stream_ref stream) { dim3 const dim_grid(frags.size().second, frags.size().first); get_dictionary_indices_kernel - <<>>(map_storage, frags); + <<>>(map_storage, frags); CUDF_CUDA_TRY(cudaGetLastError()); } -void compute_per_page_dict_bits(device_span pages, rmm::cuda_stream_view stream) +void compute_per_page_dict_bits(device_span pages, cuda::stream_ref stream) { if (pages.empty()) { return; } auto constexpr warps_per_block = DEFAULT_BLOCK_SIZE / cudf::detail::warp_size; auto const num_blocks = cudf::util::div_rounding_up_safe(static_cast(pages.size()), warps_per_block); - compute_page_dict_bits_kernel<<>>(pages); + compute_page_dict_bits_kernel<<>>(pages); CUDF_CUDA_TRY(cudaGetLastError()); } diff --git a/cpp/src/io/parquet/decode_fixed.cu b/cpp/src/io/parquet/decode_fixed.cu index 2e61f60f77cf..2d262342ea9f 100644 --- a/cpp/src/io/parquet/decode_fixed.cu +++ b/cpp/src/io/parquet/decode_fixed.cu @@ -1371,7 +1371,7 @@ void decode_page_data(cudf::detail::hostdevice_span pages, cudf::device_span initial_str_offsets, cudf::device_span page_string_offset_indices, kernel_error::pointer error_code, - rmm::cuda_stream_view stream) + cuda::stream_ref stream) { // No template parameters on lambdas until C++20, so use type tags instead auto launch_kernel = [&](auto block_size_tag, auto kernel_mask_tag) { @@ -1383,25 +1383,25 @@ void decode_page_data(cudf::detail::hostdevice_span pages, if (level_type_size == 1) { decode_page_data_generic - <<>>(pages.device_ptr(), - chunks, - min_row, - num_rows, - page_mask, - initial_str_offsets, - page_string_offset_indices, - error_code); + <<>>(pages.device_ptr(), + chunks, + min_row, + num_rows, + page_mask, + initial_str_offsets, + page_string_offset_indices, + error_code); CUDF_CUDA_TRY(cudaGetLastError()); } else { decode_page_data_generic - <<>>(pages.device_ptr(), - chunks, - min_row, - num_rows, - page_mask, - initial_str_offsets, - page_string_offset_indices, - error_code); + <<>>(pages.device_ptr(), + chunks, + min_row, + num_rows, + page_mask, + initial_str_offsets, + page_string_offset_indices, + error_code); CUDF_CUDA_TRY(cudaGetLastError()); } }; diff --git a/cpp/src/io/parquet/decode_preprocess.cu b/cpp/src/io/parquet/decode_preprocess.cu index bc4bfba86f71..d97ecbe2acf2 100644 --- a/cpp/src/io/parquet/decode_preprocess.cu +++ b/cpp/src/io/parquet/decode_preprocess.cu @@ -492,7 +492,7 @@ void compute_page_sizes(cudf::detail::hostdevice_span pages, size_t num_rows, bool compute_num_rows, int level_type_size, - rmm::cuda_stream_view stream) + cuda::stream_ref stream) { CUDF_FUNC_RANGE(); @@ -507,11 +507,11 @@ void compute_page_sizes(cudf::detail::hostdevice_span pages, // If uses_custom_row_bounds is set to true, we have to do a second pass later that "trims" // the starting and ending read values to account for these bounds. if (level_type_size == 1) { - compute_page_sizes_kernel<<>>( + compute_page_sizes_kernel<<>>( pages.device_ptr(), chunks, page_mask, min_row, num_rows, compute_num_rows); CUDF_CUDA_TRY(cudaGetLastError()); } else { - compute_page_sizes_kernel<<>>( + compute_page_sizes_kernel<<>>( pages.device_ptr(), chunks, page_mask, min_row, num_rows, compute_num_rows); CUDF_CUDA_TRY(cudaGetLastError()); } @@ -526,7 +526,7 @@ void preprocess_levels(cudf::detail::hostdevice_span pages, size_t min_row, size_t num_rows, int level_type_size, - rmm::cuda_stream_view stream) + cuda::stream_ref stream) { CUDF_FUNC_RANGE(); @@ -537,12 +537,12 @@ void preprocess_levels(cudf::detail::hostdevice_span pages, if (level_type_size == 1) { preprocess_levels_kernel - <<>>( + <<>>( pages.device_ptr(), chunks, page_mask, min_row, num_rows); CUDF_CUDA_TRY(cudaGetLastError()); } else { preprocess_levels_kernel - <<>>( + <<>>( pages.device_ptr(), chunks, page_mask, min_row, num_rows); CUDF_CUDA_TRY(cudaGetLastError()); } diff --git a/cpp/src/io/parquet/decode_pruned_pages.cu b/cpp/src/io/parquet/decode_pruned_pages.cu index c668ebdb8530..1824e0d305b0 100644 --- a/cpp/src/io/parquet/decode_pruned_pages.cu +++ b/cpp/src/io/parquet/decode_pruned_pages.cu @@ -105,10 +105,10 @@ void fill_pruned_offsets(cudf::device_span pages, cudf::device_span initial_str_offsets, size_t skip_rows, size_t num_rows, - rmm::cuda_stream_view stream) + cuda::stream_ref stream) { CUDF_EXPECTS(pages.size() == page_mask.size(), "Page mask size does not match page count"); - fill_pruned_offsets_kernel<<>>( + fill_pruned_offsets_kernel<<>>( pages, chunks, page_mask, initial_str_offsets, skip_rows, num_rows); CUDF_CUDA_TRY(cudaGetLastError()); } diff --git a/cpp/src/io/parquet/error.hpp b/cpp/src/io/parquet/error.hpp index 431c5278f95d..3e4dc9894667 100644 --- a/cpp/src/io/parquet/error.hpp +++ b/cpp/src/io/parquet/error.hpp @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: Copyright (c) 2023-2026, NVIDIA CORPORATION. + * SPDX-FileCopyrightText: Copyright (c) 2023-2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved. * SPDX-License-Identifier: Apache-2.0 */ @@ -7,7 +7,7 @@ #include "io/utilities/hostdevice_vector.hpp" -#include +#include #include #include @@ -18,7 +18,7 @@ namespace cudf::io::parquet { * @brief Specialized device scalar for use in reporting errors that occur in * kernel calls. * - * The `kernel_error` object is created with a `rmm::cuda_stream_view` which is used throughout + * The `kernel_error` object is created with a `cuda::stream_ref` which is used throughout * the object's lifetime. */ class kernel_error { @@ -40,7 +40,7 @@ class kernel_error { * * @param stream CUDA stream to use */ - kernel_error(rmm::cuda_stream_view stream) : _error_code(1, stream) + kernel_error(cuda::stream_ref stream) : _error_code(1, stream) { _error_code[0] = 0; _error_code.host_to_device_async(stream); @@ -56,7 +56,7 @@ class kernel_error { * * @param stream The CUDA stream to synchronize with */ - [[nodiscard]] auto value_sync(rmm::cuda_stream_view stream) const + [[nodiscard]] auto value_sync(cuda::stream_ref stream) const { _error_code.device_to_host(stream); return _error_code[0]; diff --git a/cpp/src/io/parquet/experimental/deletion_vectors.cu b/cpp/src/io/parquet/experimental/deletion_vectors.cu index 7af0cd3b3cf5..4e8b940f806c 100644 --- a/cpp/src/io/parquet/experimental/deletion_vectors.cu +++ b/cpp/src/io/parquet/experimental/deletion_vectors.cu @@ -12,7 +12,6 @@ #include #include -#include #include #include #include @@ -21,6 +20,7 @@ #include #include #include +#include #include @@ -37,7 +37,7 @@ namespace detail { [[nodiscard]] table_with_metadata read_parquet(parquet_reader_options const& options, deletion_vector_info const& deletion_vector_info, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { auto const& serialized_roaring_bitmaps = deletion_vector_info.serialized_roaring_bitmaps; @@ -118,7 +118,7 @@ namespace detail { [[nodiscard]] size_t compute_num_deleted_rows(deletion_vector_info const& deletion_vector_info, cudf::size_type max_chunk_rows, - rmm::cuda_stream_view stream) + cuda::stream_ref stream) { auto const& serialized_roaring_bitmaps = deletion_vector_info.serialized_roaring_bitmaps; auto const& deletion_vector_row_counts = deletion_vector_info.deletion_vector_row_counts; @@ -201,7 +201,7 @@ chunked_parquet_reader::chunked_parquet_reader(std::size_t chunk_read_limit, std::size_t pass_read_limit, parquet_reader_options const& options, deletion_vector_info const& deletion_vector_info, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) : _start_row{0}, _is_unspecified_row_group_data{deletion_vector_info.row_group_offsets.empty()}, @@ -262,7 +262,7 @@ chunked_parquet_reader::chunked_parquet_reader(std::size_t chunk_read_limit, chunked_parquet_reader::chunked_parquet_reader(std::size_t chunk_read_limit, parquet_reader_options const& options, deletion_vector_info const& deletion_vector_info, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) : chunked_parquet_reader(chunk_read_limit, parquet::detail::derive_pass_read_limit(chunk_read_limit), @@ -336,7 +336,7 @@ table_with_metadata chunked_parquet_reader::read_chunk() */ table_with_metadata read_parquet(parquet_reader_options const& options, deletion_vector_info const& deletion_vector_info, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { CUDF_FUNC_RANGE(); @@ -348,7 +348,7 @@ table_with_metadata read_parquet(parquet_reader_options const& options, */ size_t compute_num_deleted_rows(deletion_vector_info const& deletion_vector_info, cudf::size_type max_chunk_rows, - rmm::cuda_stream_view stream) + cuda::stream_ref stream) { CUDF_FUNC_RANGE(); return detail::compute_num_deleted_rows(deletion_vector_info, max_chunk_rows, stream); diff --git a/cpp/src/io/parquet/experimental/deletion_vectors_helpers.cu b/cpp/src/io/parquet/experimental/deletion_vectors_helpers.cu index 00cb25bc28b1..4a94be6193c4 100644 --- a/cpp/src/io/parquet/experimental/deletion_vectors_helpers.cu +++ b/cpp/src/io/parquet/experimental/deletion_vectors_helpers.cu @@ -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 */ @@ -64,7 +64,7 @@ std::unique_ptr compute_row_index_column( cudf::host_span row_group_num_rows, std::optional start_row, size_type num_rows, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { auto const num_row_groups = static_cast(row_group_num_rows.size()); @@ -145,7 +145,7 @@ std::unique_ptr compute_partial_row_index_column( size_t start_row, size_type num_rows, bool is_unspecified_row_group_data, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { if (is_unspecified_row_group_data) { @@ -195,7 +195,7 @@ void query_deletion_vectors( cudf::host_span const> deletion_vector_refs, cudf::host_span rows_per_deletion_vector, cudf::mutable_column_view const& output, - rmm::cuda_stream_view stream) + cuda::stream_ref stream) { auto const num_rows = row_index_column.size(); auto const num_deletion_vectors = static_cast(deletion_vector_refs.size()); @@ -252,7 +252,7 @@ std::unique_ptr compute_row_mask_column( cudf::column_view const& row_index_column, cudf::host_span const> deletion_vector_refs, cudf::host_span rows_per_deletion_vector, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { auto const num_rows = row_index_column.size(); @@ -270,7 +270,7 @@ size_t compute_deleted_row_count( cudf::column_view const& row_index_column, cudf::host_span const> deletion_vector_refs, cudf::host_span deletion_vector_row_counts, - rmm::cuda_stream_view stream) + cuda::stream_ref stream) { auto row_mask_column = compute_row_mask_column(row_index_column, deletion_vector_refs, @@ -355,7 +355,7 @@ std::unique_ptr compute_partial_row_mask_column( cudf::column_view const& row_index_column, std::queue& deletion_vectors, std::queue& deletion_vector_row_counts, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { auto [_, dv_refs, dv_row_counts] = @@ -366,7 +366,7 @@ std::unique_ptr compute_partial_row_mask_column( size_t compute_partial_deleted_row_count(cudf::column_view const& row_index_column, std::queue& deletion_vectors, std::queue& deletion_vector_row_counts, - rmm::cuda_stream_view stream) + cuda::stream_ref stream) { auto [_, dv_refs, dv_row_counts] = consume_deletion_vectors(row_index_column.size(), deletion_vectors, deletion_vector_row_counts); diff --git a/cpp/src/io/parquet/experimental/deletion_vectors_helpers.hpp b/cpp/src/io/parquet/experimental/deletion_vectors_helpers.hpp index 320346b1e0c1..7aa8121cc09c 100644 --- a/cpp/src/io/parquet/experimental/deletion_vectors_helpers.hpp +++ b/cpp/src/io/parquet/experimental/deletion_vectors_helpers.hpp @@ -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 */ @@ -14,7 +14,7 @@ #include #include -#include +#include #include #include @@ -56,7 +56,7 @@ void prepend_index_column_to_table_metadata(table_metadata& metadata); cudf::host_span row_group_num_rows, std::optional start_row, size_type num_rows, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr); /** @@ -78,7 +78,7 @@ void prepend_index_column_to_table_metadata(table_metadata& metadata); size_t start_row, size_type num_rows, bool is_unspecified_row_group_data, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr); /** @@ -96,7 +96,7 @@ void prepend_index_column_to_table_metadata(table_metadata& metadata); cudf::column_view const& row_index_column, cudf::host_span const> deletion_vector_refs, cudf::host_span rows_per_deletion_vector, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr); /** @@ -113,7 +113,7 @@ void prepend_index_column_to_table_metadata(table_metadata& metadata); cudf::column_view const& row_index_column, cudf::host_span const> deletion_vector_refs, cudf::host_span deletion_vector_row_counts, - rmm::cuda_stream_view stream); + cuda::stream_ref stream); /** * @brief Computes a chunk of the BOOL8 row mask column by consuming deletion vectors from queues @@ -130,7 +130,7 @@ void prepend_index_column_to_table_metadata(table_metadata& metadata); cudf::column_view const& row_index_column, std::queue& deletion_vectors, std::queue& deletion_vector_row_counts, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr); /** @@ -147,6 +147,6 @@ void prepend_index_column_to_table_metadata(table_metadata& metadata); cudf::column_view const& row_index_column, std::queue& deletion_vectors, std::queue& deletion_vector_row_counts, - rmm::cuda_stream_view stream); + cuda::stream_ref stream); } // namespace cudf::io::parquet::experimental diff --git a/cpp/src/io/parquet/experimental/dictionary_page_filter.cu b/cpp/src/io/parquet/experimental/dictionary_page_filter.cu index 501d2cbab355..e56fb5ee7a11 100644 --- a/cpp/src/io/parquet/experimental/dictionary_page_filter.cu +++ b/cpp/src/io/parquet/experimental/dictionary_page_filter.cu @@ -21,7 +21,6 @@ #include #include -#include #include #include #include @@ -29,6 +28,7 @@ #include #include #include +#include #include @@ -962,7 +962,7 @@ struct dictionary_caster { */ [[nodiscard]] std::vector> build_columns( cudf::host_span results_buffers, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { auto columns = std::vector>{}; @@ -997,7 +997,7 @@ struct dictionary_caster { std::vector> evaluate_many_literals( cudf::host_span literals, cudf::host_span operators, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { // Host vectors to store the running number of hash set slots and decoded values for all @@ -1046,10 +1046,10 @@ struct dictionary_caster { // Create a single bulk storage used by all cuco hash sets auto set_storage = - storage_type{total_set_storage_size, rmm::mr::polymorphic_allocator{}, stream.value()}; + storage_type{total_set_storage_size, rmm::mr::polymorphic_allocator{}, stream.get()}; // Initialize storage with the empty key sentinel - set_storage.initialize_async(EMPTY_KEY_SENTINEL, {stream.value()}); + set_storage.initialize_async(EMPTY_KEY_SENTINEL, {stream.get()}); // Device vector to store the decoded values for all dictionaries rmm::device_uvector decoded_data{total_num_values, stream, default_mr}; @@ -1083,16 +1083,16 @@ struct dictionary_caster { // Decode fixed width dictionaries and insert them to cuco hash sets, one dictionary per // thread block build_fixed_width_dictionaries - <<>>(pages.device_begin(), - chunks.device_begin(), - decoded_data, - set_storage.data(), - set_offsets.data(), - value_offsets.data(), - physical_type, - num_dictionary_columns, - dictionary_col_idx, - error_code.data()); + <<>>(pages.device_begin(), + chunks.device_begin(), + decoded_data, + set_storage.data(), + set_offsets.data(), + value_offsets.data(), + physical_type, + num_dictionary_columns, + dictionary_col_idx, + error_code.data()); CUDF_CUDA_TRY(cudaGetLastError()); } else { @@ -1110,7 +1110,7 @@ struct dictionary_caster { // Decode string dictionaries and insert them to cuco hash sets, one dictionary per // warp - build_string_dictionaries<<>>( + build_string_dictionaries<<>>( pages.device_begin(), decoded_data, set_storage.data(), @@ -1151,15 +1151,15 @@ struct dictionary_caster { // Query one predicate against all cuco hash sets of this column using a thread block query_dictionaries - <<>>(decoded_data, - results_ptrs, - scalars.data(), - d_operators.data(), - set_storage.data(), - set_offsets.data(), - value_offsets.data(), - total_row_groups, - physical_type); + <<>>(decoded_data, + results_ptrs, + scalars.data(), + d_operators.data(), + set_storage.data(), + set_offsets.data(), + value_offsets.data(), + total_row_groups, + physical_type); CUDF_CUDA_TRY(cudaGetLastError()); // Build the BOOL8 columns from the results buffers @@ -1181,7 +1181,7 @@ struct dictionary_caster { std::vector> evaluate_few_literals( cudf::host_span literals, cudf::host_span operators, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { // Get the total number of scalars and literals @@ -1226,16 +1226,16 @@ struct dictionary_caster { // Decode fixed width dictionaries and evaluate literals against them, one dictionary per // thread block evaluate_few_fixed_width_literals - <<>>(pages.device_begin(), - chunks.device_begin(), - results_ptrs, - scalars.data(), - d_operators.data(), - physical_type, - total_num_literals, - num_dictionary_columns, - dictionary_col_idx, - error_code.data()); + <<>>(pages.device_begin(), + chunks.device_begin(), + results_ptrs, + scalars.data(), + d_operators.data(), + physical_type, + total_num_literals, + num_dictionary_columns, + dictionary_col_idx, + error_code.data()); CUDF_CUDA_TRY(cudaGetLastError()); } else { static_assert(DECODE_BLOCK_SIZE % cudf::detail::warp_size == 0, @@ -1250,7 +1250,7 @@ struct dictionary_caster { // Decode string dictionaries and evaluate all literals against them, one dictionary per // warp - evaluate_few_string_literals<<>>( + evaluate_few_string_literals<<>>( pages.device_begin(), results_ptrs, scalars.data(), @@ -1277,7 +1277,7 @@ struct dictionary_caster { cudf::data_type dtype, cudf::host_span literals, cudf::host_span operators, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { // Boolean, List, Struct, Dictionary types are not supported @@ -1315,7 +1315,7 @@ class dictionary_expression_converter : public equality_literals_collector { dictionary_expression_converter(ast::expression const& expr, cudf::host_span output_dtypes, cudf::host_span const> literals, - rmm::cuda_stream_view stream) + cuda::stream_ref stream) : _literals{literals}, _always_true_scalar{std::make_unique>(true, true, stream)}, _always_true{std::make_unique(*_always_true_scalar)} @@ -1447,7 +1447,7 @@ aggregate_reader_metadata::apply_dictionary_filter( std::span output_dtypes, std::span dictionary_col_schemas, std::reference_wrapper filter, - rmm::cuda_stream_view stream) const + cuda::stream_ref stream) const { // Number of input table columns auto const num_input_columns = static_cast(output_dtypes.size()); diff --git a/cpp/src/io/parquet/experimental/hybrid_scan.cpp b/cpp/src/io/parquet/experimental/hybrid_scan.cpp index 36bc5de06dc4..a97135ca8480 100644 --- a/cpp/src/io/parquet/experimental/hybrid_scan.cpp +++ b/cpp/src/io/parquet/experimental/hybrid_scan.cpp @@ -84,7 +84,7 @@ std::vector hybrid_scan_reader::filter_row_groups_with_byte_range( std::vector hybrid_scan_reader::filter_row_groups_with_stats( std::span row_group_indices, parquet_reader_options const& options, - rmm::cuda_stream_view stream) const + cuda::stream_ref stream) const { CUDF_FUNC_RANGE(); @@ -112,7 +112,7 @@ std::vector hybrid_scan_reader::filter_row_groups_with_dictiona std::span const> dictionary_page_data, std::span row_group_indices, parquet_reader_options const& options, - rmm::cuda_stream_view stream) const + cuda::stream_ref stream) const { CUDF_FUNC_RANGE(); @@ -130,7 +130,7 @@ std::vector hybrid_scan_reader::filter_row_groups_with_bloom_fi std::span const> bloom_filter_data, std::span row_group_indices, parquet_reader_options const& options, - rmm::cuda_stream_view stream) const + cuda::stream_ref stream) const { CUDF_FUNC_RANGE(); @@ -146,7 +146,7 @@ std::vector hybrid_scan_reader::filter_row_groups_with_bloom_fi std::unique_ptr hybrid_scan_reader::build_all_true_row_mask( std::span row_group_indices, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) const { CUDF_FUNC_RANGE(); @@ -161,7 +161,7 @@ std::unique_ptr hybrid_scan_reader::build_all_true_row_mask( std::unique_ptr hybrid_scan_reader::build_row_mask_with_page_index_stats( std::span row_group_indices, parquet_reader_options const& options, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) const { CUDF_FUNC_RANGE(); @@ -192,7 +192,7 @@ table_with_metadata hybrid_scan_reader::materialize_filter_columns( cudf::mutable_column_view& row_mask, use_data_page_mask mask_data_pages, parquet_reader_options const& options, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) const { CUDF_FUNC_RANGE(); @@ -223,7 +223,7 @@ table_with_metadata hybrid_scan_reader::materialize_payload_columns( cudf::column_view const& row_mask, use_data_page_mask mask_data_pages, parquet_reader_options const& options, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) const { CUDF_FUNC_RANGE(); @@ -251,7 +251,7 @@ table_with_metadata hybrid_scan_reader::materialize_all_columns( std::span row_group_indices, std::span const> column_chunk_data, parquet_reader_options const& options, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) const { CUDF_FUNC_RANGE(); @@ -272,7 +272,7 @@ void hybrid_scan_reader::setup_chunking_for_filter_columns( use_data_page_mask mask_data_pages, std::span const> column_chunk_data, parquet_reader_options const& options, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) const { CUDF_FUNC_RANGE(); @@ -308,7 +308,7 @@ void hybrid_scan_reader::setup_chunking_for_payload_columns( use_data_page_mask mask_data_pages, std::span const> column_chunk_data, parquet_reader_options const& options, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) const { CUDF_FUNC_RANGE(); @@ -342,7 +342,7 @@ void hybrid_scan_reader::setup_chunking_for_all_columns( std::span row_group_indices, std::span const> column_chunk_data, parquet_reader_options const& options, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) const { CUDF_FUNC_RANGE(); diff --git a/cpp/src/io/parquet/experimental/hybrid_scan_chunking.cu b/cpp/src/io/parquet/experimental/hybrid_scan_chunking.cu index 7c819d0f5657..c70b94e739c6 100644 --- a/cpp/src/io/parquet/experimental/hybrid_scan_chunking.cu +++ b/cpp/src/io/parquet/experimental/hybrid_scan_chunking.cu @@ -165,7 +165,7 @@ void hybrid_scan_reader_impl::setup_next_pass( } } - _stream.synchronize(); + _stream.wait(); } } diff --git a/cpp/src/io/parquet/experimental/hybrid_scan_helpers.cpp b/cpp/src/io/parquet/experimental/hybrid_scan_helpers.cpp index b3ba5c5aaeee..cda57fa2f294 100644 --- a/cpp/src/io/parquet/experimental/hybrid_scan_helpers.cpp +++ b/cpp/src/io/parquet/experimental/hybrid_scan_helpers.cpp @@ -325,7 +325,7 @@ std::size_t aggregate_reader_metadata::total_rows_in_row_groups( std::unique_ptr aggregate_reader_metadata::build_all_true_row_mask( std::span const> row_group_indices, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) const { CUDF_FUNC_RANGE(); @@ -421,7 +421,7 @@ std::vector> aggregate_reader_metadata::filter_row_ std::span output_dtypes, std::span output_column_schemas, std::reference_wrapper filter, - rmm::cuda_stream_view stream) const + cuda::stream_ref stream) const { // Compute total number of input row groups auto const total_row_groups = compute_total_row_groups(row_group_indices); @@ -645,7 +645,7 @@ aggregate_reader_metadata::filter_row_groups_with_dictionary_pages( std::span output_dtypes, std::span dictionary_col_schemas, std::reference_wrapper filter, - rmm::cuda_stream_view stream) const + cuda::stream_ref stream) const { // Compute total number of input row groups auto const total_row_groups = @@ -673,7 +673,7 @@ aggregate_reader_metadata::filter_row_groups_with_bloom_filters( std::span output_dtypes, std::span output_column_schemas, std::reference_wrapper filter, - rmm::cuda_stream_view stream) const + cuda::stream_ref stream) const { // Collect equality literals for each input table column auto const literals = diff --git a/cpp/src/io/parquet/experimental/hybrid_scan_helpers.hpp b/cpp/src/io/parquet/experimental/hybrid_scan_helpers.hpp index 92287b55bb7a..12ae0b5aaedf 100644 --- a/cpp/src/io/parquet/experimental/hybrid_scan_helpers.hpp +++ b/cpp/src/io/parquet/experimental/hybrid_scan_helpers.hpp @@ -14,7 +14,7 @@ #include #include -#include +#include #include #include @@ -88,7 +88,7 @@ class aggregate_reader_metadata : public aggregate_reader_metadata_base { std::span output_dtypes, std::span dictionary_col_schemas, std::reference_wrapper filter, - rmm::cuda_stream_view stream) const; + cuda::stream_ref stream) const; public: /** @@ -216,7 +216,7 @@ class aggregate_reader_metadata : public aggregate_reader_metadata_base { std::span output_dtypes, std::span output_column_schemas, std::reference_wrapper filter, - rmm::cuda_stream_view stream) const; + cuda::stream_ref stream) const; /** * @brief Get the bloom filter byte ranges, one per column chunk with equality predicate @@ -278,7 +278,7 @@ class aggregate_reader_metadata : public aggregate_reader_metadata_base { std::span output_dtypes, std::span dictionary_col_schemas, std::reference_wrapper filter, - rmm::cuda_stream_view stream) const; + cuda::stream_ref stream) const; /** * @brief Filter the row groups using bloom filters based on predicate filter @@ -298,7 +298,7 @@ class aggregate_reader_metadata : public aggregate_reader_metadata_base { std::span output_dtypes, std::span output_column_schemas, std::reference_wrapper filter, - rmm::cuda_stream_view stream) const; + cuda::stream_ref stream) const; /** * @brief Builds a row mask with all rows set to true @@ -311,7 +311,7 @@ class aggregate_reader_metadata : public aggregate_reader_metadata_base { */ [[nodiscard]] std::unique_ptr build_all_true_row_mask( std::span const> row_group_indices, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) const; /** @@ -333,7 +333,7 @@ class aggregate_reader_metadata : public aggregate_reader_metadata_base { std::span output_dtypes, std::span output_column_schemas, std::reference_wrapper filter, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) const; /** @@ -360,7 +360,7 @@ class aggregate_reader_metadata : public aggregate_reader_metadata_base { std::span const> row_group_indices, std::span input_columns, cudf::size_type row_mask_offset, - rmm::cuda_stream_view stream) const; + cuda::stream_ref stream) const; }; /** diff --git a/cpp/src/io/parquet/experimental/hybrid_scan_impl.cpp b/cpp/src/io/parquet/experimental/hybrid_scan_impl.cpp index aab25c0e648b..6b55659b1b6d 100644 --- a/cpp/src/io/parquet/experimental/hybrid_scan_impl.cpp +++ b/cpp/src/io/parquet/experimental/hybrid_scan_impl.cpp @@ -238,7 +238,7 @@ hybrid_scan_reader_impl::prepare_filter_and_output_types(parquet_reader_options void hybrid_scan_reader_impl::prepare_materialization(read_columns_mode read_columns_mode, std::size_t num_sources, parquet_reader_options const& options, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { reset_internal_state(); @@ -265,7 +265,7 @@ hybrid_scan_reader_impl::filter_row_groups_with_byte_range( std::vector> hybrid_scan_reader_impl::filter_row_groups_with_stats( std::span const> row_group_indices, parquet_reader_options const& options, - rmm::cuda_stream_view stream) + cuda::stream_ref stream) { CUDF_EXPECTS(not row_group_indices.empty(), "Empty input row group indices encountered"); auto [expr_conv, output_dtypes] = prepare_filter_and_output_types(options); @@ -319,7 +319,7 @@ hybrid_scan_reader_impl::filter_row_groups_with_dictionary_pages( std::span const> dictionary_page_data, std::span const> row_group_indices, parquet_reader_options const& options, - rmm::cuda_stream_view stream) + cuda::stream_ref stream) { CUDF_EXPECTS(not row_group_indices.empty(), "Empty input row group indices encountered"); auto [expr_conv, output_dtypes] = prepare_filter_and_output_types(options); @@ -376,7 +376,7 @@ std::vector> hybrid_scan_reader_impl::filter_row_groups_w std::span const> bloom_filter_data, std::span const> row_group_indices, parquet_reader_options const& options, - rmm::cuda_stream_view stream) + cuda::stream_ref stream) { CUDF_EXPECTS(not row_group_indices.empty(), "Empty input row group indices encountered"); auto [expr_conv, output_dtypes] = prepare_filter_and_output_types(options); @@ -392,7 +392,7 @@ std::vector> hybrid_scan_reader_impl::filter_row_groups_w std::unique_ptr hybrid_scan_reader_impl::build_all_true_row_mask( std::span const> row_group_indices, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { CUDF_EXPECTS(not row_group_indices.empty(), "Empty input row group indices encountered"); @@ -403,7 +403,7 @@ std::unique_ptr hybrid_scan_reader_impl::build_all_true_row_mask( std::unique_ptr hybrid_scan_reader_impl::build_row_mask_with_page_index_stats( std::span const> row_group_indices, parquet_reader_options const& options, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { CUDF_EXPECTS(not row_group_indices.empty(), "Empty input row group indices encountered"); @@ -504,7 +504,7 @@ table_with_metadata hybrid_scan_reader_impl::materialize_filter_columns( cudf::mutable_column_view& row_mask, use_data_page_mask mask_data_pages, parquet_reader_options const& options, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { CUDF_EXPECTS(std::cmp_equal(row_mask.size(), total_rows_in_row_groups(row_group_indices)), @@ -544,7 +544,7 @@ table_with_metadata hybrid_scan_reader_impl::materialize_payload_columns( cudf::column_view const& row_mask, use_data_page_mask mask_data_pages, parquet_reader_options const& options, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { CUDF_EXPECTS(std::cmp_equal(row_mask.size(), total_rows_in_row_groups(row_group_indices)), @@ -580,7 +580,7 @@ table_with_metadata hybrid_scan_reader_impl::materialize_all_columns( std::span const> row_group_indices, std::span const> column_chunk_data, parquet_reader_options const& options, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { CUDF_EXPECTS(not row_group_indices.empty(), "Empty input row group indices encountered"); @@ -610,7 +610,7 @@ void hybrid_scan_reader_impl::setup_chunking_for_filter_columns( use_data_page_mask mask_data_pages, std::span const> column_chunk_data, parquet_reader_options const& options, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { CUDF_EXPECTS(options.get_filter().has_value(), "Empty input filter expression encountered"); @@ -672,7 +672,7 @@ void hybrid_scan_reader_impl::setup_chunking_for_payload_columns( use_data_page_mask mask_data_pages, std::span const> column_chunk_data, parquet_reader_options const& options, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { CUDF_EXPECTS(std::cmp_equal(row_mask.size(), total_rows_in_row_groups(row_group_indices)), @@ -729,7 +729,7 @@ void hybrid_scan_reader_impl::setup_chunking_for_all_columns( std::span const> row_group_indices, std::span const> column_chunk_data, parquet_reader_options const& options, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { CUDF_EXPECTS(not row_group_indices.empty(), "Empty input row group indices encountered"); @@ -899,7 +899,7 @@ void hybrid_scan_reader_impl::initialize_reader_config(parquet_reader_options co void hybrid_scan_reader_impl::initialize_options(parquet_reader_options const& options, std::size_t num_sources, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { // Binary columns can be read as binary or strings diff --git a/cpp/src/io/parquet/experimental/hybrid_scan_impl.hpp b/cpp/src/io/parquet/experimental/hybrid_scan_impl.hpp index 3dd241af35ff..944db5589ae7 100644 --- a/cpp/src/io/parquet/experimental/hybrid_scan_impl.hpp +++ b/cpp/src/io/parquet/experimental/hybrid_scan_impl.hpp @@ -19,8 +19,7 @@ #include #include -#include - +#include #include #include @@ -106,7 +105,7 @@ class hybrid_scan_reader_impl : public parquet::detail::reader_impl { [[nodiscard]] std::vector> filter_row_groups_with_stats( std::span const> row_group_indices, parquet_reader_options const& options, - rmm::cuda_stream_view stream); + cuda::stream_ref stream); /** * @copydoc cudf::io::parquet::experimental::hybrid_scan_multifile::secondary_filters_byte_ranges @@ -129,7 +128,7 @@ class hybrid_scan_reader_impl : public parquet::detail::reader_impl { std::span const> dictionary_page_data, std::span const> row_group_indices, parquet_reader_options const& options, - rmm::cuda_stream_view stream); + cuda::stream_ref stream); /** * @copydoc cudf::io::parquet::experimental::hybrid_scan::filter_row_groups_with_bloom_filters @@ -138,14 +137,14 @@ class hybrid_scan_reader_impl : public parquet::detail::reader_impl { std::span const> bloom_filter_data, std::span const> row_group_indices, parquet_reader_options const& options, - rmm::cuda_stream_view stream); + cuda::stream_ref stream); /** * @copydoc cudf::io::parquet::experimental::hybrid_scan_multifile::build_all_true_row_mask */ [[nodiscard]] std::unique_ptr build_all_true_row_mask( std::span const> row_group_indices, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr); /** @@ -155,7 +154,7 @@ class hybrid_scan_reader_impl : public parquet::detail::reader_impl { [[nodiscard]] std::unique_ptr build_row_mask_with_page_index_stats( std::span const> row_group_indices, parquet_reader_options const& options, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr); /** @@ -179,7 +178,7 @@ class hybrid_scan_reader_impl : public parquet::detail::reader_impl { cudf::mutable_column_view& row_mask, use_data_page_mask mask_data_pages, parquet_reader_options const& options, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr); /** @@ -203,7 +202,7 @@ class hybrid_scan_reader_impl : public parquet::detail::reader_impl { cudf::column_view const& row_mask, use_data_page_mask mask_data_pages, parquet_reader_options const& options, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr); /** @@ -220,7 +219,7 @@ class hybrid_scan_reader_impl : public parquet::detail::reader_impl { std::span const> row_group_indices, std::span const> column_chunk_data, parquet_reader_options const& options, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr); /** @@ -235,7 +234,7 @@ class hybrid_scan_reader_impl : public parquet::detail::reader_impl { use_data_page_mask mask_data_pages, std::span const> column_chunk_data, parquet_reader_options const& options, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr); /** @@ -257,7 +256,7 @@ class hybrid_scan_reader_impl : public parquet::detail::reader_impl { use_data_page_mask mask_data_pages, std::span const> column_chunk_data, parquet_reader_options const& options, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr); /** @@ -276,7 +275,7 @@ class hybrid_scan_reader_impl : public parquet::detail::reader_impl { std::span const> row_group_indices, std::span const> column_chunk_data, parquet_reader_options const& options, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr); /** @@ -331,7 +330,7 @@ class hybrid_scan_reader_impl : public parquet::detail::reader_impl { */ void initialize_options(parquet_reader_options const& options, std::size_t num_sources, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr); /** @@ -390,7 +389,7 @@ class hybrid_scan_reader_impl : public parquet::detail::reader_impl { void prepare_materialization(read_columns_mode read_columns_mode, std::size_t num_sources, parquet_reader_options const& options, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr); /** @@ -430,7 +429,7 @@ class hybrid_scan_reader_impl : public parquet::detail::reader_impl { std::span const> dictionary_page_data, std::span dictionary_col_schemas, parquet_reader_options const& options, - rmm::cuda_stream_view stream); + cuda::stream_ref stream); /** * @brief Prepares the select input row groups and associated chunk information @@ -528,7 +527,7 @@ class hybrid_scan_reader_impl : public parquet::detail::reader_impl { * @return True if all rows are pruned */ [[nodiscard]] bool are_all_rows_pruned(cudf::column_view const& row_mask, - rmm::cuda_stream_view stream) const; + cuda::stream_ref stream) const; /** * @brief Updates the output row mask such that out_row_mask[i + out_row_mask_offset] = true if @@ -545,7 +544,7 @@ class hybrid_scan_reader_impl : public parquet::detail::reader_impl { void update_row_mask(cudf::column_view const& in_row_mask, cudf::mutable_column_view& out_row_mask, cudf::size_type out_row_mask_offset, - rmm::cuda_stream_view stream); + cuda::stream_ref stream); /** * @brief Check if this is the first output chunk diff --git a/cpp/src/io/parquet/experimental/hybrid_scan_multifile.cpp b/cpp/src/io/parquet/experimental/hybrid_scan_multifile.cpp index 38c355a651d7..169146c6382d 100644 --- a/cpp/src/io/parquet/experimental/hybrid_scan_multifile.cpp +++ b/cpp/src/io/parquet/experimental/hybrid_scan_multifile.cpp @@ -71,7 +71,7 @@ std::vector> hybrid_scan_multifile::filter_row_groups_wit std::vector> hybrid_scan_multifile::filter_row_groups_with_stats( cudf::host_span const> row_group_indices, parquet_reader_options const& options, - rmm::cuda_stream_view stream) const + cuda::stream_ref stream) const { CUDF_FUNC_RANGE(); return _impl->filter_row_groups_with_stats(row_group_indices, options, stream); @@ -88,7 +88,7 @@ hybrid_scan_multifile::secondary_filters_byte_ranges( std::unique_ptr hybrid_scan_multifile::build_all_true_row_mask( cudf::host_span const> row_group_indices, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) const { CUDF_FUNC_RANGE(); @@ -98,7 +98,7 @@ std::unique_ptr hybrid_scan_multifile::build_all_true_row_mask( std::unique_ptr hybrid_scan_multifile::build_row_mask_with_page_index_stats( cudf::host_span const> row_group_indices, parquet_reader_options const& options, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) const { CUDF_FUNC_RANGE(); @@ -120,7 +120,7 @@ table_with_metadata hybrid_scan_multifile::materialize_filter_columns( cudf::mutable_column_view& row_mask, use_data_page_mask mask_data_pages, parquet_reader_options const& options, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) const { CUDF_FUNC_RANGE(); @@ -143,7 +143,7 @@ table_with_metadata hybrid_scan_multifile::materialize_payload_columns( cudf::column_view const& row_mask, use_data_page_mask mask_data_pages, parquet_reader_options const& options, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) const { CUDF_FUNC_RANGE(); @@ -164,7 +164,7 @@ table_with_metadata hybrid_scan_multifile::materialize_all_columns( cudf::host_span const> row_group_indices, cudf::host_span const> column_chunk_data, parquet_reader_options const& options, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) const { CUDF_FUNC_RANGE(); @@ -179,7 +179,7 @@ void hybrid_scan_multifile::setup_chunking_for_filter_columns( use_data_page_mask mask_data_pages, cudf::host_span const> column_chunk_data, parquet_reader_options const& options, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) const { CUDF_FUNC_RANGE(); @@ -209,7 +209,7 @@ void hybrid_scan_multifile::setup_chunking_for_payload_columns( use_data_page_mask mask_data_pages, cudf::host_span const> column_chunk_data, parquet_reader_options const& options, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) const { CUDF_FUNC_RANGE(); @@ -237,7 +237,7 @@ void hybrid_scan_multifile::setup_chunking_for_all_columns( cudf::host_span const> row_group_indices, cudf::host_span const> column_chunk_data, parquet_reader_options const& options, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) const { CUDF_FUNC_RANGE(); @@ -308,7 +308,7 @@ std::vector> hybrid_scan_multifile::filter_row_groups_wit cudf::host_span const> dictionary_page_data, cudf::host_span const> row_group_indices, parquet_reader_options const& options, - rmm::cuda_stream_view stream) const + cuda::stream_ref stream) const { CUDF_FUNC_RANGE(); return _impl->filter_row_groups_with_dictionary_pages( diff --git a/cpp/src/io/parquet/experimental/hybrid_scan_preprocess.cu b/cpp/src/io/parquet/experimental/hybrid_scan_preprocess.cu index 9756066db8f9..169dcbcf6be7 100644 --- a/cpp/src/io/parquet/experimental/hybrid_scan_preprocess.cu +++ b/cpp/src/io/parquet/experimental/hybrid_scan_preprocess.cu @@ -18,12 +18,12 @@ #include #include -#include #include #include #include #include +#include #include #include @@ -48,7 +48,7 @@ void decode_dictionary_page_headers( cudf::detail::hostdevice_span chunks, cudf::detail::hostdevice_span pages, cudf::host_span const> dict_page_data, - rmm::cuda_stream_view stream) + cuda::stream_ref stream) { CUDF_FUNC_RANGE(); @@ -93,7 +93,7 @@ void decode_dictionary_page_headers( pages.device_to_host_async(stream); chunks.device_to_host_async(stream); - stream.synchronize(); + stream.wait(); } } // namespace @@ -219,7 +219,7 @@ hybrid_scan_reader_impl::prepare_dictionaries( std::span const> dictionary_page_data, std::span dictionary_col_schemas, parquet_reader_options const& options, - rmm::cuda_stream_view stream) + cuda::stream_ref stream) { // Create row group information for the input row group indices auto const row_groups_info = std::get<2>( @@ -313,7 +313,8 @@ hybrid_scan_reader_impl::prepare_dictionaries( // Create page infos for each column chunk's dictionary page cudf::detail::hostdevice_vector pages(total_column_chunks, stream); - CUDF_CUDA_TRY(cudaMemsetAsync(pages.device_ptr(), 0, pages.size() * sizeof(PageInfo), stream)); + CUDF_CUDA_TRY( + cudaMemsetAsync(pages.device_ptr(), 0, pages.size() * sizeof(PageInfo), stream.get())); // Decode dictionary page headers decode_dictionary_page_headers( @@ -360,7 +361,7 @@ struct is_row_pruned_fn { } // namespace bool hybrid_scan_reader_impl::are_all_rows_pruned(cudf::column_view const& row_mask, - rmm::cuda_stream_view stream) const + cuda::stream_ref stream) const { CUDF_EXPECTS(row_mask.type().id() == type_id::BOOL8, "Input row mask column must be a boolean column"); @@ -374,7 +375,7 @@ bool hybrid_scan_reader_impl::are_all_rows_pruned(cudf::column_view const& row_m void hybrid_scan_reader_impl::update_row_mask(cudf::column_view const& in_row_mask, cudf::mutable_column_view& out_row_mask, cudf::size_type out_row_mask_offset, - rmm::cuda_stream_view stream) + cuda::stream_ref stream) { CUDF_FUNC_RANGE(); @@ -393,7 +394,7 @@ void hybrid_scan_reader_impl::update_row_mask(cudf::column_view const& in_row_ma out_row_mask.begin() + out_row_mask_offset, total_rows, row_mask_update_fn{in_row_mask.nullable(), in_row_mask.begin(), in_row_mask.null_mask()}, - stream.value())); + stream.get())); // Make sure the null mask of the output row mask column is all valid after the update. This is // to correctly assess if a payload column data page can be pruned. An invalid row in the row mask diff --git a/cpp/src/io/parquet/experimental/page_index_filter.cu b/cpp/src/io/parquet/experimental/page_index_filter.cu index c8374da7b2bd..dbdf47f40275 100644 --- a/cpp/src/io/parquet/experimental/page_index_filter.cu +++ b/cpp/src/io/parquet/experimental/page_index_filter.cu @@ -30,13 +30,13 @@ #include #include -#include #include #include #include #include #include +#include #include #include @@ -83,7 +83,7 @@ struct page_stats_caster : public stats_caster_base { cudf::device_span page_indices, cudf::host_span page_row_offsets, cudf::data_type dtype, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) const requires(not cudf::is_compound()) { @@ -138,7 +138,7 @@ struct page_stats_caster : public stats_caster_base { host_column const& is_null, cudf::device_span page_indices, cudf::host_span page_row_offsets, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) const { CUDF_EXPECTS( @@ -185,7 +185,7 @@ struct page_stats_caster : public stats_caster_base { size_type host_null_count, cudf::device_span page_indices, cudf::host_span page_row_offsets, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) const { // Total number of pages in the column @@ -296,7 +296,7 @@ struct page_stats_caster : public stats_caster_base { template [[nodiscard]] auto compute_host_data(cudf::size_type schema_idx, cudf::data_type dtype, - rmm::cuda_stream_view stream) const + cuda::stream_ref stream) const { // Compute column chunk level page count offsets and page level row offsets. auto const [page_row_offsets, col_chunk_page_offsets] = @@ -410,7 +410,7 @@ struct page_stats_caster : public stats_caster_base { tuple, std::unique_ptr, std::optional>> operator()(cudf::size_type schema_idx, cudf::data_type dtype, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) const { // List, Struct, Dictionary types are not supported @@ -547,7 +547,7 @@ struct page_stats_to_row_mask_converter : public page_stats_caster { cudf::size_type schema_idx, cudf::data_type dtype, std::reference_wrapper filter, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) const { // List, Struct, Dictionary types are not supported @@ -847,7 +847,7 @@ std::unique_ptr aggregate_reader_metadata::build_row_mask_with_pag std::span output_dtypes, std::span output_column_schemas, std::reference_wrapper filter, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) const { CUDF_FUNC_RANGE(); @@ -990,7 +990,7 @@ thrust::host_vector aggregate_reader_metadata::compute_data_page_mask( std::span const> row_group_indices, std::span input_columns, cudf::size_type row_mask_offset, - rmm::cuda_stream_view stream) const + cuda::stream_ref stream) const { CUDF_FUNC_RANGE(); @@ -1015,7 +1015,7 @@ thrust::host_vector aggregate_reader_metadata::compute_data_page_mask( row_mask.template begin() + row_mask_offset + total_rows, cuda::std::identity{}, stream)) { - return thrust::host_vector(0, stream); + return thrust::host_vector(0); } // Collect column schema indices from the input columns. @@ -1032,7 +1032,7 @@ thrust::host_vector aggregate_reader_metadata::compute_data_page_mask( CUDF_LOG_WARN( "Encountered missing Parquet offset index for one or more output columns. Skipping page " "pruning."); - return thrust::host_vector(0, stream); + return thrust::host_vector(0); } // TODO(#22900): remove this guard once this path maps schema indices per source. It currently @@ -1176,9 +1176,9 @@ thrust::host_vector aggregate_reader_metadata::compute_data_page_mask( // Copy over search results to host auto host_results = cudf::detail::make_pinned_vector_async(device_data_page_mask, stream); auto const total_pages = pinned_page_offsets.size() - num_columns; - auto data_page_mask = thrust::host_vector(total_pages, stream); + auto data_page_mask = thrust::host_vector(total_pages); auto host_results_iter = host_results.begin(); - stream.synchronize(); + stream.wait(); // Discard results for invalid ranges. i.e. ranges starting at the last page of a column and // ending at the first page of the next column @@ -1203,13 +1203,13 @@ template thrust::host_vector aggregate_reader_metadata::compute_data_page_ std::span const> row_group_indices, std::span input_columns, cudf::size_type row_mask_offset, - rmm::cuda_stream_view stream) const; + cuda::stream_ref stream) const; template thrust::host_vector aggregate_reader_metadata::compute_data_page_mask< cudf::mutable_column_view>(cudf::mutable_column_view const& row_mask, std::span const> row_group_indices, std::span input_columns, cudf::size_type row_mask_offset, - rmm::cuda_stream_view stream) const; + cuda::stream_ref stream) const; } // namespace cudf::io::parquet::experimental::detail diff --git a/cpp/src/io/parquet/experimental/page_index_filter_utils.cu b/cpp/src/io/parquet/experimental/page_index_filter_utils.cu index 4c9c72548829..c3862079b3a8 100644 --- a/cpp/src/io/parquet/experimental/page_index_filter_utils.cu +++ b/cpp/src/io/parquet/experimental/page_index_filter_utils.cu @@ -11,9 +11,9 @@ #include #include -#include #include +#include #include #include @@ -27,7 +27,7 @@ compute_page_row_offsets_and_colchunk_page_offsets( std::span per_file_metadata, std::span const> row_group_indices, size_type schema_idx, - rmm::cuda_stream_view stream) + cuda::stream_ref stream) { // Compute total number of row groups auto const total_row_groups = @@ -146,7 +146,7 @@ std::pair, size_type> compute_page_row_offsets( rmm::device_uvector compute_page_indices_async( cudf::host_span page_row_offsets, cudf::size_type total_rows, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { auto row_offsets = cudf::detail::make_device_uvector_async( diff --git a/cpp/src/io/parquet/experimental/page_index_filter_utils.hpp b/cpp/src/io/parquet/experimental/page_index_filter_utils.hpp index 59b4ac18a29c..d8306b42192b 100644 --- a/cpp/src/io/parquet/experimental/page_index_filter_utils.hpp +++ b/cpp/src/io/parquet/experimental/page_index_filter_utils.hpp @@ -13,9 +13,10 @@ #include #include -#include #include +#include + #include namespace cudf::io::parquet::experimental::detail { @@ -37,7 +38,7 @@ compute_page_row_offsets_and_colchunk_page_offsets( std::span per_file_metadata, std::span const> row_group_indices, size_type schema_idx, - rmm::cuda_stream_view stream); + cuda::stream_ref stream); /** * @brief Computes page row offsets and the size (number of rows) of the largest page for a given @@ -66,7 +67,7 @@ compute_page_row_offsets_and_colchunk_page_offsets( [[nodiscard]] rmm::device_uvector compute_page_indices_async( cudf::host_span page_row_offsets, cudf::size_type total_rows, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr); /** diff --git a/cpp/src/io/parquet/experimental/variant_extract.cu b/cpp/src/io/parquet/experimental/variant_extract.cu index f380538696ef..82962e47f271 100644 --- a/cpp/src/io/parquet/experimental/variant_extract.cu +++ b/cpp/src/io/parquet/experimental/variant_extract.cu @@ -28,7 +28,6 @@ #include #include -#include #include #include #include @@ -41,6 +40,7 @@ #include #include #include +#include #include #include @@ -715,7 +715,7 @@ struct cast_variant_fn { data_type desired_type; bitmask_type* d_null_mask; rmm::device_buffer null_mask; - rmm::cuda_stream_view stream; + cuda::stream_ref stream; rmm::device_async_resource_ref mr; template @@ -724,7 +724,7 @@ struct cast_variant_fn { { rmm::device_buffer data{num_rows * sizeof(T), stream, mr}; auto grid = cudf::detail::grid_1d{num_rows, block_size}; - cast_variant_primitive_kernel<<>>( + cast_variant_primitive_kernel<<>>( values, {static_cast(data.data()), static_cast(num_rows)}, d_null_mask); CUDF_CUDA_TRY(cudaGetLastError()); auto const null_count = @@ -831,7 +831,7 @@ __device__ cuda::std::optional logical_type_of(device_span } std::unique_ptr build_path_column(cudf::host_span steps, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { auto const depth = steps.size(); @@ -863,7 +863,7 @@ namespace detail { std::unique_ptr get_variant_field(column_view const& variant_column, std::string_view path, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { // Validate the variant column @@ -911,7 +911,7 @@ std::unique_ptr get_variant_field(column_view const& variant_column, // Parse the path per row and compute the output sizes auto grid = cudf::detail::grid_1d{num_rows, block_size}; - locate_variant_fields_kernel<<>>( + locate_variant_fields_kernel<<>>( meta_lists_device_view, val_lists_device_view, *path_device_view, @@ -960,7 +960,7 @@ std::unique_ptr get_variant_field(column_view const& variant_column, std::unique_ptr cast_variant(column_view const& values, data_type desired_type, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { validate_variant_child(values); @@ -1042,7 +1042,7 @@ std::unique_ptr get_variant_type_id(column_view const& values, std::unique_ptr get_variant_field(column_view const& variant_column, std::string_view path, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { CUDF_FUNC_RANGE(); @@ -1051,7 +1051,7 @@ std::unique_ptr get_variant_field(column_view const& variant_column, std::unique_ptr cast_variant(column_view const& values, data_type desired_type, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { CUDF_FUNC_RANGE(); @@ -1069,7 +1069,7 @@ std::unique_ptr get_variant_type_id(column_view const& values, std::unique_ptr extract_variant_field(column_view const& variant_column, std::string_view path, data_type desired_type, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { CUDF_FUNC_RANGE(); diff --git a/cpp/src/io/parquet/expression_transform_helpers.cpp b/cpp/src/io/parquet/expression_transform_helpers.cpp index 8c9351cba92a..7d798e49e35a 100644 --- a/cpp/src/io/parquet/expression_transform_helpers.cpp +++ b/cpp/src/io/parquet/expression_transform_helpers.cpp @@ -330,7 +330,7 @@ std::optional>> collect_filtered_row_group_in cudf::table_view table, std::reference_wrapper ast_expr, host_span const> input_row_group_indices, - rmm::cuda_stream_view stream) + cuda::stream_ref stream) { // Filter the input table using AST expression auto predicate_col = cudf::detail::compute_column( diff --git a/cpp/src/io/parquet/expression_transform_helpers.hpp b/cpp/src/io/parquet/expression_transform_helpers.hpp index 3762c174c941..655cb118d645 100644 --- a/cpp/src/io/parquet/expression_transform_helpers.hpp +++ b/cpp/src/io/parquet/expression_transform_helpers.hpp @@ -14,7 +14,7 @@ #include #include -#include +#include #include #include @@ -385,6 +385,6 @@ class offset_column_references : public named_to_reference_converter { cudf::table_view ast_table, std::reference_wrapper ast_expr, host_span const> input_row_group_indices, - rmm::cuda_stream_view stream); + cuda::stream_ref stream); } // namespace cudf::io::parquet::detail diff --git a/cpp/src/io/parquet/io_utils/parquet_io_utils.cpp b/cpp/src/io/parquet/io_utils/parquet_io_utils.cpp index b6f0413c57c1..bdc838601c0f 100644 --- a/cpp/src/io/parquet/io_utils/parquet_io_utils.cpp +++ b/cpp/src/io/parquet/io_utils/parquet_io_utils.cpp @@ -20,11 +20,11 @@ #include #include -#include #include #include #include +#include #include #include @@ -284,7 +284,7 @@ fetch_byte_ranges_to_device_async_impl( cudf::host_span const> datasources, cudf::host_span const> byte_ranges_per_source, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { auto const num_sources = datasources.size(); @@ -423,7 +423,7 @@ fetch_byte_ranges_to_device_async_impl( } // `device_read_async` is not guaranteed to follow stream-ordering (see datasource API docs) - stream.synchronize(); + stream.wait(); // Schedule device reads holding the `device_read_mutex` so that all reads for a caller thread // are scheduled without interleaving with reads from other threads yielding better pipelining @@ -452,7 +452,7 @@ fetch_byte_ranges_to_device_async_impl( } // Synchronize stream if `memcpy_batch_async` was called to safely discard the host buffers - if (not host_buffers.empty()) { stream.synchronize(); } + if (not host_buffers.empty()) { stream.wait(); } auto sync_function = [](decltype(device_read_tasks) device_read_tasks) { for (auto& task : device_read_tasks) { @@ -469,7 +469,7 @@ fetch_bloom_filters_to_device_impl( cudf::host_span const> datasources, cudf::host_span const> bloom_filter_byte_ranges_per_source, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { auto const num_sources = datasources.size(); @@ -637,7 +637,7 @@ fetch_bloom_filters_to_device_impl( CUDF_CUDA_TRY(cudf::detail::memcpy_batch_async( copy_dsts.data(), copy_srcs.data(), copy_sizes.data(), total_filters, stream)); } - stream.synchronize(); + stream.wait(); } std::vector bitset_buffers; @@ -697,7 +697,7 @@ std::tuple, std::future> fetch_byte_ranges_to_device_async(cudf::io::datasource& datasource, std::span byte_ranges, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { CUDF_FUNC_RANGE(); @@ -722,7 +722,7 @@ std::tuple, fetch_byte_ranges_to_device_async( cudf::host_span const> datasources, cudf::host_span const> byte_ranges_per_source, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { CUDF_FUNC_RANGE(); @@ -744,7 +744,7 @@ std::pair, std::vector bloom_filter_byte_ranges, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { CUDF_FUNC_RANGE(); @@ -769,7 +769,7 @@ fetch_bloom_filters_to_device( cudf::host_span const> datasources, cudf::host_span const> bloom_filter_byte_ranges_per_source, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { CUDF_FUNC_RANGE(); diff --git a/cpp/src/io/parquet/page_data.cu b/cpp/src/io/parquet/page_data.cu index 60a62e1d8d66..ad5d48fbca83 100644 --- a/cpp/src/io/parquet/page_data.cu +++ b/cpp/src/io/parquet/page_data.cu @@ -499,7 +499,7 @@ struct mask_tform { } // anonymous namespace uint32_t get_aggregated_decode_kernel_mask(cudf::detail::hostdevice_span pages, - rmm::cuda_stream_view stream) + cuda::stream_ref stream) { // determine which kernels to invoke return cudf::detail::transform_reduce(pages.device_begin(), @@ -520,7 +520,7 @@ void decode_page_data(cudf::detail::hostdevice_span pages, int level_type_size, cudf::device_span page_mask, kernel_error::pointer error_code, - rmm::cuda_stream_view stream) + cuda::stream_ref stream) { CUDF_EXPECTS(pages.size() > 0, "There is no page to decode"); @@ -528,11 +528,11 @@ void decode_page_data(cudf::detail::hostdevice_span pages, dim3 dim_grid(pages.size(), 1); // 1 threadblock per page if (level_type_size == 1) { - decode_page_data<<>>( + decode_page_data<<>>( pages.device_ptr(), chunks, min_row, num_rows, page_mask, error_code); CUDF_CUDA_TRY(cudaGetLastError()); } else { - decode_page_data<<>>( + decode_page_data<<>>( pages.device_ptr(), chunks, min_row, num_rows, page_mask, error_code); CUDF_CUDA_TRY(cudaGetLastError()); } @@ -548,7 +548,7 @@ void decode_split_page_data(cudf::detail::hostdevice_span pages, int level_type_size, cudf::device_span page_mask, kernel_error::pointer error_code, - rmm::cuda_stream_view stream) + cuda::stream_ref stream) { CUDF_EXPECTS(pages.size() > 0, "There is no page to decode"); @@ -557,12 +557,12 @@ void decode_split_page_data(cudf::detail::hostdevice_span pages, if (level_type_size == 1) { decode_split_page_data_kernel - <<>>( + <<>>( pages.device_ptr(), chunks, min_row, num_rows, page_mask, error_code); CUDF_CUDA_TRY(cudaGetLastError()); } else { decode_split_page_data_kernel - <<>>( + <<>>( pages.device_ptr(), chunks, min_row, num_rows, page_mask, error_code); CUDF_CUDA_TRY(cudaGetLastError()); } @@ -570,7 +570,7 @@ void decode_split_page_data(cudf::detail::hostdevice_span pages, void write_final_offsets(host_span offsets, host_span buff_addrs, - rmm::cuda_stream_view stream) + cuda::stream_ref stream) { // Copy offsets to device and create an iterator auto d_src_data = cudf::detail::make_device_uvector_async( diff --git a/cpp/src/io/parquet/page_delta_decode.cu b/cpp/src/io/parquet/page_delta_decode.cu index e7210d9a3ca5..72425abc59de 100644 --- a/cpp/src/io/parquet/page_delta_decode.cu +++ b/cpp/src/io/parquet/page_delta_decode.cu @@ -956,7 +956,7 @@ void decode_delta_binary(cudf::detail::hostdevice_span pages, int level_type_size, cudf::device_span page_mask, kernel_error::pointer error_code, - rmm::cuda_stream_view stream) + cuda::stream_ref stream) { CUDF_EXPECTS(pages.size() > 0, "There is no page to decode"); @@ -964,11 +964,11 @@ void decode_delta_binary(cudf::detail::hostdevice_span pages, dim3 dim_grid(pages.size(), 1); // 1 threadblock per page if (level_type_size == 1) { - decode_delta_binary_kernel<<>>( + decode_delta_binary_kernel<<>>( pages.device_ptr(), chunks, min_row, num_rows, page_mask, error_code); CUDF_CUDA_TRY(cudaGetLastError()); } else { - decode_delta_binary_kernel<<>>( + decode_delta_binary_kernel<<>>( pages.device_ptr(), chunks, min_row, num_rows, page_mask, error_code); CUDF_CUDA_TRY(cudaGetLastError()); } @@ -985,7 +985,7 @@ void decode_delta_byte_array(cudf::detail::hostdevice_span pages, cudf::device_span page_mask, cudf::device_span initial_str_offsets, kernel_error::pointer error_code, - rmm::cuda_stream_view stream) + cuda::stream_ref stream) { CUDF_EXPECTS(pages.size() > 0, "There is no page to decode"); @@ -993,11 +993,11 @@ void decode_delta_byte_array(cudf::detail::hostdevice_span pages, dim3 const dim_grid(pages.size(), 1); // 1 threadblock per page if (level_type_size == 1) { - decode_delta_byte_array_kernel<<>>( + decode_delta_byte_array_kernel<<>>( pages.device_ptr(), chunks, min_row, num_rows, page_mask, initial_str_offsets, error_code); CUDF_CUDA_TRY(cudaGetLastError()); } else { - decode_delta_byte_array_kernel<<>>( + decode_delta_byte_array_kernel<<>>( pages.device_ptr(), chunks, min_row, num_rows, page_mask, initial_str_offsets, error_code); CUDF_CUDA_TRY(cudaGetLastError()); } @@ -1014,7 +1014,7 @@ void decode_delta_length_byte_array(cudf::detail::hostdevice_span page cudf::device_span page_mask, cudf::device_span initial_str_offsets, kernel_error::pointer error_code, - rmm::cuda_stream_view stream) + cuda::stream_ref stream) { CUDF_EXPECTS(pages.size() > 0, "There is no page to decode"); @@ -1022,11 +1022,11 @@ void decode_delta_length_byte_array(cudf::detail::hostdevice_span page dim3 const dim_grid(pages.size(), 1); // 1 threadblock per page if (level_type_size == 1) { - decode_delta_length_byte_array_kernel<<>>( + decode_delta_length_byte_array_kernel<<>>( pages.device_ptr(), chunks, min_row, num_rows, page_mask, initial_str_offsets, error_code); CUDF_CUDA_TRY(cudaGetLastError()); } else { - decode_delta_length_byte_array_kernel<<>>( + decode_delta_length_byte_array_kernel<<>>( pages.device_ptr(), chunks, min_row, num_rows, page_mask, initial_str_offsets, error_code); CUDF_CUDA_TRY(cudaGetLastError()); } diff --git a/cpp/src/io/parquet/page_enc.cu b/cpp/src/io/parquet/page_enc.cu index 4c5c5523313c..a0debc79f8a4 100644 --- a/cpp/src/io/parquet/page_enc.cu +++ b/cpp/src/io/parquet/page_enc.cu @@ -18,7 +18,6 @@ #include #include -#include #include #include @@ -30,6 +29,7 @@ #include #include #include +#include #include #include #include @@ -3426,33 +3426,33 @@ void InitRowGroupFragments(device_2dspan frag, device_span partitions, device_span part_frag_offset, uint32_t fragment_size, - rmm::cuda_stream_view stream) + cuda::stream_ref stream) { auto const num_columns = frag.size().first; auto const num_fragments_per_column = frag.size().second; auto const grid_y = std::min(static_cast(num_fragments_per_column), MAX_GRID_Y_SIZE); dim3 const dim_grid(num_columns, grid_y); // 1 threadblock per fragment - gpuInitRowGroupFragments<512><<>>( + gpuInitRowGroupFragments<512><<>>( frag, col_desc, partitions, part_frag_offset, fragment_size); CUDF_CUDA_TRY(cudaGetLastError()); } void CalculatePageFragments(device_span frag, device_span column_frag_sizes, - rmm::cuda_stream_view stream) + cuda::stream_ref stream) { - gpuCalculatePageFragments<512><<>>(frag, column_frag_sizes); + gpuCalculatePageFragments<512><<>>(frag, column_frag_sizes); CUDF_CUDA_TRY(cudaGetLastError()); } void InitFragmentStatistics(device_span groups, device_span fragments, - rmm::cuda_stream_view stream) + cuda::stream_ref stream) { int const num_fragments = fragments.size(); int const dim = util::div_rounding_up_safe(num_fragments, encode_block_size / cudf::detail::warp_size); - gpuInitFragmentStats<<>>(groups, fragments); + gpuInitFragmentStats<<>>(groups, fragments); CUDF_CUDA_TRY(cudaGetLastError()); } @@ -3468,22 +3468,22 @@ void InitEncoderPages(device_2dspan chunks, bool write_v2_headers, statistics_merge_group* page_grstats, statistics_merge_group* chunk_grstats, - rmm::cuda_stream_view stream) + cuda::stream_ref stream) { auto num_rowgroups = chunks.size().first; dim3 dim_grid(num_columns, num_rowgroups); // 1 threadblock per rowgroup - gpuInitPages<<>>(chunks, - pages, - page_sizes, - comp_page_sizes, - col_desc, - page_grstats, - chunk_grstats, - num_columns, - max_page_size_bytes, - max_page_size_rows, - page_align, - write_v2_headers); + gpuInitPages<<>>(chunks, + pages, + page_sizes, + comp_page_sizes, + col_desc, + page_grstats, + chunk_grstats, + num_columns, + max_page_size_bytes, + max_page_size_rows, + page_align, + write_v2_headers); CUDF_CUDA_TRY(cudaGetLastError()); } @@ -3492,7 +3492,7 @@ void EncodePages(device_span pages, device_span> comp_in, device_span> comp_out, device_span comp_results, - rmm::cuda_stream_view stream) + cuda::stream_ref stream) { auto num_pages = pages.size(); @@ -3568,11 +3568,11 @@ void EncodePages(device_span pages, void decide_compression(device_span chunks, bool page_level_compression, - rmm::cuda_stream_view stream) + cuda::stream_ref stream) { auto const num_blocks = util::div_rounding_up_safe(chunks.size(), decide_compression_warps_in_block); - decide_compression_kernel<<>>( + decide_compression_kernel<<>>( chunks, page_level_compression); CUDF_CUDA_TRY(cudaGetLastError()); } @@ -3581,26 +3581,26 @@ void EncodePageHeaders(device_span pages, device_span comp_results, device_span page_stats, statistics_chunk const* chunk_stats, - rmm::cuda_stream_view stream) + cuda::stream_ref stream) { auto const num_blocks = util::div_rounding_up_safe(pages.size(), encode_block_size); - gpuEncodePageHeaders<<>>( + gpuEncodePageHeaders<<>>( pages, comp_results, page_stats, chunk_stats); CUDF_CUDA_TRY(cudaGetLastError()); } -void GatherPages(device_span chunks, rmm::cuda_stream_view stream) +void GatherPages(device_span chunks, cuda::stream_ref stream) { - gpuGatherPages<<>>(chunks); + gpuGatherPages<<>>(chunks); CUDF_CUDA_TRY(cudaGetLastError()); } void EncodeColumnIndexes(device_span chunks, device_span column_stats, int32_t column_index_truncate_length, - rmm::cuda_stream_view stream) + cuda::stream_ref stream) { - gpuEncodeColumnIndexes<<>>( + gpuEncodeColumnIndexes<<>>( chunks, column_stats, column_index_truncate_length); CUDF_CUDA_TRY(cudaGetLastError()); } diff --git a/cpp/src/io/parquet/page_hdr.cu b/cpp/src/io/parquet/page_hdr.cu index 71dc290f5901..d0caf236e7e7 100644 --- a/cpp/src/io/parquet/page_hdr.cu +++ b/cpp/src/io/parquet/page_hdr.cu @@ -12,7 +12,6 @@ #include #include -#include #include #include @@ -20,6 +19,7 @@ #include #include #include +#include #include namespace cudf::io::parquet::detail { @@ -908,7 +908,7 @@ CUDF_KERNEL void __launch_bounds__(build_string_dict_index_block_size) void count_page_headers(cudf::detail::hostdevice_span chunks, kernel_error::pointer error_code, - rmm::cuda_stream_view stream) + cuda::stream_ref stream) { static_assert(count_page_headers_block_size % cudf::detail::warp_size == 0, "Block size for decode page headers kernel must be a multiple of warp size"); @@ -920,14 +920,14 @@ void count_page_headers(cudf::detail::hostdevice_span chunks, dim3 dim_block(count_page_headers_block_size, 1); dim3 dim_grid(num_blocks, 1); - count_page_headers_kernel<<>>(chunks, error_code); + count_page_headers_kernel<<>>(chunks, error_code); CUDF_CUDA_TRY(cudaGetLastError()); } void decode_page_headers(cudf::device_span chunks, cudf::device_span chunk_pages, kernel_error::pointer error_code, - rmm::cuda_stream_view stream) + cuda::stream_ref stream) { static_assert(decode_page_headers_block_size % cudf::detail::warp_size == 0, "Block size for decode page headers kernel must be a multiple of warp size"); @@ -942,7 +942,7 @@ void decode_page_headers(cudf::device_span chunks, dim3 dim_block(decode_page_headers_block_size, 1); dim3 dim_grid(num_blocks, 1); - decode_page_headers_kernel<<>>( + decode_page_headers_kernel<<>>( chunks, chunk_pages, error_code); CUDF_CUDA_TRY(cudaGetLastError()); } @@ -953,7 +953,7 @@ void decode_page_headers_from_page_data( cudf::device_span const> page_data, cudf::device_span chunk_page_offsets, kernel_error::pointer error_code, - rmm::cuda_stream_view stream) + cuda::stream_ref stream) { CUDF_EXPECTS(chunk_page_offsets.size() == chunks.size() + 1, "Chunk page offsets must cover all chunks"); @@ -970,7 +970,7 @@ void decode_page_headers_from_page_data( void build_string_dictionary_index(ColumnChunkDesc* chunks, int32_t num_chunks, kernel_error::pointer error_code, - rmm::cuda_stream_view stream) + cuda::stream_ref stream) { static_assert( build_string_dict_index_block_size % cudf::detail::warp_size == 0, @@ -982,7 +982,7 @@ void build_string_dictionary_index(ColumnChunkDesc* chunks, dim3 dim_block(build_string_dict_index_block_size, 1); dim3 dim_grid(num_blocks, 1); - build_string_dictionary_index_kernel<<>>( + build_string_dictionary_index_kernel<<>>( chunks, num_chunks, error_code); CUDF_CUDA_TRY(cudaGetLastError()); } diff --git a/cpp/src/io/parquet/page_string_decode.cu b/cpp/src/io/parquet/page_string_decode.cu index fb316bb5a208..cc5a61cd210b 100644 --- a/cpp/src/io/parquet/page_string_decode.cu +++ b/cpp/src/io/parquet/page_string_decode.cu @@ -951,17 +951,17 @@ void compute_page_string_sizes_pass1(cudf::detail::hostdevice_span pag uint32_t kernel_mask, bool all_rows, int level_type_size, - rmm::cuda_stream_view stream) + cuda::stream_ref stream) { dim3 const dim_block(preprocess_block_size, 1); dim3 const dim_grid(pages.size(), 1); // 1 threadblock per page if (level_type_size == 1) { - compute_string_page_bounds_kernel<<>>( + compute_string_page_bounds_kernel<<>>( pages.device_ptr(), chunks, page_mask, min_row, num_rows, all_rows); CUDF_CUDA_TRY(cudaGetLastError()); } else { - compute_string_page_bounds_kernel<<>>( + compute_string_page_bounds_kernel<<>>( pages.device_ptr(), chunks, page_mask, min_row, num_rows, all_rows); CUDF_CUDA_TRY(cudaGetLastError()); } @@ -1003,7 +1003,7 @@ void compute_page_string_sizes_pass1(cudf::detail::hostdevice_span pag void compute_page_string_sizes_pass2(cudf::detail::hostdevice_span pages, cudf::detail::hostdevice_span chunks, rmm::device_uvector& temp_string_buf, - rmm::cuda_stream_view stream) + cuda::stream_ref stream) { // check for needed temp space for DELTA_BYTE_ARRAY auto const need_sizes = @@ -1374,7 +1374,7 @@ void preprocess_string_offsets(cudf::detail::hostdevice_span pages, size_t min_row, size_t num_rows, kernel_error::pointer error_code, - rmm::cuda_stream_view stream) + cuda::stream_ref stream) { if (pages.size() == 0) { return; } @@ -1385,13 +1385,13 @@ void preprocess_string_offsets(cudf::detail::hostdevice_span pages, dim3 dim_grid(pages.size(), 1); // 1 threadblock per page preprocess_string_offsets_kernel - <<>>(pages.device_ptr(), - chunks, - page_string_offset_indices, - page_mask, - min_row, - num_rows, - error_code); + <<>>(pages.device_ptr(), + chunks, + page_string_offset_indices, + page_mask, + min_row, + num_rows, + error_code); CUDF_CUDA_TRY(cudaGetLastError()); } diff --git a/cpp/src/io/parquet/parquet_gpu.cuh b/cpp/src/io/parquet/parquet_gpu.cuh index c86ab8673a4f..169f1c87536a 100644 --- a/cpp/src/io/parquet/parquet_gpu.cuh +++ b/cpp/src/io/parquet/parquet_gpu.cuh @@ -92,7 +92,7 @@ inline size_type __device__ row_to_value_idx(size_type idx, */ void populate_chunk_hash_maps(device_span const map_storage, cudf::detail::device_2dspan frags, - rmm::cuda_stream_view stream); + cuda::stream_ref stream); /** * @brief Compact dictionary hash map entries into chunk.dict_data @@ -108,7 +108,7 @@ void populate_chunk_hash_maps(device_span const map_storage, void collect_map_entries(device_span const map_storage, device_span chunks, cudf::detail::device_2dspan frags, - rmm::cuda_stream_view stream); + cuda::stream_ref stream); /** * @brief Get the Dictionary Indices for each row @@ -125,7 +125,7 @@ void collect_map_entries(device_span const map_storage, */ void get_dictionary_indices(device_span const map_storage, cudf::detail::device_2dspan frags, - rmm::cuda_stream_view stream); + cuda::stream_ref stream); /** * @brief Compute the minimum width required for the dictionary indices for each data page @@ -133,6 +133,6 @@ void get_dictionary_indices(device_span const map_storage, * @param pages Device span of encoder pages * @param stream CUDA stream to use */ -void compute_per_page_dict_bits(device_span pages, rmm::cuda_stream_view stream); +void compute_per_page_dict_bits(device_span pages, cuda::stream_ref stream); } // namespace cudf::io::parquet::detail diff --git a/cpp/src/io/parquet/parquet_gpu.hpp b/cpp/src/io/parquet/parquet_gpu.hpp index b89ecbaae7f6..1dd401f08260 100644 --- a/cpp/src/io/parquet/parquet_gpu.hpp +++ b/cpp/src/io/parquet/parquet_gpu.hpp @@ -18,12 +18,12 @@ #include #include -#include #include #include #include #include +#include #include #include @@ -713,7 +713,7 @@ __device__ inline bool is_repeated_run(int const run_header) { return !is_litera */ void count_page_headers(cudf::detail::hostdevice_span chunks, kernel_error::pointer error_code, - rmm::cuda_stream_view stream); + cuda::stream_ref stream); /** * @brief Launches kernel for parsing the page headers in the column chunks * @@ -725,7 +725,7 @@ void count_page_headers(cudf::detail::hostdevice_span chunks, void decode_page_headers(cudf::device_span chunks, cudf::device_span chunk_pages, kernel_error::pointer error_code, - rmm::cuda_stream_view stream); + cuda::stream_ref stream); /** * @brief Decode page headers from corresponding specified page data spans. @@ -745,7 +745,7 @@ void decode_page_headers_from_page_data( cudf::device_span const> page_data, cudf::device_span chunk_page_offsets, kernel_error::pointer error_code, - rmm::cuda_stream_view stream); + cuda::stream_ref stream); /** * @brief Launches kernel for building the dictionary index for the column @@ -759,7 +759,7 @@ void decode_page_headers_from_page_data( void build_string_dictionary_index(ColumnChunkDesc* chunks, int32_t num_chunks, kernel_error::pointer error_code, - rmm::cuda_stream_view stream); + cuda::stream_ref stream); /** * @brief Get the set of kernels that need to be invoked on these pages as a bitmask. @@ -772,7 +772,7 @@ void build_string_dictionary_index(ColumnChunkDesc* chunks, * @return Bitwise OR of all page `kernel_mask` values */ uint32_t get_aggregated_decode_kernel_mask(cudf::detail::hostdevice_span pages, - rmm::cuda_stream_view stream); + cuda::stream_ref stream); /** * @brief Compute page output size information. @@ -803,7 +803,7 @@ void compute_page_sizes(cudf::detail::hostdevice_span pages, size_t num_rows, bool compute_num_rows, int level_type_size, - rmm::cuda_stream_view stream); + cuda::stream_ref stream); /** * @brief Compute string page output size information. @@ -834,7 +834,7 @@ void compute_page_string_sizes_pass1(cudf::detail::hostdevice_span pag uint32_t kernel_mask, bool all_rows, int level_type_size, - rmm::cuda_stream_view stream); + cuda::stream_ref stream); /** * @brief Compute temp string information for decoding. @@ -851,7 +851,7 @@ void compute_page_string_sizes_pass1(cudf::detail::hostdevice_span pag void compute_page_string_sizes_pass2(cudf::detail::hostdevice_span pages, cudf::detail::hostdevice_span chunks, rmm::device_uvector& temp_string_buf, - rmm::cuda_stream_view stream); + cuda::stream_ref stream); /** * @brief Launches kernel for reading the column data stored in the pages @@ -875,7 +875,7 @@ void decode_page_data(cudf::detail::hostdevice_span pages, int level_type_size, cudf::device_span page_mask, kernel_error::pointer error_code, - rmm::cuda_stream_view stream); + cuda::stream_ref stream); /** * @brief Launches kernel for reading the BYTE_STREAM_SPLIT column data stored in the pages @@ -899,7 +899,7 @@ void decode_split_page_data(cudf::detail::hostdevice_span pages, int level_type_size, cudf::device_span page_mask, kernel_error::pointer error_code, - rmm::cuda_stream_view stream); + cuda::stream_ref stream); /** * @brief Writes the final offsets to the corresponding list and string buffer end addresses in a @@ -911,7 +911,7 @@ void decode_split_page_data(cudf::detail::hostdevice_span pages, */ void write_final_offsets(host_span offsets, host_span buff_addrs, - rmm::cuda_stream_view stream); + cuda::stream_ref stream); /** * @brief Launches kernel for reading the DELTA_BINARY_PACKED column data stored in the pages @@ -935,7 +935,7 @@ void decode_delta_binary(cudf::detail::hostdevice_span pages, int level_type_size, cudf::device_span page_mask, kernel_error::pointer error_code, - rmm::cuda_stream_view stream); + cuda::stream_ref stream); /** * @brief Launches kernel for reading the DELTA_BYTE_ARRAY column data stored in the pages @@ -961,7 +961,7 @@ void decode_delta_byte_array(cudf::detail::hostdevice_span pages, cudf::device_span page_mask, cudf::device_span initial_str_offsets, kernel_error::pointer error_code, - rmm::cuda_stream_view stream); + cuda::stream_ref stream); /** * @brief Launches kernel for reading the DELTA_LENGTH_BYTE_ARRAY column data stored in the pages @@ -987,7 +987,7 @@ void decode_delta_length_byte_array(cudf::detail::hostdevice_span page cudf::device_span page_mask, cudf::device_span initial_str_offsets, kernel_error::pointer error_code, - rmm::cuda_stream_view stream); + cuda::stream_ref stream); /** * @brief Launches pre-processing kernel to fill string offsets for non-dictionary columns @@ -1011,7 +1011,7 @@ void preprocess_string_offsets(cudf::detail::hostdevice_span pages, size_t min_row, size_t num_rows, kernel_error::pointer error_code, - rmm::cuda_stream_view stream); + cuda::stream_ref stream); /** * @brief Launches pre-processing kernel to decode definition and repetition levels @@ -1034,7 +1034,7 @@ void preprocess_levels(cudf::detail::hostdevice_span pages, size_t min_row, size_t num_rows, int level_type_size, - rmm::cuda_stream_view stream); + cuda::stream_ref stream); /** * @brief Fills output offset entries for pruned string and list pages @@ -1053,7 +1053,7 @@ void fill_pruned_offsets(cudf::device_span pages, cudf::device_span initial_str_offsets, size_t skip_rows, size_t num_rows, - rmm::cuda_stream_view stream); + cuda::stream_ref stream); /** * @brief Launches kernel for reading non-dictionary fixed width column data stored in the pages @@ -1083,7 +1083,7 @@ void decode_page_data(cudf::detail::hostdevice_span pages, cudf::device_span initial_str_offsets, cudf::device_span page_string_offset_indices, kernel_error::pointer error_code, - rmm::cuda_stream_view stream); + cuda::stream_ref stream); /** * @brief Launches kernel for initializing encoder row group fragments @@ -1104,7 +1104,7 @@ void InitRowGroupFragments(cudf::detail::device_2dspan frag, device_span partitions, device_span first_frag_in_part, uint32_t fragment_size, - rmm::cuda_stream_view stream); + cuda::stream_ref stream); /** * @brief Launches kernel for calculating encoder page fragments with variable fragment sizes @@ -1120,7 +1120,7 @@ void InitRowGroupFragments(cudf::detail::device_2dspan frag, */ void CalculatePageFragments(device_span frag, device_span column_frag_sizes, - rmm::cuda_stream_view stream); + cuda::stream_ref stream); /** * @brief Launches kernel for initializing fragment statistics groups with variable fragment sizes @@ -1131,7 +1131,7 @@ void CalculatePageFragments(device_span frag, */ void InitFragmentStatistics(device_span groups, device_span fragments, - rmm::cuda_stream_view stream); + cuda::stream_ref stream); /** * @brief Launches kernel for initializing encoder data pages @@ -1162,7 +1162,7 @@ void InitEncoderPages(cudf::detail::device_2dspan chunks, bool write_v2_headers, statistics_merge_group* page_grstats, statistics_merge_group* chunk_grstats, - rmm::cuda_stream_view stream); + cuda::stream_ref stream); /** * @brief Launches kernel for packing column data into parquet pages @@ -1182,7 +1182,7 @@ void EncodePages(device_span pages, device_span> comp_in, device_span> comp_out, device_span comp_res, - rmm::cuda_stream_view stream); + cuda::stream_ref stream); /** * @brief Launches kernel to make the compressed vs uncompressed chunk-level decision @@ -1195,7 +1195,7 @@ void EncodePages(device_span pages, */ void decide_compression(device_span chunks, bool page_level_compression, - rmm::cuda_stream_view stream); + cuda::stream_ref stream); /** * @brief Launches kernel to encode page headers @@ -1210,7 +1210,7 @@ void EncodePageHeaders(device_span pages, device_span comp_res, device_span page_stats, statistics_chunk const* chunk_stats, - rmm::cuda_stream_view stream); + cuda::stream_ref stream); /** * @brief Launches kernel to gather pages to a single contiguous block per chunk @@ -1218,7 +1218,7 @@ void EncodePageHeaders(device_span pages, * @param[in,out] chunks Column chunks * @param[in] stream CUDA stream to use */ -void GatherPages(device_span chunks, rmm::cuda_stream_view stream); +void GatherPages(device_span chunks, cuda::stream_ref stream); /** * @brief Launches kernel to calculate ColumnIndex information per chunk @@ -1231,6 +1231,6 @@ void GatherPages(device_span chunks, rmm::cuda_stream_view strea void EncodeColumnIndexes(device_span chunks, device_span column_stats, int32_t column_index_truncate_length, - rmm::cuda_stream_view stream); + cuda::stream_ref stream); } // namespace cudf::io::parquet::detail diff --git a/cpp/src/io/parquet/predicate_pushdown.cpp b/cpp/src/io/parquet/predicate_pushdown.cpp index 22ffbaa36758..15124db4b2c8 100644 --- a/cpp/src/io/parquet/predicate_pushdown.cpp +++ b/cpp/src/io/parquet/predicate_pushdown.cpp @@ -48,7 +48,7 @@ struct row_group_stats_caster : public stats_caster_base { tuple, std::unique_ptr, std::optional>> operator()(host_span per_source_schema_indices, cudf::data_type dtype, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) const { // List, Struct, Dictionary types are not supported @@ -162,7 +162,7 @@ std::optional>> aggregate_reader_metadata::ap host_span output_dtypes, host_span output_column_schemas, std::reference_wrapper filter, - rmm::cuda_stream_view stream) const + cuda::stream_ref stream) const { auto mr = cudf::get_current_device_resource_ref(); @@ -264,7 +264,7 @@ aggregate_reader_metadata::filter_row_groups( host_span output_dtypes, host_span output_column_schemas, std::reference_wrapper filter, - rmm::cuda_stream_view stream) const + cuda::stream_ref stream) const { // Apply stats filtering on input row groups auto const stats_filtered_row_groups = apply_stats_filters(input_row_group_indices, diff --git a/cpp/src/io/parquet/reader.cpp b/cpp/src/io/parquet/reader.cpp index 3a22732995d6..b060f06b4fbd 100644 --- a/cpp/src/io/parquet/reader.cpp +++ b/cpp/src/io/parquet/reader.cpp @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: Copyright (c) 2022-2025, NVIDIA CORPORATION. + * SPDX-FileCopyrightText: Copyright (c) 2022-2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved. * SPDX-License-Identifier: Apache-2.0 */ @@ -12,7 +12,7 @@ reader::reader() = default; reader::reader(std::vector>&& sources, std::vector&& parquet_metadatas, parquet_reader_options const& options, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) : _impl(std::make_unique( std::move(sources), std::move(parquet_metadatas), options, stream, mr)) @@ -28,7 +28,7 @@ chunked_reader::chunked_reader(std::size_t chunk_read_limit, std::vector>&& sources, std::vector&& parquet_metadatas, parquet_reader_options const& options, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { _impl = std::make_unique(chunk_read_limit, diff --git a/cpp/src/io/parquet/reader_impl.cpp b/cpp/src/io/parquet/reader_impl.cpp index 75394523b594..15b6d9c55d2e 100644 --- a/cpp/src/io/parquet/reader_impl.cpp +++ b/cpp/src/io/parquet/reader_impl.cpp @@ -492,7 +492,7 @@ void reader_impl::decode_page_data(read_mode mode, size_t skip_rows, size_t num_ } } - _stream.synchronize(); + _stream.wait(); } reader_impl::reader_impl() : _options{} {} @@ -500,7 +500,7 @@ reader_impl::reader_impl() : _options{} {} reader_impl::reader_impl(std::vector>&& sources, std::vector&& parquet_metadatas, parquet_reader_options const& options, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) : reader_impl(0 /*chunk_read_limit*/, 0 /*input_pass_read_limit*/, @@ -517,7 +517,7 @@ reader_impl::reader_impl(std::size_t chunk_read_limit, std::vector>&& sources, std::vector&& file_metadatas, parquet_reader_options const& options, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) : _stream{std::move(stream)}, _mr{std::move(mr)}, diff --git a/cpp/src/io/parquet/reader_impl.hpp b/cpp/src/io/parquet/reader_impl.hpp index 46f4769158c4..9451adafcc3b 100644 --- a/cpp/src/io/parquet/reader_impl.hpp +++ b/cpp/src/io/parquet/reader_impl.hpp @@ -22,7 +22,7 @@ #include #include -#include +#include #include #include @@ -55,7 +55,7 @@ class reader_impl { explicit reader_impl(std::vector>&& sources, std::vector&& parquet_metadatas, parquet_reader_options const& options, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr); /** @@ -104,7 +104,7 @@ class reader_impl { std::vector>&& sources, std::vector&& parquet_metadatas, parquet_reader_options const& options, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr); reader_impl(reader_impl const&) = delete; @@ -504,7 +504,7 @@ class reader_impl { */ [[nodiscard]] std::unique_ptr synthesize_source_index_column( std::span num_rows_per_source, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr); /** @@ -520,7 +520,7 @@ class reader_impl { * @return Synthesized row index column */ [[nodiscard]] std::unique_ptr synthesize_row_index_column( - row_range const& read_info, rmm::cuda_stream_view stream, rmm::device_async_resource_ref mr); + row_range const& read_info, cuda::stream_ref stream, rmm::device_async_resource_ref mr); /** * @brief Computes the names of columns to be read from the file, if specified. @@ -538,7 +538,7 @@ class reader_impl { */ void apply_decimal_width_cast(std::vector>& out_columns); - rmm::cuda_stream_view _stream; + cuda::stream_ref _stream; rmm::device_async_resource_ref _mr{cudf::get_current_device_resource_ref()}; // Reader configs. diff --git a/cpp/src/io/parquet/reader_impl_chunking.cu b/cpp/src/io/parquet/reader_impl_chunking.cu index 6f1c9c05e3cf..3157f524dce6 100644 --- a/cpp/src/io/parquet/reader_impl_chunking.cu +++ b/cpp/src/io/parquet/reader_impl_chunking.cu @@ -201,7 +201,7 @@ void reader_impl::setup_next_pass(read_mode mode) } #endif - _stream.synchronize(); + _stream.wait(); } } @@ -333,7 +333,7 @@ void reader_impl::setup_next_subpass(read_mode mode) auto h_spans = cudf::detail::make_pinned_vector_async(page_indices, _stream); subpass.pages.device_to_host_async(_stream); - _stream.synchronize(); + _stream.wait(); subpass.column_page_count = std::vector(num_columns); std::transform( diff --git a/cpp/src/io/parquet/reader_impl_chunking.hpp b/cpp/src/io/parquet/reader_impl_chunking.hpp index 2a75fe52b13c..2ebb5eb700c6 100644 --- a/cpp/src/io/parquet/reader_impl_chunking.hpp +++ b/cpp/src/io/parquet/reader_impl_chunking.hpp @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: Copyright (c) 2023-2026, NVIDIA CORPORATION. + * SPDX-FileCopyrightText: Copyright (c) 2023-2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved. * SPDX-License-Identifier: Apache-2.0 */ @@ -78,7 +78,7 @@ struct subpass_intermediate_data { subpass_intermediate_data& operator=(subpass_intermediate_data const&) = delete; subpass_intermediate_data(subpass_intermediate_data&&) = default; subpass_intermediate_data& operator=(subpass_intermediate_data&&) = default; - subpass_intermediate_data(rmm::cuda_stream_view stream) + subpass_intermediate_data(cuda::stream_ref stream) : decomp_page_data(0, stream), level_decode_data(0, stream), page_buf(0, stream), @@ -148,7 +148,7 @@ struct pass_intermediate_data { pass_intermediate_data& operator=(pass_intermediate_data const&) = delete; pass_intermediate_data(pass_intermediate_data&&) = default; pass_intermediate_data& operator=(pass_intermediate_data&&) = default; - pass_intermediate_data(rmm::cuda_stream_view stream) + pass_intermediate_data(cuda::stream_ref stream) : raw_page_data{}, row_groups{}, chunks(0, stream), diff --git a/cpp/src/io/parquet/reader_impl_chunking_utils.cu b/cpp/src/io/parquet/reader_impl_chunking_utils.cu index 6017d7bfa426..cd61e016414a 100644 --- a/cpp/src/io/parquet/reader_impl_chunking_utils.cu +++ b/cpp/src/io/parquet/reader_impl_chunking_utils.cu @@ -47,7 +47,7 @@ using cudf::io::detail::decompression_info; void print_cumulative_page_info(device_span d_pages, device_span d_chunks, device_span d_c_info, - rmm::cuda_stream_view stream) + cuda::stream_ref stream) { auto const pages = cudf::detail::make_host_vector(d_pages, stream); auto const chunks = cudf::detail::make_host_vector(d_chunks, stream); @@ -250,7 +250,7 @@ int64_t find_next_split(int64_t cur_pos, std::pair, rmm::device_uvector> adjust_cumulative_sizes(device_span c_info, device_span pages, - rmm::cuda_stream_view stream) + cuda::stream_ref stream) { // sort by row count rmm::device_uvector c_info_sorted(c_info.size(), stream); @@ -280,7 +280,7 @@ adjust_cumulative_sizes(device_span c_info, c_info.size(), 0, sizeof(size_t) * 8, - stream.value()); + stream.get()); auto tmp_stg = rmm::device_buffer(tmp_bytes, stream); cub::DeviceRadixSort::SortPairs(tmp_stg.data(), tmp_bytes, @@ -291,7 +291,7 @@ adjust_cumulative_sizes(device_span c_info, c_info.size(), 0, sizeof(size_t) * 8, - stream.value()); + stream.get()); thrust::transform(rmm::exec_policy_nosync(stream, cudf::get_current_device_resource_ref()), sort_order.begin(), @@ -357,7 +357,7 @@ std::tuple, size_t, size_t> compute_next_subpass( size_t num_columns, bool is_first_subpass, bool has_offset_index, - rmm::cuda_stream_view stream) + cuda::stream_ref stream) { auto [aggregated_info, page_keys_by_split] = adjust_cumulative_sizes(c_info, pages, stream); @@ -413,7 +413,7 @@ std::vector compute_page_splits_by_row(device_span compute_page_splits_by_row(device_span pass_pages, host_span subpass_pages, host_span subpass_page_mask, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { CUDF_FUNC_RANGE(); @@ -659,7 +659,7 @@ std::vector compute_page_splits_by_row(device_span pages, device_span chunks, std::optional expected_row_count, - rmm::cuda_stream_view stream) + cuda::stream_ref stream) { CUDF_FUNC_RANGE(); @@ -711,7 +711,7 @@ void detect_malformed_pages(device_span pages, rmm::device_uvector compute_decompression_scratch_sizes( device_span chunks, device_span pages, - rmm::cuda_stream_view stream) + cuda::stream_ref stream) { auto page_keys = make_page_key_iterator(pages); @@ -833,7 +833,7 @@ rmm::device_uvector compute_decompression_scratch_sizes( void include_scratch_size(device_span temp_cost, device_span c_info, - rmm::cuda_stream_view stream) + cuda::stream_ref stream) { auto iter = cuda::counting_iterator{size_t{0}}; thrust::for_each(rmm::exec_policy_nosync(stream, cudf::get_current_device_resource_ref()), @@ -920,7 +920,7 @@ rmm::device_uvector compute_string_offset_sizes(device_span pages, size_t skip_rows, size_t num_rows, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { rmm::device_uvector string_offset_sizes(pages.size(), stream, mr); @@ -939,7 +939,7 @@ rmm::device_uvector compute_level_decode_sizes(device_span level_decode_sizes(pages.size(), stream, mr); diff --git a/cpp/src/io/parquet/reader_impl_chunking_utils.cuh b/cpp/src/io/parquet/reader_impl_chunking_utils.cuh index 78026fec76ea..54de9d1a5fe5 100644 --- a/cpp/src/io/parquet/reader_impl_chunking_utils.cuh +++ b/cpp/src/io/parquet/reader_impl_chunking_utils.cuh @@ -13,10 +13,9 @@ #include #include -#include - #include #include +#include #include namespace cudf::io::parquet::detail { @@ -37,7 +36,7 @@ struct page_span; void print_cumulative_page_info(device_span d_pages, device_span d_chunks, device_span d_c_info, - rmm::cuda_stream_view stream); + cuda::stream_ref stream); #endif // CHUNKING_DEBUG /** @@ -102,13 +101,13 @@ int64_t find_next_split(int64_t cur_pos, * By doing this, we can now look at row X and know the total * byte cost for all pages that span row X, not just the cost up to row X itself. * - * This function is asynchronous. Call stream.synchronize() before using the + * This function is asynchronous. Call stream.wait() before using the * results. */ std::pair, rmm::device_uvector> adjust_cumulative_sizes(device_span c_info, device_span pages, - rmm::cuda_stream_view stream); + cuda::stream_ref stream); /** * @brief Computes the next subpass within the current pass @@ -145,7 +144,7 @@ std::tuple, size_t, size_t> compute_next_subpass( size_t num_columns, bool is_first_subpass, bool has_offset_index, - rmm::cuda_stream_view stream); + cuda::stream_ref stream); /** * @brief Computes the page splits for a given set of pages based on row count and size limit @@ -167,7 +166,7 @@ std::vector compute_page_splits_by_row(device_span compute_page_splits_by_row(device_span pass_pages, host_span subpass_pages, host_span subpass_page_mask, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr); /** @@ -213,7 +212,7 @@ std::vector compute_page_splits_by_row(device_span pages, device_span chunks, std::optional expected_row_count, - rmm::cuda_stream_view stream); + cuda::stream_ref stream); /** * @brief Computes the per-page scratch space required for decompression. @@ -221,7 +220,7 @@ void detect_malformed_pages(device_span pages, rmm::device_uvector compute_decompression_scratch_sizes( device_span chunks, device_span pages, - rmm::cuda_stream_view stream); + cuda::stream_ref stream); /** * @brief Computes the per-page buffer sizes required for string offsets. @@ -242,7 +241,7 @@ rmm::device_uvector compute_string_offset_sizes(device_span pages, size_t skip_rows, size_t num_rows, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr); /** @@ -266,7 +265,7 @@ rmm::device_uvector compute_level_decode_sizes(device_span pages, device_span c_info, - rmm::cuda_stream_view stream); + cuda::stream_ref stream); /** * @brief Struct to store split information diff --git a/cpp/src/io/parquet/reader_impl_dict_transcode.cu b/cpp/src/io/parquet/reader_impl_dict_transcode.cu index 796c48447662..ef6425ed5e84 100644 --- a/cpp/src/io/parquet/reader_impl_dict_transcode.cu +++ b/cpp/src/io/parquet/reader_impl_dict_transcode.cu @@ -144,7 +144,7 @@ void update_from_chunk(column_eligibility& e, ColumnChunkDesc const& chunk) [[nodiscard]] std::unique_ptr make_keys_column_from_index_pairs( string_index_pair const* begin, size_type entry_count, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { if (entry_count <= 0) { return cudf::make_empty_column(data_type{type_id::STRING}); } diff --git a/cpp/src/io/parquet/reader_impl_helpers.cpp b/cpp/src/io/parquet/reader_impl_helpers.cpp index b91f54cc3001..804d7b2eabd1 100644 --- a/cpp/src/io/parquet/reader_impl_helpers.cpp +++ b/cpp/src/io/parquet/reader_impl_helpers.cpp @@ -1594,7 +1594,7 @@ aggregate_reader_metadata::select_row_groups( host_span output_dtypes, host_span output_column_schemas, std::optional> filter, - rmm::cuda_stream_view stream) const + cuda::stream_ref stream) const { // Input row group indices must be either empty or equal to the number of data sources CUDF_EXPECTS(row_group_indices.empty() or row_group_indices.size() == per_file_metadata.size(), diff --git a/cpp/src/io/parquet/reader_impl_helpers.hpp b/cpp/src/io/parquet/reader_impl_helpers.hpp index ed67ca05cfc3..d5b53e262bfd 100644 --- a/cpp/src/io/parquet/reader_impl_helpers.hpp +++ b/cpp/src/io/parquet/reader_impl_helpers.hpp @@ -296,7 +296,7 @@ class aggregate_reader_metadata { host_span const> row_group_indices, host_span column_schemas, size_type num_row_groups, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) const; /** @@ -387,7 +387,7 @@ class aggregate_reader_metadata { host_span output_dtypes, host_span output_column_schemas, std::reference_wrapper filter, - rmm::cuda_stream_view stream) const; + cuda::stream_ref stream) const; /** * @brief Filters the row groups using bloom filters @@ -411,7 +411,7 @@ class aggregate_reader_metadata { host_span output_dtypes, host_span bloom_filter_col_schemas, std::reference_wrapper filter, - rmm::cuda_stream_view stream) const; + cuda::stream_ref stream) const; /** * @brief Initialize the internal variables @@ -667,7 +667,7 @@ class aggregate_reader_metadata { host_span output_dtypes, host_span output_column_schemas, std::reference_wrapper filter, - rmm::cuda_stream_view stream) const; + cuda::stream_ref stream) const; /** * @brief Filters and reduces down to a selection of row groups @@ -704,7 +704,7 @@ class aggregate_reader_metadata { host_span output_dtypes, host_span output_column_schemas, std::optional> filter, - rmm::cuda_stream_view stream) const; + cuda::stream_ref stream) const; /** * @brief Filters and reduces down to a selection of columns diff --git a/cpp/src/io/parquet/reader_impl_preprocess.cu b/cpp/src/io/parquet/reader_impl_preprocess.cu index bf6e5d27ca87..363f6772ec54 100644 --- a/cpp/src/io/parquet/reader_impl_preprocess.cu +++ b/cpp/src/io/parquet/reader_impl_preprocess.cu @@ -470,7 +470,7 @@ void reader_impl::compute_page_string_offset_indices(size_t skip_rows, size_t nu // Transfer the updated chunks to device pass.chunks.host_to_device_async(_stream); - _stream.synchronize(); + _stream.wait(); // Pre-process string offsets for non-dictionary string columns kernel_error error_code(_stream); @@ -717,7 +717,7 @@ void reader_impl::generate_list_column_row_counts(is_estimate_row_counts is_esti pass.chunks.device_to_host_async(_stream); pass.pages.device_to_host_async(_stream); - _stream.synchronize(); + _stream.wait(); } void reader_impl::preprocess_subpass_pages(read_mode mode, size_t chunk_read_limit) @@ -870,7 +870,7 @@ void reader_impl::preprocess_subpass_pages(read_mode mode, size_t chunk_read_lim // retrieve pages back pass.pages.device_to_host_async(_stream); if (!subpass.single_subpass) { subpass.pages.device_to_host_async(_stream); } - _stream.synchronize(); + _stream.wait(); // at this point we have an accurate row count so we can compute how many rows we will actually be // able to decode for this pass. we will have selected a set of pages for each column in the @@ -1188,7 +1188,7 @@ struct map_global_to_local_row_index { } // namespace std::unique_ptr reader_impl::synthesize_row_index_column(row_range const& read_info, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { using column_type = size_t; @@ -1226,8 +1226,8 @@ std::unique_ptr reader_impl::synthesize_row_index_column(row_range const read_info.num_rows, map_global_to_local_row_index{ rg_global_offsets.data(), rg_local_offsets.data(), rg_global_offsets.size()}, - stream.value())); - stream.synchronize(); + stream.get())); + stream.wait(); } return std::make_unique(std::move(col_data), rmm::device_buffer{0, stream, mr}, 0); @@ -1235,7 +1235,7 @@ std::unique_ptr reader_impl::synthesize_row_index_column(row_range const std::unique_ptr reader_impl::synthesize_source_index_column( std::span num_rows_per_source, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { using column_type = cudf::size_type; @@ -1271,7 +1271,7 @@ std::unique_ptr reader_impl::synthesize_source_index_column( host_row_offsets, stream, cudf::get_current_device_resource_ref()); cudf::detail::label_segments( row_offsets.begin(), row_offsets.end(), col_data.begin(), col_data.end(), stream); - stream.synchronize(); + stream.wait(); } return std::make_unique(std::move(col_data), rmm::device_buffer{0, stream, mr}, 0); diff --git a/cpp/src/io/parquet/reader_impl_preprocess_utils.cu b/cpp/src/io/parquet/reader_impl_preprocess_utils.cu index 4113ed67f711..de8707aabd3a 100644 --- a/cpp/src/io/parquet/reader_impl_preprocess_utils.cu +++ b/cpp/src/io/parquet/reader_impl_preprocess_utils.cu @@ -38,7 +38,7 @@ namespace cudf::io::parquet::detail { #if defined(PREPROCESS_DEBUG) -void print_pages(cudf::detail::hostdevice_span pages, rmm::cuda_stream_view stream) +void print_pages(cudf::detail::hostdevice_span pages, cuda::stream_ref stream) { pages.device_to_host(stream); auto idx = 0; @@ -175,7 +175,7 @@ void generate_depth_remappings( size_t end_chunk, std::vector const& column_chunk_offsets, std::vector const& chunk_source_map, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { // Construct per source byte ranges in chunk iteration order @@ -223,7 +223,7 @@ void generate_depth_remappings( } [[nodiscard]] size_t count_page_headers(cudf::detail::hostdevice_span chunks, - rmm::cuda_stream_view stream) + cuda::stream_ref stream) { size_t total_pages = 0; @@ -250,7 +250,7 @@ void generate_depth_remappings( } [[nodiscard]] size_t count_page_headers_with_pgidx( - cudf::detail::hostdevice_span chunks, rmm::cuda_stream_view stream) + cudf::detail::hostdevice_span chunks, cuda::stream_ref stream) { auto const total_pages = std::accumulate(chunks.host_begin(), chunks.host_end(), size_t{0}, [](size_t sum, auto& chunk) { @@ -269,7 +269,7 @@ void generate_depth_remappings( void fill_in_page_info(host_span chunks, device_span pages, - rmm::cuda_stream_view stream) + cuda::stream_ref stream) { auto const num_pages = pages.size(); auto page_indexes = cudf::detail::make_pinned_vector_async(num_pages, stream); @@ -305,7 +305,7 @@ void fill_in_page_info(host_span chunks, iter, iter + num_pages, copy_page_info{d_page_indexes, pages}); - stream.synchronize(); // ensures the page_indexes is not destroyed before the copy is completed + stream.wait(); // ensures the page_indexes is not destroyed before the copy is completed } std::string encoding_to_string(Encoding encoding) @@ -341,7 +341,7 @@ std::string encoding_to_string(Encoding encoding) } [[nodiscard]] std::string list_unsupported_encodings(device_span pages, - rmm::cuda_stream_view stream) + cuda::stream_ref stream) { auto const to_mask = cuda::proclaim_return_type([] __device__(auto const& page) { return is_supported_encoding(page.encoding) ? uint32_t{0} : encoding_to_mask(page.encoding); @@ -353,7 +353,7 @@ std::string encoding_to_string(Encoding encoding) cudf::detail::hostdevice_vector sort_pages(device_span unsorted_pages, device_span chunks, - rmm::cuda_stream_view stream) + cuda::stream_ref stream) { CUDF_FUNC_RANGE(); @@ -407,7 +407,7 @@ cudf::detail::hostdevice_vector sort_pages(device_span sort_indices.end(), unsorted_pages.data(), pass_pages.d_begin()); - stream.synchronize(); + stream.wait(); return pass_pages; } @@ -436,7 +436,7 @@ template void decode_page_headers_impl(pass_intermediate_data& pass, device_span unsorted_pages, host_span const> page_data, - rmm::cuda_stream_view stream) + cuda::stream_ref stream) { CUDF_FUNC_RANGE(); @@ -621,7 +621,7 @@ void decode_page_headers_impl(pass_intermediate_data& pass, pass.pages.device_to_host_async(stream); pass.chunks.device_to_host_async(stream); - stream.synchronize(); + stream.wait(); } } // namespace @@ -629,7 +629,7 @@ void decode_page_headers_impl(pass_intermediate_data& pass, void decode_page_headers(pass_intermediate_data& pass, device_span unsorted_pages, bool has_offset_index, - rmm::cuda_stream_view stream) + cuda::stream_ref stream) { if (has_offset_index) { decode_page_headers_impl(pass, unsorted_pages, {}, stream); @@ -642,7 +642,7 @@ void decode_page_headers(pass_intermediate_data& pass, void decode_page_headers(pass_intermediate_data& pass, device_span unsorted_pages, host_span const> page_data, - rmm::cuda_stream_view stream) + cuda::stream_ref stream) { decode_page_headers_impl( pass, unsorted_pages, page_data, stream); diff --git a/cpp/src/io/parquet/reader_impl_preprocess_utils.cuh b/cpp/src/io/parquet/reader_impl_preprocess_utils.cuh index 8f19d7a8d787..abdec7231ecf 100644 --- a/cpp/src/io/parquet/reader_impl_preprocess_utils.cuh +++ b/cpp/src/io/parquet/reader_impl_preprocess_utils.cuh @@ -9,9 +9,8 @@ #include -#include - #include +#include #include #include @@ -20,7 +19,7 @@ namespace cudf::io::parquet::detail { #if defined(PREPROCESS_DEBUG) -void print_pages(cudf::detail::hostdevice_span pages, rmm::cuda_stream_view stream); +void print_pages(cudf::detail::hostdevice_span pages, cuda::stream_ref stream); #endif // PREPROCESS_DEBUG /** @@ -68,7 +67,7 @@ void generate_depth_remappings( size_t end_chunk, std::vector const& column_chunk_offsets, std::vector const& chunk_source_map, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr); /** @@ -80,13 +79,13 @@ void generate_depth_remappings( * @return The total number of pages */ [[nodiscard]] size_t count_page_headers(cudf::detail::hostdevice_span chunks, - rmm::cuda_stream_view stream); + cuda::stream_ref stream); /** * @brief Count the total number of pages using page index information. */ [[nodiscard]] size_t count_page_headers_with_pgidx( - cudf::detail::hostdevice_span chunks, rmm::cuda_stream_view stream); + cudf::detail::hostdevice_span chunks, cuda::stream_ref stream); /** * @brief Set fields on the pages that can be derived from page indexes. @@ -95,7 +94,7 @@ void generate_depth_remappings( */ void fill_in_page_info(host_span chunks, device_span pages, - rmm::cuda_stream_view stream); + cuda::stream_ref stream); /** * @brief Returns a string representation of known encodings @@ -121,7 +120,7 @@ std::string encoding_to_string(Encoding encoding); * @returns Human readable string with unsupported encodings */ [[nodiscard]] std::string list_unsupported_encodings(device_span pages, - rmm::cuda_stream_view stream); + cuda::stream_ref stream); /** * @brief Decode the page information for a given pass. @@ -134,7 +133,7 @@ std::string encoding_to_string(Encoding encoding); void decode_page_headers(pass_intermediate_data& pass, device_span unsorted_pages, bool has_offset_index, - rmm::cuda_stream_view stream); + cuda::stream_ref stream); /** * @brief Decode page information using one exact span per logical indexed page @@ -149,7 +148,7 @@ void decode_page_headers(pass_intermediate_data& pass, void decode_page_headers(pass_intermediate_data& pass, device_span unsorted_pages, host_span const> page_data, - rmm::cuda_stream_view stream); + cuda::stream_ref stream); /** * @brief Check if the column chunk has a string (byte array or FLBA) type diff --git a/cpp/src/io/parquet/stats_filter_helpers.cpp b/cpp/src/io/parquet/stats_filter_helpers.cpp index d8826ef95748..55cc1d45dfca 100644 --- a/cpp/src/io/parquet/stats_filter_helpers.cpp +++ b/cpp/src/io/parquet/stats_filter_helpers.cpp @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: Copyright (c) 2025-2026, NVIDIA CORPORATION. + * SPDX-FileCopyrightText: Copyright (c) 2025-2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved. * SPDX-License-Identifier: Apache-2.0 */ @@ -104,7 +104,7 @@ std::vector> stats_columns_collect stats_expression_converter::stats_expression_converter(ast::expression const& expr, size_type num_columns, bool has_is_null_operator, - rmm::cuda_stream_view stream) + cuda::stream_ref stream) : _always_true_scalar{std::make_unique>(true, true, stream)}, _always_true{std::make_unique(*_always_true_scalar)} { diff --git a/cpp/src/io/parquet/stats_filter_helpers.hpp b/cpp/src/io/parquet/stats_filter_helpers.hpp index 60af924ea259..2d4e3ea66396 100644 --- a/cpp/src/io/parquet/stats_filter_helpers.hpp +++ b/cpp/src/io/parquet/stats_filter_helpers.hpp @@ -212,7 +212,7 @@ class stats_caster_base { std::vector null_mask; cudf::size_type null_count = 0; - host_column(size_type total_row_groups, rmm::cuda_stream_view stream) + host_column(size_type total_row_groups, cuda::stream_ref stream) : val{cudf::detail::make_host_vector(total_row_groups, stream)}, chars{cudf::detail::make_empty_host_vector(initial_chars_capacity, stream)}, null_mask(cudf::util::div_rounding_up_safe( @@ -255,7 +255,7 @@ class stats_caster_base { rmm::device_uvector> make_strings_children(cudf::host_span host_strings, cudf::host_span host_chars, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { auto offsets = @@ -270,19 +270,19 @@ class stats_caster_base { auto d_chars = cudf::detail::make_device_uvector_async(host_chars, stream, mr); auto d_offsets = cudf::detail::make_device_uvector_async(offsets, stream, mr); auto d_sizes = cudf::detail::make_device_uvector_async(sizes, stream, mr); - stream.synchronize(); // ensures the vectors are not destroyed before the copy is completed + stream.wait(); // ensures the vectors are not destroyed before the copy is completed return {std::move(d_chars), std::move(d_offsets), std::move(d_sizes)}; } [[nodiscard]] std::unique_ptr inline to_device(cudf::data_type dtype, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) const { if constexpr (std::is_same_v) { auto [d_chars, d_offsets, _] = make_strings_children(val, chars, stream, mr); auto null_mask_buffer = rmm::device_buffer{ null_mask.data(), cudf::bitmask_allocation_size_bytes(val.size()), stream, mr}; - stream.synchronize(); + stream.wait(); return cudf::make_strings_column( val.size(), std::make_unique(std::move(d_offsets), rmm::device_buffer{0, stream, mr}, 0), @@ -293,7 +293,7 @@ class stats_caster_base { auto data = cudf::detail::make_device_uvector_async(val, stream, mr); auto null_mask_buffer = rmm::device_buffer{ null_mask.data(), cudf::bitmask_allocation_size_bytes(val.size()), stream, mr}; - stream.synchronize(); + stream.wait(); return std::make_unique( dtype, val.size(), data.release(), std::move(null_mask_buffer), null_count); } @@ -363,7 +363,7 @@ class stats_expression_converter : public stats_columns_collector { stats_expression_converter(ast::expression const& expr, size_type num_columns, bool has_is_null_operator, - rmm::cuda_stream_view stream); + cuda::stream_ref stream); // Bring all overrides of `visit` from stats_columns_collector into scope using stats_columns_collector::visit; diff --git a/cpp/src/io/parquet/writer_impl.cu b/cpp/src/io/parquet/writer_impl.cu index 30d8c2171e56..68c995c4cc23 100644 --- a/cpp/src/io/parquet/writer_impl.cu +++ b/cpp/src/io/parquet/writer_impl.cu @@ -35,13 +35,13 @@ #include #include -#include #include #include #include #include #include +#include #include #include @@ -265,7 +265,7 @@ void update_chunk_encoding_stats(ColumnChunkMetaData& chunk_meta, * @param stream CUDA stream used for device memory operations and kernel launches * @return The data size of the input */ -size_t column_size(column_view const& column, rmm::cuda_stream_view stream) +size_t column_size(column_view const& column, cuda::stream_ref stream) { if (column.is_empty()) { return 0; } @@ -955,9 +955,9 @@ std::vector construct_parquet_schema_tree( struct parquet_column_view { parquet_column_view(schema_tree_node const& schema_node, std::vector const& schema_tree, - rmm::cuda_stream_view stream); + cuda::stream_ref stream); - [[nodiscard]] parquet_column_device_view get_device_view(rmm::cuda_stream_view stream) const; + [[nodiscard]] parquet_column_device_view get_device_view(cuda::stream_ref stream) const; [[nodiscard]] column_view cudf_column_view() const { return cudf_col; } [[nodiscard]] Type physical_type() const { return schema_node.type; } @@ -1005,7 +1005,7 @@ struct parquet_column_view { parquet_column_view::parquet_column_view(schema_tree_node const& schema_node, std::vector const& schema_tree, - rmm::cuda_stream_view stream) + cuda::stream_ref stream) : schema_node(schema_node), _d_nullability(0, stream), _dremel_offsets(0, stream), @@ -1098,14 +1098,14 @@ parquet_column_view::parquet_column_view(schema_tree_node const& schema_node, _def_level = std::move(dremel.def_level); _data_count = dremel.leaf_data_size; // Needed for knowing what size dictionary to allocate - stream.synchronize(); + stream.wait(); } else { // For non-list struct, the size of the root column is the same as the size of the leaf column _data_count = cudf_col.size(); } } -parquet_column_device_view parquet_column_view::get_device_view(rmm::cuda_stream_view) const +parquet_column_device_view parquet_column_view::get_device_view(cuda::stream_ref) const { auto desc = parquet_column_device_view{}; // Zero out all fields desc.stats_dtype = schema_node.stats_dtype; @@ -1149,7 +1149,7 @@ void init_row_group_fragments(cudf::detail::hostdevice_2dvector& f host_span partitions, device_span part_frag_offset, uint32_t fragment_size, - rmm::cuda_stream_view stream) + cuda::stream_ref stream) { auto d_partitions = cudf::detail::make_device_uvector_async( partitions, stream, cudf::get_current_device_resource_ref()); @@ -1169,7 +1169,7 @@ void init_row_group_fragments(cudf::detail::hostdevice_2dvector& f */ void calculate_page_fragments(device_span frag, host_span frag_sizes, - rmm::cuda_stream_view stream) + cuda::stream_ref stream) { auto d_frag_sz = cudf::detail::make_device_uvector_async( frag_sizes, stream, cudf::get_current_device_resource_ref()); @@ -1187,14 +1187,14 @@ void calculate_page_fragments(device_span frag, void gather_fragment_statistics(device_span frag_stats, device_span frags, bool int96_timestamps, - rmm::cuda_stream_view stream) + cuda::stream_ref stream) { rmm::device_uvector frag_stats_group(frag_stats.size(), stream); InitFragmentStatistics(frag_stats_group, frags, stream); detail::calculate_group_statistics( frag_stats.data(), frag_stats_group.data(), frag_stats.size(), stream, int96_timestamps); - stream.synchronize(); + stream.wait(); } auto init_page_sizes(hostdevice_2dvector& chunks, @@ -1204,7 +1204,7 @@ auto init_page_sizes(hostdevice_2dvector& chunks, size_type max_page_size_rows, bool write_v2_headers, compression_type compression, - rmm::cuda_stream_view stream) + cuda::stream_ref stream) { if (chunks.is_empty()) { return cudf::detail::hostdevice_vector{}; } @@ -1294,7 +1294,7 @@ build_chunk_dictionaries(hostdevice_2dvector& chunks, compression_type compression, dictionary_policy dict_policy, size_t max_dict_size, - rmm::cuda_stream_view stream) + cuda::stream_ref stream) { // At this point, we know all chunks and their sizes. We want to allocate dictionaries for each // chunk that can have dictionary @@ -1341,14 +1341,14 @@ build_chunk_dictionaries(hostdevice_2dvector& chunks, // Create a single bulk storage used by all sub-dictionaries auto map_storage = - storage_type{total_map_storage_size, rmm::mr::polymorphic_allocator{}, stream.value()}; + storage_type{total_map_storage_size, rmm::mr::polymorphic_allocator{}, stream.get()}; // Create a span of non-const map_storage as map_storage_ref takes in a non-const pointer. device_span const map_storage_data{map_storage.data(), total_map_storage_size}; // Synchronize chunks.host_to_device_async(stream); // Initialize storage with the given sentinel - map_storage.initialize_async({KEY_SENTINEL, VALUE_SENTINEL}, {stream.value()}); + map_storage.initialize_async({KEY_SENTINEL, VALUE_SENTINEL}, {stream.get()}); // Populate the hash map for each chunk populate_chunk_hash_maps(map_storage_data, frags, stream); // Synchronize again @@ -1449,7 +1449,7 @@ void init_encoder_pages(hostdevice_2dvector& chunks, size_t max_page_size_bytes, size_type max_page_size_rows, bool write_v2_headers, - rmm::cuda_stream_view stream) + cuda::stream_ref stream) { rmm::device_uvector page_stats_mrg(num_stats_bfr, stream); chunks.host_to_device_async(stream); @@ -1478,7 +1478,7 @@ void init_encoder_pages(hostdevice_2dvector& chunks, stream); } } - stream.synchronize(); + stream.wait(); } /** @@ -1508,7 +1508,7 @@ void encode_pages(hostdevice_2dvector& chunks, int32_t column_index_truncate_length, bool write_v2_headers, bool page_level_compression, - rmm::cuda_stream_view stream) + cuda::stream_ref stream) { auto const num_pages = pages.size(); auto pages_stats = (page_stats != nullptr) @@ -1549,7 +1549,7 @@ void encode_pages(hostdevice_2dvector& chunks, if (comp_stats.has_value()) { comp_stats.value() += collect_compression_statistics(comp_in, comp_res, stream); } - stream.synchronize(); + stream.wait(); } /** @@ -1667,7 +1667,7 @@ auto convert_table_to_parquet_data(table_input_metadata& table_meta, bool page_level_compression, bool write_arrow_schema, host_span const> out_sink, - rmm::cuda_stream_view stream) + cuda::stream_ref stream) { // initialize LinkedColVector auto vec = table_to_linked_columns(input); @@ -2218,7 +2218,7 @@ auto convert_table_to_parquet_data(table_input_metadata& table_meta, } // Sync before calling the next `encode_pages` which may alter the stats data. - if (need_sync) { stream.synchronize(); } + if (need_sync) { stream.wait(); } // now add to the column chunk SizeStatistics if necessary if (stats_granularity == statistics_freq::STATISTICS_COLUMN) { @@ -2302,7 +2302,7 @@ auto convert_table_to_parquet_data(table_input_metadata& table_meta, writer::impl::impl(std::vector> sinks, parquet_writer_options const& options, single_write_mode mode, - rmm::cuda_stream_view stream) + cuda::stream_ref stream) : _stream(stream), _compression(options.get_compression()), _max_row_group_size{options.get_row_group_size_bytes()}, @@ -2343,7 +2343,7 @@ writer::impl::impl(std::vector> sinks, writer::impl::impl(std::vector> sinks, chunked_parquet_writer_options const& options, single_write_mode mode, - rmm::cuda_stream_view stream) + cuda::stream_ref stream) : _stream(stream), _compression(options.get_compression()), _max_row_group_size{options.get_row_group_size_bytes()}, @@ -2579,7 +2579,7 @@ void writer::impl::write_parquet_data_to_sink( if (is_byte_arr) { offset_idx.unencoded_byte_array_data_bytes = std::move(var_bytes); } - _stream.synchronize(); + _stream.wait(); _agg_meta->file(p).offset_indexes.emplace_back(std::move(offset_idx)); _agg_meta->file(p).column_indexes.emplace_back(std::move(column_idx)); } @@ -2681,7 +2681,7 @@ std::unique_ptr> writer::impl::close( writer::writer(std::vector> sinks, parquet_writer_options const& options, single_write_mode mode, - rmm::cuda_stream_view stream) + cuda::stream_ref stream) : _impl(std::make_unique(std::move(sinks), options, mode, stream)) { } @@ -2689,7 +2689,7 @@ writer::writer(std::vector> sinks, writer::writer(std::vector> sinks, chunked_parquet_writer_options const& options, single_write_mode mode, - rmm::cuda_stream_view stream) + cuda::stream_ref stream) : _impl(std::make_unique(std::move(sinks), options, mode, stream)) { } diff --git a/cpp/src/io/parquet/writer_impl.hpp b/cpp/src/io/parquet/writer_impl.hpp index 549817efcd7d..5e4c5c5f0e20 100644 --- a/cpp/src/io/parquet/writer_impl.hpp +++ b/cpp/src/io/parquet/writer_impl.hpp @@ -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 */ @@ -20,7 +20,7 @@ #include #include -#include +#include #include #include @@ -51,7 +51,7 @@ class writer::impl { explicit impl(std::vector> sinks, parquet_writer_options const& options, cudf::io::detail::single_write_mode mode, - rmm::cuda_stream_view stream); + cuda::stream_ref stream); /** * @brief Constructor with chunked writer options. @@ -64,7 +64,7 @@ class writer::impl { explicit impl(std::vector> sinks, chunked_parquet_writer_options const& options, cudf::io::detail::single_write_mode mode, - rmm::cuda_stream_view stream); + cuda::stream_ref stream); /** * @brief Destructor to complete any incomplete write and release resources. @@ -137,7 +137,7 @@ class writer::impl { host_span bounce_buffer); // Cuda stream to be used - rmm::cuda_stream_view _stream; + cuda::stream_ref _stream; // Writer options. compression_type const _compression; diff --git a/cpp/src/io/parquet/writer_impl_helpers.cpp b/cpp/src/io/parquet/writer_impl_helpers.cpp index a32f1be2243f..f164d76dc5d9 100644 --- a/cpp/src/io/parquet/writer_impl_helpers.cpp +++ b/cpp/src/io/parquet/writer_impl_helpers.cpp @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: Copyright (c) 2024-2025, NVIDIA CORPORATION. + * SPDX-FileCopyrightText: Copyright (c) 2024-2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved. * SPDX-License-Identifier: Apache-2.0 */ @@ -37,7 +37,7 @@ void fill_table_meta(table_input_metadata& table_meta) } } -[[nodiscard]] size_t column_size(column_view const& column, rmm::cuda_stream_view stream) +[[nodiscard]] size_t column_size(column_view const& column, cuda::stream_ref stream) { if (column.is_empty()) { return 0; } diff --git a/cpp/src/io/parquet/writer_impl_helpers.hpp b/cpp/src/io/parquet/writer_impl_helpers.hpp index 55e335f2d1a9..507490166e2d 100644 --- a/cpp/src/io/parquet/writer_impl_helpers.hpp +++ b/cpp/src/io/parquet/writer_impl_helpers.hpp @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: Copyright (c) 2024-2025, NVIDIA CORPORATION. + * SPDX-FileCopyrightText: Copyright (c) 2024-2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved. * SPDX-License-Identifier: Apache-2.0 */ @@ -29,7 +29,7 @@ void fill_table_meta(table_input_metadata& table_meta); * @param stream CUDA stream used for device memory operations and kernel launches * @return The data size of the input */ -[[nodiscard]] size_t column_size(column_view const& column, rmm::cuda_stream_view stream); +[[nodiscard]] size_t column_size(column_view const& column, cuda::stream_ref stream); /** * @brief Indicates if the column should be marked as nullable in the output schema diff --git a/cpp/src/io/statistics/column_statistics.cuh b/cpp/src/io/statistics/column_statistics.cuh index 27d886f832d4..33ffcb5eb897 100644 --- a/cpp/src/io/statistics/column_statistics.cuh +++ b/cpp/src/io/statistics/column_statistics.cuh @@ -338,12 +338,12 @@ template void calculate_group_statistics(statistics_chunk* chunks, statistics_group const* groups, uint32_t num_chunks, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, bool const int96_timestamps = false) { constexpr int block_size = 256; gpu_calculate_group_statistics - <<>>(chunks, groups, int96_timestamps); + <<>>(chunks, groups, int96_timestamps); CUDF_CUDA_TRY(cudaGetLastError()); } @@ -394,11 +394,11 @@ void merge_group_statistics(statistics_chunk* chunks_out, statistics_chunk const* chunks_in, statistics_merge_group const* groups, uint32_t num_chunks, - rmm::cuda_stream_view stream) + cuda::stream_ref stream) { constexpr int block_size = 256; gpu_merge_group_statistics - <<>>(chunks_out, chunks_in, groups); + <<>>(chunks_out, chunks_in, groups); CUDF_CUDA_TRY(cudaGetLastError()); } diff --git a/cpp/src/io/statistics/orc_column_statistics.cu b/cpp/src/io/statistics/orc_column_statistics.cu index 89cf74799da2..284787d6edd4 100644 --- a/cpp/src/io/statistics/orc_column_statistics.cu +++ b/cpp/src/io/statistics/orc_column_statistics.cu @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: Copyright (c) 2021-2023, NVIDIA CORPORATION. + * SPDX-FileCopyrightText: Copyright (c) 2021-2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved. * SPDX-License-Identifier: Apache-2.0 */ @@ -19,12 +19,12 @@ void merge_group_statistics(statistics_chunk* chunk statistics_chunk const* chunks_in, statistics_merge_group const* groups, uint32_t num_chunks, - rmm::cuda_stream_view stream); + cuda::stream_ref stream); template <> void calculate_group_statistics(statistics_chunk* chunks, statistics_group const* groups, uint32_t num_chunks, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, bool int96_timestamp); } // namespace detail diff --git a/cpp/src/io/statistics/parquet_column_statistics.cu b/cpp/src/io/statistics/parquet_column_statistics.cu index 2d01d7ba218c..da96f3967b5c 100644 --- a/cpp/src/io/statistics/parquet_column_statistics.cu +++ b/cpp/src/io/statistics/parquet_column_statistics.cu @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: Copyright (c) 2021-2023, NVIDIA CORPORATION. + * SPDX-FileCopyrightText: Copyright (c) 2021-2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved. * SPDX-License-Identifier: Apache-2.0 */ @@ -19,12 +19,12 @@ void merge_group_statistics(statistics_chunk* c statistics_chunk const* chunks_in, statistics_merge_group const* groups, uint32_t num_chunks, - rmm::cuda_stream_view stream); + cuda::stream_ref stream); template <> void calculate_group_statistics(statistics_chunk* chunks, statistics_group const* groups, uint32_t num_chunks, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, bool int96_timestamp); } // namespace detail diff --git a/cpp/src/io/statistics/statistics.cuh b/cpp/src/io/statistics/statistics.cuh index 3526a8824ead..e2943cf97583 100644 --- a/cpp/src/io/statistics/statistics.cuh +++ b/cpp/src/io/statistics/statistics.cuh @@ -17,7 +17,7 @@ #include #include -#include +#include #include diff --git a/cpp/src/io/text/bgzip_data_chunk_source.cu b/cpp/src/io/text/bgzip_data_chunk_source.cu index 351e0f98a2ce..8a48a79caba5 100644 --- a/cpp/src/io/text/bgzip_data_chunk_source.cu +++ b/cpp/src/io/text/bgzip_data_chunk_source.cu @@ -19,12 +19,12 @@ #include #include -#include #include #include #include #include +#include #include #include @@ -62,7 +62,7 @@ class bgzip_data_chunk_reader : public data_chunk_reader { template static void copy_to_device(cudf::detail::host_vector const& host, rmm::device_uvector& device, - rmm::cuda_stream_view stream) + cuda::stream_ref stream) { // Buffer needs to be padded. // Required by `inflate_kernel`. @@ -102,7 +102,7 @@ class bgzip_data_chunk_reader : public data_chunk_reader { std::size_t read_pos{}; bool is_decompressed{}; - decompression_blocks(rmm::cuda_stream_view init_stream) + decompression_blocks(cuda::stream_ref init_stream) : h_compressed_blocks{cudf::detail::make_pinned_vector_async(0, init_stream)}, h_compressed_offsets{cudf::detail::make_pinned_vector_async(0, init_stream)}, h_decompressed_offsets{cudf::detail::make_pinned_vector_async(0, init_stream)}, @@ -122,7 +122,7 @@ class bgzip_data_chunk_reader : public data_chunk_reader { h_decompressed_offsets.push_back(0); } - void decompress(rmm::cuda_stream_view stream) + void decompress(cuda::stream_ref stream) { if (is_decompressed) { return; } copy_to_device(h_compressed_blocks, d_compressed_blocks, stream); @@ -288,7 +288,7 @@ class bgzip_data_chunk_reader : public data_chunk_reader { } std::unique_ptr get_next_chunk(std::size_t read_size, - rmm::cuda_stream_view stream) override + cuda::stream_ref stream) override { CUDF_FUNC_RANGE(); if (read_size <= _curr_blocks.remaining_size()) { @@ -300,7 +300,7 @@ class bgzip_data_chunk_reader : public data_chunk_reader { read_size, stream)); // record the host-to-device copy, decompression and device copy - CUDF_CUDA_TRY(cudaEventRecord(_curr_blocks.event, stream.value())); + CUDF_CUDA_TRY(cudaEventRecord(_curr_blocks.event, stream.get())); _curr_blocks.consume_bytes(read_size); return std::make_unique(std::move(data)); } @@ -320,8 +320,8 @@ class bgzip_data_chunk_reader : public data_chunk_reader { read_size - _prev_blocks.remaining_size(), stream)); // record the host-to-device copy, decompression and device copy - CUDF_CUDA_TRY(cudaEventRecord(_curr_blocks.event, stream.value())); - CUDF_CUDA_TRY(cudaEventRecord(_prev_blocks.event, stream.value())); + CUDF_CUDA_TRY(cudaEventRecord(_curr_blocks.event, stream.get())); + CUDF_CUDA_TRY(cudaEventRecord(_prev_blocks.event, stream.get())); read_size -= _prev_blocks.remaining_size(); _prev_blocks.consume_bytes(_prev_blocks.remaining_size()); _curr_blocks.consume_bytes(read_size); diff --git a/cpp/src/io/text/data_chunk_source_factories.cpp b/cpp/src/io/text/data_chunk_source_factories.cpp index f57a1648e6a2..83684e802dff 100644 --- a/cpp/src/io/text/data_chunk_source_factories.cpp +++ b/cpp/src/io/text/data_chunk_source_factories.cpp @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: Copyright (c) 2021-2025, NVIDIA CORPORATION. + * SPDX-FileCopyrightText: Copyright (c) 2021-2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved. * SPDX-License-Identifier: Apache-2.0 */ @@ -45,7 +45,7 @@ class datasource_chunk_reader : public data_chunk_reader { }; std::unique_ptr get_next_chunk(std::size_t read_size, - rmm::cuda_stream_view stream) override + cuda::stream_ref stream) override { CUDF_FUNC_RANGE(); @@ -78,7 +78,7 @@ class datasource_chunk_reader : public data_chunk_reader { stream); // record the host-to-device copy. - CUDF_CUDA_TRY(cudaEventRecord(h_ticket.event, stream.value())); + CUDF_CUDA_TRY(cudaEventRecord(h_ticket.event, stream.get())); } _offset += read_size; @@ -114,7 +114,7 @@ class istream_data_chunk_reader : public data_chunk_reader { }; std::unique_ptr get_next_chunk(std::size_t read_size, - rmm::cuda_stream_view stream) override + cuda::stream_ref stream) override { CUDF_FUNC_RANGE(); @@ -146,7 +146,7 @@ class istream_data_chunk_reader : public data_chunk_reader { stream); // record the host-to-device copy. - CUDF_CUDA_TRY(cudaEventRecord(h_ticket.event, stream.value())); + CUDF_CUDA_TRY(cudaEventRecord(h_ticket.event, stream.get())); // return the device buffer so it can be processed. return std::make_unique(std::move(chunk)); @@ -172,7 +172,7 @@ class host_span_data_chunk_reader : public data_chunk_reader { } std::unique_ptr get_next_chunk(std::size_t read_size, - rmm::cuda_stream_view stream) override + cuda::stream_ref stream) override { CUDF_FUNC_RANGE(); @@ -212,7 +212,7 @@ class device_span_data_chunk_reader : public data_chunk_reader { } std::unique_ptr get_next_chunk(std::size_t read_size, - rmm::cuda_stream_view stream) override + cuda::stream_ref stream) override { // limit the read size to the number of bytes remaining in the device_span. read_size = std::min(read_size, _data.size() - _position); diff --git a/cpp/src/io/text/multibyte_split.cu b/cpp/src/io/text/multibyte_split.cu index 8812077a1890..1d55897c597e 100644 --- a/cpp/src/io/text/multibyte_split.cu +++ b/cpp/src/io/text/multibyte_split.cu @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: Copyright (c) 2021-2026, NVIDIA CORPORATION. + * SPDX-FileCopyrightText: Copyright (c) 2021-2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved. * SPDX-License-Identifier: Apache-2.0 */ @@ -26,7 +26,6 @@ #include #include -#include #include #include @@ -34,6 +33,7 @@ #include #include #include +#include #include #include #include @@ -296,7 +296,7 @@ std::unique_ptr multibyte_split(cudf::io::text::data_chunk_source std::string_view delimiter, byte_range_info byte_range, bool strip_delimiters, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { CUDF_FUNC_RANGE(); @@ -343,7 +343,7 @@ std::unique_ptr multibyte_split(cudf::io::text::data_chunk_source multibyte_split_init_kernel<<>>( // + stream.get()>>>( // -TILES_PER_CHUNK, TILES_PER_CHUNK, tile_multistates, @@ -571,7 +571,7 @@ std::unique_ptr multibyte_split(cudf::io::text::data_chunk_source std::unique_ptr multibyte_split(cudf::io::text::data_chunk_source const& source, std::string_view delimiter, parse_options options, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { auto result = detail::multibyte_split( diff --git a/cpp/src/io/utilities/column_buffer.cpp b/cpp/src/io/utilities/column_buffer.cpp index ea5facad4a34..55b655091189 100644 --- a/cpp/src/io/utilities/column_buffer.cpp +++ b/cpp/src/io/utilities/column_buffer.cpp @@ -24,7 +24,7 @@ namespace cudf::io::detail { -void gather_column_buffer::allocate_strings_data(bool memset_data, rmm::cuda_stream_view stream) +void gather_column_buffer::allocate_strings_data(bool memset_data, cuda::stream_ref stream) { CUDF_EXPECTS(type.id() == type_id::STRING, "allocate_strings_data called for non-string column"); // The contents of _strings will never be directly returned to the user. @@ -38,7 +38,7 @@ void gather_column_buffer::allocate_strings_data(bool memset_data, rmm::cuda_str size, stream, cudf::get_current_device_resource_ref())); } -std::unique_ptr gather_column_buffer::make_string_column_impl(rmm::cuda_stream_view stream) +std::unique_ptr gather_column_buffer::make_string_column_impl(cuda::stream_ref stream) { // make_strings_column allocates new memory, it does not simply move // from the inputs, so we need to pass it the memory resource given to @@ -48,7 +48,7 @@ std::unique_ptr gather_column_buffer::make_string_column_impl(rmm::cuda_ } void cudf::io::detail::inline_column_buffer::allocate_strings_data(bool memset_data, - rmm::cuda_stream_view stream) + cuda::stream_ref stream) { CUDF_EXPECTS(type.id() == type_id::STRING, "allocate_strings_data called for non-string column"); // size + 1 for final offset. _string_data will be initialized later. @@ -57,7 +57,7 @@ void cudf::io::detail::inline_column_buffer::allocate_strings_data(bool memset_d void cudf::io::detail::inline_column_buffer::create_string_data(size_t num_bytes, bool is_large_strings_col, - rmm::cuda_stream_view stream) + cuda::stream_ref stream) { _is_large_strings_col = is_large_strings_col; _string_data = rmm::device_buffer(num_bytes, stream, _mr); @@ -90,7 +90,7 @@ template void column_buffer_base::create_with_mask(size_type _size, cudf::mask_state null_mask_state, bool memset_data, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { CUDF_EXPECTS(_size >= 0 and _size <= std::numeric_limits::max(), @@ -117,14 +117,14 @@ void column_buffer_base::create_with_mask(size_type _size, } if (is_nullable) { _null_mask = - cudf::detail::create_null_mask(size, null_mask_state, rmm::cuda_stream_view(stream), _mr); + cudf::detail::create_null_mask(size, null_mask_state, cuda::stream_ref(stream), _mr); } } template void column_buffer_base::create(size_type _size, bool memset_data, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { create_with_mask(_size, mask_state::ALL_NULL, memset_data, stream, mr); @@ -132,7 +132,7 @@ void column_buffer_base::create(size_type _size, template void column_buffer_base::create(size_type _size, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { create_with_mask(_size, mask_state::ALL_NULL, true, stream, mr); @@ -174,7 +174,7 @@ template std::unique_ptr make_column(column_buffer_base& buffer, column_name_info* schema_info, std::optional const& schema, - rmm::cuda_stream_view stream) + cuda::stream_ref stream) { std::function(column_buffer_base & buffer, column_name_info * schema_info, @@ -314,7 +314,7 @@ std::unique_ptr make_column(column_buffer_base& buffer, template std::unique_ptr empty_like(column_buffer_base& buffer, column_name_info* schema_info, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { if (schema_info != nullptr) { schema_info->name = buffer.name; } @@ -392,22 +392,22 @@ template std::unique_ptr make_column( string_column_buffer& buffer, column_name_info* schema_info, std::optional const& schema, - rmm::cuda_stream_view stream); + cuda::stream_ref stream); template std::unique_ptr make_column( pointer_column_buffer& buffer, column_name_info* schema_info, std::optional const& schema, - rmm::cuda_stream_view stream); + cuda::stream_ref stream); template std::unique_ptr empty_like(string_column_buffer& buffer, column_name_info* schema_info, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr); template std::unique_ptr empty_like(pointer_column_buffer& buffer, column_name_info* schema_info, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr); template std::string type_to_name(string_column_buffer const& buffer); diff --git a/cpp/src/io/utilities/column_buffer.hpp b/cpp/src/io/utilities/column_buffer.hpp index 1bc53a3a39e5..ede57a1ac036 100644 --- a/cpp/src/io/utilities/column_buffer.hpp +++ b/cpp/src/io/utilities/column_buffer.hpp @@ -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 */ @@ -15,11 +15,11 @@ #include #include -#include #include #include #include +#include #include @@ -40,19 +40,19 @@ namespace detail { inline rmm::device_buffer create_data(data_type type, size_type size, bool memset_data, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { std::size_t data_size = size_of(type) * size; rmm::device_buffer data(data_size, stream, mr); - if (memset_data) { CUDF_CUDA_TRY(cudaMemsetAsync(data.data(), 0, data_size, stream.value())); } + if (memset_data) { CUDF_CUDA_TRY(cudaMemsetAsync(data.data(), 0, data_size, stream.get())); } return data; } inline rmm::device_buffer create_data(data_type type, size_type size, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { return create_data(type, size, true, stream, mr); @@ -80,7 +80,7 @@ template std::unique_ptr make_column(column_buffer_base& buffer, column_name_info* schema_info, std::optional const& schema, - rmm::cuda_stream_view stream); + cuda::stream_ref stream); template class column_buffer_base { @@ -93,7 +93,7 @@ class column_buffer_base { column_buffer_base(data_type _type, size_type _size, bool _is_nullable, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) : column_buffer_base(_type, _is_nullable) { @@ -111,17 +111,17 @@ class column_buffer_base { // preprocessing steps such as in the Parquet reader void create(size_type _size, bool memset_data, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr); - void create(size_type _size, rmm::cuda_stream_view stream, rmm::device_async_resource_ref mr); + void create(size_type _size, cuda::stream_ref stream, rmm::device_async_resource_ref mr); // like create(), but also takes a `cudf::mask_state` to allow initializing the null mask as // something other than `ALL_NULL` void create_with_mask(size_type _size, cudf::mask_state null_mask_state, bool memset_data, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr); // Create a new column_buffer that has empty data but with the same basic information as the @@ -145,7 +145,7 @@ class column_buffer_base { return static_cast(this)->data_size_impl(); } - std::unique_ptr make_string_column(rmm::cuda_stream_view stream) + std::unique_ptr make_string_column(cuda::stream_ref stream) { return static_cast(this)->make_string_column_impl(stream); } @@ -171,7 +171,7 @@ class column_buffer_base { column_buffer_base& buffer, column_name_info* schema_info, std::optional const& schema, - rmm::cuda_stream_view stream); + cuda::stream_ref stream); }; // column buffer that uses a string_index_pair for strings data, requiring a gather step when @@ -189,20 +189,20 @@ class gather_column_buffer : public column_buffer_base { gather_column_buffer(data_type _type, size_type _size, bool _is_nullable, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) : column_buffer_base(_type, _size, _is_nullable, stream, mr) { create(_size, stream, mr); } - void allocate_strings_data(bool memset_data, rmm::cuda_stream_view stream); + void allocate_strings_data(bool memset_data, cuda::stream_ref stream); [[nodiscard]] void* data_impl() { return _strings ? _strings->data() : _data.data(); } [[nodiscard]] void const* data_impl() const { return _strings ? _strings->data() : _data.data(); } [[nodiscard]] size_t data_size_impl() const { return _strings ? _strings->size() : _data.size(); } - std::unique_ptr make_string_column_impl(rmm::cuda_stream_view stream); + std::unique_ptr make_string_column_impl(cuda::stream_ref stream); public: std::unique_ptr> _strings; @@ -223,23 +223,21 @@ class inline_column_buffer : public column_buffer_base { inline_column_buffer(data_type _type, size_type _size, bool _is_nullable, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) : column_buffer_base(_type, _size, _is_nullable, stream, mr) { create(_size, stream, mr); } - void allocate_strings_data(bool memset_data, rmm::cuda_stream_view stream); + void allocate_strings_data(bool memset_data, cuda::stream_ref stream); void* data_impl() { return _data.data(); } [[nodiscard]] void const* data_impl() const { return _data.data(); } [[nodiscard]] size_t data_size_impl() const { return _data.size(); } - std::unique_ptr make_string_column_impl(rmm::cuda_stream_view stream); + std::unique_ptr make_string_column_impl(cuda::stream_ref stream); - void create_string_data(size_t num_bytes, - bool is_large_strings_col, - rmm::cuda_stream_view stream); + void create_string_data(size_t num_bytes, bool is_large_strings_col, cuda::stream_ref stream); void set_initial_string_offset(size_t offset) { initial_string_offset = offset; } void* string_data() { return _string_data.data(); } @@ -273,7 +271,7 @@ using column_buffer = gather_column_buffer; template std::unique_ptr empty_like(column_buffer_base& buffer, column_name_info* schema_info, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr); /** diff --git a/cpp/src/io/utilities/column_buffer_strings.cu b/cpp/src/io/utilities/column_buffer_strings.cu index 94a53355ca7c..49aecacfa7d9 100644 --- a/cpp/src/io/utilities/column_buffer_strings.cu +++ b/cpp/src/io/utilities/column_buffer_strings.cu @@ -12,7 +12,7 @@ namespace cudf::io::detail { std::unique_ptr cudf::io::detail::inline_column_buffer::make_string_column_impl( - rmm::cuda_stream_view stream) + cuda::stream_ref stream) { // if the size of _string_data is over the threshold for 64bit size_type, _data will contain // sizes rather than offsets. need special handling for that case. diff --git a/cpp/src/io/utilities/column_utils.cuh b/cpp/src/io/utilities/column_utils.cuh index eb097a80a5cf..7bdb099e873d 100644 --- a/cpp/src/io/utilities/column_utils.cuh +++ b/cpp/src/io/utilities/column_utils.cuh @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: Copyright (c) 2021-2026, NVIDIA CORPORATION. + * SPDX-FileCopyrightText: Copyright (c) 2021-2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved. * SPDX-License-Identifier: Apache-2.0 */ @@ -13,10 +13,10 @@ #include #include -#include #include #include +#include #include namespace cudf { @@ -41,7 +41,7 @@ template rmm::device_uvector create_leaf_column_device_views( typename cudf::device_span col_desc, table_device_view const& parent_table_device_view, - rmm::cuda_stream_view stream) + cuda::stream_ref stream) { rmm::device_uvector leaf_column_views(parent_table_device_view.num_columns(), stream); diff --git a/cpp/src/io/utilities/data_casting.cu b/cpp/src/io/utilities/data_casting.cu index 74bfbc825d7c..0b92c0eb2909 100644 --- a/cpp/src/io/utilities/data_casting.cu +++ b/cpp/src/io/utilities/data_casting.cu @@ -19,7 +19,6 @@ #include #include -#include #include #include @@ -28,6 +27,7 @@ #include #include #include +#include #include #include @@ -794,7 +794,7 @@ static std::unique_ptr parse_string(string_view_pair_it str_tuples, rmm::device_buffer&& null_mask, cudf::detail::device_scalar& d_null_count, cudf::io::parse_options_view const& options, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { // CUDF_FUNC_RANGE(); @@ -827,7 +827,7 @@ static std::unique_ptr parse_string(string_view_pair_it str_tuples, // TODO run these independent kernels in parallel streams. if (max_length > SINGLE_THREAD_THRESHOLD) { parse_fn_string_parallel - <<>>( + <<>>( str_tuples, col_size, str_counter.data(), @@ -844,7 +844,7 @@ static std::unique_ptr parse_string(string_view_pair_it str_tuples, // for strings longer than WARP_THRESHOLD, 1 block per string str_counter.set_value(0, stream); parse_fn_string_parallel - <<>>( + <<>>( str_tuples, col_size, str_counter.data(), @@ -876,7 +876,7 @@ static std::unique_ptr parse_string(string_view_pair_it str_tuples, if (max_length > SINGLE_THREAD_THRESHOLD) { str_counter.set_value(0, stream); parse_fn_string_parallel - <<>>( + <<>>( str_tuples, col_size, str_counter.data(), @@ -893,7 +893,7 @@ static std::unique_ptr parse_string(string_view_pair_it str_tuples, str_counter.set_value(0, stream); // for strings longer than WARP_THRESHOLD, 1 block per string parse_fn_string_parallel - <<>>( + <<>>( str_tuples, col_size, str_counter.data(), @@ -921,7 +921,7 @@ std::unique_ptr parse_data( rmm::device_buffer&& null_mask, size_type null_count, cudf::io::parse_options_view const& options, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { CUDF_FUNC_RANGE(); diff --git a/cpp/src/io/utilities/data_sink.cpp b/cpp/src/io/utilities/data_sink.cpp index d2f89c454c79..70c79e7a0ff8 100644 --- a/cpp/src/io/utilities/data_sink.cpp +++ b/cpp/src/io/utilities/data_sink.cpp @@ -11,8 +11,7 @@ #include -#include - +#include #include namespace cudf { @@ -59,20 +58,20 @@ class file_sink : public data_sink { std::future device_write_async(void const* gpu_data, size_t size, - rmm::cuda_stream_view stream) override + cuda::stream_ref stream) override { if (!supports_device_write()) CUDF_FAIL("Device writes are not supported for this file."); size_t const offset = _bytes_written; _bytes_written += size; - stream.synchronize(); + stream.wait(); // Start the write now via the capture-initializer; only the `.get()` wait is deferred. return std::async(std::launch::deferred, [fut = _kvikio_file.pwrite(gpu_data, size, offset)]() mutable { fut.get(); }); } - void device_write(void const* gpu_data, size_t size, rmm::cuda_stream_view stream) override + void device_write(void const* gpu_data, size_t size, cuda::stream_ref stream) override { return device_write_async(gpu_data, size, stream).get(); } @@ -102,14 +101,14 @@ class host_buffer_sink : public data_sink { [[nodiscard]] bool is_device_write_preferred(size_t size) const override { return true; } - void device_write(void const* gpu_data, size_t size, rmm::cuda_stream_view stream) override + void device_write(void const* gpu_data, size_t size, cuda::stream_ref stream) override { device_write_async(gpu_data, size, stream).get(); } std::future device_write_async(void const* gpu_data, size_t size, - rmm::cuda_stream_view stream) override + cuda::stream_ref stream) override { auto const current_size = buffer_->size(); buffer_->resize(current_size + size); @@ -120,8 +119,8 @@ class host_buffer_sink : public data_sink { // in-flight when using cudaMemcpySrcAccessOrderStream. Need to ensure // stream ordering or pre-reserve buffer to avoid reallocation. CUDF_CUDA_TRY(cudaMemcpyAsync( - buffer_->data() + current_size, gpu_data, size, cudaMemcpyDeviceToHost, stream.value())); - return std::async(std::launch::deferred, [stream]() -> void { stream.synchronize(); }); + buffer_->data() + current_size, gpu_data, size, cudaMemcpyDeviceToHost, stream.get())); + return std::async(std::launch::deferred, [stream]() -> void { stream.wait(); }); } void flush() override {} @@ -147,14 +146,14 @@ class void_sink : public data_sink { [[nodiscard]] bool is_device_write_preferred(size_t size) const override { return true; } - void device_write(void const* gpu_data, size_t size, rmm::cuda_stream_view stream) override + void device_write(void const* gpu_data, size_t size, cuda::stream_ref stream) override { _bytes_written += size; } std::future device_write_async(void const* gpu_data, size_t size, - rmm::cuda_stream_view stream) override + cuda::stream_ref stream) override { _bytes_written += size; return std::async(std::launch::deferred, []() -> void {}); @@ -181,7 +180,7 @@ class user_sink_wrapper : public data_sink { return user_sink->supports_device_write(); } - void device_write(void const* gpu_data, size_t size, rmm::cuda_stream_view stream) override + void device_write(void const* gpu_data, size_t size, cuda::stream_ref stream) override { CUDF_EXPECTS(user_sink->supports_device_write(), "device_write() was called on a data_sink that doesn't support it"); @@ -190,7 +189,7 @@ class user_sink_wrapper : public data_sink { std::future device_write_async(void const* gpu_data, size_t size, - rmm::cuda_stream_view stream) override + cuda::stream_ref stream) override { CUDF_EXPECTS(user_sink->supports_device_write(), "device_write_async() was called on a data_sink that doesn't support it"); diff --git a/cpp/src/io/utilities/datasource.cpp b/cpp/src/io/utilities/datasource.cpp index 05908cb9ee5e..c1d4d8960d59 100644 --- a/cpp/src/io/utilities/datasource.cpp +++ b/cpp/src/io/utilities/datasource.cpp @@ -99,25 +99,22 @@ class kvikio_source : public datasource { std::future device_read_async(size_t offset, size_t size, uint8_t* dst, - rmm::cuda_stream_view stream) override + cuda::stream_ref stream) override { CUDF_EXPECTS(supports_device_read(), "Device reads are not supported for this file."); auto const read_size = std::min(size, this->size() - offset); - stream.synchronize(); + stream.wait(); return _kvikio_handle.pread(dst, read_size, offset); } - size_t device_read(size_t offset, - size_t size, - uint8_t* dst, - rmm::cuda_stream_view stream) override + size_t device_read(size_t offset, size_t size, uint8_t* dst, cuda::stream_ref stream) override { return device_read_async(offset, size, dst, stream).get(); } std::unique_ptr device_read(size_t offset, size_t size, - rmm::cuda_stream_view stream) override + cuda::stream_ref stream) override { rmm::device_buffer out_data(size, stream); size_t const read = @@ -153,11 +150,11 @@ class file_source : public kvikio_source { std::future device_read_async(size_t offset, size_t size, uint8_t* dst, - rmm::cuda_stream_view stream) override + cuda::stream_ref stream) override { CUDF_EXPECTS(supports_device_read(), "Device reads are not supported for this file."); auto const read_size = std::min(size, this->size() - offset); - stream.synchronize(); + stream.wait(); return _kvikio_handle.pread(dst, read_size, offset, @@ -226,24 +223,19 @@ class device_buffer_source final : public datasource { std::future device_read_async(size_t offset, size_t size, uint8_t* dst, - rmm::cuda_stream_view stream) override + cuda::stream_ref stream) override { auto const count = std::min(size, this->size() - offset); CUDF_CUDA_TRY(cudf::detail::memcpy_async(dst, _d_buffer.data() + offset, count, stream)); return std::async(std::launch::deferred, [count] { return count; }); } - size_t device_read(size_t offset, - size_t size, - uint8_t* dst, - rmm::cuda_stream_view stream) override + size_t device_read(size_t offset, size_t size, uint8_t* dst, cuda::stream_ref stream) override { return device_read_async(offset, size, dst, stream).get(); } - std::unique_ptr device_read(size_t offset, - size_t size, - rmm::cuda_stream_view stream) override + std::unique_ptr device_read(size_t offset, size_t size, cuda::stream_ref stream) override { return std::make_unique( reinterpret_cast(_d_buffer.data() + offset), size); @@ -324,17 +316,12 @@ class user_datasource_wrapper : public datasource { return source->is_device_read_preferred(size); } - size_t device_read(size_t offset, - size_t size, - uint8_t* dst, - rmm::cuda_stream_view stream) override + size_t device_read(size_t offset, size_t size, uint8_t* dst, cuda::stream_ref stream) override { return source->device_read(offset, size, dst, stream); } - std::unique_ptr device_read(size_t offset, - size_t size, - rmm::cuda_stream_view stream) override + std::unique_ptr device_read(size_t offset, size_t size, cuda::stream_ref stream) override { return source->device_read(offset, size, stream); } @@ -342,7 +329,7 @@ class user_datasource_wrapper : public datasource { std::future device_read_async(size_t offset, size_t size, uint8_t* dst, - rmm::cuda_stream_view stream) override + cuda::stream_ref stream) override { return source->device_read_async(offset, size, dst, stream); } diff --git a/cpp/src/io/utilities/hostdevice_span.hpp b/cpp/src/io/utilities/hostdevice_span.hpp index 8a071a3a4834..60b899511aa8 100644 --- a/cpp/src/io/utilities/hostdevice_span.hpp +++ b/cpp/src/io/utilities/hostdevice_span.hpp @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: Copyright (c) 2023-2026, NVIDIA CORPORATION. + * SPDX-FileCopyrightText: Copyright (c) 2023-2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved. * SPDX-License-Identifier: Apache-2.0 */ @@ -9,7 +9,7 @@ #include #include -#include +#include namespace cudf::detail { @@ -152,30 +152,30 @@ class hostdevice_span { return hostdevice_span(_host_data.subspan(offset, count), device_ptr(offset)); } - void host_to_device_async(rmm::cuda_stream_view stream) const + void host_to_device_async(cuda::stream_ref stream) const { static_assert(not std::is_const_v, "Cannot copy to const device memory"); cudf::detail::cuda_memcpy_async(device_span{device_ptr(), size()}, _host_data, stream); } [[deprecated("Use host_to_device_async instead")]] void host_to_device( - rmm::cuda_stream_view stream) const + cuda::stream_ref stream) const { host_to_device_async(stream); - stream.synchronize(); + stream.wait(); } - void device_to_host_async(rmm::cuda_stream_view stream) const + void device_to_host_async(cuda::stream_ref stream) const { static_assert(not std::is_const_v, "Cannot copy to const host memory"); cudf::detail::cuda_memcpy_async( _host_data, device_span{device_ptr(), size()}, stream); } - void device_to_host(rmm::cuda_stream_view stream) const + void device_to_host(cuda::stream_ref stream) const { device_to_host_async(stream); - stream.synchronize(); + stream.wait(); } private: diff --git a/cpp/src/io/utilities/hostdevice_vector.hpp b/cpp/src/io/utilities/hostdevice_vector.hpp index 20aa81ec3455..662de8bda8b9 100644 --- a/cpp/src/io/utilities/hostdevice_vector.hpp +++ b/cpp/src/io/utilities/hostdevice_vector.hpp @@ -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 */ @@ -16,9 +16,10 @@ #include #include -#include #include +#include + namespace cudf::detail { /** @@ -43,7 +44,7 @@ class hostdevice_vector { hostdevice_vector() : hostdevice_vector(0, cudf::get_default_stream()) {} - explicit hostdevice_vector(size_t size, rmm::cuda_stream_view stream) + explicit hostdevice_vector(size_t size, cuda::stream_ref stream) : keep_single_copy{cudf::io::integrated_memory_optimization::is_enabled()}, h_data{make_pinned_vector_async(size, stream)}, d_data{keep_single_copy ? 0 : size, stream}, @@ -91,26 +92,25 @@ class hostdevice_vector { return cudf::device_span(device_ptr(), size()); } - void host_to_device_async(rmm::cuda_stream_view stream) + void host_to_device_async(cuda::stream_ref stream) { if (not keep_single_copy) { cuda_memcpy_async(d_data, h_data, stream); } } - [[deprecated("Use host_to_device_async instead")]] void host_to_device( - rmm::cuda_stream_view stream) + [[deprecated("Use host_to_device_async instead")]] void host_to_device(cuda::stream_ref stream) { host_to_device_async(stream); - stream.synchronize(); + stream.wait(); } - void device_to_host_async(rmm::cuda_stream_view stream) + void device_to_host_async(cuda::stream_ref stream) { if (not keep_single_copy) { cuda_memcpy_async(h_data, d_data, stream); } } - void device_to_host(rmm::cuda_stream_view stream) + void device_to_host(cuda::stream_ref stream) { device_to_host_async(stream); - stream.synchronize(); + stream.wait(); } /** @@ -142,7 +142,7 @@ class hostdevice_2dvector { public: hostdevice_2dvector() : hostdevice_2dvector(0, 0, cudf::get_default_stream()) {} - hostdevice_2dvector(size_t rows, size_t columns, rmm::cuda_stream_view stream) + hostdevice_2dvector(size_t rows, size_t columns, cuda::stream_ref stream) : _data{rows * columns, stream}, _size{rows, columns} { } @@ -207,15 +207,14 @@ class hostdevice_2dvector { [[nodiscard]] size_t size_bytes() const noexcept { return _data.size_bytes(); } - void host_to_device_async(rmm::cuda_stream_view stream) { _data.host_to_device_async(stream); } - [[deprecated("Use host_to_device_async instead")]] void host_to_device( - rmm::cuda_stream_view stream) + void host_to_device_async(cuda::stream_ref stream) { _data.host_to_device_async(stream); } + [[deprecated("Use host_to_device_async instead")]] void host_to_device(cuda::stream_ref stream) { _data.host_to_device(stream); } - void device_to_host_async(rmm::cuda_stream_view stream) { _data.device_to_host_async(stream); } - void device_to_host(rmm::cuda_stream_view stream) { _data.device_to_host(stream); } + void device_to_host_async(cuda::stream_ref stream) { _data.device_to_host_async(stream); } + void device_to_host(cuda::stream_ref stream) { _data.device_to_host(stream); } private: hostdevice_vector _data; diff --git a/cpp/src/io/utilities/output_builder.cuh b/cpp/src/io/utilities/output_builder.cuh index 6dfae735562c..533d790631ba 100644 --- a/cpp/src/io/utilities/output_builder.cuh +++ b/cpp/src/io/utilities/output_builder.cuh @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: Copyright (c) 2022-2026, NVIDIA CORPORATION. + * SPDX-FileCopyrightText: Copyright (c) 2022-2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved. * SPDX-License-Identifier: Apache-2.0 */ @@ -10,10 +10,10 @@ #include #include -#include #include #include +#include #include #include @@ -214,7 +214,7 @@ class output_builder { */ output_builder(size_type max_write_size, size_type max_growth, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref()) : _max_write_size{max_write_size}, _max_growth{max_growth} { @@ -237,7 +237,7 @@ class output_builder { * @return A `split_device_span` starting directly after the last output and providing at least * `max_write_size` entries of storage. */ - [[nodiscard]] split_device_span next_output(rmm::cuda_stream_view stream) + [[nodiscard]] split_device_span next_output(cuda::stream_ref stream) { auto head_it = _chunks.end() - (_chunks.size() > 1 and _chunks.back().is_empty() ? 2 : 1); auto head_span = get_free_span(*head_it); @@ -264,7 +264,7 @@ class output_builder { * reallocate, this only changes the stream of the internally stored vectors, * impacting their subsequent copy and destruction behavior. */ - void advance_output(size_type actual_size, rmm::cuda_stream_view stream) + void advance_output(size_type actual_size, cuda::stream_ref stream) { CUDF_EXPECTS(actual_size <= _max_write_size, "Internal error"); if (_chunks.size() < 2) { @@ -287,7 +287,7 @@ class output_builder { * @param stream The stream used to access the element. * @return The first element that was written to the output. */ - [[nodiscard]] T front_element(rmm::cuda_stream_view stream) const + [[nodiscard]] T front_element(cuda::stream_ref stream) const { return _chunks.front().front_element(stream); } @@ -298,7 +298,7 @@ class output_builder { * @param stream The stream used to access the element. * @return The last element that was written to the output. */ - [[nodiscard]] T back_element(rmm::cuda_stream_view stream) const + [[nodiscard]] T back_element(cuda::stream_ref stream) const { #if defined(__GNUC__) && (__GNUC__ >= 14) #pragma GCC diagnostic push @@ -322,7 +322,7 @@ class output_builder { * @param mr The memory resource used to allocate the output vector. * @return The output vector. */ - [[nodiscard]] rmm::device_uvector gather(rmm::cuda_stream_view stream, + [[nodiscard]] rmm::device_uvector gather(cuda::stream_ref stream, rmm::device_async_resource_ref mr) const { rmm::device_uvector output{size(), stream, mr}; @@ -349,7 +349,7 @@ class output_builder { */ static void inplace_resize(rmm::device_uvector& vector, size_type new_size, - rmm::cuda_stream_view stream) + cuda::stream_ref stream) { CUDF_EXPECTS(new_size <= vector.capacity(), "Internal error"); vector.resize(new_size, stream); diff --git a/cpp/src/io/utilities/string_parsing.hpp b/cpp/src/io/utilities/string_parsing.hpp index 3204c1530531..f987a041a371 100644 --- a/cpp/src/io/utilities/string_parsing.hpp +++ b/cpp/src/io/utilities/string_parsing.hpp @@ -11,10 +11,9 @@ #include #include -#include - #include #include +#include namespace cudf::io { /** @@ -121,7 +120,7 @@ CUDF_EXPORT cudf::data_type infer_data_type( device_span data, cuda::zip_iterator offset_length_begin, std::size_t const size, - rmm::cuda_stream_view stream); + cuda::stream_ref stream); } // namespace detail namespace json::detail { @@ -147,7 +146,7 @@ CUDF_EXPORT std::unique_ptr parse_data( rmm::device_buffer&& null_mask, size_type null_count, cudf::io::parse_options_view const& options, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr); } // namespace json::detail } // namespace cudf::io diff --git a/cpp/src/io/utilities/trie.cu b/cpp/src/io/utilities/trie.cu index b14df7f4ade2..f04632a7b5bf 100644 --- a/cpp/src/io/utilities/trie.cu +++ b/cpp/src/io/utilities/trie.cu @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: Copyright (c) 2021-2025, NVIDIA CORPORATION. + * SPDX-FileCopyrightText: Copyright (c) 2021-2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved. * SPDX-License-Identifier: Apache-2.0 */ @@ -24,7 +24,7 @@ namespace cudf { namespace detail { rmm::device_uvector create_serialized_trie(std::vector const& keys, - rmm::cuda_stream_view stream) + cuda::stream_ref stream) { if (keys.empty()) { return rmm::device_uvector{0, stream}; } diff --git a/cpp/src/io/utilities/trie.hpp b/cpp/src/io/utilities/trie.hpp index f30c06c97fa5..8a757a4ff49e 100644 --- a/cpp/src/io/utilities/trie.hpp +++ b/cpp/src/io/utilities/trie.hpp @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: Copyright (c) 2018-2025, NVIDIA CORPORATION. + * SPDX-FileCopyrightText: Copyright (c) 2018-2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved. * SPDX-License-Identifier: Apache-2.0 */ @@ -13,7 +13,7 @@ #include #include -#include +#include #include #include @@ -62,7 +62,7 @@ inline trie_view make_trie_view(optional_trie const& t) * @return A host vector of nodes representing the serialized trie */ CUDF_EXPORT trie create_serialized_trie(std::vector const& keys, - rmm::cuda_stream_view stream); + cuda::stream_ref stream); } // namespace detail } // namespace cudf diff --git a/cpp/src/io/utilities/type_inference.cu b/cpp/src/io/utilities/type_inference.cu index ed20ff6e98a6..90d0602071fc 100644 --- a/cpp/src/io/utilities/type_inference.cu +++ b/cpp/src/io/utilities/type_inference.cu @@ -228,7 +228,7 @@ cudf::io::column_type_histogram infer_column_type(OptionsView const& options, cudf::device_span data, ColumnStringIter offset_length_begin, std::size_t const size, - rmm::cuda_stream_view stream) + cuda::stream_ref stream) { constexpr int block_size = 128; @@ -236,9 +236,9 @@ cudf::io::column_type_histogram infer_column_type(OptionsView const& options, auto d_column_info = cudf::detail::device_scalar( stream, cudf::get_current_device_resource_ref()); CUDF_CUDA_TRY(cudaMemsetAsync( - d_column_info.data(), 0, sizeof(cudf::io::column_type_histogram), stream.value())); + d_column_info.data(), 0, sizeof(cudf::io::column_type_histogram), stream.get())); - infer_column_type_kernel<<>>( + infer_column_type_kernel<<>>( options, data, offset_length_begin, size, d_column_info.data()); CUDF_CUDA_TRY(cudaGetLastError()); @@ -250,7 +250,7 @@ cudf::data_type infer_data_type( device_span data, cuda::zip_iterator offset_length_begin, std::size_t const size, - rmm::cuda_stream_view stream) + cuda::stream_ref stream) { CUDF_FUNC_RANGE(); CUDF_EXPECTS(size != 0, "No data available for data type inference.\n"); diff --git a/cpp/src/lists/combine/concatenate_list_elements.cu b/cpp/src/lists/combine/concatenate_list_elements.cu index 376845d31b31..23d9f2dc0b56 100644 --- a/cpp/src/lists/combine/concatenate_list_elements.cu +++ b/cpp/src/lists/combine/concatenate_list_elements.cu @@ -19,11 +19,11 @@ #include #include -#include #include #include #include +#include #include #include #include @@ -41,7 +41,7 @@ namespace { */ std::unique_ptr concatenate_lists_ignore_null(column_view const& input, bool build_null_mask, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { auto const num_rows = input.size(); @@ -106,7 +106,7 @@ std::unique_ptr concatenate_lists_ignore_null(column_view const& input, */ std::pair, rmm::device_uvector> generate_list_offsets_and_validities(column_view const& input, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { auto const num_rows = input.size(); @@ -161,7 +161,7 @@ std::unique_ptr gather_list_entries(column_view const& input, column_view const& output_list_offsets, size_type num_rows, size_type num_output_entries, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { auto const child_col = lists_column_view(input).child(); @@ -200,7 +200,7 @@ std::unique_ptr gather_list_entries(column_view const& input, } std::unique_ptr concatenate_lists_nullifying_rows(column_view const& input, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { // Generate offsets and validities of the output lists column. @@ -231,7 +231,7 @@ std::unique_ptr concatenate_lists_nullifying_rows(column_view const& inp */ std::unique_ptr concatenate_list_elements(column_view const& input, concatenate_null_policy null_policy, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { CUDF_EXPECTS(input.type().id() == type_id::LIST, @@ -280,7 +280,7 @@ std::unique_ptr concatenate_list_elements(column_view const& input, */ std::unique_ptr concatenate_list_elements(column_view const& input, concatenate_null_policy null_policy, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { CUDF_FUNC_RANGE(); diff --git a/cpp/src/lists/combine/concatenate_rows.cu b/cpp/src/lists/combine/concatenate_rows.cu index 7fa0bf509846..5f3579c2f097 100644 --- a/cpp/src/lists/combine/concatenate_rows.cu +++ b/cpp/src/lists/combine/concatenate_rows.cu @@ -16,11 +16,11 @@ #include #include -#include #include #include #include +#include #include #include @@ -64,7 +64,7 @@ generate_regrouped_offsets_and_null_mask(table_device_view const& input, bool build_null_mask, concatenate_null_policy null_policy, device_span row_null_counts, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { // outgoing offsets. @@ -148,7 +148,7 @@ generate_regrouped_offsets_and_null_mask(table_device_view const& input, } rmm::device_uvector generate_null_counts(table_device_view const& input, - rmm::cuda_stream_view stream) + cuda::stream_ref stream) { rmm::device_uvector null_counts(input.num_rows(), stream); @@ -187,7 +187,7 @@ rmm::device_uvector generate_null_counts(table_device_view const& inp */ std::unique_ptr concatenate_rows(table_view const& input, concatenate_null_policy null_policy, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { CUDF_EXPECTS(input.num_columns() > 0, "The input table must have at least one column."); @@ -304,7 +304,7 @@ std::unique_ptr concatenate_rows(table_view const& input, */ std::unique_ptr concatenate_rows(table_view const& input, concatenate_null_policy null_policy, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { CUDF_FUNC_RANGE(); diff --git a/cpp/src/lists/contains.cu b/cpp/src/lists/contains.cu index 58251a141111..033163f1c268 100644 --- a/cpp/src/lists/contains.cu +++ b/cpp/src/lists/contains.cu @@ -158,7 +158,7 @@ void index_of(InputIterator input_it, column_view const& search_keys, duplicate_find_option find_option, DeviceComp d_comp, - rmm::cuda_stream_view stream) + cuda::stream_ref stream) { auto const keys_dv_ptr = column_device_view::create(search_keys, stream); auto const key_validity_iter = cudf::detail::make_validity_iterator(*keys_dv_ptr); @@ -176,7 +176,7 @@ void index_of(InputIterator input_it, std::unique_ptr dispatch_index_of(lists_column_view const& lists, column_view const& search_keys, duplicate_find_option find_option, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { CUDF_EXPECTS(cudf::type_dispatcher(search_keys.type(), is_supported_type_fn{}), @@ -237,7 +237,7 @@ std::unique_ptr dispatch_index_of(lists_column_view const& lists, * the search key(s) were found. */ std::unique_ptr to_contains(std::unique_ptr&& key_positions, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { CUDF_EXPECTS(key_positions->type().id() == type_to_id(), @@ -266,7 +266,7 @@ namespace detail { std::unique_ptr index_of(lists_column_view const& lists, cudf::scalar const& search_key, duplicate_find_option find_option, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { if (!search_key.is_valid(stream)) { @@ -290,7 +290,7 @@ std::unique_ptr index_of(lists_column_view const& lists, std::unique_ptr index_of(lists_column_view const& lists, column_view const& search_keys, duplicate_find_option find_option, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { CUDF_EXPECTS(search_keys.size() == lists.size(), @@ -300,7 +300,7 @@ std::unique_ptr index_of(lists_column_view const& lists, std::unique_ptr contains(lists_column_view const& lists, cudf::scalar const& search_key, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { auto key_indices = detail::index_of(lists, @@ -313,7 +313,7 @@ std::unique_ptr contains(lists_column_view const& lists, std::unique_ptr contains(lists_column_view const& lists, column_view const& search_keys, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { CUDF_EXPECTS(search_keys.size() == lists.size(), @@ -328,7 +328,7 @@ std::unique_ptr contains(lists_column_view const& lists, } std::unique_ptr contains_nulls(lists_column_view const& lists, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { auto const lists_cv = lists.parent(); @@ -362,7 +362,7 @@ std::unique_ptr contains_nulls(lists_column_view const& lists, std::unique_ptr contains(lists_column_view const& lists, cudf::scalar const& search_key, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { CUDF_FUNC_RANGE(); @@ -371,7 +371,7 @@ std::unique_ptr contains(lists_column_view const& lists, std::unique_ptr contains(lists_column_view const& lists, column_view const& search_keys, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { CUDF_FUNC_RANGE(); @@ -379,7 +379,7 @@ std::unique_ptr contains(lists_column_view const& lists, } std::unique_ptr contains_nulls(lists_column_view const& lists, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { CUDF_FUNC_RANGE(); @@ -389,7 +389,7 @@ std::unique_ptr contains_nulls(lists_column_view const& lists, std::unique_ptr index_of(lists_column_view const& lists, cudf::scalar const& search_key, duplicate_find_option find_option, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { CUDF_FUNC_RANGE(); @@ -399,7 +399,7 @@ std::unique_ptr index_of(lists_column_view const& lists, std::unique_ptr index_of(lists_column_view const& lists, column_view const& search_keys, duplicate_find_option find_option, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { CUDF_FUNC_RANGE(); diff --git a/cpp/src/lists/copying/concatenate.cu b/cpp/src/lists/copying/concatenate.cu index 4ed2b30d1e5a..208474709435 100644 --- a/cpp/src/lists/copying/concatenate.cu +++ b/cpp/src/lists/copying/concatenate.cu @@ -16,9 +16,9 @@ #include #include -#include #include +#include #include #include @@ -46,7 +46,7 @@ namespace { */ std::unique_ptr merge_offsets(host_span columns, size_type total_list_count, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { // outgoing offsets @@ -86,7 +86,7 @@ std::unique_ptr merge_offsets(host_span columns * @copydoc cudf::lists::detail::concatenate */ std::unique_ptr concatenate(host_span columns, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { std::vector lists_columns; diff --git a/cpp/src/lists/copying/copying.cu b/cpp/src/lists/copying/copying.cu index e25a99230047..6e271a70e4c8 100644 --- a/cpp/src/lists/copying/copying.cu +++ b/cpp/src/lists/copying/copying.cu @@ -11,9 +11,9 @@ #include #include -#include #include +#include #include #include @@ -26,7 +26,7 @@ namespace detail { std::unique_ptr copy_slice(lists_column_view const& lists, size_type start, size_type end, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { if (lists.is_empty() or start == end) { return cudf::empty_like(lists.parent()); } diff --git a/cpp/src/lists/copying/gather.cu b/cpp/src/lists/copying/gather.cu index 0601b2138678..69edf1cceefe 100644 --- a/cpp/src/lists/copying/gather.cu +++ b/cpp/src/lists/copying/gather.cu @@ -8,9 +8,8 @@ #include #include -#include - #include +#include #include #include @@ -80,7 +79,7 @@ struct list_gatherer { */ std::unique_ptr gather_list_leaf(column_view const& column, gather_data const& gd, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { // gather map iterator for this level (N) @@ -109,7 +108,7 @@ std::unique_ptr gather_list_leaf(column_view const& column, */ std::unique_ptr gather_list_nested(cudf::lists_column_view const& list, gather_data& gd, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { // gather map iterator for this level (N) diff --git a/cpp/src/lists/copying/scatter_helper.cu b/cpp/src/lists/copying/scatter_helper.cu index 5c009804eff9..1f95711ad186 100644 --- a/cpp/src/lists/copying/scatter_helper.cu +++ b/cpp/src/lists/copying/scatter_helper.cu @@ -43,7 +43,7 @@ std::pair construct_child_nullmask( cudf::lists_column_device_view const& source_lists, cudf::lists_column_device_view const& target_lists, size_type num_child_rows, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { auto is_valid_predicate = [d_list_vector = parent_list_vector.begin(), @@ -148,7 +148,7 @@ struct list_child_constructor { cudf::column_view const& list_offsets, cudf::lists_column_view const& source_lists_column_view, cudf::lists_column_view const& target_lists_column_view, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) const requires(cudf::is_fixed_width()) { @@ -207,7 +207,7 @@ struct list_child_constructor { cudf::column_view const& list_offsets, cudf::lists_column_view const& source_lists_column_view, cudf::lists_column_view const& target_lists_column_view, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) const requires(std::is_same_v) { @@ -270,7 +270,7 @@ struct list_child_constructor { cudf::column_view const& list_offsets, cudf::lists_column_view const& source_lists_column_view, cudf::lists_column_view const& target_lists_column_view, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) const requires(std::is_same_v) { @@ -364,7 +364,7 @@ struct list_child_constructor { cudf::column_view const& list_offsets, cudf::lists_column_view const& source_lists_column_view, cudf::lists_column_view const& target_lists_column_view, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) const requires(std::is_same_v) { @@ -455,7 +455,7 @@ std::unique_ptr build_lists_child_column_recursive( cudf::column_view const& list_offsets, cudf::lists_column_view const& source_lists_column_view, cudf::lists_column_view const& target_lists_column_view, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { return cudf::type_dispatcher(child_column_type, diff --git a/cpp/src/lists/copying/segmented_gather.cu b/cpp/src/lists/copying/segmented_gather.cu index fdbf786e1f5e..e5d542fd664d 100644 --- a/cpp/src/lists/copying/segmented_gather.cu +++ b/cpp/src/lists/copying/segmented_gather.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 @@ -14,9 +14,8 @@ #include #include -#include - #include +#include #include #include @@ -27,7 +26,7 @@ namespace detail { std::unique_ptr segmented_gather(lists_column_view const& value_column, lists_column_view const& gather_map, out_of_bounds_policy bounds_policy, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { CUDF_EXPECTS(is_index_type(gather_map.child().type()), @@ -111,7 +110,7 @@ std::unique_ptr segmented_gather(lists_column_view const& value_column, std::unique_ptr segmented_gather(lists_column_view const& source_column, lists_column_view const& gather_map_list, out_of_bounds_policy bounds_policy, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { CUDF_FUNC_RANGE(); diff --git a/cpp/src/lists/count_elements.cu b/cpp/src/lists/count_elements.cu index cb8a52275c6f..c331e3489302 100644 --- a/cpp/src/lists/count_elements.cu +++ b/cpp/src/lists/count_elements.cu @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: Copyright (c) 2021-2026, NVIDIA CORPORATION. + * SPDX-FileCopyrightText: Copyright (c) 2021-2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved. * SPDX-License-Identifier: Apache-2.0 */ @@ -15,10 +15,10 @@ #include #include -#include #include #include +#include #include #include @@ -34,7 +34,7 @@ namespace detail { * @return New size_type column with lengths */ std::unique_ptr count_elements(lists_column_view const& input, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { auto device_column = cudf::column_device_view::create(input.parent(), stream); @@ -63,7 +63,7 @@ std::unique_ptr count_elements(lists_column_view const& input, // external APIS std::unique_ptr count_elements(lists_column_view const& input, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { CUDF_FUNC_RANGE(); diff --git a/cpp/src/lists/dremel.cu b/cpp/src/lists/dremel.cu index ec477853656c..076c6d5e63d5 100644 --- a/cpp/src/lists/dremel.cu +++ b/cpp/src/lists/dremel.cu @@ -69,7 +69,7 @@ dremel_data get_encoding(column_view h_col, std::vector nullability, bool output_as_byte_array, bool always_nullable, - rmm::cuda_stream_view stream) + cuda::stream_ref stream) { auto get_list_level = [](column_view col) { while (col.type().id() == type_id::STRUCT) { @@ -126,7 +126,7 @@ dremel_data get_encoding(column_view h_col, stream, cudf::get_current_device_resource_ref()); CUDF_CUDA_TRY(cudaMemsetAsync( - empty_list_offset_col->mutable_view().head(), 0, sizeof(int32_t), stream.value())); + empty_list_offset_col->mutable_view().head(), 0, sizeof(int32_t), stream.get())); std::function normalize_col = [&](column_view const& col) { auto children = [&]() -> std::vector { if (col.type().id() == type_id::LIST) { @@ -255,7 +255,7 @@ dremel_data get_encoding(column_view h_col, auto column_offsets = cudf::detail::make_host_vector_async(d_column_offsets, stream); auto column_ends = cudf::detail::make_host_vector_async(d_column_ends, stream); - stream.synchronize(); + stream.wait(); size_t max_vals_size = 0; for (size_t l = 0; l < column_offsets.size(); ++l) { @@ -462,7 +462,7 @@ dremel_data get_encoding(column_view h_col, rep_level.resize(level_vals_size, stream); def_level.resize(level_vals_size, stream); - stream.synchronize(); + stream.wait(); size_type leaf_data_size = column_ends.back() - column_offsets.back(); @@ -477,7 +477,7 @@ dremel_data get_encoding(column_view h_col, dremel_data get_dremel_data(column_view h_col, std::vector nullability, bool output_as_byte_array, - rmm::cuda_stream_view stream) + cuda::stream_ref stream) { return get_encoding(h_col, nullability, output_as_byte_array, false, stream); } @@ -485,7 +485,7 @@ dremel_data get_dremel_data(column_view h_col, dremel_data get_comparator_data(column_view h_col, std::vector nullability, bool output_as_byte_array, - rmm::cuda_stream_view stream) + cuda::stream_ref stream) { return get_encoding(h_col, nullability, output_as_byte_array, true, stream); } diff --git a/cpp/src/lists/explode.cu b/cpp/src/lists/explode.cu index 95ee740ea591..c536b39c5d35 100644 --- a/cpp/src/lists/explode.cu +++ b/cpp/src/lists/explode.cu @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: Copyright (c) 2021-2026, NVIDIA CORPORATION. + * SPDX-FileCopyrightText: Copyright (c) 2021-2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved. * SPDX-License-Identifier: Apache-2.0 */ @@ -13,7 +13,6 @@ #include #include -#include #include #include @@ -21,6 +20,7 @@ #include #include #include +#include #include #include #include @@ -47,7 +47,7 @@ std::unique_ptr
build_table( cudf::device_span gather_map, cuda::std::optional> explode_col_gather_map, cuda::std::optional> position_array, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { auto select_iter = thrust::make_transform_iterator( @@ -101,7 +101,7 @@ std::unique_ptr
build_table( std::unique_ptr
explode(table_view const& input_table, size_type const explode_column_idx, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { lists_column_view explode_col{input_table.column(explode_column_idx)}; @@ -139,7 +139,7 @@ std::unique_ptr
explode(table_view const& input_table, std::unique_ptr
explode_position(table_view const& input_table, size_type const explode_column_idx, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { lists_column_view explode_col{input_table.column(explode_column_idx)}; @@ -190,7 +190,7 @@ std::unique_ptr
explode_position(table_view const& input_table, std::unique_ptr
explode_outer(table_view const& input_table, size_type const explode_column_idx, bool include_position, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { lists_column_view explode_col{input_table.column(explode_column_idx)}; @@ -290,12 +290,12 @@ std::unique_ptr
explode_outer(table_view const& input_table, } // namespace detail /** - * @copydoc cudf::explode(table_view const&, size_type, rmm::cuda_stream_view, + * @copydoc cudf::explode(table_view const&, size_type, cuda::stream_ref, * rmm::device_async_resource_ref) */ std::unique_ptr
explode(table_view const& input_table, size_type explode_column_idx, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { CUDF_FUNC_RANGE(); @@ -305,12 +305,12 @@ std::unique_ptr
explode(table_view const& input_table, } /** - * @copydoc cudf::explode_position(table_view const&, size_type, rmm::cuda_stream_view, + * @copydoc cudf::explode_position(table_view const&, size_type, cuda::stream_ref, * rmm::device_async_resource_ref) */ std::unique_ptr
explode_position(table_view const& input_table, size_type explode_column_idx, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { CUDF_FUNC_RANGE(); @@ -320,12 +320,12 @@ std::unique_ptr
explode_position(table_view const& input_table, } /** - * @copydoc cudf::explode_outer(table_view const&, size_type, rmm::cuda_stream_view, + * @copydoc cudf::explode_outer(table_view const&, size_type, cuda::stream_ref, * rmm::device_async_resource_ref) */ std::unique_ptr
explode_outer(table_view const& input_table, size_type explode_column_idx, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { CUDF_FUNC_RANGE(); @@ -336,11 +336,11 @@ std::unique_ptr
explode_outer(table_view const& input_table, /** * @copydoc cudf::explode_outer_position(table_view const&, size_type, - * rmm::cuda_stream_view, rmm::device_async_resource_ref) + * cuda::stream_ref, rmm::device_async_resource_ref) */ std::unique_ptr
explode_outer_position(table_view const& input_table, size_type explode_column_idx, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { CUDF_FUNC_RANGE(); diff --git a/cpp/src/lists/extract.cu b/cpp/src/lists/extract.cu index 7f794a4e1c72..8f761ba68b12 100644 --- a/cpp/src/lists/extract.cu +++ b/cpp/src/lists/extract.cu @@ -17,9 +17,9 @@ #include #include -#include #include +#include #include #include @@ -42,7 +42,7 @@ namespace { */ std::unique_ptr make_index_child(column_view const& indices, size_type, - rmm::cuda_stream_view stream) + cuda::stream_ref stream) { // New column, near identical to `indices`, except with null values replaced. // `segmented_gather()` on a null index should produce a null row. @@ -77,7 +77,7 @@ std::unique_ptr make_index_child(column_view const& indices, */ std::unique_ptr make_index_child(size_type index, size_type num_rows, - rmm::cuda_stream_view stream) + cuda::stream_ref stream) { auto index_child = // [index, index, index, ..., index] make_numeric_column(data_type{type_to_id()}, @@ -99,7 +99,7 @@ std::unique_ptr make_index_child(size_type index, * This may be used to construct an "index-list" column, where each list row * has a single element. */ -std::unique_ptr make_index_offsets(size_type num_lists, rmm::cuda_stream_view stream) +std::unique_ptr make_index_offsets(size_type num_lists, cuda::stream_ref stream) { return cudf::detail::sequence( num_lists + 1, @@ -118,7 +118,7 @@ std::unique_ptr make_index_offsets(size_type num_lists, rmm::cuda_ template std::unique_ptr extract_list_element_impl(lists_column_view lists_column, index_t const& index, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { auto const num_lists = lists_column.size(); @@ -173,7 +173,7 @@ std::unique_ptr extract_list_element_impl(lists_column_view lists_column */ std::unique_ptr extract_list_element(lists_column_view lists_column, size_type const index, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { return detail::extract_list_element_impl(lists_column, index, stream, mr); @@ -181,7 +181,7 @@ std::unique_ptr extract_list_element(lists_column_view lists_column, std::unique_ptr extract_list_element(lists_column_view lists_column, column_view const& indices, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { return detail::extract_list_element_impl(lists_column, indices, stream, mr); @@ -196,7 +196,7 @@ std::unique_ptr extract_list_element(lists_column_view lists_column, */ std::unique_ptr extract_list_element(lists_column_view const& lists_column, size_type index, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { CUDF_FUNC_RANGE(); @@ -210,7 +210,7 @@ std::unique_ptr extract_list_element(lists_column_view const& lists_colu */ std::unique_ptr extract_list_element(lists_column_view const& lists_column, column_view const& indices, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { CUDF_FUNC_RANGE(); diff --git a/cpp/src/lists/interleave_columns.cu b/cpp/src/lists/interleave_columns.cu index 76c1c115a5dd..835ae5b97ca4 100644 --- a/cpp/src/lists/interleave_columns.cu +++ b/cpp/src/lists/interleave_columns.cu @@ -16,12 +16,12 @@ #include #include -#include #include #include #include #include +#include #include #include #include @@ -39,7 +39,7 @@ namespace { std::pair, rmm::device_uvector> generate_list_offsets_and_validities(table_view const& input, bool has_null_mask, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { auto const num_cols = input.num_columns(); @@ -89,7 +89,7 @@ generate_list_offsets_and_validities(table_view const& input, * column that is the result of interleaving the input columns. */ std::unique_ptr concatenate_and_gather_lists(host_span columns_to_concat, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { // Concatenate all columns into a single (temporary) column. @@ -188,7 +188,7 @@ struct interleave_list_entries_impl( size_type num_output_lists, size_type num_output_entries, bool data_has_null_mask, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) const noexcept { auto const num_cols = input.num_columns(); @@ -292,7 +292,7 @@ struct interleave_list_entries_fn { size_type num_output_lists, size_type num_output_entries, bool data_has_null_mask, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) const { return interleave_list_entries_impl{}(input, @@ -313,7 +313,7 @@ struct interleave_list_entries_fn { */ std::unique_ptr interleave_columns(table_view const& input, bool has_null_mask, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { auto const entry_type = lists_column_view(*input.begin()).child().type(); diff --git a/cpp/src/lists/lists_column_factories.cu b/cpp/src/lists/lists_column_factories.cu index 26306bb32ca9..a25a5ffacb8a 100644 --- a/cpp/src/lists/lists_column_factories.cu +++ b/cpp/src/lists/lists_column_factories.cu @@ -12,10 +12,10 @@ #include #include -#include #include #include +#include #include namespace cudf { @@ -24,7 +24,7 @@ namespace detail { std::unique_ptr make_lists_column_from_scalar(list_scalar const& value, size_type size, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { if (size == 0) { @@ -79,7 +79,7 @@ std::unique_ptr make_empty_lists_column(data_type child_type) std::unique_ptr make_all_nulls_lists_column(size_type size, data_type child_type, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { auto offsets = [&] { diff --git a/cpp/src/lists/lists_column_view.cu b/cpp/src/lists/lists_column_view.cu index 51d56c0dd724..82af9ba053b8 100644 --- a/cpp/src/lists/lists_column_view.cu +++ b/cpp/src/lists/lists_column_view.cu @@ -9,7 +9,7 @@ #include #include -#include +#include namespace cudf { @@ -32,7 +32,7 @@ column_view lists_column_view::child() const return column_view::child(child_column_index); } -column_view lists_column_view::get_sliced_child(rmm::cuda_stream_view stream) const +column_view lists_column_view::get_sliced_child(cuda::stream_ref stream) const { // if I have a positive offset, I need to slice my child if (offset() > 0) { diff --git a/cpp/src/lists/reverse.cu b/cpp/src/lists/reverse.cu index 23228de7cd22..bac6e5ce7e3d 100644 --- a/cpp/src/lists/reverse.cu +++ b/cpp/src/lists/reverse.cu @@ -14,18 +14,18 @@ #include #include -#include #include #include #include +#include #include namespace cudf::lists { namespace detail { std::unique_ptr reverse(lists_column_view const& input, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { if (input.is_empty()) { return cudf::empty_like(input.parent()); } @@ -75,7 +75,7 @@ std::unique_ptr reverse(lists_column_view const& input, } // namespace detail std::unique_ptr reverse(lists_column_view const& input, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { CUDF_FUNC_RANGE(); diff --git a/cpp/src/lists/segmented_sort.cu b/cpp/src/lists/segmented_sort.cu index 1e246a062d76..e60230ad258c 100644 --- a/cpp/src/lists/segmented_sort.cu +++ b/cpp/src/lists/segmented_sort.cu @@ -15,9 +15,9 @@ #include #include -#include #include +#include #include namespace cudf { @@ -32,7 +32,7 @@ namespace { * This creates a normalized set of offsets from the offsets child column of the input. */ std::unique_ptr build_output_offsets(lists_column_view const& input, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { auto output_offset = make_numeric_column( @@ -52,7 +52,7 @@ std::unique_ptr build_output_offsets(lists_column_view const& input, std::unique_ptr sort_lists(lists_column_view const& input, order column_order, null_order null_precedence, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { if (input.is_empty()) return empty_like(input.parent()); @@ -78,7 +78,7 @@ std::unique_ptr sort_lists(lists_column_view const& input, std::unique_ptr stable_sort_lists(lists_column_view const& input, order column_order, null_order null_precedence, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { if (input.is_empty()) { return empty_like(input.parent()); } @@ -105,7 +105,7 @@ std::unique_ptr stable_sort_lists(lists_column_view const& input, std::unique_ptr sort_lists(lists_column_view const& input, order column_order, null_order null_precedence, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { CUDF_FUNC_RANGE(); @@ -115,7 +115,7 @@ std::unique_ptr sort_lists(lists_column_view const& input, std::unique_ptr stable_sort_lists(lists_column_view const& input, order column_order, null_order null_precedence, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { CUDF_FUNC_RANGE(); diff --git a/cpp/src/lists/sequences.cu b/cpp/src/lists/sequences.cu index 2d75f0e0f146..cc655fff9db1 100644 --- a/cpp/src/lists/sequences.cu +++ b/cpp/src/lists/sequences.cu @@ -16,10 +16,10 @@ #include #include -#include #include #include +#include #include #include #include @@ -81,7 +81,7 @@ struct sequences_dispatcher { column_view const& starts, std::optional const& steps, int32_t const* offsets, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { return sequences_functor::invoke(n_lists, n_elements, starts, steps, offsets, stream, mr); @@ -101,7 +101,7 @@ struct sequences_functor()>> { column_view const& starts, std::optional const& steps, int32_t const* offsets, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { auto result = @@ -128,7 +128,7 @@ struct sequences_functor()>> { std::unique_ptr sequences(column_view const& starts, std::optional const& steps, column_view const& sizes, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { CUDF_EXPECTS(!starts.has_nulls() && !sizes.has_nulls(), @@ -176,7 +176,7 @@ std::unique_ptr sequences(column_view const& starts, std::unique_ptr sequences(column_view const& starts, column_view const& sizes, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { return sequences(starts, std::nullopt, sizes, stream, mr); @@ -185,7 +185,7 @@ std::unique_ptr sequences(column_view const& starts, std::unique_ptr sequences(column_view const& starts, column_view const& steps, column_view const& sizes, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { return sequences(starts, std::optional{steps}, sizes, stream, mr); @@ -195,7 +195,7 @@ std::unique_ptr sequences(column_view const& starts, std::unique_ptr sequences(column_view const& starts, column_view const& sizes, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { CUDF_FUNC_RANGE(); @@ -205,7 +205,7 @@ std::unique_ptr sequences(column_view const& starts, std::unique_ptr sequences(column_view const& starts, column_view const& steps, column_view const& sizes, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { CUDF_FUNC_RANGE(); diff --git a/cpp/src/lists/set_operations.cu b/cpp/src/lists/set_operations.cu index 61d1dc88291e..552283cd83c6 100644 --- a/cpp/src/lists/set_operations.cu +++ b/cpp/src/lists/set_operations.cu @@ -20,12 +20,12 @@ #include #include -#include #include #include #include #include +#include #include #include @@ -52,7 +52,7 @@ std::unique_ptr have_overlap(lists_column_view const& lhs, lists_column_view const& rhs, null_equality nulls_equal, nan_equality nans_equal, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { check_compatibility(lhs, rhs); @@ -125,7 +125,7 @@ std::unique_ptr intersect_distinct(lists_column_view const& lhs, lists_column_view const& rhs, null_equality nulls_equal, nan_equality nans_equal, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { check_compatibility(lhs, rhs); @@ -184,7 +184,7 @@ std::unique_ptr union_distinct(lists_column_view const& lhs, lists_column_view const& rhs, null_equality nulls_equal, nan_equality nans_equal, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { check_compatibility(lhs, rhs); @@ -209,7 +209,7 @@ std::unique_ptr difference_distinct(lists_column_view const& lhs, lists_column_view const& rhs, null_equality nulls_equal, nan_equality nans_equal, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { check_compatibility(lhs, rhs); @@ -272,7 +272,7 @@ std::unique_ptr have_overlap(lists_column_view const& lhs, lists_column_view const& rhs, null_equality nulls_equal, nan_equality nans_equal, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { CUDF_FUNC_RANGE(); @@ -283,7 +283,7 @@ std::unique_ptr intersect_distinct(lists_column_view const& lhs, lists_column_view const& rhs, null_equality nulls_equal, nan_equality nans_equal, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { CUDF_FUNC_RANGE(); @@ -294,7 +294,7 @@ std::unique_ptr union_distinct(lists_column_view const& lhs, lists_column_view const& rhs, null_equality nulls_equal, nan_equality nans_equal, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { CUDF_FUNC_RANGE(); @@ -305,7 +305,7 @@ std::unique_ptr difference_distinct(lists_column_view const& lhs, lists_column_view const& rhs, null_equality nulls_equal, nan_equality nans_equal, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { CUDF_FUNC_RANGE(); diff --git a/cpp/src/lists/stream_compaction/apply_boolean_mask.cu b/cpp/src/lists/stream_compaction/apply_boolean_mask.cu index 04a9fa83a780..50abf4fbd0cf 100644 --- a/cpp/src/lists/stream_compaction/apply_boolean_mask.cu +++ b/cpp/src/lists/stream_compaction/apply_boolean_mask.cu @@ -26,7 +26,7 @@ namespace detail { std::unique_ptr apply_mask(lists_column_view const& input, lists_column_view const& boolean_mask, cudf::detail::mask_type mask_kind, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { CUDF_EXPECTS(boolean_mask.child().type().id() == type_id::BOOL8, "Mask must be of type BOOL8."); @@ -91,7 +91,7 @@ std::unique_ptr apply_mask(lists_column_view const& input, sizes_end, output_offsets_view.begin() + 1); CUDF_CUDA_TRY( - cudaMemsetAsync(output_offsets_view.begin(), 0, sizeof(int32_t), stream.value())); + cudaMemsetAsync(output_offsets_view.begin(), 0, sizeof(int32_t), stream.get())); return output_offsets; }; @@ -105,7 +105,7 @@ std::unique_ptr apply_mask(lists_column_view const& input, std::unique_ptr apply_boolean_mask(lists_column_view const& input, lists_column_view const& boolean_mask, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { CUDF_FUNC_RANGE(); @@ -114,7 +114,7 @@ std::unique_ptr apply_boolean_mask(lists_column_view const& input, std::unique_ptr apply_deletion_mask(lists_column_view const& input, lists_column_view const& deletion_mask, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { CUDF_FUNC_RANGE(); diff --git a/cpp/src/lists/stream_compaction/distinct.cu b/cpp/src/lists/stream_compaction/distinct.cu index 733fe912ad2c..f3074c53ec74 100644 --- a/cpp/src/lists/stream_compaction/distinct.cu +++ b/cpp/src/lists/stream_compaction/distinct.cu @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: Copyright (c) 2022-2026, NVIDIA CORPORATION. + * SPDX-FileCopyrightText: Copyright (c) 2022-2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved. * SPDX-License-Identifier: Apache-2.0 */ @@ -17,7 +17,7 @@ #include #include -#include +#include #include #include @@ -29,7 +29,7 @@ std::unique_ptr distinct(lists_column_view const& input, null_equality nulls_equal, nan_equality nans_equal, duplicate_keep_option keep_option, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { // Algorithm: @@ -68,7 +68,7 @@ std::unique_ptr distinct(lists_column_view const& input, null_equality nulls_equal, nan_equality nans_equal, duplicate_keep_option keep_option, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { CUDF_FUNC_RANGE(); diff --git a/cpp/src/lists/utilities.cu b/cpp/src/lists/utilities.cu index 40b61da28181..acbe455a5a9e 100644 --- a/cpp/src/lists/utilities.cu +++ b/cpp/src/lists/utilities.cu @@ -14,7 +14,7 @@ namespace cudf::lists::detail { std::unique_ptr generate_labels(lists_column_view const& input, size_type n_elements, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { auto labels = make_numeric_column( @@ -27,7 +27,7 @@ std::unique_ptr generate_labels(lists_column_view const& input, std::unique_ptr reconstruct_offsets(column_view const& labels, size_type n_lists, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { @@ -45,7 +45,7 @@ std::unique_ptr reconstruct_offsets(column_view const& labels, } std::unique_ptr get_normalized_offsets(lists_column_view const& input, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { if (input.is_empty()) { return empty_like(input.offsets()); } diff --git a/cpp/src/lists/utilities.hpp b/cpp/src/lists/utilities.hpp index 09ea783c1c11..c87086adb22c 100644 --- a/cpp/src/lists/utilities.hpp +++ b/cpp/src/lists/utilities.hpp @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: Copyright (c) 2022-2026, NVIDIA CORPORATION. + * SPDX-FileCopyrightText: Copyright (c) 2022-2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved. * SPDX-License-Identifier: Apache-2.0 */ @@ -9,7 +9,7 @@ #include #include -#include +#include namespace cudf::lists::detail { @@ -24,7 +24,7 @@ namespace cudf::lists::detail { */ std::unique_ptr generate_labels(lists_column_view const& input, size_type n_elements, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr); /** @@ -38,7 +38,7 @@ std::unique_ptr generate_labels(lists_column_view const& input, */ std::unique_ptr reconstruct_offsets(column_view const& labels, size_type n_lists, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr); /** @@ -50,7 +50,7 @@ std::unique_ptr reconstruct_offsets(column_view const& labels, * @return The output offsets column with values start from 0 */ std::unique_ptr get_normalized_offsets(lists_column_view const& input, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr); } // namespace cudf::lists::detail diff --git a/cpp/src/strings/attributes.cu b/cpp/src/strings/attributes.cu index 3bfc6dbfe62c..8faab9f28c87 100644 --- a/cpp/src/strings/attributes.cu +++ b/cpp/src/strings/attributes.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 */ @@ -19,13 +19,13 @@ #include #include -#include #include #include #include #include #include +#include #include #include #include @@ -65,7 +65,7 @@ constexpr size_type AVG_CHAR_BYTES_THRESHOLD = 64; template std::unique_ptr counts_fn(strings_column_view const& strings, UnaryFunction& ufn, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { // create output column @@ -126,7 +126,7 @@ CUDF_KERNEL void count_characters_parallel_fn(column_device_view const d_strings } std::unique_ptr count_characters_parallel(strings_column_view const& input, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { // create output column @@ -144,7 +144,7 @@ std::unique_ptr count_characters_parallel(strings_column_view const& inp constexpr thread_index_type block_size = 256; constexpr thread_index_type warp_size = cudf::detail::warp_size; cudf::detail::grid_1d grid{input.size() * warp_size, block_size}; - count_characters_parallel_fn<<>>( + count_characters_parallel_fn<<>>( *d_strings, d_lengths); CUDF_CUDA_TRY(cudaGetLastError()); @@ -157,7 +157,7 @@ std::unique_ptr count_characters_parallel(strings_column_view const& inp } // namespace std::unique_ptr count_characters(strings_column_view const& input, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { if ((input.size() == input.null_count()) || @@ -172,7 +172,7 @@ std::unique_ptr count_characters(strings_column_view const& input, } std::unique_ptr count_bytes(strings_column_view const& input, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { auto ufn = cuda::proclaim_return_type( @@ -211,7 +211,7 @@ struct code_points_fn { namespace detail { // std::unique_ptr code_points(strings_column_view const& input, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { auto strings_column = column_device_view::create(input.parent(), stream); @@ -256,7 +256,7 @@ std::unique_ptr code_points(strings_column_view const& input, // external APIS std::unique_ptr count_characters(strings_column_view const& input, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { CUDF_FUNC_RANGE(); @@ -264,7 +264,7 @@ std::unique_ptr count_characters(strings_column_view const& input, } std::unique_ptr count_bytes(strings_column_view const& input, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { CUDF_FUNC_RANGE(); @@ -272,7 +272,7 @@ std::unique_ptr count_bytes(strings_column_view const& input, } std::unique_ptr code_points(strings_column_view const& input, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { CUDF_FUNC_RANGE(); diff --git a/cpp/src/strings/capitalize.cu b/cpp/src/strings/capitalize.cu index ab67eef83177..c291a96e14a9 100644 --- a/cpp/src/strings/capitalize.cu +++ b/cpp/src/strings/capitalize.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 */ @@ -16,11 +16,10 @@ #include #include -#include - #include #include #include +#include #include #include @@ -126,7 +125,7 @@ struct base_fn { char* d_chars{}; cudf::detail::input_offsetalator d_offsets; - base_fn(column_device_view const& d_column, rmm::cuda_stream_view stream) + base_fn(column_device_view const& d_column, cuda::stream_ref stream) : d_flags(get_character_flags_table(stream)), d_case_table(get_character_cases_table(stream)), d_special_case_mapping(get_special_case_mapping_table(stream)), @@ -234,7 +233,7 @@ struct capitalize_fn : base_fn { capitalize_fn(column_device_view const& d_column, string_view const& d_delimiters, - rmm::cuda_stream_view stream) + cuda::stream_ref stream) : base_fn(d_column, stream), d_delimiters(d_delimiters) { } @@ -258,7 +257,7 @@ struct title_fn : base_fn { title_fn(column_device_view const& d_column, string_character_types sequence_type, - rmm::cuda_stream_view stream) + cuda::stream_ref stream) : base_fn(d_column, stream), sequence_type(sequence_type) { } @@ -311,7 +310,7 @@ struct is_title_fn { template std::unique_ptr capitalizer(CapitalFn cfn, strings_column_view const& input, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { auto [offsets_column, chars] = make_strings_children(cfn, input.size(), stream, mr); @@ -327,7 +326,7 @@ std::unique_ptr capitalizer(CapitalFn cfn, std::unique_ptr capitalize(strings_column_view const& input, string_scalar const& delimiters, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { CUDF_EXPECTS(delimiters.is_valid(stream), "Delimiter must be a valid string"); @@ -339,7 +338,7 @@ std::unique_ptr capitalize(strings_column_view const& input, std::unique_ptr title(strings_column_view const& input, string_character_types sequence_type, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { if (input.is_empty()) return make_empty_column(type_id::STRING); @@ -348,7 +347,7 @@ std::unique_ptr title(strings_column_view const& input, } std::unique_ptr is_title(strings_column_view const& input, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { if (input.is_empty()) return make_empty_column(type_id::BOOL8); @@ -372,7 +371,7 @@ std::unique_ptr is_title(strings_column_view const& input, std::unique_ptr capitalize(strings_column_view const& input, string_scalar const& delimiter, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { CUDF_FUNC_RANGE(); @@ -381,7 +380,7 @@ std::unique_ptr capitalize(strings_column_view const& input, std::unique_ptr title(strings_column_view const& input, string_character_types sequence_type, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { CUDF_FUNC_RANGE(); @@ -389,7 +388,7 @@ std::unique_ptr title(strings_column_view const& input, } std::unique_ptr is_title(strings_column_view const& input, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { CUDF_FUNC_RANGE(); diff --git a/cpp/src/strings/case.cu b/cpp/src/strings/case.cu index bf8deaf009f8..9ddea2b354da 100644 --- a/cpp/src/strings/case.cu +++ b/cpp/src/strings/case.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 */ @@ -22,7 +22,6 @@ #include #include -#include #include #include @@ -30,6 +29,7 @@ #include #include #include +#include #include #include #include @@ -385,7 +385,7 @@ CUDF_KERNEL void multibyte_converter_kernel(convert_char_fn converter, */ std::unique_ptr convert_case(strings_column_view const& input, character_flags_table_type case_flag, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { if (input.size() == input.null_count()) { @@ -427,7 +427,7 @@ std::unique_ptr convert_case(strings_column_view const& input, cudf::detail::device_scalar mb_count(0, stream, cudf::get_current_device_resource_ref()); auto const grid = cudf::detail::grid_1d(chars_size, block_size, bytes_per_thread); mismatch_multibytes_kernel - <<>>( + <<>>( input_chars, first_offset, last_offset, mb_count.data()); CUDF_CUDA_TRY(cudaGetLastError()); if (mb_count.value(stream) == 0) { @@ -437,7 +437,7 @@ std::unique_ptr convert_case(strings_column_view const& input, auto result = std::make_unique(input.parent(), stream, mr); auto d_chars = result->mutable_view().head(); multibyte_converter_kernel - <<>>( + <<>>( ccfn, input_chars + first_offset, chars_size, d_chars); CUDF_CUDA_TRY(cudaGetLastError()); result->set_null_count(input.null_count()); @@ -451,7 +451,7 @@ std::unique_ptr convert_case(strings_column_view const& input, constexpr thread_index_type warp_size = cudf::detail::warp_size; auto grid = cudf::detail::grid_1d(input.size() * warp_size, block_size); count_bytes_kernel - <<>>( + <<>>( ccfn, *d_strings, sizes.data()); CUDF_CUDA_TRY(cudaGetLastError()); // convert sizes to offsets @@ -479,7 +479,7 @@ std::unique_ptr convert_case(strings_column_view const& input, sub_offsets.begin(), sub_offsets.end(), tmp_offsets.begin()); - stream.synchronize(); // protect against destruction of sub_offsets + stream.wait(); // protect against destruction of sub_offsets } // run case conversion over the new sub-strings @@ -497,7 +497,7 @@ std::unique_ptr convert_case(strings_column_view const& input, } // namespace std::unique_ptr to_lower(strings_column_view const& strings, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { character_flags_table_type case_flag = IS_UPPER(0xFF); // convert only upper case characters @@ -506,7 +506,7 @@ std::unique_ptr to_lower(strings_column_view const& strings, // std::unique_ptr to_upper(strings_column_view const& strings, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { character_flags_table_type case_flag = IS_LOWER(0xFF); // convert only lower case characters @@ -515,7 +515,7 @@ std::unique_ptr to_upper(strings_column_view const& strings, // std::unique_ptr swapcase(strings_column_view const& strings, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { // convert only upper or lower case characters @@ -528,7 +528,7 @@ std::unique_ptr swapcase(strings_column_view const& strings, // APIs std::unique_ptr to_lower(strings_column_view const& strings, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { CUDF_FUNC_RANGE(); @@ -536,7 +536,7 @@ std::unique_ptr to_lower(strings_column_view const& strings, } std::unique_ptr to_upper(strings_column_view const& strings, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { CUDF_FUNC_RANGE(); @@ -544,7 +544,7 @@ std::unique_ptr to_upper(strings_column_view const& strings, } std::unique_ptr swapcase(strings_column_view const& strings, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { CUDF_FUNC_RANGE(); diff --git a/cpp/src/strings/char_types/char_types.cu b/cpp/src/strings/char_types/char_types.cu index 8c6303dd3b36..b8f12c6a9749 100644 --- a/cpp/src/strings/char_types/char_types.cu +++ b/cpp/src/strings/char_types/char_types.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 */ @@ -18,10 +18,9 @@ #include #include -#include - #include #include +#include #include namespace cudf { @@ -77,7 +76,7 @@ struct char_types_fn { std::unique_ptr all_characters_of_type(strings_column_view const& input, string_character_types types, string_character_types verify_types, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { auto d_strings = column_device_view::create(input.parent(), stream); @@ -166,7 +165,7 @@ std::unique_ptr filter_characters_of_type(strings_column_view const& str string_character_types types_to_remove, string_scalar const& replacement, string_character_types types_to_keep, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { CUDF_EXPECTS(replacement.is_valid(stream), "Parameter replacement must be valid"); @@ -209,7 +208,7 @@ std::unique_ptr filter_characters_of_type(strings_column_view const& str std::unique_ptr all_characters_of_type(strings_column_view const& input, string_character_types types, string_character_types verify_types, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { CUDF_FUNC_RANGE(); @@ -220,7 +219,7 @@ std::unique_ptr filter_characters_of_type(strings_column_view const& inp string_character_types types_to_remove, string_scalar const& replacement, string_character_types types_to_keep, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { CUDF_FUNC_RANGE(); diff --git a/cpp/src/strings/combine/concatenate.cu b/cpp/src/strings/combine/concatenate.cu index d32f52655f86..e726b52480b3 100644 --- a/cpp/src/strings/combine/concatenate.cu +++ b/cpp/src/strings/combine/concatenate.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 */ @@ -20,11 +20,11 @@ #include #include -#include #include #include #include +#include #include #include @@ -113,7 +113,7 @@ std::unique_ptr concatenate(table_view const& strings_columns, string_scalar const& separator, string_scalar const& narep, separator_on_nulls separate_nulls, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { auto const num_columns = strings_columns.num_columns(); @@ -197,7 +197,7 @@ std::unique_ptr concatenate(table_view const& strings_columns, string_scalar const& separator_narep, string_scalar const& col_narep, separator_on_nulls separate_nulls, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { auto const num_columns = strings_columns.num_columns(); @@ -253,7 +253,7 @@ std::unique_ptr concatenate(table_view const& strings_columns, string_scalar const& separator, string_scalar const& narep, separator_on_nulls separate_nulls, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { CUDF_FUNC_RANGE(); @@ -265,7 +265,7 @@ std::unique_ptr concatenate(table_view const& strings_columns, string_scalar const& separator_narep, string_scalar const& col_narep, separator_on_nulls separate_nulls, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { CUDF_FUNC_RANGE(); diff --git a/cpp/src/strings/combine/join.cu b/cpp/src/strings/combine/join.cu index 6534858eb10c..a81ea9844674 100644 --- a/cpp/src/strings/combine/join.cu +++ b/cpp/src/strings/combine/join.cu @@ -20,11 +20,11 @@ #include #include -#include #include #include #include +#include #include #include @@ -123,7 +123,7 @@ struct join_gather_fn : public join_base_fn { std::unique_ptr join_strings(strings_column_view const& input, string_scalar const& separator, string_scalar const& narep, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { if (input.is_empty()) { return make_empty_column(type_id::STRING); } @@ -181,7 +181,7 @@ std::unique_ptr join_strings(strings_column_view const& input, std::unique_ptr join_strings(strings_column_view const& strings, string_scalar const& separator, string_scalar const& narep, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { CUDF_FUNC_RANGE(); diff --git a/cpp/src/strings/combine/join_list_elements.cu b/cpp/src/strings/combine/join_list_elements.cu index c08e4c59e1c7..4201175211f6 100644 --- a/cpp/src/strings/combine/join_list_elements.cu +++ b/cpp/src/strings/combine/join_list_elements.cu @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: Copyright (c) 2021-2026, NVIDIA CORPORATION. + * SPDX-FileCopyrightText: Copyright (c) 2021-2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved. * SPDX-License-Identifier: Apache-2.0 */ @@ -18,10 +18,10 @@ #include #include -#include #include #include +#include namespace cudf { namespace strings { @@ -168,7 +168,7 @@ std::unique_ptr join_list_elements(lists_column_view const& lists_string string_scalar const& narep, separator_on_nulls separate_nulls, output_if_empty_list empty_list_policy, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { CUDF_EXPECTS(lists_strings_column.child().type().id() == type_id::STRING, @@ -241,7 +241,7 @@ std::unique_ptr join_list_elements(lists_column_view const& lists_string string_scalar const& string_narep, separator_on_nulls separate_nulls, output_if_empty_list empty_list_policy, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { CUDF_EXPECTS(lists_strings_column.child().type().id() == type_id::STRING, @@ -292,7 +292,7 @@ std::unique_ptr join_list_elements(lists_column_view const& lists_string string_scalar const& narep, separator_on_nulls separate_nulls, output_if_empty_list empty_list_policy, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { CUDF_FUNC_RANGE(); @@ -306,7 +306,7 @@ std::unique_ptr join_list_elements(lists_column_view const& lists_string string_scalar const& string_narep, separator_on_nulls separate_nulls, output_if_empty_list empty_list_policy, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { CUDF_FUNC_RANGE(); diff --git a/cpp/src/strings/contains.cu b/cpp/src/strings/contains.cu index b16199c077d5..9c27ba0547b9 100644 --- a/cpp/src/strings/contains.cu +++ b/cpp/src/strings/contains.cu @@ -20,7 +20,7 @@ #include #include -#include +#include namespace cudf { namespace strings { @@ -51,7 +51,7 @@ struct contains_fn { std::unique_ptr contains_impl(strings_column_view const& input, regex_program const& prog, bool const beginning_only, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { auto results = make_numeric_column(data_type{type_id::BOOL8}, @@ -82,7 +82,7 @@ std::unique_ptr contains_impl(strings_column_view const& input, std::unique_ptr contains_re(strings_column_view const& input, regex_program const& prog, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { // check for potential fast-paths @@ -111,7 +111,7 @@ std::unique_ptr contains_re(strings_column_view const& input, std::unique_ptr matches_re(strings_column_view const& input, regex_program const& prog, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { auto [fp, literal] = prog.get_literal_fast_path(); @@ -126,7 +126,7 @@ std::unique_ptr matches_re(strings_column_view const& input, std::unique_ptr count_re(strings_column_view const& input, regex_program const& prog, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { auto [fp, literal] = prog.get_literal_fast_path(); @@ -152,7 +152,7 @@ std::unique_ptr count_re(strings_column_view const& input, std::unique_ptr contains_re(strings_column_view const& input, regex_program const& prog, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { CUDF_FUNC_RANGE(); @@ -161,7 +161,7 @@ std::unique_ptr contains_re(strings_column_view const& input, std::unique_ptr matches_re(strings_column_view const& input, regex_program const& prog, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { CUDF_FUNC_RANGE(); @@ -170,7 +170,7 @@ std::unique_ptr matches_re(strings_column_view const& input, std::unique_ptr count_re(strings_column_view const& input, regex_program const& prog, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { CUDF_FUNC_RANGE(); diff --git a/cpp/src/strings/convert/convert_booleans.cu b/cpp/src/strings/convert/convert_booleans.cu index aebf8938ab39..329109b6ddcf 100644 --- a/cpp/src/strings/convert/convert_booleans.cu +++ b/cpp/src/strings/convert/convert_booleans.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 */ @@ -15,10 +15,10 @@ #include #include -#include #include #include +#include #include namespace cudf { @@ -27,7 +27,7 @@ namespace detail { // Convert strings column to boolean column std::unique_ptr to_booleans(strings_column_view const& input, string_scalar const& true_string, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { size_type strings_count = input.size(); @@ -70,7 +70,7 @@ std::unique_ptr to_booleans(strings_column_view const& input, // external API std::unique_ptr to_booleans(strings_column_view const& input, string_scalar const& true_string, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { CUDF_FUNC_RANGE(); @@ -109,7 +109,7 @@ struct from_booleans_fn { std::unique_ptr from_booleans(column_view const& booleans, string_scalar const& true_string, string_scalar const& false_string, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { size_type strings_count = booleans.size(); @@ -146,7 +146,7 @@ std::unique_ptr from_booleans(column_view const& booleans, std::unique_ptr from_booleans(column_view const& booleans, string_scalar const& true_string, string_scalar const& false_string, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { CUDF_FUNC_RANGE(); diff --git a/cpp/src/strings/convert/convert_datetime.cu b/cpp/src/strings/convert/convert_datetime.cu index 0d572a76d8c9..3facac97746e 100644 --- a/cpp/src/strings/convert/convert_datetime.cu +++ b/cpp/src/strings/convert/convert_datetime.cu @@ -24,13 +24,13 @@ #include #include -#include #include #include #include #include #include +#include #include #include #include @@ -109,7 +109,7 @@ struct format_compiler { // clang-format on format_compiler(std::string_view fmt, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, specifier_map extra_specifiers = {}) : format(fmt), d_items(0, stream) { @@ -395,7 +395,7 @@ struct dispatch_to_timestamps_fn { void operator()(column_device_view const& d_strings, std::string_view format, mutable_column_view& results_view, - rmm::cuda_stream_view stream) const + cuda::stream_ref stream) const requires(cudf::is_timestamp()) { format_compiler compiler(format, stream); @@ -410,7 +410,7 @@ struct dispatch_to_timestamps_fn { void operator()(column_device_view const&, std::string_view, mutable_column_view&, - rmm::cuda_stream_view) const + cuda::stream_ref) const requires(not cudf::is_timestamp()) { CUDF_FAIL("Only timestamps type are expected", std::invalid_argument); @@ -423,7 +423,7 @@ struct dispatch_to_timestamps_fn { std::unique_ptr to_timestamps(strings_column_view const& input, data_type timestamp_type, std::string_view format, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { if (input.is_empty()) { return make_empty_column(timestamp_type); } @@ -661,7 +661,7 @@ struct check_datetime_format { std::unique_ptr is_timestamp(strings_column_view const& input, std::string_view const& format, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { size_type strings_count = input.size(); @@ -697,7 +697,7 @@ std::unique_ptr is_timestamp(strings_column_view const& input, std::unique_ptr to_timestamps(strings_column_view const& input, data_type timestamp_type, std::string_view format, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { CUDF_FUNC_RANGE(); @@ -706,7 +706,7 @@ std::unique_ptr to_timestamps(strings_column_view const& input, std::unique_ptr is_timestamp(strings_column_view const& input, std::string_view format, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { CUDF_FUNC_RANGE(); @@ -1093,7 +1093,7 @@ struct dispatch_from_timestamps_fn { strings_children operator()(column_device_view const& d_timestamps, column_device_view const& d_format_names, device_span d_format_items, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) const requires(cudf::is_timestamp()) { @@ -1118,7 +1118,7 @@ struct dispatch_from_timestamps_fn { std::unique_ptr from_timestamps(column_view const& timestamps, std::string_view format, strings_column_view const& names, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { if (timestamps.is_empty()) return make_empty_column(type_id::STRING); @@ -1161,7 +1161,7 @@ std::unique_ptr from_timestamps(column_view const& timestamps, std::unique_ptr from_timestamps(column_view const& timestamps, std::string_view format, strings_column_view const& names, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { CUDF_FUNC_RANGE(); diff --git a/cpp/src/strings/convert/convert_durations.cu b/cpp/src/strings/convert/convert_durations.cu index 401d72c7f04d..2c431a609023 100644 --- a/cpp/src/strings/convert/convert_durations.cu +++ b/cpp/src/strings/convert/convert_durations.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 "utilities/time_utils.cuh" @@ -15,12 +15,12 @@ #include #include -#include #include #include #include #include +#include #include #include #include @@ -79,7 +79,7 @@ struct alignas(4) format_item { struct format_compiler { std::string_view const format; rmm::device_uvector d_items; - format_compiler(std::string_view format, rmm::cuda_stream_view stream) + format_compiler(std::string_view format, cuda::stream_ref stream) : format(format), d_items(0, stream) { static std::map const specifier_lengths = { @@ -389,7 +389,7 @@ struct dispatch_from_durations_fn { template std::unique_ptr operator()(column_view const& durations, std::string_view format, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) const requires(cudf::is_duration()) { @@ -644,7 +644,7 @@ struct dispatch_to_durations_fn { void operator()(column_device_view const& d_strings, std::string_view format, mutable_column_view& results_view, - rmm::cuda_stream_view stream) const + cuda::stream_ref stream) const requires(cudf::is_duration()) { format_compiler compiler(format, stream); @@ -661,7 +661,7 @@ struct dispatch_to_durations_fn { void operator()(column_device_view const&, std::string_view, mutable_column_view&, - rmm::cuda_stream_view) const + cuda::stream_ref) const requires(not cudf::is_duration()) { CUDF_FAIL("Only durations type are expected for to_durations function"); @@ -672,7 +672,7 @@ struct dispatch_to_durations_fn { std::unique_ptr from_durations(column_view const& durations, std::string_view format, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { size_type strings_count = durations.size(); @@ -685,7 +685,7 @@ std::unique_ptr from_durations(column_view const& durations, std::unique_ptr to_durations(strings_column_view const& input, data_type duration_type, std::string_view format, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { size_type strings_count = input.size(); @@ -715,7 +715,7 @@ std::unique_ptr to_durations(strings_column_view const& input, std::unique_ptr from_durations(column_view const& durations, std::string_view format, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { CUDF_FUNC_RANGE(); @@ -725,7 +725,7 @@ std::unique_ptr from_durations(column_view const& durations, std::unique_ptr to_durations(strings_column_view const& input, data_type duration_type, std::string_view format, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { CUDF_FUNC_RANGE(); diff --git a/cpp/src/strings/convert/convert_fixed_point.cu b/cpp/src/strings/convert/convert_fixed_point.cu index 0b5f154521dd..bf42d86ee0ce 100644 --- a/cpp/src/strings/convert/convert_fixed_point.cu +++ b/cpp/src/strings/convert/convert_fixed_point.cu @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: Copyright (c) 2021-2026, NVIDIA CORPORATION. + * SPDX-FileCopyrightText: Copyright (c) 2021-2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved. * SPDX-License-Identifier: Apache-2.0 */ @@ -19,13 +19,13 @@ #include #include -#include #include #include #include #include #include +#include #include #include @@ -119,7 +119,7 @@ struct dispatch_to_fixed_point_fn { template std::unique_ptr operator()(strings_column_view const& input, data_type output_type, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) const requires(cudf::is_fixed_point()) { @@ -149,7 +149,7 @@ struct dispatch_to_fixed_point_fn { template std::unique_ptr operator()(strings_column_view const&, data_type, - rmm::cuda_stream_view, + cuda::stream_ref, rmm::device_async_resource_ref) const requires(not cudf::is_fixed_point()) { @@ -162,7 +162,7 @@ struct dispatch_to_fixed_point_fn { // This will convert a strings column into any integer column type. std::unique_ptr to_fixed_point(strings_column_view const& input, data_type output_type, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { if (input.is_empty()) return make_empty_column(output_type); @@ -174,7 +174,7 @@ std::unique_ptr to_fixed_point(strings_column_view const& input, // external API std::unique_ptr to_fixed_point(strings_column_view const& input, data_type output_type, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { CUDF_FUNC_RANGE(); @@ -226,7 +226,7 @@ struct from_fixed_point_fn { struct dispatch_from_fixed_point_fn { template std::unique_ptr operator()(column_view const& input, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) const requires(cudf::is_fixed_point()) { @@ -246,7 +246,7 @@ struct dispatch_from_fixed_point_fn { template std::unique_ptr operator()(column_view const&, - rmm::cuda_stream_view, + cuda::stream_ref, rmm::device_async_resource_ref) const requires(not cudf::is_fixed_point()) { @@ -257,7 +257,7 @@ struct dispatch_from_fixed_point_fn { } // namespace std::unique_ptr from_fixed_point(column_view const& input, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { if (input.is_empty()) return make_empty_column(type_id::STRING); @@ -269,7 +269,7 @@ std::unique_ptr from_fixed_point(column_view const& input, // external API std::unique_ptr from_fixed_point(column_view const& input, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { CUDF_FUNC_RANGE(); @@ -283,7 +283,7 @@ struct dispatch_is_fixed_point_fn { template std::unique_ptr operator()(strings_column_view const& input, data_type decimal_type, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) const requires(cudf::is_fixed_point()) { @@ -313,7 +313,7 @@ struct dispatch_is_fixed_point_fn { template std::unique_ptr operator()(strings_column_view const&, data_type, - rmm::cuda_stream_view, + cuda::stream_ref, rmm::device_async_resource_ref) const requires(not cudf::is_fixed_point()) { @@ -325,7 +325,7 @@ struct dispatch_is_fixed_point_fn { std::unique_ptr is_fixed_point(strings_column_view const& input, data_type decimal_type, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { if (input.is_empty()) return cudf::make_empty_column(type_id::BOOL8); @@ -336,7 +336,7 @@ std::unique_ptr is_fixed_point(strings_column_view const& input, std::unique_ptr is_fixed_point(strings_column_view const& input, data_type decimal_type, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { CUDF_FUNC_RANGE(); diff --git a/cpp/src/strings/convert/convert_floats.cu b/cpp/src/strings/convert/convert_floats.cu index 75cbec529df3..c3a99809d092 100644 --- a/cpp/src/strings/convert/convert_floats.cu +++ b/cpp/src/strings/convert/convert_floats.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 */ @@ -18,10 +18,10 @@ #include #include -#include #include #include +#include #include #include @@ -59,7 +59,7 @@ struct dispatch_to_floats_fn { template void operator()(column_device_view const& strings_column, mutable_column_view& output_column, - rmm::cuda_stream_view stream) const + cuda::stream_ref stream) const requires(std::is_floating_point_v) { auto d_results = output_column.data(); @@ -71,7 +71,7 @@ struct dispatch_to_floats_fn { } // non-integral types throw an exception template - void operator()(column_device_view const&, mutable_column_view&, rmm::cuda_stream_view) const + void operator()(column_device_view const&, mutable_column_view&, cuda::stream_ref) const requires(not std::is_floating_point_v) { CUDF_FAIL("Output for to_floats must be a float type."); @@ -83,7 +83,7 @@ struct dispatch_to_floats_fn { // This will convert a strings column into any float column type. std::unique_ptr to_floats(strings_column_view const& input, data_type output_type, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { size_type strings_count = input.size(); @@ -113,7 +113,7 @@ std::unique_ptr to_floats(strings_column_view const& input, std::unique_ptr to_floats(strings_column_view const& input, data_type output_type, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { CUDF_FUNC_RANGE(); @@ -385,7 +385,7 @@ struct from_floats_fn { struct dispatch_from_floats_fn { template std::unique_ptr operator()(column_view const& floats, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) const requires(std::is_floating_point_v) { @@ -409,7 +409,7 @@ struct dispatch_from_floats_fn { // non-float types throw an exception template std::unique_ptr operator()(column_view const&, - rmm::cuda_stream_view, + cuda::stream_ref, rmm::device_async_resource_ref) const requires(not std::is_floating_point_v) { @@ -421,7 +421,7 @@ struct dispatch_from_floats_fn { // This will convert all float column types into a strings column. std::unique_ptr from_floats(column_view const& floats, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { size_type strings_count = floats.size(); @@ -434,7 +434,7 @@ std::unique_ptr from_floats(column_view const& floats, // external API std::unique_ptr from_floats(column_view const& floats, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { CUDF_FUNC_RANGE(); @@ -443,7 +443,7 @@ std::unique_ptr from_floats(column_view const& floats, namespace detail { std::unique_ptr is_float(strings_column_view const& input, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { auto strings_column = column_device_view::create(input.parent(), stream); @@ -473,7 +473,7 @@ std::unique_ptr is_float(strings_column_view const& input, // external API std::unique_ptr is_float(strings_column_view const& input, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { CUDF_FUNC_RANGE(); diff --git a/cpp/src/strings/convert/convert_hex.cu b/cpp/src/strings/convert/convert_hex.cu index 6ecaf95c6852..e030359ad9bb 100644 --- a/cpp/src/strings/convert/convert_hex.cu +++ b/cpp/src/strings/convert/convert_hex.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 */ @@ -17,11 +17,11 @@ #include #include -#include #include #include #include +#include #include #include #include @@ -86,7 +86,7 @@ struct dispatch_hex_to_integers_fn { template void operator()(column_device_view const& strings_column, mutable_column_view& output_column, - rmm::cuda_stream_view stream) const + cuda::stream_ref stream) const requires(cudf::is_integral_not_bool()) { auto d_results = output_column.data(); @@ -166,7 +166,7 @@ struct integer_to_hex_fn { struct dispatch_integers_to_hex_fn { template std::unique_ptr operator()(column_view const& input, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) const requires(cudf::is_integral_not_bool()) { @@ -195,7 +195,7 @@ struct dispatch_integers_to_hex_fn { // This will convert a strings column into any integer column type. std::unique_ptr hex_to_integers(strings_column_view const& strings, data_type output_type, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { size_type strings_count = strings.size(); @@ -217,7 +217,7 @@ std::unique_ptr hex_to_integers(strings_column_view const& strings, } std::unique_ptr is_hex(strings_column_view const& strings, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { auto strings_column = column_device_view::create(strings.parent(), stream); @@ -255,7 +255,7 @@ std::unique_ptr is_hex(strings_column_view const& strings, } std::unique_ptr integers_to_hex(column_view const& input, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { if (input.is_empty()) { return cudf::make_empty_column(type_id::STRING); } @@ -267,7 +267,7 @@ std::unique_ptr integers_to_hex(column_view const& input, // external API std::unique_ptr hex_to_integers(strings_column_view const& strings, data_type output_type, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { CUDF_FUNC_RANGE(); @@ -275,7 +275,7 @@ std::unique_ptr hex_to_integers(strings_column_view const& strings, } std::unique_ptr is_hex(strings_column_view const& strings, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { CUDF_FUNC_RANGE(); @@ -283,7 +283,7 @@ std::unique_ptr is_hex(strings_column_view const& strings, } std::unique_ptr integers_to_hex(column_view const& input, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { CUDF_FUNC_RANGE(); diff --git a/cpp/src/strings/convert/convert_integers.cu b/cpp/src/strings/convert/convert_integers.cu index 1bf5908d83ea..78fc1505e8de 100644 --- a/cpp/src/strings/convert/convert_integers.cu +++ b/cpp/src/strings/convert/convert_integers.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 */ @@ -19,13 +19,13 @@ #include #include -#include #include #include #include #include #include +#include #include #include #include @@ -103,7 +103,7 @@ inline __device__ bool is_integer(string_view const& d_str) struct dispatch_is_integer_fn { template std::unique_ptr operator()(strings_column_view const& input, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) const requires(cudf::is_integral_not_bool()) { @@ -138,7 +138,7 @@ struct dispatch_is_integer_fn { template std::unique_ptr operator()(strings_column_view const&, - rmm::cuda_stream_view, + cuda::stream_ref, rmm::device_async_resource_ref) const requires(not cudf::is_integral_not_bool()) { @@ -149,7 +149,7 @@ struct dispatch_is_integer_fn { } // namespace std::unique_ptr is_integer(strings_column_view const& input, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { auto const d_column = column_device_view::create(input.parent(), stream); @@ -184,7 +184,7 @@ std::unique_ptr is_integer(strings_column_view const& input, std::unique_ptr is_integer(strings_column_view const& input, data_type int_type, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { if (input.is_empty()) { return cudf::make_empty_column(type_id::BOOL8); } @@ -195,7 +195,7 @@ std::unique_ptr is_integer(strings_column_view const& input, // external APIs std::unique_ptr is_integer(strings_column_view const& input, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { CUDF_FUNC_RANGE(); @@ -204,7 +204,7 @@ std::unique_ptr is_integer(strings_column_view const& input, std::unique_ptr is_integer(strings_column_view const& input, data_type int_type, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { CUDF_FUNC_RANGE(); @@ -240,7 +240,7 @@ struct dispatch_to_integers_fn { template void operator()(column_device_view const& strings_column, mutable_column_view& output_column, - rmm::cuda_stream_view stream) const + cuda::stream_ref stream) const requires(cudf::is_integral_not_bool()) { thrust::transform(rmm::exec_policy_nosync(stream, cudf::get_current_device_resource_ref()), @@ -251,7 +251,7 @@ struct dispatch_to_integers_fn { } // non-integer types throw an exception template - void operator()(column_device_view const&, mutable_column_view&, rmm::cuda_stream_view) const + void operator()(column_device_view const&, mutable_column_view&, cuda::stream_ref) const requires(not cudf::is_integral_not_bool()) { CUDF_FAIL("Output for to_integers must be an integer type."); @@ -263,7 +263,7 @@ struct dispatch_to_integers_fn { // This will convert a strings column into any integer column type. std::unique_ptr to_integers(strings_column_view const& input, data_type output_type, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { size_type strings_count = input.size(); @@ -294,7 +294,7 @@ std::unique_ptr to_integers(strings_column_view const& input, // external API std::unique_ptr to_integers(strings_column_view const& input, data_type output_type, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { CUDF_FUNC_RANGE(); @@ -345,7 +345,7 @@ struct from_integers_fn { struct dispatch_from_integers_fn { template std::unique_ptr operator()(column_view const& integers, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) const requires(cudf::is_integral_not_bool()) { @@ -369,7 +369,7 @@ struct dispatch_from_integers_fn { // non-integer types throw an exception template std::unique_ptr operator()(column_view const&, - rmm::cuda_stream_view, + cuda::stream_ref, rmm::device_async_resource_ref) const requires(not cudf::is_integral_not_bool()) { @@ -380,7 +380,7 @@ struct dispatch_from_integers_fn { // This will convert all integer column types into a strings column. std::unique_ptr from_integers(column_view const& integers, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { size_type strings_count = integers.size(); @@ -393,7 +393,7 @@ std::unique_ptr from_integers(column_view const& integers, // external API std::unique_ptr from_integers(column_view const& integers, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { CUDF_FUNC_RANGE(); diff --git a/cpp/src/strings/convert/convert_ipv4.cu b/cpp/src/strings/convert/convert_ipv4.cu index da31b931181a..3f7f6bcad4ce 100644 --- a/cpp/src/strings/convert/convert_ipv4.cu +++ b/cpp/src/strings/convert/convert_ipv4.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 */ @@ -15,9 +15,8 @@ #include #include -#include - #include +#include #include namespace cudf { @@ -63,7 +62,7 @@ struct ipv4_to_integers_fn { // Convert strings column of IPv4 addresses to integers column std::unique_ptr ipv4_to_integers(strings_column_view const& input, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { size_type strings_count = input.size(); @@ -95,7 +94,7 @@ std::unique_ptr ipv4_to_integers(strings_column_view const& input, // external API std::unique_ptr ipv4_to_integers(strings_column_view const& input, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { CUDF_FUNC_RANGE(); @@ -149,7 +148,7 @@ struct integers_to_ipv4_fn { // Convert integers into IPv4 addresses std::unique_ptr integers_to_ipv4(column_view const& integers, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { if (integers.is_empty()) return make_empty_column(type_id::STRING); @@ -168,7 +167,7 @@ std::unique_ptr integers_to_ipv4(column_view const& integers, } std::unique_ptr is_ipv4(strings_column_view const& input, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { auto strings_column = column_device_view::create(input.parent(), stream); @@ -217,7 +216,7 @@ std::unique_ptr is_ipv4(strings_column_view const& input, // external API std::unique_ptr integers_to_ipv4(column_view const& integers, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { CUDF_FUNC_RANGE(); @@ -225,7 +224,7 @@ std::unique_ptr integers_to_ipv4(column_view const& integers, } std::unique_ptr is_ipv4(strings_column_view const& input, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { CUDF_FUNC_RANGE(); diff --git a/cpp/src/strings/convert/convert_lists.cu b/cpp/src/strings/convert/convert_lists.cu index ec3cfe23faa5..ad4f227e0b6f 100644 --- a/cpp/src/strings/convert/convert_lists.cu +++ b/cpp/src/strings/convert/convert_lists.cu @@ -12,7 +12,7 @@ #include #include -#include +#include namespace cudf { namespace strings { @@ -183,7 +183,7 @@ struct format_lists_fn { std::unique_ptr format_list_column(lists_column_view const& input, string_scalar const& na_rep, strings_column_view const& separators, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { if (input.is_empty()) return make_empty_column(data_type{type_id::STRING}); @@ -224,7 +224,7 @@ std::unique_ptr format_list_column(lists_column_view const& input, std::unique_ptr format_list_column(lists_column_view const& input, string_scalar const& na_rep, strings_column_view const& separators, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { CUDF_FUNC_RANGE(); diff --git a/cpp/src/strings/convert/convert_urls.cu b/cpp/src/strings/convert/convert_urls.cu index 5c962b433371..fbee11358fba 100644 --- a/cpp/src/strings/convert/convert_urls.cu +++ b/cpp/src/strings/convert/convert_urls.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 */ @@ -20,7 +20,6 @@ #include #include -#include #include #include @@ -28,6 +27,7 @@ #include #include #include +#include namespace cudf { namespace strings { @@ -120,7 +120,7 @@ struct url_encoder_fn { // std::unique_ptr url_encode(strings_column_view const& input, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { if (input.is_empty()) return make_empty_column(type_id::STRING); @@ -141,7 +141,7 @@ std::unique_ptr url_encode(strings_column_view const& input, // external API std::unique_ptr url_encode(strings_column_view const& input, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { CUDF_FUNC_RANGE(); @@ -374,7 +374,7 @@ CUDF_KERNEL void url_decode_char_replacer(column_device_view const in_strings, // std::unique_ptr url_decode(strings_column_view const& strings, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { size_type strings_count = strings.size(); @@ -391,7 +391,7 @@ std::unique_ptr url_decode(strings_column_view const& strings, // build offsets column by computing the output row sizes and scanning the results auto row_sizes = rmm::device_uvector(strings_count, stream); url_decode_char_counter - <<>>(*d_strings, row_sizes.data()); + <<>>(*d_strings, row_sizes.data()); CUDF_CUDA_TRY(cudaGetLastError()); // performs scan on the sizes and builds the appropriate offsets column auto [offsets_column, out_chars_bytes] = cudf::strings::detail::make_offsets_child_column( @@ -405,7 +405,7 @@ std::unique_ptr url_decode(strings_column_view const& strings, // decode and copy the characters from the input column to the output column url_decode_char_replacer - <<>>(*d_strings, d_out_chars, offsets); + <<>>(*d_strings, d_out_chars, offsets); CUDF_CUDA_TRY(cudaGetLastError()); // copy null mask @@ -423,7 +423,7 @@ std::unique_ptr url_decode(strings_column_view const& strings, // external API std::unique_ptr url_decode(strings_column_view const& input, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { CUDF_FUNC_RANGE(); diff --git a/cpp/src/strings/convert/int_cast.cu b/cpp/src/strings/convert/int_cast.cu index 4881f5f68b0b..e4536166fb2b 100644 --- a/cpp/src/strings/convert/int_cast.cu +++ b/cpp/src/strings/convert/int_cast.cu @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: Copyright (c) 2025-2026, NVIDIA CORPORATION. + * SPDX-FileCopyrightText: Copyright (c) 2025-2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved. * SPDX-License-Identifier: Apache-2.0 */ @@ -16,13 +16,13 @@ #include #include -#include #include #include #include #include #include +#include #include #include @@ -78,7 +78,7 @@ struct cast_to_integer_fn { std::unique_ptr cast_to_integer(strings_column_view const& input, data_type output_type, endian swap, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { CUDF_EXPECTS(cudf::is_integral_not_bool(output_type), @@ -109,7 +109,7 @@ std::unique_ptr cast_to_integer(strings_column_view const& input, std::unique_ptr cast_to_integer(strings_column_view const& input, data_type output_type, endian swap, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { CUDF_FUNC_RANGE(); @@ -172,7 +172,7 @@ struct from_integers_fn { // Convert boolean column to strings column std::unique_ptr cast_from_integer(column_view const& integers, endian swap, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { CUDF_EXPECTS(cudf::is_integral_not_bool(integers.type()), @@ -198,7 +198,7 @@ std::unique_ptr cast_from_integer(column_view const& integers, std::unique_ptr cast_from_integer(column_view const& integers, endian swap, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { CUDF_FUNC_RANGE(); @@ -208,7 +208,7 @@ std::unique_ptr cast_from_integer(column_view const& integers, namespace detail { std::optional integer_cast_type(strings_column_view const& input, - rmm::cuda_stream_view stream) + cuda::stream_ref stream) { if (input.size() == 0) { return std::nullopt; } auto d_strings = column_device_view::create(input.parent(), stream); @@ -243,7 +243,7 @@ std::optional integer_cast_type(strings_column_view const& inpu } // namespace detail std::optional integer_cast_type(strings_column_view const& input, - rmm::cuda_stream_view stream) + cuda::stream_ref stream) { CUDF_FUNC_RANGE(); return detail::integer_cast_type(input, stream); diff --git a/cpp/src/strings/copying/concatenate.cu b/cpp/src/strings/copying/concatenate.cu index bfde1f742698..4dc9a8a572fc 100644 --- a/cpp/src/strings/copying/concatenate.cu +++ b/cpp/src/strings/copying/concatenate.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 */ @@ -20,10 +20,10 @@ #include #include -#include #include #include +#include #include #include #include @@ -62,7 +62,7 @@ struct chars_size_transform { } }; -auto create_strings_device_views(host_span views, rmm::cuda_stream_view stream) +auto create_strings_device_views(host_span views, cuda::stream_ref stream) { CUDF_FUNC_RANGE(); // Assemble contiguous array of device views @@ -95,7 +95,7 @@ auto create_strings_device_views(host_span views, rmm::cuda_s chars_size_transform{}, cuda::std::plus{}); auto const output_chars_size = d_partition_offsets.back_element(stream); - stream.synchronize(); // ensure copy of output_chars_size is complete before returning + stream.wait(); // ensure copy of output_chars_size is complete before returning return std::make_tuple(std::move(device_view_owners), device_views_ptr, @@ -196,7 +196,7 @@ CUDF_KERNEL void fused_concatenate_string_chars_kernel(column_device_view const* } std::unique_ptr concatenate(host_span columns, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { CUDF_FUNC_RANGE(); @@ -242,7 +242,7 @@ std::unique_ptr concatenate(host_span columns, cudf::detail::grid_1d config(offsets_count, block_size); auto const kernel = has_nulls ? fused_concatenate_string_offset_kernel : fused_concatenate_string_offset_kernel; - kernel<<>>( + kernel<<>>( d_views, d_input_offsets.data(), d_partition_offsets.data(), @@ -264,11 +264,11 @@ std::unique_ptr concatenate(host_span columns, // cudf::detail::grid_1d limited to size_type elements auto const num_blocks = util::div_rounding_up_safe(total_bytes, block_size); auto const kernel = fused_concatenate_string_chars_kernel; - kernel<<>>(d_views, - d_partition_offsets.data(), - static_cast(columns.size()), - total_bytes, - d_new_chars); + kernel<<>>(d_views, + d_partition_offsets.data(), + static_cast(columns.size()), + total_bytes, + d_new_chars); CUDF_CUDA_TRY(cudaGetLastError()); } else { // Memcpy each input chars column (more efficient for very large strings) diff --git a/cpp/src/strings/copying/copy_range.cu b/cpp/src/strings/copying/copy_range.cu index 95c69aadce34..a44adfa0902c 100644 --- a/cpp/src/strings/copying/copy_range.cu +++ b/cpp/src/strings/copying/copy_range.cu @@ -13,10 +13,10 @@ #include #include -#include #include #include +#include #include namespace cudf { @@ -48,7 +48,7 @@ std::unique_ptr copy_range(strings_column_view const& source, size_type source_begin, size_type source_end, size_type target_begin, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { auto target_end = target_begin + (source_end - source_begin); diff --git a/cpp/src/strings/copying/copying.cu b/cpp/src/strings/copying/copying.cu index 97677c3bb4b1..662fe4f425b5 100644 --- a/cpp/src/strings/copying/copying.cu +++ b/cpp/src/strings/copying/copying.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 */ @@ -12,11 +12,11 @@ #include #include -#include #include #include #include +#include #include namespace cudf { @@ -26,7 +26,7 @@ namespace detail { std::unique_ptr copy_slice(strings_column_view const& input, size_type start, size_type end, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { if (input.is_empty()) { return make_empty_column(type_id::STRING); } diff --git a/cpp/src/strings/copying/shift.cu b/cpp/src/strings/copying/shift.cu index 3676010d09ae..94a301adaf40 100644 --- a/cpp/src/strings/copying/shift.cu +++ b/cpp/src/strings/copying/shift.cu @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: Copyright (c) 2021-2026, NVIDIA CORPORATION. + * SPDX-FileCopyrightText: Copyright (c) 2021-2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved. * SPDX-License-Identifier: Apache-2.0 */ @@ -13,10 +13,10 @@ #include #include -#include #include #include +#include #include namespace cudf::strings::detail { @@ -81,7 +81,7 @@ struct shift_chars_fn { std::unique_ptr shift(strings_column_view const& input, size_type offset, scalar const& fill_value, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { auto d_fill_str = static_cast(fill_value).value(stream); diff --git a/cpp/src/strings/count_matches.cu b/cpp/src/strings/count_matches.cu index 6e5e8dda1779..ab9d1d1dda78 100644 --- a/cpp/src/strings/count_matches.cu +++ b/cpp/src/strings/count_matches.cu @@ -56,7 +56,7 @@ template std::unique_ptr count_matches(column_device_view const& d_strings, ProgDevice& d_prog, size_type strings_count, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { auto results = make_numeric_column( @@ -87,18 +87,18 @@ std::unique_ptr count_matches(column_device_view const& d_strings, template std::unique_ptr count_matches(column_device_view const&, reprog_device&, size_type, - rmm::cuda_stream_view, + cuda::stream_ref, rmm::device_async_resource_ref); template std::unique_ptr count_matches(column_device_view const&, gkprog_device&, size_type, - rmm::cuda_stream_view, + cuda::stream_ref, rmm::device_async_resource_ref); std::unique_ptr count_matches(column_device_view const& d_strings, regex_program const& prog, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { auto const strings_count = d_strings.size(); diff --git a/cpp/src/strings/count_matches.hpp b/cpp/src/strings/count_matches.hpp index 8f445836020d..d4b7efdf077b 100644 --- a/cpp/src/strings/count_matches.hpp +++ b/cpp/src/strings/count_matches.hpp @@ -8,7 +8,7 @@ #include #include -#include +#include namespace cudf { @@ -41,7 +41,7 @@ template std::unique_ptr count_matches(column_device_view const& d_strings, ProgDevice& d_prog, size_type strings_count, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr); /** @@ -60,7 +60,7 @@ std::unique_ptr count_matches(column_device_view const& d_strings, */ std::unique_ptr count_matches(column_device_view const& d_strings, regex_program const& prog, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr); } // namespace detail diff --git a/cpp/src/strings/extract/extract.cu b/cpp/src/strings/extract/extract.cu index d68c2a01a66e..a79e1612b25a 100644 --- a/cpp/src/strings/extract/extract.cu +++ b/cpp/src/strings/extract/extract.cu @@ -18,10 +18,9 @@ #include #include -#include - #include #include +#include #include #include @@ -75,7 +74,7 @@ struct extract_fn { // std::unique_ptr
extract(strings_column_view const& input, regex_program const& prog, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { // create device object from regex_program @@ -145,7 +144,7 @@ struct extract_single_fn { std::unique_ptr extract_single(strings_column_view const& input, regex_program const& prog, size_type group, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { if (input.is_empty()) { return make_empty_column(type_id::STRING); } @@ -175,7 +174,7 @@ std::unique_ptr extract_single(strings_column_view const& input, std::unique_ptr
extract(strings_column_view const& input, regex_program const& prog, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { CUDF_FUNC_RANGE(); @@ -185,7 +184,7 @@ std::unique_ptr
extract(strings_column_view const& input, std::unique_ptr extract_single(strings_column_view const& input, regex_program const& prog, size_type group, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { CUDF_FUNC_RANGE(); diff --git a/cpp/src/strings/extract/extract_all.cu b/cpp/src/strings/extract/extract_all.cu index bd641badfa59..45d05999fac7 100644 --- a/cpp/src/strings/extract/extract_all.cu +++ b/cpp/src/strings/extract/extract_all.cu @@ -18,10 +18,10 @@ #include #include -#include #include #include +#include #include namespace cudf { @@ -93,7 +93,7 @@ struct extract_fn { */ std::unique_ptr extract_all_record(strings_column_view const& input, regex_program const& prog, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { auto const strings_count = input.size(); @@ -149,7 +149,7 @@ std::unique_ptr extract_all_record(strings_column_view const& input, std::unique_ptr extract_all_record(strings_column_view const& input, regex_program const& prog, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { CUDF_FUNC_RANGE(); diff --git a/cpp/src/strings/filling/fill.cu b/cpp/src/strings/filling/fill.cu index f3e0dda4d76b..d0b7ddd3a673 100644 --- a/cpp/src/strings/filling/fill.cu +++ b/cpp/src/strings/filling/fill.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 */ @@ -11,9 +11,8 @@ #include #include -#include - #include +#include #include namespace cudf { @@ -48,7 +47,7 @@ std::unique_ptr fill(strings_column_view const& input, size_type begin, size_type end, string_scalar const& value, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { auto const strings_count = input.size(); diff --git a/cpp/src/strings/filter_chars.cu b/cpp/src/strings/filter_chars.cu index 3ccf495d3d5a..872235fdf0f6 100644 --- a/cpp/src/strings/filter_chars.cu +++ b/cpp/src/strings/filter_chars.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,10 +19,10 @@ #include #include -#include #include #include +#include #include #include #include @@ -108,7 +108,7 @@ std::unique_ptr filter_characters( std::vector> characters_to_filter, filter_type keep_characters, string_scalar const& replacement, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { size_type strings_count = strings.size(); @@ -149,7 +149,7 @@ std::unique_ptr filter_characters( std::vector> characters_to_filter, filter_type keep_characters, string_scalar const& replacement, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { CUDF_FUNC_RANGE(); diff --git a/cpp/src/strings/like.cu b/cpp/src/strings/like.cu index 3f7823950c1f..5ea9244696de 100644 --- a/cpp/src/strings/like.cu +++ b/cpp/src/strings/like.cu @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: Copyright (c) 2022-2026, NVIDIA CORPORATION. + * SPDX-FileCopyrightText: Copyright (c) 2022-2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved. * SPDX-License-Identifier: Apache-2.0 */ @@ -17,12 +17,12 @@ #include #include -#include #include #include #include #include +#include #include #include #include @@ -305,7 +305,7 @@ template std::unique_ptr like(strings_column_view const& input, PatternIterator const patterns_itr, string_view const& d_escape, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { auto results = make_numeric_column(data_type{type_id::BOOL8}, @@ -333,7 +333,7 @@ std::unique_ptr like(strings_column_view const& input, constexpr thread_index_type block_size = 512; constexpr thread_index_type warp_size = cudf::detail::warp_size; auto const grid = cudf::detail::grid_1d(input.size() * warp_size, block_size); - like_kernel<<>>( + like_kernel<<>>( *d_strings, patterns_itr, d_escape, results->mutable_view().data()); CUDF_CUDA_TRY(cudaGetLastError()); } @@ -347,7 +347,7 @@ std::unique_ptr like(strings_column_view const& input, std::unique_ptr like(strings_column_view const& input, string_scalar const& pattern, string_scalar const& escape_character, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { CUDF_EXPECTS(pattern.is_valid(stream), "Parameter pattern must be valid", std::invalid_argument); @@ -368,7 +368,7 @@ std::unique_ptr like(strings_column_view const& input, std::unique_ptr like(strings_column_view const& input, std::string_view const& pattern, std::string_view const& escape_character, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { auto const ptn = string_scalar(pattern, true, stream, cudf::get_current_device_resource_ref()); @@ -380,7 +380,7 @@ std::unique_ptr like(strings_column_view const& input, std::unique_ptr like(strings_column_view const& input, strings_column_view const& patterns, string_scalar const& escape_character, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { CUDF_EXPECTS(patterns.size() == input.size(), @@ -410,7 +410,7 @@ std::unique_ptr like(strings_column_view const& input, std::unique_ptr like(strings_column_view const& input, std::string_view const& pattern, std::string_view const& escape_character, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { CUDF_FUNC_RANGE(); @@ -420,7 +420,7 @@ std::unique_ptr like(strings_column_view const& input, std::unique_ptr like(strings_column_view const& input, strings_column_view const& patterns, string_scalar const& escape_character, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { CUDF_FUNC_RANGE(); diff --git a/cpp/src/strings/merge/merge.cu b/cpp/src/strings/merge/merge.cu index f7357316cb0f..7ac934eb6c94 100644 --- a/cpp/src/strings/merge/merge.cu +++ b/cpp/src/strings/merge/merge.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 */ @@ -10,10 +10,10 @@ #include #include -#include #include #include +#include #include namespace cudf { @@ -22,7 +22,7 @@ namespace detail { std::unique_ptr merge(strings_column_view const& lhs, strings_column_view const& rhs, cudf::detail::index_vector const& row_order, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { using cudf::detail::side; diff --git a/cpp/src/strings/padding.cu b/cpp/src/strings/padding.cu index c860b0055641..9a8ce1d216b2 100644 --- a/cpp/src/strings/padding.cu +++ b/cpp/src/strings/padding.cu @@ -16,9 +16,8 @@ #include #include -#include - #include +#include namespace cudf { namespace strings { @@ -96,7 +95,7 @@ std::unique_ptr pad(strings_column_view const& input, size_type width, side_type side, std::string_view fill_char, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { if (input.is_empty()) return make_empty_column(type_id::STRING); @@ -178,7 +177,7 @@ struct zfill_fn { std::unique_ptr zfill(strings_column_view const& input, size_type width, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { if (input.is_empty()) return make_empty_column(type_id::STRING); @@ -196,7 +195,7 @@ std::unique_ptr zfill(strings_column_view const& input, std::unique_ptr zfill_by_widths(strings_column_view const& input, column_view const& widths, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { if (input.is_empty()) { return make_empty_column(type_id::STRING); } @@ -225,7 +224,7 @@ std::unique_ptr pad(strings_column_view const& input, size_type width, side_type side, std::string_view fill_char, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { CUDF_FUNC_RANGE(); @@ -234,7 +233,7 @@ std::unique_ptr pad(strings_column_view const& input, std::unique_ptr zfill(strings_column_view const& input, size_type width, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { CUDF_FUNC_RANGE(); @@ -243,7 +242,7 @@ std::unique_ptr zfill(strings_column_view const& input, std::unique_ptr zfill_by_widths(strings_column_view const& input, column_view const& widths, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { CUDF_FUNC_RANGE(); diff --git a/cpp/src/strings/positions.cu b/cpp/src/strings/positions.cu index dd53d60bdc45..c25380865835 100644 --- a/cpp/src/strings/positions.cu +++ b/cpp/src/strings/positions.cu @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: Copyright (c) 2025-2026, NVIDIA CORPORATION. + * SPDX-FileCopyrightText: Copyright (c) 2025-2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved. * SPDX-License-Identifier: Apache-2.0 */ @@ -10,11 +10,11 @@ #include #include -#include #include #include #include +#include #include #include #include @@ -23,7 +23,7 @@ namespace cudf::strings::detail { std::unique_ptr create_offsets_from_positions(strings_column_view const& input, device_span const& positions, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { auto const d_offsets = diff --git a/cpp/src/strings/positions.hpp b/cpp/src/strings/positions.hpp index 126b7b63df3e..2f214c438aad 100644 --- a/cpp/src/strings/positions.hpp +++ b/cpp/src/strings/positions.hpp @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: Copyright (c) 2025, NVIDIA CORPORATION. + * SPDX-FileCopyrightText: Copyright (c) 2025-2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved. * SPDX-License-Identifier: Apache-2.0 */ @@ -9,7 +9,7 @@ #include #include -#include +#include namespace cudf::strings::detail { @@ -27,7 +27,7 @@ namespace cudf::strings::detail { */ std::unique_ptr create_offsets_from_positions(strings_column_view const& input, device_span const& positions, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr); } // namespace cudf::strings::detail diff --git a/cpp/src/strings/regex/gkexec.cpp b/cpp/src/strings/regex/gkexec.cpp index 47ac896f8e17..8c6a143d6467 100644 --- a/cpp/src/strings/regex/gkexec.cpp +++ b/cpp/src/strings/regex/gkexec.cpp @@ -12,9 +12,10 @@ #include #include -#include #include +#include + #include #include #include @@ -37,7 +38,7 @@ namespace detail { * [_classes : classes_count × reclass_device + variable-length literals] */ std::unique_ptr> gkprog_device::create( - gkprog const& h_gp, rmm::cuda_stream_view stream) + gkprog const& h_gp, cuda::stream_ref stream) { auto const num_states = h_gp.num_states; auto const classes_cnt = static_cast(h_gp.classes.size()); @@ -146,7 +147,7 @@ std::unique_ptr> gkprog_devic delete d_buffer; }; - stream.synchronize(); // wait for h_buffer to finish copying + stream.wait(); // wait for h_buffer to finish copying auto result = std::unique_ptr>(d_prog.get(), deleter); diff --git a/cpp/src/strings/regex/glushkov.cuh b/cpp/src/strings/regex/glushkov.cuh index 458a8917bf0a..82ced8f8172c 100644 --- a/cpp/src/strings/regex/glushkov.cuh +++ b/cpp/src/strings/regex/glushkov.cuh @@ -8,11 +8,10 @@ #include -#include - #include #include #include +#include #include #include @@ -67,7 +66,7 @@ struct gkprog_device { gkprog_device& operator=(gkprog_device&&) = default; static std::unique_ptr> create( - gkprog const& prog, rmm::cuda_stream_view stream); + gkprog const& prog, cuda::stream_ref stream); /** * @brief Called automatically by the unique_ptr returned from create(). diff --git a/cpp/src/strings/regex/regex.cuh b/cpp/src/strings/regex/regex.cuh index d5216200a41b..cebc37b9a915 100644 --- a/cpp/src/strings/regex/regex.cuh +++ b/cpp/src/strings/regex/regex.cuh @@ -11,8 +11,7 @@ #include #include -#include - +#include #include #include @@ -60,7 +59,7 @@ class alignas(16) reprog_device { * @return The program device object */ static std::unique_ptr> create( - reprog const& prog, rmm::cuda_stream_view stream); + reprog const& prog, cuda::stream_ref stream); /** * @brief Called automatically by the unique_ptr returned from create(). diff --git a/cpp/src/strings/regex/regex_program_impl.h b/cpp/src/strings/regex/regex_program_impl.h index e3891d0bade1..40f2808787be 100644 --- a/cpp/src/strings/regex/regex_program_impl.h +++ b/cpp/src/strings/regex/regex_program_impl.h @@ -12,7 +12,7 @@ #include #include -#include +#include #include @@ -41,12 +41,12 @@ struct regex_device_builder { return p._impl->glushkov_prog.get() != nullptr; } - static auto create_prog_device(regex_program const& p, rmm::cuda_stream_view stream) + static auto create_prog_device(regex_program const& p, cuda::stream_ref stream) { return detail::reprog_device::create(p._impl->prog, stream); } - static auto create_gkprog_device(regex_program const& p, rmm::cuda_stream_view stream) + static auto create_gkprog_device(regex_program const& p, cuda::stream_ref stream) { CUDF_EXPECTS(glushkov_fast_path_supported(p), "fast-path not supported"); return detail::gkprog_device::create(*p._impl->glushkov_prog, stream); diff --git a/cpp/src/strings/regex/regexec.cpp b/cpp/src/strings/regex/regexec.cpp index 8c23c15f8679..facfe9d4359c 100644 --- a/cpp/src/strings/regex/regexec.cpp +++ b/cpp/src/strings/regex/regexec.cpp @@ -12,9 +12,10 @@ #include #include -#include #include +#include + #include #include @@ -34,7 +35,7 @@ reprog_device::reprog_device(reprog const& prog) } std::unique_ptr> reprog_device::create( - reprog const& h_prog, rmm::cuda_stream_view stream) + reprog const& h_prog, cuda::stream_ref stream) { // compute size to hold all the member data auto const insts_count = h_prog.insts_count(); @@ -116,7 +117,7 @@ std::unique_ptr> reprog_devic delete d_buffer; }; - stream.synchronize(); // wait for h_buffer to finish copying + stream.wait(); // wait for h_buffer to finish copying return std::unique_ptr>(d_prog, deleter); } diff --git a/cpp/src/strings/regex/utilities.cuh b/cpp/src/strings/regex/utilities.cuh index f9f3280e53a4..dc6118e68129 100644 --- a/cpp/src/strings/regex/utilities.cuh +++ b/cpp/src/strings/regex/utilities.cuh @@ -17,9 +17,9 @@ #include #include -#include #include +#include #include #include @@ -51,7 +51,7 @@ template void launch_for_each_kernel(ForEachFunction fn, ProgDevice& d_prog, size_type size, - rmm::cuda_stream_view stream) + cuda::stream_ref stream) { auto [buffer_size, thread_count] = d_prog.compute_strided_working_memory(size); @@ -60,7 +60,7 @@ void launch_for_each_kernel(ForEachFunction fn, auto const shmem_size = d_prog.compute_shared_memory_size(); cudf::detail::grid_1d grid{thread_count, regex_launch_kernel_block_size}; - for_each_kernel<<>>( + for_each_kernel<<>>( fn, d_prog, size); CUDF_CUDA_TRY(cudaGetLastError()); } @@ -90,7 +90,7 @@ void launch_transform_kernel(TransformFunction fn, ProgDevice& d_prog, OutputType* d_output, size_type size, - rmm::cuda_stream_view stream) + cuda::stream_ref stream) { auto [buffer_size, thread_count] = d_prog.compute_strided_working_memory(size); @@ -99,7 +99,7 @@ void launch_transform_kernel(TransformFunction fn, auto const shmem_size = d_prog.compute_shared_memory_size(); cudf::detail::grid_1d grid{thread_count, regex_launch_kernel_block_size}; - transform_kernel<<>>( + transform_kernel<<>>( fn, d_prog, d_output, size); CUDF_CUDA_TRY(cudaGetLastError()); } @@ -108,7 +108,7 @@ template auto make_strings_children(SizeAndExecuteFunction size_and_exec_fn, ProgDevice& d_prog, size_type strings_count, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { auto output_sizes = rmm::device_uvector(strings_count, stream); @@ -123,7 +123,7 @@ auto make_strings_children(SizeAndExecuteFunction size_and_exec_fn, // Compute the output size for each row if (strings_count > 0) { - for_each_kernel<<>>( + for_each_kernel<<>>( size_and_exec_fn, d_prog, strings_count); CUDF_CUDA_TRY(cudaGetLastError()); } @@ -137,7 +137,7 @@ auto make_strings_children(SizeAndExecuteFunction size_and_exec_fn, rmm::device_uvector chars(char_bytes, stream, mr); if (char_bytes > 0) { size_and_exec_fn.d_chars = chars.data(); - for_each_kernel<<>>( + for_each_kernel<<>>( size_and_exec_fn, d_prog, strings_count); CUDF_CUDA_TRY(cudaGetLastError()); } diff --git a/cpp/src/strings/repeat_strings.cu b/cpp/src/strings/repeat_strings.cu index 2faae9ea3b36..a7038c6382b5 100644 --- a/cpp/src/strings/repeat_strings.cu +++ b/cpp/src/strings/repeat_strings.cu @@ -18,10 +18,9 @@ #include #include -#include - #include #include +#include #include #include #include @@ -32,7 +31,7 @@ namespace strings { namespace detail { std::unique_ptr repeat_string(string_scalar const& input, size_type repeat_times, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { if (!input.is_valid(stream)) { return std::make_unique("", false, stream, mr); } @@ -69,7 +68,7 @@ namespace { */ auto generate_empty_output(strings_column_view const& input, size_type strings_count, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { auto offsets_column = make_numeric_column( @@ -77,7 +76,7 @@ auto generate_empty_output(strings_column_view const& input, CUDF_CUDA_TRY(cudaMemsetAsync(offsets_column->mutable_view().template data(), 0, offsets_column->size() * sizeof(int32_t), - stream.value())); + stream.get())); return make_strings_column(strings_count, std::move(offsets_column), @@ -137,7 +136,7 @@ struct compute_size_and_repeat_fn { std::unique_ptr repeat_strings(strings_column_view const& input, size_type repeat_times, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { auto const strings_count = input.size(); @@ -219,7 +218,7 @@ struct compute_sizes_and_repeat_fn { std::unique_ptr repeat_strings(strings_column_view const& input, column_view const& repeat_times, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { CUDF_EXPECTS(input.size() == repeat_times.size(), "The input columns must have the same size."); @@ -255,7 +254,7 @@ std::unique_ptr repeat_strings(strings_column_view const& input, std::unique_ptr repeat_string(string_scalar const& input, size_type repeat_times, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { CUDF_FUNC_RANGE(); @@ -264,7 +263,7 @@ std::unique_ptr repeat_string(string_scalar const& input, std::unique_ptr repeat_strings(strings_column_view const& input, size_type repeat_times, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { CUDF_FUNC_RANGE(); @@ -273,7 +272,7 @@ std::unique_ptr repeat_strings(strings_column_view const& input, std::unique_ptr repeat_strings(strings_column_view const& input, column_view const& repeat_times, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { CUDF_FUNC_RANGE(); diff --git a/cpp/src/strings/replace/backref_re.cu b/cpp/src/strings/replace/backref_re.cu index 3add1e7913c2..1eacb6f026a0 100644 --- a/cpp/src/strings/replace/backref_re.cu +++ b/cpp/src/strings/replace/backref_re.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,7 +19,7 @@ #include #include -#include +#include #include @@ -94,7 +94,7 @@ std::pair> parse_backrefs(std::string_vie std::unique_ptr replace_with_backrefs(strings_column_view const& input, regex_program const& prog, std::string_view replacement, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { if (input.is_empty()) return make_empty_column(type_id::STRING); @@ -138,7 +138,7 @@ std::unique_ptr replace_with_backrefs(strings_column_view const& input, std::unique_ptr replace_with_backrefs(strings_column_view const& strings, regex_program const& prog, std::string_view replacement, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { CUDF_FUNC_RANGE(); diff --git a/cpp/src/strings/replace/backref_re.cuh b/cpp/src/strings/replace/backref_re.cuh index 2d5496bcaa60..6f1236bf97dd 100644 --- a/cpp/src/strings/replace/backref_re.cuh +++ b/cpp/src/strings/replace/backref_re.cuh @@ -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 */ @@ -12,9 +12,8 @@ #include #include -#include - #include +#include #include #include diff --git a/cpp/src/strings/replace/find_replace.cu b/cpp/src/strings/replace/find_replace.cu index f1c8ae48222a..52af5026143f 100644 --- a/cpp/src/strings/replace/find_replace.cu +++ b/cpp/src/strings/replace/find_replace.cu @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: Copyright (c) 2024-2026, NVIDIA CORPORATION. + * SPDX-FileCopyrightText: Copyright (c) 2024-2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved. * SPDX-License-Identifier: Apache-2.0 */ #include @@ -10,9 +10,8 @@ #include #include -#include - #include +#include #include #include @@ -55,7 +54,7 @@ std::unique_ptr find_and_replace_all( cudf::strings_column_view const& input, cudf::strings_column_view const& values_to_replace, cudf::strings_column_view const& replacement_values, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { auto d_input = cudf::column_device_view::create(input.parent(), stream); diff --git a/cpp/src/strings/replace/multi.cu b/cpp/src/strings/replace/multi.cu index 1a7e4d40502b..70a216c2eda3 100644 --- a/cpp/src/strings/replace/multi.cu +++ b/cpp/src/strings/replace/multi.cu @@ -23,7 +23,6 @@ #include #include -#include #include #include @@ -31,6 +30,7 @@ #include #include #include +#include #include #include #include @@ -306,7 +306,7 @@ struct copy_if_fn { std::unique_ptr replace_character_parallel(strings_column_view const& input, strings_column_view const& targets, strings_column_view const& repls, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { auto d_strings = column_device_view::create(input.parent(), stream); @@ -333,7 +333,7 @@ std::unique_ptr replace_character_parallel(strings_column_view const& in cudf::detail::device_scalar d_count(0, stream, cudf::get_current_device_resource_ref()); auto const num_blocks = util::div_rounding_up_safe( util::div_rounding_up_safe(chars_bytes, static_cast(bytes_per_thread)), block_size); - count_targets<<>>(fn, chars_bytes, d_count.data()); + count_targets<<>>(fn, chars_bytes, d_count.data()); CUDF_CUDA_TRY(cudaGetLastError()); auto target_count = d_count.value(stream); // Create a vector of every target position in the chars column. @@ -476,7 +476,7 @@ struct replace_multi_fn { std::unique_ptr replace_string_parallel(strings_column_view const& input, strings_column_view const& targets, strings_column_view const& repls, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { auto d_strings = column_device_view::create(input.parent(), stream); @@ -498,7 +498,7 @@ std::unique_ptr replace_string_parallel(strings_column_view const& input std::unique_ptr replace_multiple(strings_column_view const& input, strings_column_view const& targets, strings_column_view const& repls, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { if (input.is_empty()) { return make_empty_column(type_id::STRING); } @@ -523,7 +523,7 @@ std::unique_ptr replace_multiple(strings_column_view const& input, std::unique_ptr replace_multiple(strings_column_view const& strings, strings_column_view const& targets, strings_column_view const& repls, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { CUDF_FUNC_RANGE(); diff --git a/cpp/src/strings/replace/replace.cu b/cpp/src/strings/replace/replace.cu index ba527f5da742..63289de8cf0d 100644 --- a/cpp/src/strings/replace/replace.cu +++ b/cpp/src/strings/replace/replace.cu @@ -24,7 +24,6 @@ #include #include -#include #include #include @@ -32,6 +31,7 @@ #include #include #include +#include #include #include #include @@ -262,7 +262,7 @@ std::unique_ptr replace_character_parallel(strings_column_view const& in string_view const& d_target, string_view const& d_replacement, cudf::size_type maxrepl, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { auto d_strings = column_device_view::create(input.parent(), stream); @@ -287,7 +287,7 @@ std::unique_ptr replace_character_parallel(strings_column_view const& in auto const num_blocks = util::div_rounding_up_safe( util::div_rounding_up_safe(chars_bytes, static_cast(bytes_per_thread)), block_size); count_targets_kernel - <<>>(fn, chars_bytes, d_target_count.data()); + <<>>(fn, chars_bytes, d_target_count.data()); CUDF_CUDA_TRY(cudaGetLastError()); auto target_count = d_target_count.value(stream); @@ -453,7 +453,7 @@ std::unique_ptr replace_string_parallel(strings_column_view const& input ReplIter repl_iter, cudf::size_type maxrepl, bitmask_type const* d_valid_mask, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { auto d_strings = column_device_view::create(input.parent(), stream); @@ -473,7 +473,7 @@ std::unique_ptr replace(strings_column_view const& input, string_scalar const& target, string_scalar const& repl, cudf::size_type maxrepl, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { if (input.is_empty()) { return make_empty_column(type_id::STRING); } @@ -507,7 +507,7 @@ std::unique_ptr replace(strings_column_view const& input, std::unique_ptr replace(strings_column_view const& input, strings_column_view const& targets, strings_column_view const& repls, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { CUDF_EXPECTS(targets.size() == input.size(), @@ -556,7 +556,7 @@ std::unique_ptr replace(strings_column_view const& strings, string_scalar const& target, string_scalar const& repl, cudf::size_type maxrepl, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { CUDF_FUNC_RANGE(); @@ -566,7 +566,7 @@ std::unique_ptr replace(strings_column_view const& strings, std::unique_ptr replace(strings_column_view const& strings, strings_column_view const& targets, strings_column_view const& repls, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { CUDF_FUNC_RANGE(); diff --git a/cpp/src/strings/replace/replace_nulls.cu b/cpp/src/strings/replace/replace_nulls.cu index b5851463007c..b29507ccd454 100644 --- a/cpp/src/strings/replace/replace_nulls.cu +++ b/cpp/src/strings/replace/replace_nulls.cu @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: Copyright (c) 2024-2026, NVIDIA CORPORATION. + * SPDX-FileCopyrightText: Copyright (c) 2024-2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved. * SPDX-License-Identifier: Apache-2.0 */ @@ -16,11 +16,11 @@ #include #include -#include #include #include #include +#include #include namespace cudf { @@ -29,7 +29,7 @@ namespace detail { std::unique_ptr replace_nulls(strings_column_view const& input, string_scalar const& repl, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { size_type strings_count = input.size(); diff --git a/cpp/src/strings/replace/replace_re.cu b/cpp/src/strings/replace/replace_re.cu index ee3c3b8997f7..320b742d1856 100644 --- a/cpp/src/strings/replace/replace_re.cu +++ b/cpp/src/strings/replace/replace_re.cu @@ -19,7 +19,7 @@ #include #include -#include +#include namespace cudf { namespace strings { @@ -94,7 +94,7 @@ std::unique_ptr replace_re(strings_column_view const& input, regex_program const& prog, string_scalar const& replacement, std::optional max_replace_count, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { if (input.is_empty()) { return make_empty_column(type_id::STRING); } @@ -141,7 +141,7 @@ std::unique_ptr replace_re(strings_column_view const& strings, regex_program const& prog, string_scalar const& replacement, std::optional max_replace_count, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { CUDF_FUNC_RANGE(); diff --git a/cpp/src/strings/replace/replace_slice.cu b/cpp/src/strings/replace/replace_slice.cu index a1012c8ff1db..508a3f56c276 100644 --- a/cpp/src/strings/replace/replace_slice.cu +++ b/cpp/src/strings/replace/replace_slice.cu @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: Copyright (c) 2024, NVIDIA CORPORATION. + * SPDX-FileCopyrightText: Copyright (c) 2024-2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved. * SPDX-License-Identifier: Apache-2.0 */ @@ -16,9 +16,8 @@ #include #include -#include - #include +#include namespace cudf { namespace strings { @@ -70,7 +69,7 @@ std::unique_ptr replace_slice(strings_column_view const& input, string_scalar const& repl, size_type start, size_type stop, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { if (input.is_empty()) { return make_empty_column(type_id::STRING); } @@ -100,7 +99,7 @@ std::unique_ptr replace_slice(strings_column_view const& input, string_scalar const& repl, size_type start, size_type stop, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { CUDF_FUNC_RANGE(); diff --git a/cpp/src/strings/reverse.cu b/cpp/src/strings/reverse.cu index 064e14f9afe9..dd0be2ea81b8 100644 --- a/cpp/src/strings/reverse.cu +++ b/cpp/src/strings/reverse.cu @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: Copyright (c) 2022-2026, NVIDIA CORPORATION. + * SPDX-FileCopyrightText: Copyright (c) 2022-2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved. * SPDX-License-Identifier: Apache-2.0 */ @@ -15,10 +15,10 @@ #include #include -#include #include #include +#include namespace cudf { namespace strings { @@ -49,7 +49,7 @@ struct reverse_characters_fn { } // namespace std::unique_ptr reverse(strings_column_view const& input, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { if (input.is_empty()) { return make_empty_column(type_id::STRING); } @@ -72,7 +72,7 @@ std::unique_ptr reverse(strings_column_view const& input, } // namespace detail std::unique_ptr reverse(strings_column_view const& input, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { CUDF_FUNC_RANGE(); diff --git a/cpp/src/strings/scan/scan_inclusive.cu b/cpp/src/strings/scan/scan_inclusive.cu index ba8191169350..a95b1cf3b95e 100644 --- a/cpp/src/strings/scan/scan_inclusive.cu +++ b/cpp/src/strings/scan/scan_inclusive.cu @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: Copyright (c) 2023-2026, NVIDIA CORPORATION. + * SPDX-FileCopyrightText: Copyright (c) 2023-2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved. * SPDX-License-Identifier: Apache-2.0 */ @@ -11,11 +11,11 @@ #include #include -#include #include #include #include +#include #include #include @@ -71,7 +71,7 @@ struct null_iterator { template std::unique_ptr scan_inclusive(column_view const& input, bitmask_type const* mask, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { auto d_input = column_device_view::create(input, stream); @@ -109,12 +109,12 @@ std::unique_ptr scan_inclusive(column_view const& input, template std::unique_ptr scan_inclusive(column_view const& input, bitmask_type const* mask, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr); template std::unique_ptr scan_inclusive(column_view const& input, bitmask_type const* mask, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr); } // namespace detail diff --git a/cpp/src/strings/search/contains_multiple.cu b/cpp/src/strings/search/contains_multiple.cu index 542aea6b4177..fc2a3461a05e 100644 --- a/cpp/src/strings/search/contains_multiple.cu +++ b/cpp/src/strings/search/contains_multiple.cu @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: Copyright (c) 2024-2026, NVIDIA CORPORATION. + * SPDX-FileCopyrightText: Copyright (c) 2024-2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved. * SPDX-License-Identifier: Apache-2.0 */ #include @@ -18,7 +18,6 @@ #include #include -#include #include #include @@ -26,6 +25,7 @@ #include #include #include +#include #include #include #include @@ -180,7 +180,7 @@ CUDF_KERNEL void multi_contains_kernel(column_device_view const d_strings, std::unique_ptr
contains_multiple(strings_column_view const& input, strings_column_view const& targets, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { CUDF_EXPECTS( @@ -204,7 +204,7 @@ std::unique_ptr
contains_multiple(strings_column_view const& input, auto vals_out = indices.begin(); auto num_items = targets.size(); auto cmp_op = cuda::std::less(); - auto sv = stream.value(); + auto sv = stream.get(); std::size_t tmp_bytes = 0; cub::DeviceMergeSort::SortPairsCopy( @@ -263,14 +263,14 @@ std::unique_ptr
contains_multiple(strings_column_view const& input, // Smaller strings perform better with a row per string cudf::detail::grid_1d grid{static_cast(input.size()), block_size}; multi_contains_kernel<1> - <<>>(*d_strings, - *d_targets, - d_first_bytes, - d_indices, - d_offsets, - unique_count, - nullptr, - d_results); + <<>>(*d_strings, + *d_targets, + d_first_bytes, + d_indices, + d_offsets, + unique_count, + nullptr, + d_results); CUDF_CUDA_TRY(cudaGetLastError()); } else { constexpr cudf::thread_index_type tile_size = cudf::detail::warp_size; @@ -284,7 +284,7 @@ std::unique_ptr
contains_multiple(strings_column_view const& input, cudf::detail::grid_1d grid{static_cast(input.size()) * tile_size, block_size}; multi_contains_kernel - <<>>( + <<>>( *d_strings, *d_targets, d_first_bytes, @@ -303,7 +303,7 @@ std::unique_ptr
contains_multiple(strings_column_view const& input, std::unique_ptr
contains_multiple(strings_column_view const& strings, strings_column_view const& targets, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { CUDF_FUNC_RANGE(); diff --git a/cpp/src/strings/search/count.cu b/cpp/src/strings/search/count.cu index e42f9e383fe0..7b3dc606d8a0 100644 --- a/cpp/src/strings/search/count.cu +++ b/cpp/src/strings/search/count.cu @@ -15,9 +15,9 @@ #include #include -#include #include +#include #include namespace cudf { @@ -54,7 +54,7 @@ struct counter_fn { std::unique_ptr count(strings_column_view const& input, string_scalar const& target, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { CUDF_EXPECTS(target.is_valid(stream), "parameter target must be valid", std::invalid_argument); @@ -86,7 +86,7 @@ std::unique_ptr count(strings_column_view const& input, std::unique_ptr count(strings_column_view const& strings, string_scalar const& target, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { CUDF_FUNC_RANGE(); diff --git a/cpp/src/strings/search/find.cu b/cpp/src/strings/search/find.cu index 265b25321706..f1f08dd86595 100644 --- a/cpp/src/strings/search/find.cu +++ b/cpp/src/strings/search/find.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 */ @@ -19,7 +19,6 @@ #include #include -#include #include #include @@ -28,6 +27,7 @@ #include #include #include +#include #include #include #include @@ -164,7 +164,7 @@ void find_utility(strings_column_view const& input, column& output, size_type start, size_type stop, - rmm::cuda_stream_view stream) + cuda::stream_ref stream) { auto d_strings = column_device_view::create(input.parent(), stream); auto d_results = output.mutable_view().data(); @@ -174,7 +174,7 @@ void find_utility(strings_column_view const& input, constexpr thread_index_type warp_size = cudf::detail::warp_size; cudf::detail::grid_1d grid{input.size() * warp_size, block_size}; finder_warp_parallel_fn - <<>>( + <<>>( *d_strings, target_itr, start, stop, d_results); CUDF_CUDA_TRY(cudaGetLastError()); } else { @@ -192,7 +192,7 @@ std::unique_ptr find_fn(strings_column_view const& input, string_scalar const& target, size_type start, size_type stop, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { CUDF_EXPECTS(target.is_valid(stream), "Parameter target must be valid."); @@ -236,7 +236,7 @@ std::unique_ptr find(strings_column_view const& input, string_scalar const& target, size_type start, size_type stop, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { return find_fn(input, target, start, stop, stream, mr); @@ -246,7 +246,7 @@ std::unique_ptr rfind(strings_column_view const& input, string_scalar const& target, size_type start, size_type stop, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { return find_fn(input, target, start, stop, stream, mr); @@ -256,7 +256,7 @@ template std::unique_ptr find(strings_column_view const& input, strings_column_view const& target, size_type start, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { CUDF_EXPECTS(start >= 0, "Parameter start must be positive integer or zero."); @@ -289,7 +289,7 @@ std::unique_ptr find(strings_column_view const& strings, string_scalar const& target, size_type start, size_type stop, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { CUDF_FUNC_RANGE(); @@ -300,7 +300,7 @@ std::unique_ptr rfind(strings_column_view const& strings, string_scalar const& target, size_type start, size_type stop, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { CUDF_FUNC_RANGE(); @@ -310,7 +310,7 @@ std::unique_ptr rfind(strings_column_view const& strings, std::unique_ptr find(strings_column_view const& input, strings_column_view const& target, size_type start, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { CUDF_FUNC_RANGE(); @@ -368,7 +368,7 @@ CUDF_KERNEL void contains_warp_parallel_fn(column_device_view const d_strings, std::unique_ptr contains_warp_parallel(strings_column_view const& input, string_scalar const& target, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { CUDF_EXPECTS(target.is_valid(stream), "Parameter target must be valid."); @@ -395,7 +395,7 @@ std::unique_ptr contains_warp_parallel(strings_column_view const& input, constexpr thread_index_type block_size = 256; constexpr thread_index_type warp_size = cudf::detail::warp_size; cudf::detail::grid_1d grid{input.size() * warp_size, block_size}; - contains_warp_parallel_fn<<>>( + contains_warp_parallel_fn<<>>( *d_strings, d_target, results_view.data()); CUDF_CUDA_TRY(cudaGetLastError()); } @@ -422,7 +422,7 @@ template std::unique_ptr contains_fn(strings_column_view const& strings, string_scalar const& target, BoolFunction pfn, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { auto strings_count = strings.size(); @@ -483,7 +483,7 @@ template std::unique_ptr contains_fn(strings_column_view const& strings, strings_column_view const& targets, BoolFunction pfn, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { if (strings.is_empty()) return make_empty_column(type_id::BOOL8); @@ -527,7 +527,7 @@ std::unique_ptr contains_fn(strings_column_view const& strings, std::unique_ptr contains(strings_column_view const& input, string_scalar const& target, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { // use warp parallel when the average string width is greater than the threshold @@ -549,7 +549,7 @@ std::unique_ptr contains(strings_column_view const& input, std::unique_ptr contains(strings_column_view const& strings, strings_column_view const& targets, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { auto pfn = [] __device__(string_view d_string, string_view d_target) { @@ -563,7 +563,7 @@ std::unique_ptr contains(strings_column_view const& strings, std::unique_ptr starts_with(strings_column_view const& strings, string_scalar const& target, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { auto pfn = [] __device__(string_view d_string, string_view d_target) { @@ -575,7 +575,7 @@ std::unique_ptr starts_with(strings_column_view const& strings, std::unique_ptr starts_with(strings_column_view const& strings, strings_column_view const& targets, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { auto pfn = [] __device__(string_view d_string, string_view d_target) { @@ -587,7 +587,7 @@ std::unique_ptr starts_with(strings_column_view const& strings, std::unique_ptr ends_with(strings_column_view const& strings, string_scalar const& target, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { auto pfn = [] __device__(string_view d_string, string_view d_target) { @@ -602,7 +602,7 @@ std::unique_ptr ends_with(strings_column_view const& strings, std::unique_ptr ends_with(strings_column_view const& strings, strings_column_view const& targets, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { auto pfn = [] __device__(string_view d_string, string_view d_target) { @@ -621,7 +621,7 @@ std::unique_ptr ends_with(strings_column_view const& strings, std::unique_ptr contains(strings_column_view const& strings, string_scalar const& target, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { CUDF_FUNC_RANGE(); @@ -630,7 +630,7 @@ std::unique_ptr contains(strings_column_view const& strings, std::unique_ptr contains(strings_column_view const& strings, strings_column_view const& targets, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { CUDF_FUNC_RANGE(); @@ -639,7 +639,7 @@ std::unique_ptr contains(strings_column_view const& strings, std::unique_ptr starts_with(strings_column_view const& strings, string_scalar const& target, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { CUDF_FUNC_RANGE(); @@ -648,7 +648,7 @@ std::unique_ptr starts_with(strings_column_view const& strings, std::unique_ptr starts_with(strings_column_view const& strings, strings_column_view const& targets, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { CUDF_FUNC_RANGE(); @@ -657,7 +657,7 @@ std::unique_ptr starts_with(strings_column_view const& strings, std::unique_ptr ends_with(strings_column_view const& strings, string_scalar const& target, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { CUDF_FUNC_RANGE(); @@ -666,7 +666,7 @@ std::unique_ptr ends_with(strings_column_view const& strings, std::unique_ptr ends_with(strings_column_view const& strings, strings_column_view const& targets, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { CUDF_FUNC_RANGE(); diff --git a/cpp/src/strings/search/find_instance.cu b/cpp/src/strings/search/find_instance.cu index c12f6c1710d1..b817a727fbc5 100644 --- a/cpp/src/strings/search/find_instance.cu +++ b/cpp/src/strings/search/find_instance.cu @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: Copyright (c) 2025-2026, NVIDIA CORPORATION. + * SPDX-FileCopyrightText: Copyright (c) 2025-2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved. * SPDX-License-Identifier: Apache-2.0 */ @@ -16,12 +16,12 @@ #include #include -#include #include #include #include #include +#include namespace cudf { namespace strings { @@ -84,7 +84,7 @@ CUDF_KERNEL void find_instance_warp_parallel_fn(column_device_view const d_strin std::unique_ptr find_instance(strings_column_view const& input, string_scalar const& target, size_type instance, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { CUDF_EXPECTS( @@ -109,10 +109,8 @@ std::unique_ptr find_instance(strings_column_view const& input, constexpr thread_index_type warp_size = cudf::detail::warp_size; static_assert(block_size % warp_size == 0, "block size must be a multiple of warp size"); cudf::detail::grid_1d grid{input.size() * warp_size, block_size}; - find_instance_warp_parallel_fn<<>>(*d_strings, d_target, instance, d_results); + find_instance_warp_parallel_fn<<>>( + *d_strings, d_target, instance, d_results); CUDF_CUDA_TRY(cudaGetLastError()); return results; @@ -123,7 +121,7 @@ std::unique_ptr find_instance(strings_column_view const& input, std::unique_ptr find_instance(strings_column_view const& input, string_scalar const& target, size_type instance, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { CUDF_FUNC_RANGE(); diff --git a/cpp/src/strings/search/find_multiple.cu b/cpp/src/strings/search/find_multiple.cu index 3d081c3e6e77..83e177b51bec 100644 --- a/cpp/src/strings/search/find_multiple.cu +++ b/cpp/src/strings/search/find_multiple.cu @@ -15,10 +15,10 @@ #include #include -#include #include #include +#include #include namespace cudf { @@ -26,7 +26,7 @@ namespace strings { namespace detail { std::unique_ptr find_multiple(strings_column_view const& input, strings_column_view const& targets, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { auto const strings_count = input.size(); @@ -82,7 +82,7 @@ std::unique_ptr find_multiple(strings_column_view const& input, // external API std::unique_ptr find_multiple(strings_column_view const& input, strings_column_view const& targets, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { CUDF_FUNC_RANGE(); diff --git a/cpp/src/strings/search/findall.cu b/cpp/src/strings/search/findall.cu index f0c8fe2a4fed..f334655ef9f6 100644 --- a/cpp/src/strings/search/findall.cu +++ b/cpp/src/strings/search/findall.cu @@ -20,9 +20,10 @@ #include #include -#include #include +#include + namespace cudf { namespace strings { namespace detail { @@ -105,7 +106,7 @@ struct one_capture_fn { // std::unique_ptr findall(strings_column_view const& input, regex_program const& prog, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { auto const groups = prog.groups_count(); @@ -182,7 +183,7 @@ struct find_re_fn { std::unique_ptr find_re(strings_column_view const& input, regex_program const& prog, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { auto results = make_numeric_column(data_type{type_to_id()}, @@ -212,7 +213,7 @@ std::unique_ptr find_re(strings_column_view const& input, std::unique_ptr findall(strings_column_view const& input, regex_program const& prog, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { CUDF_FUNC_RANGE(); @@ -221,7 +222,7 @@ std::unique_ptr findall(strings_column_view const& input, std::unique_ptr find_re(strings_column_view const& input, regex_program const& prog, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { CUDF_FUNC_RANGE(); diff --git a/cpp/src/strings/slice.cu b/cpp/src/strings/slice.cu index 621ae0e718d7..a72b3c3557ab 100644 --- a/cpp/src/strings/slice.cu +++ b/cpp/src/strings/slice.cu @@ -22,14 +22,13 @@ #include #include -#include - #include #include #include #include #include #include +#include #include namespace cudf { @@ -240,7 +239,7 @@ template std::unique_ptr compute_substrings_from_fn(strings_column_view const& input, IndexIterator starts, IndexIterator stops, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { auto results = rmm::device_uvector(input.size(), stream); @@ -259,7 +258,7 @@ std::unique_ptr compute_substrings_from_fn(strings_column_view const& in static_cast(input.size()) * cudf::detail::warp_size; auto const num_blocks = util::div_rounding_up_safe(threads, block_size); substring_from_kernel - <<>>(*d_column, starts, stops, results.data()); + <<>>(*d_column, starts, stops, results.data()); CUDF_CUDA_TRY(cudaGetLastError()); } return make_strings_column(results.begin(), results.end(), stream, mr); @@ -271,7 +270,7 @@ std::unique_ptr slice_strings(strings_column_view const& input, numeric_scalar const& start, numeric_scalar const& stop, numeric_scalar const& step, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { if (input.size() == input.null_count()) { @@ -319,7 +318,7 @@ std::unique_ptr slice_strings(strings_column_view const& input, std::optional start, std::optional stop, std::optional step, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { if (input.size() == input.null_count()) { @@ -365,7 +364,7 @@ std::unique_ptr slice_strings(strings_column_view const& input, std::unique_ptr slice_strings(strings_column_view const& input, column_view const& starts_column, column_view const& stops_column, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { if (input.size() == input.null_count()) { @@ -392,7 +391,7 @@ std::unique_ptr slice_strings(strings_column_view const& input, numeric_scalar const& start, numeric_scalar const& stop, numeric_scalar const& step, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { CUDF_FUNC_RANGE(); @@ -403,7 +402,7 @@ std::unique_ptr slice_strings(strings_column_view const& input, std::optional start, std::optional stop, std::optional step, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { CUDF_FUNC_RANGE(); @@ -413,7 +412,7 @@ std::unique_ptr slice_strings(strings_column_view const& input, std::unique_ptr slice_strings(strings_column_view const& input, column_view const& starts_column, column_view const& stops_column, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { CUDF_FUNC_RANGE(); diff --git a/cpp/src/strings/split/partition.cu b/cpp/src/strings/split/partition.cu index 73d12a07674e..38ca45e2aff7 100644 --- a/cpp/src/strings/split/partition.cu +++ b/cpp/src/strings/split/partition.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 */ @@ -15,12 +15,12 @@ #include #include -#include #include #include #include #include +#include #include #include @@ -174,7 +174,7 @@ struct rpartition_fn : public partition_fn { std::unique_ptr
partition(strings_column_view const& strings, string_scalar const& delimiter, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { CUDF_EXPECTS(delimiter.is_valid(stream), "Parameter delimiter must be valid"); @@ -201,7 +201,7 @@ std::unique_ptr
partition(strings_column_view const& strings, std::unique_ptr
rpartition(strings_column_view const& strings, string_scalar const& delimiter, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { CUDF_EXPECTS(delimiter.is_valid(stream), "Parameter delimiter must be valid"); @@ -232,7 +232,7 @@ std::unique_ptr
rpartition(strings_column_view const& strings, std::unique_ptr
partition(strings_column_view const& input, string_scalar const& delimiter, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { CUDF_FUNC_RANGE(); @@ -241,7 +241,7 @@ std::unique_ptr
partition(strings_column_view const& input, std::unique_ptr
rpartition(strings_column_view const& input, string_scalar const& delimiter, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { CUDF_FUNC_RANGE(); diff --git a/cpp/src/strings/split/split.cu b/cpp/src/strings/split/split.cu index e5d724e71b9a..f6baac564ea5 100644 --- a/cpp/src/strings/split/split.cu +++ b/cpp/src/strings/split/split.cu @@ -19,11 +19,11 @@ #include #include -#include #include #include #include +#include #include #include #include @@ -142,7 +142,7 @@ template std::unique_ptr
split_fn(strings_column_view const& input, Tokenizer tokenizer, DelimiterFn delimiter_fn, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { std::vector> results; @@ -187,7 +187,7 @@ std::unique_ptr
split_fn(strings_column_view const& input, std::unique_ptr
build_table_from_tokens(strings_column_view const& input, column_view offsets, rmm::device_uvector const& tokens, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { auto const d_offsets = cudf::detail::offsetalator_factory::make_input_iterator(offsets); @@ -218,7 +218,7 @@ std::unique_ptr
build_table_from_tokens(strings_column_view const& input, // Create a table with a single strings column with all nulls std::unique_ptr
make_all_null_table(size_type size, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { std::vector> results; @@ -233,7 +233,7 @@ std::unique_ptr
make_all_null_table(size_type size, std::unique_ptr
split(strings_column_view const& input, string_scalar const& delimiter, size_type maxsplit, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { CUDF_EXPECTS(delimiter.is_valid(stream), "Parameter delimiter must be valid"); @@ -267,7 +267,7 @@ std::unique_ptr
split(strings_column_view const& input, std::unique_ptr
rsplit(strings_column_view const& input, string_scalar const& delimiter, size_type maxsplit, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { CUDF_EXPECTS(delimiter.is_valid(stream), "Parameter delimiter must be valid"); @@ -305,7 +305,7 @@ std::unique_ptr
rsplit(strings_column_view const& input, std::unique_ptr
split(strings_column_view const& input, string_scalar const& delimiter, size_type maxsplit, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { CUDF_FUNC_RANGE(); @@ -315,7 +315,7 @@ std::unique_ptr
split(strings_column_view const& input, std::unique_ptr
rsplit(strings_column_view const& input, string_scalar const& delimiter, size_type maxsplit, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { CUDF_FUNC_RANGE(); diff --git a/cpp/src/strings/split/split.cuh b/cpp/src/strings/split/split.cuh index 4f6a3471c9fd..777f316a4503 100644 --- a/cpp/src/strings/split/split.cuh +++ b/cpp/src/strings/split/split.cuh @@ -24,12 +24,12 @@ #include #include -#include #include #include #include #include +#include #include #include #include @@ -573,7 +573,7 @@ std::pair, rmm::device_uvector> split column_device_view const& d_strings, string_view const d_delimiter, size_type const max_tokens, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { CUDF_EXPECTS(d_delimiter.size_bytes() > 0, "unexpected delimiter"); @@ -660,7 +660,7 @@ std::pair, rmm::device_uvector> split strings_column_view const& input, Tokenizer tokenizer, DelimiterFn delimiter_fn, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { auto [first_offset, last_offset] = get_first_and_last_offset(input, stream); @@ -676,7 +676,7 @@ std::pair, rmm::device_uvector> split auto const num_blocks = util::div_rounding_up_safe( util::div_rounding_up_safe(chars_bytes, static_cast(bytes_per_thread)), block_size); count_delimiters_kernel - <<>>(delimiter_fn, chars_bytes, d_count.data()); + <<>>(delimiter_fn, chars_bytes, d_count.data()); CUDF_CUDA_TRY(cudaGetLastError()); } diff --git a/cpp/src/strings/split/split_part.cu b/cpp/src/strings/split/split_part.cu index a532561e6125..6c23a24c8d90 100644 --- a/cpp/src/strings/split/split_part.cu +++ b/cpp/src/strings/split/split_part.cu @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: Copyright (c) 2025-2026, NVIDIA CORPORATION. + * SPDX-FileCopyrightText: Copyright (c) 2025-2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved. * SPDX-License-Identifier: Apache-2.0 */ @@ -17,10 +17,10 @@ #include #include -#include #include #include +#include #include namespace cudf { @@ -66,7 +66,7 @@ std::unique_ptr split_part_fn(strings_column_view const& input, size_type index, Tokenizer tokenizer, DelimiterFn delimiter_fn, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { if (input.size() == input.null_count()) { @@ -99,7 +99,7 @@ std::unique_ptr split_part_fn(strings_column_view const& input, std::unique_ptr split_part(strings_column_view const& input, string_scalar const& delimiter, size_type index, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { CUDF_EXPECTS( @@ -125,7 +125,7 @@ std::unique_ptr split_part(strings_column_view const& input, std::unique_ptr split_part(strings_column_view const& input, string_scalar const& delimiter, size_type index, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { CUDF_FUNC_RANGE(); diff --git a/cpp/src/strings/split/split_re.cu b/cpp/src/strings/split/split_re.cu index ecbdf3e85840..aaed60acb88f 100644 --- a/cpp/src/strings/split/split_re.cu +++ b/cpp/src/strings/split/split_re.cu @@ -18,13 +18,12 @@ #include #include -#include - #include #include #include #include #include +#include #include namespace cudf { @@ -127,7 +126,7 @@ std::pair, std::unique_ptr> gener ProgDevice& d_prog, split_direction direction, size_type maxsplit, - rmm::cuda_stream_view stream) + cuda::stream_ref stream) { auto const strings_count = d_strings.size(); auto const max_tokens = maxsplit > 0 ? maxsplit : std::numeric_limits::max(); @@ -166,7 +165,7 @@ std::pair, std::unique_ptr> gener regex_program const& prog, split_direction direction, size_type maxsplit, - rmm::cuda_stream_view stream) + cuda::stream_ref stream) { if (regex_device_builder::glushkov_fast_path_supported(prog)) { auto d_prog = regex_device_builder::create_gkprog_device(prog, stream); @@ -203,7 +202,7 @@ std::unique_ptr
split_re(strings_column_view const& input, regex_program const& prog, split_direction direction, size_type maxsplit, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { CUDF_EXPECTS(!prog.pattern().empty(), "Parameter pattern must not be empty"); @@ -267,7 +266,7 @@ std::unique_ptr split_record_re(strings_column_view const& input, regex_program const& prog, split_direction direction, size_type maxsplit, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { CUDF_EXPECTS(!prog.pattern().empty(), "Parameter pattern must not be empty"); @@ -299,7 +298,7 @@ std::unique_ptr split_record_re(strings_column_view const& input, std::unique_ptr
split_re(strings_column_view const& input, regex_program const& prog, size_type maxsplit, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { return split_re(input, prog, split_direction::FORWARD, maxsplit, stream, mr); @@ -308,7 +307,7 @@ std::unique_ptr
split_re(strings_column_view const& input, std::unique_ptr split_record_re(strings_column_view const& input, regex_program const& prog, size_type maxsplit, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { return split_record_re(input, prog, split_direction::FORWARD, maxsplit, stream, mr); @@ -317,7 +316,7 @@ std::unique_ptr split_record_re(strings_column_view const& input, std::unique_ptr
rsplit_re(strings_column_view const& input, regex_program const& prog, size_type maxsplit, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { return split_re(input, prog, split_direction::BACKWARD, maxsplit, stream, mr); @@ -326,7 +325,7 @@ std::unique_ptr
rsplit_re(strings_column_view const& input, std::unique_ptr rsplit_record_re(strings_column_view const& input, regex_program const& prog, size_type maxsplit, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { return split_record_re(input, prog, split_direction::BACKWARD, maxsplit, stream, mr); @@ -339,7 +338,7 @@ std::unique_ptr rsplit_record_re(strings_column_view const& input, std::unique_ptr
split_re(strings_column_view const& input, regex_program const& prog, size_type maxsplit, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { CUDF_FUNC_RANGE(); @@ -349,7 +348,7 @@ std::unique_ptr
split_re(strings_column_view const& input, std::unique_ptr split_record_re(strings_column_view const& input, regex_program const& prog, size_type maxsplit, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { CUDF_FUNC_RANGE(); @@ -359,7 +358,7 @@ std::unique_ptr split_record_re(strings_column_view const& input, std::unique_ptr
rsplit_re(strings_column_view const& input, regex_program const& prog, size_type maxsplit, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { CUDF_FUNC_RANGE(); @@ -369,7 +368,7 @@ std::unique_ptr
rsplit_re(strings_column_view const& input, std::unique_ptr rsplit_record_re(strings_column_view const& input, regex_program const& prog, size_type maxsplit, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { CUDF_FUNC_RANGE(); diff --git a/cpp/src/strings/split/split_record.cu b/cpp/src/strings/split/split_record.cu index 503e9a0c0a90..2b1d1fd428c1 100644 --- a/cpp/src/strings/split/split_record.cu +++ b/cpp/src/strings/split/split_record.cu @@ -18,9 +18,8 @@ #include #include -#include - #include +#include #include #include #include @@ -35,7 +34,7 @@ template std::unique_ptr split_record_fn(strings_column_view const& input, Tokenizer tokenizer, DelimiterFn delimiter_fn, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { if (input.is_empty()) { @@ -69,7 +68,7 @@ template std::unique_ptr split_record_per_row_fn(strings_column_view const& input, string_view const d_delimiter, size_type const max_tokens, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { if (input.is_empty()) { @@ -105,7 +104,7 @@ std::unique_ptr split_record_per_row_fn(strings_column_view const& input std::unique_ptr split_record(strings_column_view const& input, string_scalar const& delimiter, size_type maxsplit, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { CUDF_EXPECTS(delimiter.is_valid(stream), "Parameter delimiter must be valid"); @@ -136,7 +135,7 @@ std::unique_ptr split_record(strings_column_view const& input, std::unique_ptr rsplit_record(strings_column_view const& input, string_scalar const& delimiter, size_type maxsplit, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { CUDF_EXPECTS(delimiter.is_valid(stream), "Parameter delimiter must be valid"); @@ -171,7 +170,7 @@ std::unique_ptr rsplit_record(strings_column_view const& input, std::unique_ptr split_record(strings_column_view const& input, string_scalar const& delimiter, size_type maxsplit, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { CUDF_FUNC_RANGE(); @@ -181,7 +180,7 @@ std::unique_ptr split_record(strings_column_view const& input, std::unique_ptr rsplit_record(strings_column_view const& input, string_scalar const& delimiter, size_type maxsplit, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { CUDF_FUNC_RANGE(); diff --git a/cpp/src/strings/strings_column_factories.cu b/cpp/src/strings/strings_column_factories.cu index 3ad65d2c0945..511062d0c187 100644 --- a/cpp/src/strings/strings_column_factories.cu +++ b/cpp/src/strings/strings_column_factories.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 */ @@ -14,12 +14,12 @@ #include #include -#include #include #include #include #include +#include #include #include #include @@ -35,7 +35,7 @@ using column_string_pairs = cudf::device_span; template std::pair>, rmm::device_uvector> make_offsets_child_column_batch_async(std::vector const& input, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { auto const num_columns = input.size(); @@ -70,7 +70,7 @@ make_offsets_child_column_batch_async(std::vector const& in std::vector> make_strings_column_batch( std::vector const& input, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { auto const num_columns = input.size(); @@ -100,7 +100,7 @@ std::vector> make_strings_column_batch( auto const grid = cudf::detail::grid_1d{static_cast(string_count), block_size}; cudf::detail::valid_if_kernel - <<>>( + <<>>( reinterpret_cast(null_masks.back().data()), string_pairs.data(), string_count, @@ -114,7 +114,7 @@ std::vector> make_strings_column_batch( // Except for other stream syncs in `CUB` that we cannot control, // this should be the only stream sync we need in the entire API. - stream.synchronize(); + stream.wait(); auto const threshold = cudf::strings::get_offset64_threshold(); auto const overflow_count = @@ -178,7 +178,7 @@ std::vector> make_strings_column_batch( // Create a strings-type column from vector of pointer/size pairs std::unique_ptr make_strings_column( device_span const> strings, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { CUDF_FUNC_RANGE(); @@ -187,7 +187,7 @@ std::unique_ptr make_strings_column( std::vector> make_strings_column_batch( std::vector const>> const& input, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { CUDF_FUNC_RANGE(); @@ -210,7 +210,7 @@ struct string_view_to_pair { std::unique_ptr make_strings_column(device_span string_views, string_view null_placeholder, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { CUDF_FUNC_RANGE(); diff --git a/cpp/src/strings/strings_column_view.cpp b/cpp/src/strings/strings_column_view.cpp index 3ecb903b1418..e8cc4e135acc 100644 --- a/cpp/src/strings/strings_column_view.cpp +++ b/cpp/src/strings/strings_column_view.cpp @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: Copyright (c) 2019-2025, NVIDIA CORPORATION. + * SPDX-FileCopyrightText: Copyright (c) 2019-2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved. * SPDX-License-Identifier: Apache-2.0 */ @@ -7,7 +7,7 @@ #include #include -#include +#include namespace cudf { // @@ -24,20 +24,19 @@ column_view strings_column_view::offsets() const return child(offsets_column_index); } -int64_t strings_column_view::chars_size(rmm::cuda_stream_view stream) const +int64_t strings_column_view::chars_size(cuda::stream_ref stream) const { if (size() == 0) { return 0L; } return cudf::strings::detail::get_offset_value(offsets(), offsets().size() - 1, stream); } strings_column_view::chars_iterator strings_column_view::chars_begin( - rmm::cuda_stream_view) const noexcept + cuda::stream_ref) const noexcept { return head(); } -strings_column_view::chars_iterator strings_column_view::chars_end( - rmm::cuda_stream_view stream) const +strings_column_view::chars_iterator strings_column_view::chars_end(cuda::stream_ref stream) const { return chars_begin(stream) + chars_size(stream); } diff --git a/cpp/src/strings/strings_scalar_factories.cpp b/cpp/src/strings/strings_scalar_factories.cpp index 89db14cf06ec..279ed9974720 100644 --- a/cpp/src/strings/strings_scalar_factories.cpp +++ b/cpp/src/strings/strings_scalar_factories.cpp @@ -1,17 +1,17 @@ /* - * SPDX-FileCopyrightText: Copyright (c) 2019-2024, NVIDIA CORPORATION. + * SPDX-FileCopyrightText: Copyright (c) 2019-2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved. * SPDX-License-Identifier: Apache-2.0 */ #include #include -#include +#include namespace cudf { // Create a strings-type column from array of pointer/size pairs std::unique_ptr make_string_scalar(std::string const& string, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { auto s = new string_scalar(string, true, stream, mr); diff --git a/cpp/src/strings/strip.cu b/cpp/src/strings/strip.cu index ec561c6203d1..81c769fafab4 100644 --- a/cpp/src/strings/strip.cu +++ b/cpp/src/strings/strip.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 */ @@ -14,10 +14,10 @@ #include #include -#include #include #include +#include namespace cudf { namespace strings { @@ -51,7 +51,7 @@ struct strip_transform_fn { std::unique_ptr strip(strings_column_view const& input, side_type side, string_scalar const& to_strip, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { if (input.is_empty()) return make_empty_column(type_id::STRING); @@ -78,7 +78,7 @@ std::unique_ptr strip(strings_column_view const& input, std::unique_ptr strip(strings_column_view const& input, side_type side, string_scalar const& to_strip, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { CUDF_FUNC_RANGE(); diff --git a/cpp/src/strings/translate.cu b/cpp/src/strings/translate.cu index 648e0774ed08..339d528e7c90 100644 --- a/cpp/src/strings/translate.cu +++ b/cpp/src/strings/translate.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 */ @@ -16,10 +16,10 @@ #include #include -#include #include #include +#include #include #include #include @@ -79,7 +79,7 @@ struct translate_fn { // std::unique_ptr translate(strings_column_view const& strings, std::vector> const& chars_table, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { if (strings.is_empty()) return make_empty_column(type_id::STRING); @@ -117,7 +117,7 @@ std::unique_ptr translate(strings_column_view const& strings, std::unique_ptr translate(strings_column_view const& input, std::vector> const& chars_table, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { CUDF_FUNC_RANGE(); diff --git a/cpp/src/strings/utilities.cu b/cpp/src/strings/utilities.cu index 8afb7eea7661..121d5f3679c9 100644 --- a/cpp/src/strings/utilities.cu +++ b/cpp/src/strings/utilities.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 */ @@ -17,11 +17,11 @@ #include #include -#include #include #include #include +#include #include #include @@ -34,9 +34,7 @@ namespace detail { * @copydoc create_string_vector_from_column */ rmm::device_uvector create_string_vector_from_column( - cudf::strings_column_view const input, - rmm::cuda_stream_view stream, - rmm::device_async_resource_ref mr) + cudf::strings_column_view const input, cuda::stream_ref stream, rmm::device_async_resource_ref mr) { auto d_strings = column_device_view::create(input.parent(), stream); @@ -65,7 +63,7 @@ rmm::device_uvector create_string_vector_from_column( */ std::unique_ptr create_offsets_child_column(int64_t chars_bytes, size_type count, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { auto const threshold = get_offset64_threshold(); @@ -98,7 +96,7 @@ thread_safe_per_context_cache d_special_case_mappings; /** * @copydoc cudf::strings::detail::get_character_flags_table */ -character_flags_table_type const* get_character_flags_table(rmm::cuda_stream_view stream) +character_flags_table_type const* get_character_flags_table(cuda::stream_ref stream) { return d_character_codepoint_flags.find_or_initialize([&](void) { character_flags_table_type* table = nullptr; @@ -107,7 +105,7 @@ character_flags_table_type const* get_character_flags_table(rmm::cuda_stream_vie sizeof(g_character_codepoint_flags), 0, cudaMemcpyHostToDevice, - stream.value())); + stream.get())); CUDF_CUDA_TRY(cudaGetSymbolAddress((void**)&table, character_codepoint_flags)); return table; }); @@ -116,7 +114,7 @@ character_flags_table_type const* get_character_flags_table(rmm::cuda_stream_vie /** * @copydoc cudf::strings::detail::get_character_cases_table */ -character_cases_table_type const* get_character_cases_table(rmm::cuda_stream_view stream) +character_cases_table_type const* get_character_cases_table(cuda::stream_ref stream) { return d_character_cases_table.find_or_initialize([&](void) { character_cases_table_type* table = nullptr; @@ -125,7 +123,7 @@ character_cases_table_type const* get_character_cases_table(rmm::cuda_stream_vie sizeof(g_character_cases_table), 0, cudaMemcpyHostToDevice, - stream.value())); + stream.get())); CUDF_CUDA_TRY(cudaGetSymbolAddress((void**)&table, character_cases_table)); return table; }); @@ -134,7 +132,7 @@ character_cases_table_type const* get_character_cases_table(rmm::cuda_stream_vie /** * @copydoc cudf::strings::detail::get_special_case_mapping_table */ -special_case_mapping const* get_special_case_mapping_table(rmm::cuda_stream_view stream) +special_case_mapping const* get_special_case_mapping_table(cuda::stream_ref stream) { return d_special_case_mappings.find_or_initialize([&](void) { special_case_mapping* table = nullptr; @@ -143,7 +141,7 @@ special_case_mapping const* get_special_case_mapping_table(rmm::cuda_stream_view sizeof(g_special_case_mappings), 0, cudaMemcpyHostToDevice, - stream.value())); + stream.get())); CUDF_CUDA_TRY(cudaGetSymbolAddress((void**)&table, character_special_case_mappings)); return table; }); @@ -169,9 +167,7 @@ bool is_large_strings_enabled() #endif } -int64_t get_offset_value(cudf::column_view const& offsets, - size_type index, - rmm::cuda_stream_view stream) +int64_t get_offset_value(cudf::column_view const& offsets, size_type index, cuda::stream_ref stream) { auto const otid = offsets.type().id(); CUDF_EXPECTS(otid == type_id::INT64 || otid == type_id::INT32, @@ -182,7 +178,7 @@ int64_t get_offset_value(cudf::column_view const& offsets, } std::pair get_first_and_last_offset(cudf::strings_column_view const& input, - rmm::cuda_stream_view stream) + cuda::stream_ref stream) { if (input.is_empty()) { return {0L, 0L}; } auto const first_offset = (input.offset() == 0) ? 0 @@ -197,7 +193,7 @@ std::pair get_first_and_last_offset(cudf::strings_column_view rmm::device_uvector create_string_vector_from_column( cudf::strings_column_view const strings, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { CUDF_FUNC_RANGE(); diff --git a/cpp/src/strings/wrap.cu b/cpp/src/strings/wrap.cu index 2d9c2c1d5c63..6b3909b9e9e0 100644 --- a/cpp/src/strings/wrap.cu +++ b/cpp/src/strings/wrap.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 */ @@ -16,11 +16,11 @@ #include #include -#include #include #include #include +#include #include namespace cudf { @@ -84,7 +84,7 @@ struct execute_wrap { template std::unique_ptr wrap(strings_column_view const& strings, size_type width, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { CUDF_EXPECTS(width > 0, "Positive wrap width required"); @@ -128,7 +128,7 @@ std::unique_ptr wrap(strings_column_view const& strings, std::unique_ptr wrap(strings_column_view const& strings, size_type width, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { CUDF_FUNC_RANGE(); diff --git a/cpp/src/structs/copying/concatenate.cu b/cpp/src/structs/copying/concatenate.cu index 3199af2ad900..217c33163de0 100644 --- a/cpp/src/structs/copying/concatenate.cu +++ b/cpp/src/structs/copying/concatenate.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 */ @@ -14,7 +14,7 @@ #include #include -#include +#include #include #include @@ -28,7 +28,7 @@ namespace detail { * @copydoc cudf::structs::detail::concatenate */ std::unique_ptr concatenate(host_span columns, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { // get ordered children diff --git a/cpp/src/structs/scan/scan_inclusive.cu b/cpp/src/structs/scan/scan_inclusive.cu index 355b5f29e5a9..af211cc135dd 100644 --- a/cpp/src/structs/scan/scan_inclusive.cu +++ b/cpp/src/structs/scan/scan_inclusive.cu @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: Copyright (c) 2023-2026, NVIDIA CORPORATION. + * SPDX-FileCopyrightText: Copyright (c) 2023-2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved. * SPDX-License-Identifier: Apache-2.0 */ @@ -11,11 +11,11 @@ #include #include -#include #include #include #include +#include #include #include @@ -29,7 +29,7 @@ namespace { template std::unique_ptr scan_inclusive(column_view const& input, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { // Create a gather map containing indices of the prefix min/max elements. @@ -68,11 +68,11 @@ std::unique_ptr scan_inclusive(column_view const& input, } template std::unique_ptr scan_inclusive(column_view const& input_view, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr); template std::unique_ptr scan_inclusive(column_view const& input_view, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr); } // namespace detail diff --git a/cpp/src/structs/structs_column_factories.cu b/cpp/src/structs/structs_column_factories.cu index 872038d5ec0a..bfbd4c5eebb5 100644 --- a/cpp/src/structs/structs_column_factories.cu +++ b/cpp/src/structs/structs_column_factories.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 */ @@ -8,7 +8,7 @@ #include #include -#include +#include #include #include @@ -20,7 +20,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, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { CUDF_EXPECTS(null_count <= 0 || !null_mask.is_empty(), @@ -56,7 +56,7 @@ std::unique_ptr create_structs_hierarchy( std::vector>&& child_columns, size_type null_count, rmm::device_buffer&& null_mask, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { CUDF_EXPECTS(null_count <= 0 || !null_mask.is_empty(), diff --git a/cpp/src/structs/structs_column_view.cpp b/cpp/src/structs/structs_column_view.cpp index ff5cd785d92f..bf68298ff70e 100644 --- a/cpp/src/structs/structs_column_view.cpp +++ b/cpp/src/structs/structs_column_view.cpp @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: Copyright (c) 2020-2024, NVIDIA CORPORATION. + * SPDX-FileCopyrightText: Copyright (c) 2020-2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved. * SPDX-License-Identifier: Apache-2.0 */ @@ -17,7 +17,7 @@ structs_column_view::structs_column_view(column_view const& rhs) : column_view{r column_view structs_column_view::parent() const { return *this; } -column_view structs_column_view::get_sliced_child(int index, rmm::cuda_stream_view stream) const +column_view structs_column_view::get_sliced_child(int index, cuda::stream_ref stream) const { std::vector children; children.reserve(child(index).num_children()); diff --git a/cpp/src/structs/utilities.cu b/cpp/src/structs/utilities.cu index c37e897d5210..b66a174778cd 100644 --- a/cpp/src/structs/utilities.cu +++ b/cpp/src/structs/utilities.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 */ @@ -27,7 +27,7 @@ namespace cudf::structs::detail { * @copydoc cudf::structs::detail::extract_ordered_struct_children */ std::vector> extract_ordered_struct_children( - host_span struct_cols, rmm::cuda_stream_view stream) + host_span struct_cols, cuda::stream_ref stream) { auto const num_children = struct_cols[0].num_children(); auto const num_cols = static_cast(struct_cols.size()); @@ -81,7 +81,7 @@ struct table_flattener { std::vector const& column_order; std::vector const& null_precedence; column_nullability nullability; - rmm::cuda_stream_view stream; + cuda::stream_ref stream; rmm::device_async_resource_ref mr; temporary_nullable_data nullable_data; @@ -94,7 +94,7 @@ struct table_flattener { std::vector const& column_order, std::vector const& null_precedence, column_nullability nullability, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) : column_order{column_order}, null_precedence{null_precedence}, @@ -191,7 +191,7 @@ std::unique_ptr flatten_nested_columns( std::vector const& column_order, std::vector const& null_precedence, column_nullability nullability, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { auto const has_struct = std::any_of(input.begin(), input.end(), is_struct); @@ -223,7 +223,7 @@ namespace { std::unique_ptr superimpose_nulls(bitmask_type const* null_mask, size_type null_count, std::unique_ptr&& input, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { CUDF_FUNC_RANGE(); @@ -300,7 +300,7 @@ std::unique_ptr superimpose_nulls(bitmask_type const* null_mask, std::vector> superimpose_nulls( host_span null_masks, std::vector> inputs, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { CUDF_FUNC_RANGE(); @@ -401,7 +401,7 @@ std::vector> superimpose_nulls( * @copydoc cudf::structs::detail::push_down_nulls */ std::pair push_down_nulls_no_sanitize( - column_view const& input, rmm::cuda_stream_view stream, rmm::device_async_resource_ref mr) + column_view const& input, cuda::stream_ref stream, rmm::device_async_resource_ref mr) { auto ret_nullable_data = temporary_nullable_data{}; if (input.type().id() != type_id::STRUCT) { @@ -494,7 +494,7 @@ void temporary_nullable_data::emplace_back(temporary_nullable_data&& other) std::unique_ptr superimpose_and_sanitize_nulls(bitmask_type const* null_mask, size_type null_count, std::unique_ptr&& input, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { CUDF_FUNC_RANGE(); @@ -517,7 +517,7 @@ std::unique_ptr superimpose_and_sanitize_nulls(bitmask_type const* null_ std::vector> superimpose_and_sanitize_nulls( host_span null_masks, std::vector> inputs, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { CUDF_FUNC_RANGE(); @@ -539,7 +539,7 @@ std::vector> superimpose_and_sanitize_nulls( std::vector> enforce_null_consistency( std::vector> columns, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { CUDF_FUNC_RANGE(); @@ -615,7 +615,7 @@ std::vector> enforce_null_consistency( } std::pair push_down_nulls(column_view const& input, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { auto output = push_down_nulls_no_sanitize(input, stream, mr); @@ -636,7 +636,7 @@ std::pair push_down_nulls(column_view cons } std::pair push_down_nulls(table_view const& table, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { auto processed_columns = std::vector{}; diff --git a/cpp/src/text/bpe/byte_pair_encoding.cu b/cpp/src/text/bpe/byte_pair_encoding.cu index 26231d2cca72..3d7f49fe9dc9 100644 --- a/cpp/src/text/bpe/byte_pair_encoding.cu +++ b/cpp/src/text/bpe/byte_pair_encoding.cu @@ -23,11 +23,11 @@ #include -#include #include #include #include +#include #include #include #include @@ -332,7 +332,7 @@ CUDF_KERNEL void bpe_finalize(cudf::column_device_view const d_strings, std::unique_ptr byte_pair_encoding(cudf::strings_column_view const& input, bpe_merge_pairs const& merge_pairs, cudf::string_scalar const& separator, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { if (input.is_empty() || input.chars_size(stream) == 0) { @@ -411,14 +411,14 @@ std::unique_ptr byte_pair_encoding(cudf::strings_column_view const rmm::device_uvector d_rerank(chars_size, stream); // more working memory; rmm::device_uvector d_ranks(chars_size, stream); auto const pair_map = get_bpe_merge_pairs_impl(merge_pairs)->get_merge_pairs_ref(); - bpe_parallel_fn<<>>( + bpe_parallel_fn<<>>( *d_tmp_strings, d_input_chars, pair_map, d_spaces.data(), d_ranks.data(), d_rerank.data()); CUDF_CUDA_TRY(cudaGetLastError()); } // compute the output sizes auto output_sizes = rmm::device_uvector(input.size(), stream); - bpe_finalize<<>>( + bpe_finalize<<>>( *d_strings, d_input_chars, d_spaces.data(), output_sizes.data()); CUDF_CUDA_TRY(cudaGetLastError()); @@ -461,7 +461,7 @@ std::unique_ptr byte_pair_encoding(cudf::strings_column_view const std::unique_ptr byte_pair_encoding(cudf::strings_column_view const& input, bpe_merge_pairs const& merges_table, cudf::string_scalar const& separator, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { CUDF_FUNC_RANGE(); diff --git a/cpp/src/text/bpe/byte_pair_encoding.cuh b/cpp/src/text/bpe/byte_pair_encoding.cuh index 55503119b694..9d5dbd4b8bde 100644 --- a/cpp/src/text/bpe/byte_pair_encoding.cuh +++ b/cpp/src/text/bpe/byte_pair_encoding.cuh @@ -14,13 +14,13 @@ #include -#include #include #include #include #include #include +#include #include #include @@ -163,7 +163,7 @@ using mp_table_map_type = cuco::static_map this helper simplifies the return type for us using col_device_view = std::invoke_result_t; struct bpe_merge_pairs::bpe_merge_pairs_impl { diff --git a/cpp/src/text/bpe/load_merge_pairs.cu b/cpp/src/text/bpe/load_merge_pairs.cu index 4d46f79f9e55..ff2ba5db5081 100644 --- a/cpp/src/text/bpe/load_merge_pairs.cu +++ b/cpp/src/text/bpe/load_merge_pairs.cu @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: Copyright (c) 2022-2025, NVIDIA CORPORATION. + * SPDX-FileCopyrightText: Copyright (c) 2022-2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved. * SPDX-License-Identifier: Apache-2.0 */ @@ -16,11 +16,11 @@ #include -#include #include #include #include +#include #include #include @@ -32,7 +32,7 @@ namespace detail { namespace { std::unique_ptr initialize_merge_pairs_map( - cudf::column_device_view const& input, rmm::cuda_stream_view stream) + cudf::column_device_view const& input, cuda::stream_ref stream) { auto const elements = input.size() / 2; auto merge_pairs_map = @@ -45,20 +45,20 @@ std::unique_ptr initialize_merge_pairs_map( cuco::thread_scope_device, cuco_storage{}, rmm::mr::polymorphic_allocator{}, - stream.value()); + stream.get()); auto iter = cudf::detail::make_counting_transform_iterator( 0, cuda::proclaim_return_type>( [] __device__(cudf::size_type idx) { return cuco::make_pair(idx, idx); })); - merge_pairs_map->insert_async(iter, iter + elements, stream.value()); + merge_pairs_map->insert_async(iter, iter + elements, stream.get()); return merge_pairs_map; } std::unique_ptr initialize_mp_table_map( - cudf::column_device_view const& input, rmm::cuda_stream_view stream) + cudf::column_device_view const& input, cuda::stream_ref stream) { auto mp_table_map = std::make_unique(static_cast(input.size()), cudf::detail::CUCO_DESIRED_LOAD_FACTOR, @@ -69,20 +69,20 @@ std::unique_ptr initialize_mp_table_map( cuco::thread_scope_device, cuco_storage{}, rmm::mr::polymorphic_allocator{}, - stream.value()); + stream.get()); auto iter = cudf::detail::make_counting_transform_iterator( 0, cuda::proclaim_return_type>( [] __device__(cudf::size_type idx) { return cuco::make_pair(idx, idx); })); - mp_table_map->insert_async(iter, iter + input.size(), stream.value()); + mp_table_map->insert_async(iter, iter + input.size(), stream.get()); return mp_table_map; } std::unique_ptr create_bpe_merge_pairs_impl( - std::unique_ptr&& input, rmm::cuda_stream_view stream) + std::unique_ptr&& input, cuda::stream_ref stream) { auto d_input = cudf::column_device_view::create(input->view(), stream); auto merge_pairs = initialize_merge_pairs_map(*d_input, stream); @@ -93,7 +93,7 @@ std::unique_ptr create_bpe_merge_pairs_im std::unique_ptr create_bpe_merge_pairs_impl( cudf::strings_column_view const& input, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { auto const space = std::string(" "); // workaround to ARM issue @@ -106,7 +106,7 @@ std::unique_ptr create_bpe_merge_pairs_im } // namespace std::unique_ptr load_merge_pairs(cudf::strings_column_view const& merge_pairs, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { CUDF_EXPECTS(!merge_pairs.is_empty(), "Merge pairs must not be empty"); @@ -117,7 +117,7 @@ std::unique_ptr load_merge_pairs(cudf::strings_column_view cons } // namespace detail std::unique_ptr load_merge_pairs(cudf::strings_column_view const& merge_pairs, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { CUDF_FUNC_RANGE(); @@ -138,14 +138,14 @@ bpe_merge_pairs::bpe_merge_pairs_impl::bpe_merge_pairs_impl( } bpe_merge_pairs::bpe_merge_pairs(std::unique_ptr&& input, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref) : impl(detail::create_bpe_merge_pairs_impl(std::move(input), stream).release()) { } bpe_merge_pairs::bpe_merge_pairs(cudf::strings_column_view const& input, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) : impl(detail::create_bpe_merge_pairs_impl(input, stream, mr).release()) { diff --git a/cpp/src/text/deduplicate.cu b/cpp/src/text/deduplicate.cu index 3ba002f549a6..87be198c5ed6 100644 --- a/cpp/src/text/deduplicate.cu +++ b/cpp/src/text/deduplicate.cu @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: Copyright (c) 2025-2026, NVIDIA CORPORATION. + * SPDX-FileCopyrightText: Copyright (c) 2025-2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved. * SPDX-License-Identifier: Apache-2.0 */ @@ -17,7 +17,6 @@ #include -#include #include #include @@ -25,6 +24,7 @@ #include #include #include +#include #include #include #include @@ -145,7 +145,7 @@ struct collapse_overlaps_fn { std::unique_ptr> build_suffix_array_fn( cudf::device_span chars_span, cudf::size_type min_width, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { auto const size = static_cast(chars_span.size()) - min_width + (min_width > 0); @@ -155,10 +155,10 @@ std::unique_ptr> build_suffix_array_fn( auto const seq = cuda::counting_iterator{0}; auto tmp_bytes = std::size_t{0}; cub::DeviceMergeSort::SortKeysCopy( - nullptr, tmp_bytes, seq, indices.begin(), indices.size(), cmp_op, stream.value()); + nullptr, tmp_bytes, seq, indices.begin(), indices.size(), cmp_op, stream.get()); auto tmp_stg = rmm::device_buffer(tmp_bytes, stream); cub::DeviceMergeSort::SortKeysCopy( - tmp_stg.data(), tmp_bytes, seq, indices.begin(), indices.size(), cmp_op, stream.value()); + tmp_stg.data(), tmp_bytes, seq, indices.begin(), indices.size(), cmp_op, stream.get()); return std::make_unique>(std::move(indices)); } @@ -167,7 +167,7 @@ std::unique_ptr resolve_duplicates_fn( cudf::device_span chars_span, cudf::device_span indices, cudf::size_type min_width, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { auto sizes = rmm::device_uvector(indices.size(), stream); @@ -255,7 +255,7 @@ std::unique_ptr resolve_duplicates_fn( std::unique_ptr> build_suffix_array( cudf::strings_column_view const& input, cudf::size_type min_width, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { auto [first_offset, last_offset] = @@ -276,7 +276,7 @@ std::unique_ptr> build_suffix_array( std::unique_ptr resolve_duplicates(cudf::strings_column_view const& input, cudf::device_span indices, cudf::size_type min_width, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { CUDF_EXPECTS(min_width > 8, "min_width should be at least 8", std::invalid_argument); @@ -405,7 +405,7 @@ std::unique_ptr resolve_duplicates_pair_impl( cudf::strings_column_view const& input2, cudf::device_span indices2, cudf::size_type min_width, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { CUDF_EXPECTS(min_width > 8, "min_width should be at least 8", std::invalid_argument); @@ -550,7 +550,7 @@ std::unique_ptr resolve_duplicates_pair( cudf::strings_column_view const& input2, cudf::device_span indices2, cudf::size_type min_width, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { // force the 2nd input to be the smaller one @@ -565,7 +565,7 @@ std::unique_ptr resolve_duplicates_pair( std::unique_ptr> build_suffix_array( cudf::strings_column_view const& input, cudf::size_type min_width, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { CUDF_FUNC_RANGE(); @@ -575,7 +575,7 @@ std::unique_ptr> build_suffix_array( std::unique_ptr resolve_duplicates(cudf::strings_column_view const& input, cudf::device_span indices, cudf::size_type min_width, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { CUDF_FUNC_RANGE(); @@ -588,7 +588,7 @@ std::unique_ptr resolve_duplicates_pair( cudf::strings_column_view const& input2, cudf::device_span indices2, cudf::size_type min_width, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { CUDF_FUNC_RANGE(); diff --git a/cpp/src/text/detokenize.cu b/cpp/src/text/detokenize.cu index aba919e9de9b..4e630cdbcc1d 100644 --- a/cpp/src/text/detokenize.cu +++ b/cpp/src/text/detokenize.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 */ @@ -22,10 +22,10 @@ #include -#include #include #include +#include namespace nvtext { namespace detail { @@ -90,7 +90,7 @@ rmm::device_uvector create_token_row_offsets( cudf::column_view const& row_indices, cudf::column_view const& sorted_indices, cudf::size_type tokens_counts, - rmm::cuda_stream_view stream) + cuda::stream_ref stream) { index_changed_fn fn{cudf::detail::indexalator_factory::make_input_iterator(row_indices), sorted_indices.data()}; @@ -122,7 +122,7 @@ rmm::device_uvector create_token_row_offsets( std::unique_ptr detokenize(cudf::strings_column_view const& strings, cudf::column_view const& row_indices, cudf::string_scalar const& separator, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { CUDF_EXPECTS(separator.is_valid(stream), "Parameter separator must be valid"); @@ -163,7 +163,7 @@ std::unique_ptr detokenize(cudf::strings_column_view const& string std::unique_ptr detokenize(cudf::strings_column_view const& input, cudf::column_view const& row_indices, cudf::string_scalar const& separator, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { CUDF_FUNC_RANGE(); diff --git a/cpp/src/text/edit_distance.cu b/cpp/src/text/edit_distance.cu index 869ebb156ec9..146834819b0a 100644 --- a/cpp/src/text/edit_distance.cu +++ b/cpp/src/text/edit_distance.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 */ @@ -20,13 +20,13 @@ #include -#include #include #include #include #include #include +#include #include #include #include @@ -233,7 +233,7 @@ CUDF_KERNEL void levenshtein_kernel(cudf::column_device_view d_strings, std::unique_ptr edit_distance(cudf::strings_column_view const& input, cudf::strings_column_view const& targets, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { auto const output_type = cudf::data_type{cudf::type_to_id()}; @@ -272,7 +272,7 @@ std::unique_ptr edit_distance(cudf::strings_column_view const& inp constexpr auto block_size = 256L; constexpr auto tile_size = static_cast(cudf::detail::warp_size); cudf::detail::grid_1d grid{input.size() * tile_size, block_size}; - levenshtein_kernel<<>>( + levenshtein_kernel<<>>( *d_strings, *d_targets, d_buffer, offsets.data(), d_results); CUDF_CUDA_TRY(cudaGetLastError()); @@ -288,7 +288,7 @@ std::unique_ptr edit_distance(cudf::strings_column_view const& inp */ std::unique_ptr edit_distance(cudf::strings_column_view const& input, cudf::strings_column_view const& targets, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { CUDF_FUNC_RANGE(); diff --git a/cpp/src/text/generate_ngrams.cu b/cpp/src/text/generate_ngrams.cu index a2487456d40d..2918d2595e8b 100644 --- a/cpp/src/text/generate_ngrams.cu +++ b/cpp/src/text/generate_ngrams.cu @@ -24,13 +24,13 @@ #include -#include #include #include #include #include #include +#include #include #include @@ -86,7 +86,7 @@ struct ngram_generator_fn { std::unique_ptr generate_ngrams(cudf::strings_column_view const& strings, cudf::size_type ngrams, cudf::string_scalar const& separator, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { CUDF_EXPECTS( @@ -150,7 +150,7 @@ std::unique_ptr generate_ngrams(cudf::strings_column_view const& s std::unique_ptr generate_ngrams(cudf::strings_column_view const& strings, cudf::size_type ngrams, cudf::string_scalar const& separator, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { CUDF_FUNC_RANGE(); @@ -248,7 +248,7 @@ struct character_ngram_generator_fn { std::unique_ptr generate_character_ngrams(cudf::strings_column_view const& input, cudf::size_type ngrams, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { CUDF_EXPECTS(ngrams >= 2, @@ -273,7 +273,7 @@ std::unique_ptr generate_character_ngrams(cudf::strings_column_vie : cudf::detail::warp_size; // warp per row auto const grid = cudf::detail::grid_1d( static_cast(input.size()) * tile_size, block_size); - count_char_ngrams_kernel<<>>( + count_char_ngrams_kernel<<>>( *d_strings, ngrams, tile_size, counts.data()); CUDF_CUDA_TRY(cudaGetLastError()); return cudf::detail::make_offsets_child_column(counts.begin(), counts.end(), stream, mr); @@ -357,7 +357,7 @@ CUDF_KERNEL void character_ngram_hash_kernel(cudf::column_device_view const d_st std::unique_ptr hash_character_ngrams(cudf::strings_column_view const& input, cudf::size_type ngrams, uint32_t seed, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { CUDF_EXPECTS(ngrams >= 2, @@ -374,7 +374,7 @@ std::unique_ptr hash_character_ngrams(cudf::strings_column_view co // build offsets column by computing the number of ngrams per string auto [offsets, total_ngrams] = [&] { auto counts = rmm::device_uvector(input.size(), stream); - count_char_ngrams_kernel<<>>( + count_char_ngrams_kernel<<>>( *d_strings, ngrams, cudf::detail::warp_size, counts.data()); CUDF_CUDA_TRY(cudaGetLastError()); return cudf::detail::make_offsets_child_column(counts.begin(), counts.end(), stream, mr); @@ -389,7 +389,7 @@ std::unique_ptr hash_character_ngrams(cudf::strings_column_view co cudf::make_numeric_column(output_type, total_ngrams, cudf::mask_state::UNALLOCATED, stream, mr); auto d_hashes = hashes->mutable_view().data(); - character_ngram_hash_kernel<<>>( + character_ngram_hash_kernel<<>>( *d_strings, ngrams, seed, d_offsets, d_hashes); CUDF_CUDA_TRY(cudaGetLastError()); @@ -401,7 +401,7 @@ std::unique_ptr hash_character_ngrams(cudf::strings_column_view co std::unique_ptr generate_character_ngrams(cudf::strings_column_view const& strings, cudf::size_type ngrams, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { CUDF_FUNC_RANGE(); @@ -411,7 +411,7 @@ std::unique_ptr generate_character_ngrams(cudf::strings_column_vie std::unique_ptr hash_character_ngrams(cudf::strings_column_view const& strings, cudf::size_type ngrams, uint32_t seed, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { CUDF_FUNC_RANGE(); diff --git a/cpp/src/text/jaccard.cu b/cpp/src/text/jaccard.cu index a4e7ff354a25..8a74b77db875 100644 --- a/cpp/src/text/jaccard.cu +++ b/cpp/src/text/jaccard.cu @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: Copyright (c) 2023-2026, NVIDIA CORPORATION. + * SPDX-FileCopyrightText: Copyright (c) 2023-2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved. * SPDX-License-Identifier: Apache-2.0 */ @@ -21,7 +21,6 @@ #include -#include #include #include @@ -29,6 +28,7 @@ #include #include #include +#include #include #include #include @@ -105,12 +105,12 @@ CUDF_KERNEL void sorted_unique_fn(uint32_t const* d_values, rmm::device_uvector compute_unique_counts(uint32_t const* values, int64_t const* offsets, cudf::size_type rows, - rmm::cuda_stream_view stream) + cuda::stream_ref stream) { auto d_results = rmm::device_uvector(rows, stream); auto const num_blocks = cudf::util::div_rounding_up_safe( static_cast(rows) * cudf::detail::warp_size, block_size); - sorted_unique_fn<<>>( + sorted_unique_fn<<>>( values, offsets, rows, d_results.data()); CUDF_CUDA_TRY(cudaGetLastError()); return d_results; @@ -180,12 +180,12 @@ rmm::device_uvector compute_intersect_counts(uint32_t const* va uint32_t const* values2, int64_t const* offsets2, cudf::size_type rows, - rmm::cuda_stream_view stream) + cuda::stream_ref stream) { auto d_results = rmm::device_uvector(rows, stream); auto const num_blocks = cudf::util::div_rounding_up_safe( static_cast(rows) * cudf::detail::warp_size, block_size); - sorted_intersect_fn<<>>( + sorted_intersect_fn<<>>( values1, offsets1, values2, offsets2, rows, d_results.data()); CUDF_CUDA_TRY(cudaGetLastError()); return d_results; @@ -305,15 +305,15 @@ void segmented_sort(uint32_t const* input, int64_t items, cudf::size_type segments, int64_t const* offsets, - rmm::cuda_stream_view stream) + cuda::stream_ref stream) { rmm::device_buffer temp; std::size_t temp_bytes = 0; cub::DeviceSegmentedSort::SortKeys( - temp.data(), temp_bytes, input, output, items, segments, offsets, offsets + 1, stream.value()); + temp.data(), temp_bytes, input, output, items, segments, offsets, offsets + 1, stream.get()); temp = rmm::device_buffer(temp_bytes, stream); cub::DeviceSegmentedSort::SortKeys( - temp.data(), temp_bytes, input, output, items, segments, offsets, offsets + 1, stream.value()); + temp.data(), temp_bytes, input, output, items, segments, offsets, offsets + 1, stream.get()); } /** @@ -328,7 +328,7 @@ void segmented_sort(uint32_t const* input, * @return The sorted hash values and offsets to each row */ std::pair, rmm::device_uvector> hash_substrings( - cudf::strings_column_view const& input, cudf::size_type width, rmm::cuda_stream_view stream) + cudf::strings_column_view const& input, cudf::size_type width, cuda::stream_ref stream) { auto const d_strings = cudf::column_device_view::create(input.parent(), stream); @@ -336,7 +336,7 @@ std::pair, rmm::device_uvector> hash_subs auto offsets = rmm::device_uvector(input.size() + 1, stream); auto const num_blocks = cudf::util::div_rounding_up_safe( static_cast(input.size()) * cudf::detail::warp_size, block_size); - count_substrings_kernel<<>>( + count_substrings_kernel<<>>( *d_strings, width, offsets.data()); CUDF_CUDA_TRY(cudaGetLastError()); auto const total_hashes = @@ -344,7 +344,7 @@ std::pair, rmm::device_uvector> hash_subs // hash substrings rmm::device_uvector hashes(total_hashes, stream); - substring_hash_kernel<<>>( + substring_hash_kernel<<>>( *d_strings, width, offsets.data(), hashes.data()); CUDF_CUDA_TRY(cudaGetLastError()); @@ -439,7 +439,7 @@ struct jaccard_fn { std::unique_ptr jaccard_index(cudf::strings_column_view const& input1, cudf::strings_column_view const& input2, cudf::size_type width, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { CUDF_EXPECTS( @@ -490,7 +490,7 @@ std::unique_ptr jaccard_index(cudf::strings_column_view const& inp std::unique_ptr jaccard_index(cudf::strings_column_view const& input1, cudf::strings_column_view const& input2, cudf::size_type width, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { CUDF_FUNC_RANGE(); diff --git a/cpp/src/text/minhash.cu b/cpp/src/text/minhash.cu index 80154e15ce3c..c7fdf4848321 100644 --- a/cpp/src/text/minhash.cu +++ b/cpp/src/text/minhash.cu @@ -26,7 +26,6 @@ #include -#include #include #include @@ -36,6 +35,7 @@ #include #include #include +#include #include #include #include @@ -389,10 +389,7 @@ CUDF_KERNEL void minhash_kernel(offsets_type offsets_itr, */ template std::pair> partition_input( - cudf::size_type size, - cudf::size_type threshold_count, - transform_fn tfn, - rmm::cuda_stream_view stream) + cudf::size_type size, cudf::size_type threshold_count, transform_fn tfn, cuda::stream_ref stream) { auto indices = rmm::device_uvector(size, stream); thrust::sequence(rmm::exec_policy_nosync(stream, cudf::get_current_device_resource_ref()), @@ -432,7 +429,7 @@ std::unique_ptr minhash_fn(cudf::strings_column_view const& input, cudf::device_span parameter_a, cudf::device_span parameter_b, cudf::size_type width, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { CUDF_EXPECTS(width >= 2, @@ -469,13 +466,13 @@ std::unique_ptr minhash_fn(cudf::strings_column_view const& input, 0, stream, cudf::get_current_device_resource_ref()); minhash_seed_kernel - <<>>(*d_strings, - seed, - width, - d_hashes.data(), - d_threshold_count.data(), - parameter_a.size(), - d_results); + <<>>(*d_strings, + seed, + width, + d_hashes.data(), + d_threshold_count.data(), + parameter_a.size(), + d_results); CUDF_CUDA_TRY(cudaGetLastError()); auto transform_fn = [d_strings = *d_strings] __device__(auto idx) -> cudf::size_type { @@ -495,7 +492,7 @@ std::unique_ptr minhash_fn(cudf::strings_column_view const& input, cudf::detail::grid_1d grid{static_cast(d_indices.size()) * block_size, block_size}; minhash_kernel - <<>>( + <<>>( input_offsets, d_indices, parameter_a, parameter_b, width, d_hashes.data(), d_results); CUDF_CUDA_TRY(cudaGetLastError()); } @@ -507,7 +504,7 @@ std::unique_ptr minhash_fn(cudf::strings_column_view const& input, cudf::device_span(indices.data() + threshold_index, count); cudf::detail::grid_1d grid{count * block_size * blocks_per_row, block_size}; minhash_kernel - <<>>( + <<>>( input_offsets, d_indices, parameter_a, parameter_b, width, d_hashes.data(), d_results); CUDF_CUDA_TRY(cudaGetLastError()); } @@ -522,7 +519,7 @@ std::unique_ptr minhash_ngrams_fn( hash_value_type seed, cudf::device_span parameter_a, cudf::device_span parameter_b, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { CUDF_EXPECTS(ngrams >= 2, @@ -560,13 +557,13 @@ std::unique_ptr minhash_ngrams_fn( auto d_list = cudf::lists_column_device_view(*d_input); minhash_ngrams_kernel - <<>>(d_list, - seed, - ngrams, - d_hashes.data(), - d_threshold_count.data(), - parameter_a.size(), - d_results); + <<>>(d_list, + seed, + ngrams, + d_hashes.data(), + d_threshold_count.data(), + parameter_a.size(), + d_results); CUDF_CUDA_TRY(cudaGetLastError()); auto sizes_fn = [d_list] __device__(auto idx) -> cudf::size_type { @@ -585,7 +582,7 @@ std::unique_ptr minhash_ngrams_fn( cudf::detail::grid_1d grid{static_cast(d_indices.size()) * block_size, block_size}; minhash_kernel - <<>>( + <<>>( input_offsets, d_indices, parameter_a, parameter_b, ngrams, d_hashes.data(), d_results); CUDF_CUDA_TRY(cudaGetLastError()); } @@ -597,7 +594,7 @@ std::unique_ptr minhash_ngrams_fn( cudf::device_span(indices.data() + threshold_index, count); cudf::detail::grid_1d grid{count * block_size * blocks_per_row, block_size}; minhash_kernel - <<>>( + <<>>( input_offsets, d_indices, parameter_a, parameter_b, ngrams, d_hashes.data(), d_results); CUDF_CUDA_TRY(cudaGetLastError()); } @@ -608,7 +605,7 @@ std::unique_ptr minhash_ngrams_fn( std::unique_ptr build_list_result(cudf::column_view const& input, std::unique_ptr&& hashes, cudf::size_type seeds_size, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { // build the offsets for the output lists column @@ -638,7 +635,7 @@ std::unique_ptr minhash(cudf::strings_column_view const& input, cudf::device_span parameter_a, cudf::device_span parameter_b, cudf::size_type width, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { using HashFunction = cudf::hashing::detail::MurmurHash3_x86_32; @@ -652,7 +649,7 @@ std::unique_ptr minhash_ngrams(cudf::lists_column_view const& inpu uint32_t seed, cudf::device_span parameter_a, cudf::device_span parameter_b, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { using HashFunction = cudf::hashing::detail::MurmurHash3_x86_32; @@ -666,7 +663,7 @@ std::unique_ptr minhash64(cudf::strings_column_view const& input, cudf::device_span parameter_a, cudf::device_span parameter_b, cudf::size_type width, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { using HashFunction = cudf::hashing::detail::MurmurHash3_x64_128; @@ -680,7 +677,7 @@ std::unique_ptr minhash64_ngrams(cudf::lists_column_view const& in uint64_t seed, cudf::device_span parameter_a, cudf::device_span parameter_b, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { using HashFunction = cudf::hashing::detail::MurmurHash3_x64_128; @@ -696,7 +693,7 @@ std::unique_ptr minhash(cudf::strings_column_view const& input, cudf::device_span parameter_a, cudf::device_span parameter_b, cudf::size_type width, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { CUDF_FUNC_RANGE(); @@ -708,7 +705,7 @@ std::unique_ptr minhash_ngrams(cudf::lists_column_view const& inpu uint32_t seed, cudf::device_span parameter_a, cudf::device_span parameter_b, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { @@ -721,7 +718,7 @@ std::unique_ptr minhash64(cudf::strings_column_view const& input, cudf::device_span parameter_a, cudf::device_span parameter_b, cudf::size_type width, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { CUDF_FUNC_RANGE(); @@ -733,7 +730,7 @@ std::unique_ptr minhash64_ngrams(cudf::lists_column_view const& in uint64_t seed, cudf::device_span parameter_a, cudf::device_span parameter_b, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { diff --git a/cpp/src/text/ngrams_tokenize.cu b/cpp/src/text/ngrams_tokenize.cu index 22d0a1f5887a..c3afe28cf81c 100644 --- a/cpp/src/text/ngrams_tokenize.cu +++ b/cpp/src/text/ngrams_tokenize.cu @@ -21,11 +21,11 @@ #include #include -#include #include #include #include +#include #include #include @@ -129,7 +129,7 @@ std::unique_ptr ngrams_tokenize(cudf::strings_column_view const& s cudf::size_type ngrams, cudf::string_scalar const& delimiter, cudf::string_scalar const& separator, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { CUDF_EXPECTS(delimiter.is_valid(stream), "Parameter delimiter must be valid"); @@ -236,7 +236,7 @@ std::unique_ptr ngrams_tokenize(cudf::strings_column_view const& s cudf::size_type ngrams, cudf::string_scalar const& delimiter, cudf::string_scalar const& separator, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { CUDF_FUNC_RANGE(); diff --git a/cpp/src/text/normalize.cu b/cpp/src/text/normalize.cu index 0dc98c689fef..8528e496b7ca 100644 --- a/cpp/src/text/normalize.cu +++ b/cpp/src/text/normalize.cu @@ -29,11 +29,10 @@ #include -#include - #include #include #include +#include #include #include #include @@ -106,7 +105,7 @@ __device__ int8_t cp_to_utf8(uint32_t codepoint, char* out) // detail API std::unique_ptr normalize_spaces(cudf::strings_column_view const& strings, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { if (strings.is_empty()) return cudf::make_empty_column(cudf::data_type{cudf::type_id::STRING}); @@ -131,7 +130,7 @@ std::unique_ptr normalize_spaces(cudf::strings_column_view const& * Build the code point metadata table in device memory * using the vector pieces from codepoint_metadata.ah */ -rmm::device_uvector get_codepoint_metadata(rmm::cuda_stream_view stream) +rmm::device_uvector get_codepoint_metadata(cuda::stream_ref stream) { auto table_vector = rmm::device_uvector(codepoint_metadata_size, stream); auto table = table_vector.data(); @@ -155,7 +154,7 @@ rmm::device_uvector get_codepoint_metadata(rmm::cuda_st * Build the aux code point data table in device memory * using the vector pieces from codepoint_metadata.ah */ -rmm::device_uvector get_aux_codepoint_data(rmm::cuda_stream_view stream) +rmm::device_uvector get_aux_codepoint_data(cuda::stream_ref stream) { auto table_vector = rmm::device_uvector(aux_codepoint_data_size, stream); auto table = table_vector.data(); @@ -184,7 +183,7 @@ rmm::device_uvector get_aux_codepoint_data(rmm::cuda_st // external APIs std::unique_ptr normalize_spaces(cudf::strings_column_view const& input, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { CUDF_FUNC_RANGE(); @@ -219,7 +218,7 @@ struct character_normalizer::character_normalizer_impl { character_normalizer::character_normalizer(bool do_lower_case, cudf::strings_column_view const& special_tokens, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref) { auto cp_metadata = nvtext::detail::get_codepoint_metadata(stream); @@ -249,7 +248,7 @@ character_normalizer::~character_normalizer() {} std::unique_ptr create_character_normalizer( bool do_lower_case, cudf::strings_column_view const& special_tokens, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { CUDF_FUNC_RANGE(); @@ -401,7 +400,7 @@ rmm::device_uvector compute_sizes(cudf::device_span(size, stream); @@ -425,20 +424,20 @@ rmm::device_uvector compute_sizes(cudf::device_span([offset] __device__(auto o) { return o - offset; })); cub::DeviceSegmentedReduce::Sum( - nullptr, temp, d_in, d_out, size, offsets_itr, offsets_itr + 1, stream.value()); + nullptr, temp, d_in, d_out, size, offsets_itr, offsets_itr + 1, stream.get()); auto d_temp = rmm::device_buffer{temp, stream}; cub::DeviceSegmentedReduce::Sum( - d_temp.data(), temp, d_in, d_out, size, offsets_itr, offsets_itr + 1, stream.value()); + d_temp.data(), temp, d_in, d_out, size, offsets_itr, offsets_itr + 1, stream.get()); } return output_sizes; @@ -450,7 +449,7 @@ OutputIterator remove_copy_safe(InputIterator first, InputIterator last, OutputIterator result, T const& value, - rmm::cuda_stream_view stream) + cuda::stream_ref stream) { auto const copy_size = std::min(static_cast(std::distance(first, last)), static_cast(std::numeric_limits::max())); @@ -472,7 +471,7 @@ OutputIterator remove_copy_safe(InputIterator first, // handles ranges above int32 max template -Iterator remove_safe(Iterator first, Iterator last, T const& value, rmm::cuda_stream_view stream) +Iterator remove_safe(Iterator first, Iterator last, T const& value, cuda::stream_ref stream) { auto const size = std::min(static_cast(std::distance(first, last)), static_cast(std::numeric_limits::max())); @@ -491,7 +490,7 @@ Iterator remove_safe(Iterator first, Iterator last, T const& value, rmm::cuda_st std::unique_ptr normalize_characters(cudf::strings_column_view const& input, character_normalizer const& normalizer, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { if (input.is_empty()) { return cudf::make_empty_column(cudf::data_type{cudf::type_id::STRING}); } @@ -510,7 +509,7 @@ std::unique_ptr normalize_characters(cudf::strings_column_view con auto const& parameters = normalizer._impl; auto d_normalized = rmm::device_uvector(max_new_char_total, stream); - data_normalizer_kernel<<>>( + data_normalizer_kernel<<>>( d_input_chars, chars_size, parameters->cp_metadata.data(), @@ -524,7 +523,7 @@ std::unique_ptr normalize_characters(cudf::strings_column_view con // before returning the output strings column. auto const special_tokens = parameters->get_special_tokens(); if (!special_tokens.empty()) { - special_tokens_kernel<<>>( + special_tokens_kernel<<>>( d_normalized.data(), chars_size, special_tokens, parameters->do_lower_case); CUDF_CUDA_TRY(cudaGetLastError()); } @@ -556,7 +555,7 @@ std::unique_ptr normalize_characters(cudf::strings_column_view con std::unique_ptr normalize_characters(cudf::strings_column_view const& input, character_normalizer const& normalizer, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { CUDF_FUNC_RANGE(); diff --git a/cpp/src/text/normalize.cuh b/cpp/src/text/normalize.cuh index 39f32ae6bc33..7e4a294ff28b 100644 --- a/cpp/src/text/normalize.cuh +++ b/cpp/src/text/normalize.cuh @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: Copyright (c) 2025, NVIDIA CORPORATION. + * SPDX-FileCopyrightText: Copyright (c) 2025-2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved. * SPDX-License-Identifier: Apache-2.0 */ @@ -7,9 +7,10 @@ #include "text/detail/cp_data.h" -#include #include +#include + #include namespace nvtext { @@ -95,14 +96,14 @@ __device__ constexpr bool is_head_byte(unsigned char utf8_byte) { return (utf8_b * * @param stream CUDA stream used for device memory operations and kernel launches. */ -rmm::device_uvector get_codepoint_metadata(rmm::cuda_stream_view stream); +rmm::device_uvector get_codepoint_metadata(cuda::stream_ref stream); /** * @brief Retrieve the auxiliary code point metadata table. * * @param stream CUDA stream used for device memory operations and kernel launches. */ -rmm::device_uvector get_aux_codepoint_data(rmm::cuda_stream_view stream); +rmm::device_uvector get_aux_codepoint_data(cuda::stream_ref stream); } // namespace detail } // namespace nvtext diff --git a/cpp/src/text/replace.cu b/cpp/src/text/replace.cu index c26c58e8b56c..e7a7772272cd 100644 --- a/cpp/src/text/replace.cu +++ b/cpp/src/text/replace.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 */ @@ -21,13 +21,12 @@ #include -#include - #include #include #include #include #include +#include #include #include #include @@ -258,7 +257,7 @@ struct remove_small_tokens_fn : base_token_replacer_fn { template std::unique_ptr replace_helper(ReplacerFn replacer, cudf::strings_column_view const& input, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { auto const first_offset = (input.offset() == 0) ? 0L @@ -315,7 +314,7 @@ std::unique_ptr replace_helper(ReplacerFn replacer, sub_offsets.begin() + sub_count, tmp_offsets.begin()); tmp_offsets.resize(sub_count + input.size() + 1, stream); - stream.synchronize(); // protect against destruction of sub_offsets + stream.wait(); // protect against destruction of sub_offsets } // cobble together a column_view of type STRING using the original data and the tmp offsets @@ -364,7 +363,7 @@ std::unique_ptr replace_tokens(cudf::strings_column_view const& in cudf::strings_column_view const& targets, cudf::strings_column_view const& replacements, cudf::string_scalar const& delimiter, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { CUDF_EXPECTS(!targets.has_nulls(), "Parameter targets must not have nulls"); @@ -394,7 +393,7 @@ std::unique_ptr filter_tokens(cudf::strings_column_view const& inp cudf::size_type min_token_length, cudf::string_scalar const& replacement, cudf::string_scalar const& delimiter, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { CUDF_EXPECTS(replacement.is_valid(stream), "Parameter replacement must be valid"); @@ -419,7 +418,7 @@ std::unique_ptr replace_tokens(cudf::strings_column_view const& in cudf::strings_column_view const& targets, cudf::strings_column_view const& replacements, cudf::string_scalar const& delimiter, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { CUDF_FUNC_RANGE(); @@ -430,7 +429,7 @@ std::unique_ptr filter_tokens(cudf::strings_column_view const& inp cudf::size_type min_token_length, cudf::string_scalar const& replacement, cudf::string_scalar const& delimiter, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { CUDF_FUNC_RANGE(); diff --git a/cpp/src/text/stemmer.cu b/cpp/src/text/stemmer.cu index 2726bdbe3816..ab79e89f3936 100644 --- a/cpp/src/text/stemmer.cu +++ b/cpp/src/text/stemmer.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 */ @@ -18,10 +18,10 @@ #include -#include #include #include +#include #include #include @@ -87,7 +87,7 @@ template std::unique_ptr is_letter(cudf::strings_column_view const& strings, letter_type ltype, PositionIterator position_itr, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { if (strings.is_empty()) return cudf::make_empty_column(cudf::data_type{cudf::type_id::BOOL8}); @@ -121,7 +121,7 @@ struct dispatch_is_letter_fn { std::unique_ptr operator()(cudf::strings_column_view const& strings, letter_type ltype, cudf::column_view const& indices, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) const requires(cudf::is_index_type()) { @@ -201,7 +201,7 @@ struct porter_stemmer_measure_fn { } // namespace std::unique_ptr porter_stemmer_measure(cudf::strings_column_view const& strings, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { if (strings.is_empty()) { @@ -230,7 +230,7 @@ std::unique_ptr porter_stemmer_measure(cudf::strings_column_view c std::unique_ptr is_letter(cudf::strings_column_view const& strings, letter_type ltype, cudf::column_view const& indices, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { return cudf::type_dispatcher( @@ -244,7 +244,7 @@ std::unique_ptr is_letter(cudf::strings_column_view const& strings std::unique_ptr is_letter(cudf::strings_column_view const& input, letter_type ltype, cudf::size_type character_index, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { CUDF_FUNC_RANGE(); @@ -255,7 +255,7 @@ std::unique_ptr is_letter(cudf::strings_column_view const& input, std::unique_ptr is_letter(cudf::strings_column_view const& input, letter_type ltype, cudf::column_view const& indices, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { CUDF_FUNC_RANGE(); @@ -266,7 +266,7 @@ std::unique_ptr is_letter(cudf::strings_column_view const& input, * @copydoc nvtext::porter_stemmer_measure */ std::unique_ptr porter_stemmer_measure(cudf::strings_column_view const& input, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { CUDF_FUNC_RANGE(); diff --git a/cpp/src/text/tokenize.cu b/cpp/src/text/tokenize.cu index f7bc91cafd73..7839665ef810 100644 --- a/cpp/src/text/tokenize.cu +++ b/cpp/src/text/tokenize.cu @@ -21,11 +21,11 @@ #include #include -#include #include #include #include +#include #include #include #include @@ -37,7 +37,7 @@ namespace { template std::unique_ptr token_count_fn(cudf::size_type strings_count, TokenCounter tokenizer, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { // create output column @@ -61,7 +61,7 @@ std::unique_ptr token_count_fn(cudf::size_type strings_count, template std::unique_ptr tokenize_fn(cudf::size_type strings_count, Tokenizer tokenizer, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { // get the number of tokens in each string @@ -95,7 +95,7 @@ std::unique_ptr tokenize_fn(cudf::size_type strings_count, // zero or more character tokenizer std::unique_ptr tokenize(cudf::strings_column_view const& strings, cudf::string_scalar const& delimiter, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { CUDF_EXPECTS(delimiter.is_valid(stream), "Parameter delimiter must be valid"); @@ -107,7 +107,7 @@ std::unique_ptr tokenize(cudf::strings_column_view const& strings, // zero or more character token counter std::unique_ptr count_tokens(cudf::strings_column_view const& strings, cudf::string_scalar const& delimiter, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { CUDF_EXPECTS(delimiter.is_valid(stream), "Parameter delimiter must be valid"); @@ -120,7 +120,7 @@ std::unique_ptr count_tokens(cudf::strings_column_view const& stri // one or more string delimiter tokenizer std::unique_ptr tokenize(cudf::strings_column_view const& strings, cudf::strings_column_view const& delimiters, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { CUDF_EXPECTS(delimiters.size() > 0, "Parameter delimiters must not be empty"); @@ -139,7 +139,7 @@ std::unique_ptr tokenize(cudf::strings_column_view const& strings, // one or more string delimiter token counter std::unique_ptr count_tokens(cudf::strings_column_view const& strings, cudf::strings_column_view const& delimiters, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { CUDF_EXPECTS(delimiters.size() > 0, "Parameter delimiters must not be empty"); @@ -157,7 +157,7 @@ std::unique_ptr count_tokens(cudf::strings_column_view const& stri // tokenize on every character std::unique_ptr character_tokenize(cudf::strings_column_view const& strings_column, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { auto strings_count = strings_column.size(); @@ -234,7 +234,7 @@ std::unique_ptr character_tokenize(cudf::strings_column_view const std::unique_ptr tokenize(cudf::strings_column_view const& input, cudf::string_scalar const& delimiter, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { CUDF_FUNC_RANGE(); @@ -243,7 +243,7 @@ std::unique_ptr tokenize(cudf::strings_column_view const& input, std::unique_ptr tokenize(cudf::strings_column_view const& input, cudf::strings_column_view const& delimiters, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { CUDF_FUNC_RANGE(); @@ -252,7 +252,7 @@ std::unique_ptr tokenize(cudf::strings_column_view const& input, std::unique_ptr count_tokens(cudf::strings_column_view const& input, cudf::string_scalar const& delimiter, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { CUDF_FUNC_RANGE(); @@ -261,7 +261,7 @@ std::unique_ptr count_tokens(cudf::strings_column_view const& inpu std::unique_ptr count_tokens(cudf::strings_column_view const& input, cudf::strings_column_view const& delimiters, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { CUDF_FUNC_RANGE(); @@ -269,7 +269,7 @@ std::unique_ptr count_tokens(cudf::strings_column_view const& inpu } std::unique_ptr character_tokenize(cudf::strings_column_view const& input, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { CUDF_FUNC_RANGE(); diff --git a/cpp/src/text/vocabulary_tokenize.cu b/cpp/src/text/vocabulary_tokenize.cu index 2f2dfa64bc80..26ad038c1136 100644 --- a/cpp/src/text/vocabulary_tokenize.cu +++ b/cpp/src/text/vocabulary_tokenize.cu @@ -27,13 +27,13 @@ #include -#include #include #include #include #include #include +#include #include #include #include @@ -101,7 +101,7 @@ using vocabulary_map_type = cuco::static_map this helper simplifies the return type in a maintainable way using col_device_view = std::invoke_result_t; struct tokenize_vocabulary::tokenize_vocabulary_impl { @@ -127,7 +127,7 @@ struct key_pair { }; tokenize_vocabulary::tokenize_vocabulary(cudf::strings_column_view const& input, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { CUDF_EXPECTS(not input.is_empty(), "vocabulary must not be empty"); @@ -146,11 +146,11 @@ tokenize_vocabulary::tokenize_vocabulary(cudf::strings_column_view const& input, cuco::thread_scope_device, detail::cuco_storage{}, rmm::mr::polymorphic_allocator{mr}, - stream.value()); + stream.get()); // the row index is the token id (value for each key in the map) auto iter = cudf::detail::make_counting_transform_iterator(0, key_pair{}); - vocab_map->insert_async(iter, iter + vocabulary->size(), stream.value()); + vocab_map->insert_async(iter, iter + vocabulary->size(), stream.get()); _impl = new tokenize_vocabulary_impl( std::move(vocabulary), std::move(d_vocabulary), std::move(vocab_map)); @@ -158,7 +158,7 @@ tokenize_vocabulary::tokenize_vocabulary(cudf::strings_column_view const& input, tokenize_vocabulary::~tokenize_vocabulary() { delete _impl; } std::unique_ptr load_vocabulary(cudf::strings_column_view const& input, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { CUDF_FUNC_RANGE(); @@ -347,7 +347,7 @@ std::unique_ptr tokenize_with_vocabulary(cudf::strings_column_view tokenize_vocabulary const& vocabulary, cudf::string_scalar const& delimiter, cudf::size_type default_id, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { CUDF_EXPECTS(delimiter.is_valid(stream), "Parameter delimiter must be valid"); @@ -406,16 +406,14 @@ std::unique_ptr tokenize_with_vocabulary(cudf::strings_column_view // mark position of all delimiters auto grid_chars = cudf::detail::grid_1d{chars_size, block_size}; - mark_delimiters_fn<<>>(d_input_chars, chars_size, d_delimiter, d_marks.data()); + mark_delimiters_fn<<>>( + d_input_chars, chars_size, d_delimiter, d_marks.data()); CUDF_CUDA_TRY(cudaGetLastError()); // launch warp per string to compute token counts constexpr cudf::thread_index_type warp_size = cudf::detail::warp_size; cudf::detail::grid_1d grid{input.size() * warp_size, block_size}; - token_counts_fn<<>>( + token_counts_fn<<>>( *d_strings, d_delimiter, d_token_counts.data(), d_marks.data()); CUDF_CUDA_TRY(cudaGetLastError()); auto [token_offsets, total_count] = cudf::detail::make_offsets_child_column( @@ -464,7 +462,7 @@ std::unique_ptr tokenize_with_vocabulary(cudf::strings_column_view tokenize_vocabulary const& vocabulary, cudf::string_scalar const& delimiter, cudf::size_type default_id, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { CUDF_FUNC_RANGE(); diff --git a/cpp/src/text/wordpiece_tokenize.cu b/cpp/src/text/wordpiece_tokenize.cu index abe64e425c15..88923f7d251c 100644 --- a/cpp/src/text/wordpiece_tokenize.cu +++ b/cpp/src/text/wordpiece_tokenize.cu @@ -25,7 +25,6 @@ #include -#include #include #include @@ -37,6 +36,7 @@ #include #include #include +#include #include #include #include @@ -137,7 +137,7 @@ using sub_vocabulary_map_type = cuco::static_map this helper simplifies the return type in a maintainable way using col_device_view = std::invoke_result_t; /** @@ -211,7 +211,7 @@ struct resolve_unk_id { } // namespace wordpiece_vocabulary::wordpiece_vocabulary(cudf::strings_column_view const& input, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { CUDF_EXPECTS(not input.is_empty(), "vocabulary must not be empty", std::invalid_argument); @@ -231,10 +231,10 @@ wordpiece_vocabulary::wordpiece_vocabulary(cudf::strings_column_view const& inpu cuco::thread_scope_thread, detail::cuco_storage{}, rmm::mr::polymorphic_allocator{mr}, - stream.value()); + stream.get()); // the row index is the token id (data value for each key in the map) auto iter = cudf::detail::make_counting_transform_iterator(0, key_pair{}); - vocab_map->insert_async(iter, iter + vocabulary->size(), stream.value()); + vocab_map->insert_async(iter, iter + vocabulary->size(), stream.get()); auto const zero_itr = cuda::counting_iterator{0}; // get the indices of all the ## prefixed entries @@ -257,10 +257,10 @@ wordpiece_vocabulary::wordpiece_vocabulary(cudf::strings_column_view const& inpu cuco::thread_scope_thread, detail::cuco_storage{}, rmm::mr::polymorphic_allocator{mr}, - stream.value()); + stream.get()); // insert them without the '##' prefix since that is how they will be looked up auto iter_sub = thrust::make_transform_iterator(sub_map_indices.begin(), key_pair{}); - vocab_sub_map->insert_async(iter_sub, iter_sub + sub_map_indices.size(), stream.value()); + vocab_sub_map->insert_async(iter_sub, iter_sub + sub_map_indices.size(), stream.get()); // prefetch the [unk] vocab entry auto unk_ids = rmm::device_uvector(2, stream); @@ -285,7 +285,7 @@ wordpiece_vocabulary::~wordpiece_vocabulary() {} std::unique_ptr load_wordpiece_vocabulary( cudf::strings_column_view const& input, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { CUDF_FUNC_RANGE(); @@ -464,7 +464,7 @@ rmm::device_uvector count_tokens(cudf::size_type const* d_token OffsetType offsets, int64_t offset, cudf::size_type size, - rmm::cuda_stream_view stream) + cuda::stream_ref stream) { auto d_counts = rmm::device_uvector(size, stream); @@ -482,10 +482,10 @@ rmm::device_uvector count_tokens(cudf::size_type const* d_token auto temp = std::size_t{0}; auto d_out = d_counts.data(); cub::DeviceSegmentedReduce::Sum( - nullptr, temp, d_in, d_out, size, d_offsets, d_offsets + 1, stream.value()); + nullptr, temp, d_in, d_out, size, d_offsets, d_offsets + 1, stream.get()); auto d_temp = rmm::device_buffer{temp, stream}; cub::DeviceSegmentedReduce::Sum( - d_temp.data(), temp, d_in, d_out, size, d_offsets, d_offsets + 1, stream.value()); + d_temp.data(), temp, d_in, d_out, size, d_offsets, d_offsets + 1, stream.get()); return d_counts; } @@ -505,7 +505,7 @@ rmm::device_uvector compute_all_tokens( int64_t first_offset, int64_t chars_size, wordpiece_vocabulary::wordpiece_vocabulary_impl const& vocabulary, - rmm::cuda_stream_view stream) + cuda::stream_ref stream) { auto const d_input_chars = input.chars_begin(stream) + first_offset; @@ -560,7 +560,7 @@ rmm::device_uvector compute_all_tokens( cudf::detail::grid_1d grid{static_cast(d_all_edges.size()), 512}; tokenize_all_kernel - <<>>( + <<>>( d_all_edges, d_input_chars, map_ref, sub_map_ref, unk_id, d_tokens.data()); CUDF_CUDA_TRY(cudaGetLastError()); @@ -760,7 +760,7 @@ rmm::device_uvector compute_some_tokens( int64_t chars_size, cudf::size_type max_words_per_row, wordpiece_vocabulary::wordpiece_vocabulary_impl const& vocabulary, - rmm::cuda_stream_view stream) + cuda::stream_ref stream) { auto const d_input_chars = input.chars_begin(stream) + first_offset; @@ -791,7 +791,7 @@ rmm::device_uvector compute_some_tokens( constexpr cudf::thread_index_type warp_size = cudf::detail::warp_size; cudf::detail::grid_1d grid_find{input.size() * warp_size, block_size}; find_words_kernel - <<>>( + <<>>( *d_strings, d_input_chars, max_word_offsets.data(), start_words.data(), word_sizes.data()); CUDF_CUDA_TRY(cudaGetLastError()); @@ -827,7 +827,7 @@ rmm::device_uvector compute_some_tokens( cudf::detail::grid_1d grid{total_words, 512}; tokenize_kernel - <<>>( + <<>>( start_words, word_sizes, d_input_chars, map_ref, sub_map_ref, unk_id, d_tokens.data()); CUDF_CUDA_TRY(cudaGetLastError()); @@ -839,7 +839,7 @@ rmm::device_uvector compute_some_tokens( std::unique_ptr wordpiece_tokenize(cudf::strings_column_view const& input, wordpiece_vocabulary const& vocabulary, cudf::size_type max_words_per_row, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { CUDF_EXPECTS( @@ -891,7 +891,7 @@ std::unique_ptr wordpiece_tokenize(cudf::strings_column_view const std::unique_ptr wordpiece_tokenize(cudf::strings_column_view const& input, wordpiece_vocabulary const& vocabulary, cudf::size_type max_words_per_row, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { CUDF_FUNC_RANGE(); diff --git a/cpp/tests/io/comp/comp_test.cpp b/cpp/tests/io/comp/comp_test.cpp index 86a5c4acdd43..8dc2f429d2fc 100644 --- a/cpp/tests/io/comp/comp_test.cpp +++ b/cpp/tests/io/comp/comp_test.cpp @@ -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 */ @@ -89,7 +89,7 @@ struct DecompressTest static_cast(this)->device_dispatch(inf_in, inf_out, inf_stat); CUDF_CUDA_TRY(cudaMemcpyAsync( - decompressed.data(), dst.data(), dst.size(), cudaMemcpyDefault, stream.value())); + decompressed.data(), dst.data(), dst.size(), cudaMemcpyDefault, stream.get())); inf_stat.device_to_host(stream); CUDF_EXPECTS(inf_stat[0].status == codec_status::SUCCESS, "Failure in device decompression"); diff --git a/cpp/tests/io/cudftable_test.cpp b/cpp/tests/io/cudftable_test.cpp index 63859cb99d30..a3276a4dd8a6 100644 --- a/cpp/tests/io/cudftable_test.cpp +++ b/cpp/tests/io/cudftable_test.cpp @@ -515,10 +515,10 @@ TEST_F(CudftableTest, DeviceBufferSource) rmm::device_buffer device_buffer(buffer.size(), cudf::get_default_stream()); auto const stream = cudf::get_default_stream(); CUDF_CUDA_TRY(cudaMemcpyAsync( - device_buffer.data(), buffer.data(), buffer.size(), cudaMemcpyHostToDevice, stream.value())); + device_buffer.data(), buffer.data(), buffer.size(), cudaMemcpyHostToDevice, stream.get())); // Ensure the data is copied to the device before the host read, because the host read does not // take the stream - stream.synchronize(); + stream.wait(); auto device_span = cudf::device_span( static_cast(device_buffer.data()), device_buffer.size()); diff --git a/cpp/tests/io/experimental/hybrid_scan_common.cpp b/cpp/tests/io/experimental/hybrid_scan_common.cpp index 339009ecf7e5..1bb4c0374b49 100644 --- a/cpp/tests/io/experimental/hybrid_scan_common.cpp +++ b/cpp/tests/io/experimental/hybrid_scan_common.cpp @@ -194,7 +194,7 @@ multisource_device_data fetch_multisource_device_data( multifile_inputs const& inputs, std::pair, std::vector> const& byte_ranges_and_source_map, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { auto const byte_ranges_per_source = @@ -215,7 +215,7 @@ multisource_device_data fetch_multisource_device_data( } std::unique_ptr concatenate_tables(std::vector>&& tables, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { if (tables.size() == 1) { return std::move(tables[0]); } @@ -237,7 +237,7 @@ template auto filter_row_groups_with_dictionaries_impl(InputType& inputs, ReaderType const& reader, cudf::io::parquet_reader_options const& options, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { reader.reset_column_selection(); @@ -284,7 +284,7 @@ std::vector filter_row_groups_with_dictionaries( cudf::io::datasource& datasource, cudf::io::parquet::experimental::hybrid_scan_reader const& reader, cudf::io::parquet_reader_options const& options, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { return filter_row_groups_with_dictionaries_impl(datasource, reader, options, stream, mr); @@ -294,7 +294,7 @@ std::vector> filter_row_groups_with_dictionaries( multifile_inputs const& inputs, cudf::io::parquet::experimental::hybrid_scan_multifile const& reader, cudf::io::parquet_reader_options const& options, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { return filter_row_groups_with_dictionaries_impl(inputs, reader, options, stream, mr); @@ -306,7 +306,7 @@ std::pair, std::vector> create_parquet_with_s cudf::io::compression_type compression, std::vector column_names, std::vector column_order, - rmm::cuda_stream_view stream) + cuda::stream_ref stream) { static_assert(NumTableConcats >= 1, "Concatenated table must contain at least one table"); @@ -412,7 +412,7 @@ std::pair, std::vector> create_parquet_with_s cudf::io::compression_type, \ std::vector, \ std::vector, \ - rmm::cuda_stream_view) + cuda::stream_ref) #define INSTANTIATE_CREATE_PARQUET_WITH_STATS_DICT(T) \ INSTANTIATE_CREATE_PARQUET_WITH_STATS(T, 1, true, false); \ diff --git a/cpp/tests/io/experimental/hybrid_scan_common.hpp b/cpp/tests/io/experimental/hybrid_scan_common.hpp index 8a8493977a4b..1264a0ce6fa1 100644 --- a/cpp/tests/io/experimental/hybrid_scan_common.hpp +++ b/cpp/tests/io/experimental/hybrid_scan_common.hpp @@ -18,10 +18,11 @@ #include #include -#include #include #include +#include + #include #include #include @@ -95,7 +96,7 @@ void setup_page_indexes(cudf::io::parquet::experimental::hybrid_scan_multifile c multifile_inputs const& inputs, std::pair, std::vector> const& byte_ranges_and_source_map, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr); /** @@ -109,7 +110,7 @@ void setup_page_indexes(cudf::io::parquet::experimental::hybrid_scan_multifile c */ [[nodiscard]] std::unique_ptr concatenate_tables( std::vector>&& tables, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr); /** @@ -151,7 +152,7 @@ template column_names = {"col0", "col1", "col2"}, std::vector column_order = {0, 1, 2}, - rmm::cuda_stream_view stream = cudf::get_default_stream()); + cuda::stream_ref stream = cudf::get_default_stream()); /** * @brief Prune row groups using column chunk dictionaries via the single-file hybrid scan reader @@ -162,7 +163,7 @@ template setup_reader(cudf::io::datasource& datasourc auto apply_hybrid_scan_filters(cudf::io::datasource& datasource, hybrid_scan_reader const& reader, cudf::io::parquet_reader_options const& options, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { // Get all row groups from the reader @@ -133,7 +133,7 @@ std::tuple, std::unique_ptr> hybrid_sc cudf::ast::operation const& filter_expression, std::optional> const& payload_column_names, bool case_sensitive_names, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr, rmm::mr::aligned_resource_adaptor& aligned_mr) { @@ -209,7 +209,7 @@ std::tuple, std::unique_ptr> chunked_h cudf::ast::operation const& filter_expression, std::optional> const& payload_column_names, bool case_sensitive_names, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr, rmm::mr::aligned_resource_adaptor& aligned_mr) { @@ -324,7 +324,7 @@ std::unique_ptr hybrid_scan_single_step( cudf::ast::operation const& filter_expression, std::optional> const& column_names, bool case_sensitive_names, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { // Create reader options with empty source info @@ -365,7 +365,7 @@ std::unique_ptr chunked_hybrid_scan_single_step( cudf::ast::operation const& filter_expression, std::optional> const& column_names, bool case_sensitive_names, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { // Create reader options with empty source info diff --git a/cpp/tests/io/experimental/hybrid_scan_composer.hpp b/cpp/tests/io/experimental/hybrid_scan_composer.hpp index 80519cdd3130..ca7439277e01 100644 --- a/cpp/tests/io/experimental/hybrid_scan_composer.hpp +++ b/cpp/tests/io/experimental/hybrid_scan_composer.hpp @@ -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 */ @@ -32,7 +32,7 @@ std::tuple, std::unique_ptr> hybrid_sc cudf::ast::operation const& filter_expression, std::optional> const& payload_column_names, bool case_sensitive_names, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr, rmm::mr::aligned_resource_adaptor& aligned_mr); @@ -54,7 +54,7 @@ std::tuple, std::unique_ptr> chunked_h cudf::ast::operation const& filter_expression, std::optional> const& payload_column_names, bool case_sensitive_names, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr, rmm::mr::aligned_resource_adaptor& aligned_mr); @@ -75,7 +75,7 @@ std::unique_ptr hybrid_scan_single_step( cudf::ast::operation const& filter_expression, std::optional> const& column_names, bool case_sensitive_names, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr); /** @@ -95,5 +95,5 @@ std::unique_ptr chunked_hybrid_scan_single_step( cudf::ast::operation const& filter_expression, std::optional> const& column_names, bool case_sensitive_names, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr); diff --git a/cpp/tests/io/experimental/hybrid_scan_multifile_composer.cpp b/cpp/tests/io/experimental/hybrid_scan_multifile_composer.cpp index d3d52c2c5129..a3a5a9337644 100644 --- a/cpp/tests/io/experimental/hybrid_scan_multifile_composer.cpp +++ b/cpp/tests/io/experimental/hybrid_scan_multifile_composer.cpp @@ -21,7 +21,7 @@ std::tuple, std::unique_ptr> hybrid_sc cudf::ast::operation const& filter_expression, std::optional> const& payload_column_names, bool case_sensitive_names, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { auto options = cudf::io::parquet_reader_options::builder() @@ -68,7 +68,7 @@ std::unique_ptr hybrid_scan_multifile_single_step( cudf::ast::operation const& filter_expression, std::optional> const& column_names, bool case_sensitive_names, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { auto options = cudf::io::parquet_reader_options::builder() @@ -97,7 +97,7 @@ chunked_hybrid_scan_multifile(cudf::io::source_info const& source_info, cudf::ast::operation const& filter_expression, std::optional> const& payload_column_names, bool case_sensitive_names, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { auto options = cudf::io::parquet_reader_options::builder() @@ -163,7 +163,7 @@ std::unique_ptr chunked_hybrid_scan_multifile_single_step( cudf::ast::operation const& filter_expression, std::optional> const& column_names, bool case_sensitive_names, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { auto options = cudf::io::parquet_reader_options::builder() diff --git a/cpp/tests/io/experimental/hybrid_scan_multifile_composer.hpp b/cpp/tests/io/experimental/hybrid_scan_multifile_composer.hpp index 50421f6f5ac2..95f530de442e 100644 --- a/cpp/tests/io/experimental/hybrid_scan_multifile_composer.hpp +++ b/cpp/tests/io/experimental/hybrid_scan_multifile_composer.hpp @@ -33,7 +33,7 @@ std::tuple, std::unique_ptr> hybrid_sc cudf::ast::operation const& filter_expression, std::optional> const& payload_column_names, bool case_sensitive_names, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr); /** @@ -53,7 +53,7 @@ std::unique_ptr hybrid_scan_multifile_single_step( cudf::ast::operation const& filter_expression, std::optional> const& column_names, bool case_sensitive_names, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr); /** @@ -76,7 +76,7 @@ chunked_hybrid_scan_multifile(cudf::io::source_info const& source_info, cudf::ast::operation const& filter_expression, std::optional> const& payload_column_names, bool case_sensitive_names, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr); /** @@ -97,5 +97,5 @@ std::unique_ptr chunked_hybrid_scan_multifile_single_step( cudf::ast::operation const& filter_expression, std::optional> const& column_names, bool case_sensitive_names, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr); diff --git a/cpp/tests/io/experimental/hybrid_scan_multifile_filters_test.cpp b/cpp/tests/io/experimental/hybrid_scan_multifile_filters_test.cpp index baf05e6188b9..4a42846d668a 100644 --- a/cpp/tests/io/experimental/hybrid_scan_multifile_filters_test.cpp +++ b/cpp/tests/io/experimental/hybrid_scan_multifile_filters_test.cpp @@ -39,7 +39,7 @@ namespace { * @brief Copy fixed-width column data to a host vector */ template -auto host_row_mask_data(cudf::column_view const& column, rmm::cuda_stream_view stream) +auto host_row_mask_data(cudf::column_view const& column, cuda::stream_ref stream) { return cudf::detail::make_host_vector( cudf::device_span(column.data(), static_cast(column.size())), stream); @@ -74,7 +74,7 @@ std::vector create_empty_parquet_with_stats() * @brief Build a scalar literal matching a filter column type */ template -auto make_scalar(cudf::size_type value, rmm::cuda_stream_view stream) +auto make_scalar(cudf::size_type value, cuda::stream_ref stream) { if constexpr (cudf::is_timestamp()) { return cudf::timestamp_scalar(T(typename T::duration(value)), true, stream); diff --git a/cpp/tests/io/experimental/hybrid_scan_test.cpp b/cpp/tests/io/experimental/hybrid_scan_test.cpp index edf43fc6bdff..ff05dc64e11c 100644 --- a/cpp/tests/io/experimental/hybrid_scan_test.cpp +++ b/cpp/tests/io/experimental/hybrid_scan_test.cpp @@ -166,7 +166,7 @@ std::unique_ptr test_hybrid_scan_column_selection( std::vector const& payload_column_indices, std::optional> const& payload_column_names, bool case_sensitive_names, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr, rmm::mr::aligned_resource_adaptor& aligned_mr) { @@ -1189,7 +1189,7 @@ TEST_F(HybridScanTest, RowGroupPassesMatchesChunkedReader) writer.write(chunk_table); } writer.close(); - stream.synchronize(); + stream.wait(); } // Pick a pass_read_limit that forces multiple passes but groups some row groups together diff --git a/cpp/tests/io/fst/fst_test.cu b/cpp/tests/io/fst/fst_test.cu index da21ae071fb0..4862fa56f3b0 100644 --- a/cpp/tests/io/fst/fst_test.cu +++ b/cpp/tests/io/fst/fst_test.cu @@ -17,10 +17,11 @@ #include #include -#include #include #include +#include + #include #include @@ -122,7 +123,7 @@ TEST_F(FstTest, GroundTruth) // Prepare cuda stream for data transfers & kernels rmm::cuda_stream stream{}; - rmm::cuda_stream_view stream_view(stream); + cuda::stream_ref stream_view{stream.value()}; // Test input std::string input = R"( {)" @@ -146,7 +147,7 @@ TEST_F(FstTest, GroundTruth) cudf::size_type const repeat_times = string_size / input.size(); auto d_input_string = cudf::strings::repeat_string(d_string_scalar, repeat_times); auto& d_input = static_cast&>(*d_input_string); - input = d_input.to_string(stream); + input = d_input.to_string(stream_view); // Prepare input & output buffers constexpr std::size_t single_item = 1; @@ -173,9 +174,9 @@ TEST_F(FstTest, GroundTruth) stream.value()); // Async copy results from device to host - output_gpu.device_to_host_async(stream.view()); - out_indexes_gpu.device_to_host_async(stream.view()); - output_gpu_size.device_to_host_async(stream.view()); + output_gpu.device_to_host_async(stream_view); + out_indexes_gpu.device_to_host_async(stream_view); + output_gpu_size.device_to_host_async(stream_view); // Prepare CPU-side results for verification std::string output_cpu{}; diff --git a/cpp/tests/io/fst/logical_stack_test.cu b/cpp/tests/io/fst/logical_stack_test.cu index f7dc5b966409..abe486ab4a66 100644 --- a/cpp/tests/io/fst/logical_stack_test.cu +++ b/cpp/tests/io/fst/logical_stack_test.cu @@ -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 */ @@ -11,9 +11,10 @@ #include #include -#include #include +#include + #include #include @@ -153,7 +154,7 @@ TEST_F(LogicalStackTest, GroundTruth) // Prepare cuda stream for data transfers & kernels rmm::cuda_stream stream{}; - rmm::cuda_stream_view stream_view(stream); + cuda::stream_ref stream_view{stream.value()}; // Test input, std::string input = R"( {)" diff --git a/cpp/tests/io/io_test_utils.hpp b/cpp/tests/io/io_test_utils.hpp index 9fb6c64bb108..0464faf8c4bb 100644 --- a/cpp/tests/io/io_test_utils.hpp +++ b/cpp/tests/io/io_test_utils.hpp @@ -54,21 +54,21 @@ class ThrowingDeviceReadDatasource : public cudf::io::datasource { std::unique_ptr device_read(size_t offset, size_t size, - rmm::cuda_stream_view stream) override + cuda::stream_ref stream) override { // For testing, just copy the data from the host buffer into a new buffer size = std::min(size, data_.size() - offset); rmm::device_buffer out_data(size, stream); cudaMemcpyAsync( - out_data.data(), data_.data() + offset, size, cudaMemcpyHostToDevice, stream.value()); - cudaStreamSynchronize(stream.value()); + out_data.data(), data_.data() + offset, size, cudaMemcpyHostToDevice, stream.get()); + cudaStreamSynchronize(stream.get()); return cudf::io::datasource::buffer::create(std::move(out_data)); } std::future device_read_async(size_t offset, size_t size, uint8_t* dst, - rmm::cuda_stream_view stream) override + cuda::stream_ref stream) override { // This datasource returns a future that throws a custom exception when accessed for testing std::promise promise; @@ -91,14 +91,14 @@ class ThrowingDeviceWriteDataSink : public cudf::io::data_sink { [[nodiscard]] bool supports_device_write() const override { return true; } - void device_write(void const* gpu_data, size_t size, rmm::cuda_stream_view stream) override + void device_write(void const* gpu_data, size_t size, cuda::stream_ref stream) override { buffer_size_ += size; } std::future device_write_async(void const* gpu_data, size_t size, - rmm::cuda_stream_view stream) override + cuda::stream_ref stream) override { // This data sink returns a future that throws a custom exception when accessed for testing std::promise promise; diff --git a/cpp/tests/io/json/json_tree.cpp b/cpp/tests/io/json/json_tree.cpp index 993fc715453d..150feda6e515 100644 --- a/cpp/tests/io/json/json_tree.cpp +++ b/cpp/tests/io/json/json_tree.cpp @@ -13,7 +13,7 @@ #include #include -#include +#include #include #include @@ -33,14 +33,14 @@ struct tree_meta_t2 { std::vector node_range_end; }; -tree_meta_t2 to_cpu_tree(cuio_json::tree_meta_t const& d_value, rmm::cuda_stream_view stream) +tree_meta_t2 to_cpu_tree(cuio_json::tree_meta_t const& d_value, cuda::stream_ref stream) { tree_meta_t2 result{cudf::detail::make_std_vector_async(d_value.node_categories, stream), cudf::detail::make_std_vector_async(d_value.parent_node_ids, stream), cudf::detail::make_std_vector_async(d_value.node_levels, stream), cudf::detail::make_std_vector_async(d_value.node_range_begin, stream), cudf::detail::make_std_vector_async(d_value.node_range_end, stream)}; - stream.synchronize(); + stream.wait(); return result; } @@ -219,7 +219,7 @@ tree_meta_t2 get_tree_representation_cpu( cudf::device_span tokens_gpu, cudf::device_span token_indices_gpu1, cudf::io::json_reader_options const& options, - rmm::cuda_stream_view stream) + cuda::stream_ref stream) { constexpr bool include_quote_char = true; // Copy the JSON tokens to the host @@ -227,7 +227,7 @@ tree_meta_t2 get_tree_representation_cpu( auto token_indices = cudf::detail::make_host_vector_async(token_indices_gpu1, stream); // Make sure tokens have been copied to the host - stream.synchronize(); + stream.wait(); #if LIBCUDF_JSON_DEBUG_DUMP // DEBUG print @@ -415,7 +415,7 @@ records_orient_tree_traversal_cpu(cudf::host_span inpu tree_meta_t2 const& tree, bool is_array_of_arrays, bool is_enabled_lines, - rmm::cuda_stream_view stream) + cuda::stream_ref stream) { std::vector node_ids(tree.parent_node_ids.size()); std::iota(node_ids.begin(), node_ids.end(), 0); diff --git a/cpp/tests/io/json/json_tree_csr.cu b/cpp/tests/io/json/json_tree_csr.cu index bf7ccaca7836..3095d0467a37 100644 --- a/cpp/tests/io/json/json_tree_csr.cu +++ b/cpp/tests/io/json/json_tree_csr.cu @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: Copyright (c) 2024-2026, NVIDIA CORPORATION. + * SPDX-FileCopyrightText: Copyright (c) 2024-2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved. * SPDX-License-Identifier: Apache-2.0 */ @@ -15,9 +15,9 @@ #include #include -#include #include +#include #include #include @@ -58,10 +58,10 @@ bool check_equality(cuio_json::tree_meta_t& d_a, cudf::device_span d_a_max_row_offsets, cuio_json::experimental::compressed_sparse_row& d_b_csr, cuio_json::experimental::column_tree_properties& d_b_ctp, - rmm::cuda_stream_view stream) + cuda::stream_ref stream) { // convert from tree_meta_t to column_tree_csr - stream.synchronize(); + stream.wait(); h_tree_meta_t a{cudf::detail::make_std_vector_async(d_a.node_categories, stream), cudf::detail::make_std_vector_async(d_a.parent_node_ids, stream), @@ -76,7 +76,7 @@ bool check_equality(cuio_json::tree_meta_t& d_a, auto a_max_row_offsets = cudf::detail::make_std_vector_async(d_a_max_row_offsets, stream); auto b_max_row_offsets = cudf::detail::make_std_vector_async(d_b_ctp.max_row_offsets, stream); - stream.synchronize(); + stream.wait(); auto num_nodes = a.parent_node_ids.size(); if (num_nodes > 1) { @@ -147,8 +147,8 @@ void run_test(std::string const& input, bool enable_lines = true) gpu_tree.node_categories.data(), sizeof(cuio_json::node_t) * size_to_copy, cudaMemcpyDefault, - stream.value())); - stream.synchronize(); + stream.get())); + stream.wait(); if (options.is_enabled_lines()) return h_node_categories[0] == cuio_json::NC_LIST; return h_node_categories[0] == cuio_json::NC_LIST and h_node_categories[1] == cuio_json::NC_LIST; @@ -186,8 +186,8 @@ void run_test(std::string const& input, bool enable_lines = true) gpu_col_id.data() + list_node_index, sizeof(cudf::size_type), cudaMemcpyDefault, - stream.value())); - stream.synchronize(); + stream.get())); + stream.wait(); return value; }(); diff --git a/cpp/tests/io/json/json_utils.cu b/cpp/tests/io/json/json_utils.cu index fb13344ecdd9..bc1e91bcd0d4 100644 --- a/cpp/tests/io/json/json_utils.cu +++ b/cpp/tests/io/json/json_utils.cu @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: Copyright (c) 2024-2026, NVIDIA CORPORATION. + * SPDX-FileCopyrightText: Copyright (c) 2024-2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved. * SPDX-License-Identifier: Apache-2.0 */ @@ -31,7 +31,7 @@ std::vector split_byte_range_reading( cudf::io::json_reader_options const& reader_opts, cudf::io::json_reader_options const& creader_opts, IndexType chunk_size, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { auto total_source_size = [&sources]() { @@ -108,7 +108,7 @@ template std::vector split_byte_range_reading split_byte_range_reading( @@ -117,11 +117,11 @@ template std::vector split_byte_range_reading string_offset_to_length( - cudf::strings_column_view const& column, rmm::cuda_stream_view stream) + cudf::strings_column_view const& column, cuda::stream_ref stream) { rmm::device_uvector svs_length(column.size(), stream); auto itr = diff --git a/cpp/tests/io/json/json_utils.hpp b/cpp/tests/io/json/json_utils.hpp index 56127346ce9f..760836e320d7 100644 --- a/cpp/tests/io/json/json_utils.hpp +++ b/cpp/tests/io/json/json_utils.hpp @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: Copyright (c) 2024-2025, NVIDIA CORPORATION. + * SPDX-FileCopyrightText: Copyright (c) 2024-2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved. * SPDX-License-Identifier: Apache-2.0 */ #pragma once @@ -9,9 +9,10 @@ #include #include -#include #include +#include + #include // Helper function to test correctness of JSON byte range reading. @@ -24,9 +25,9 @@ std::vector split_byte_range_reading( cudf::io::json_reader_options const& reader_opts, cudf::io::json_reader_options const& creader_opts, IndexType chunk_size, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr); /// Returns length of each string in the column rmm::device_uvector string_offset_to_length( - cudf::strings_column_view const& column, rmm::cuda_stream_view stream); + cudf::strings_column_view const& column, cuda::stream_ref stream); diff --git a/cpp/tests/io/json/json_whitespace_normalization_test.cpp b/cpp/tests/io/json/json_whitespace_normalization_test.cpp index f334846e6425..9e9a199c3e94 100644 --- a/cpp/tests/io/json/json_whitespace_normalization_test.cpp +++ b/cpp/tests/io/json/json_whitespace_normalization_test.cpp @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: Copyright (c) 2024-2025, NVIDIA CORPORATION. + * SPDX-FileCopyrightText: Copyright (c) 2024-2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved. * SPDX-License-Identifier: Apache-2.0 */ #include @@ -14,9 +14,10 @@ #include #include -#include #include +#include + #include // Base test fixture for tests diff --git a/cpp/tests/io/json/nested_json_test.cpp b/cpp/tests/io/json/nested_json_test.cpp index 9966101d6200..219755f8f923 100644 --- a/cpp/tests/io/json/nested_json_test.cpp +++ b/cpp/tests/io/json/nested_json_test.cpp @@ -163,7 +163,7 @@ TEST_F(JsonTest, StackContext) stack_context.device_to_host_async(stream); // Make sure we copied back the stack context - stream.synchronize(); + stream.wait(); std::vector const golden_stack_context{ '_', '_', '_', '[', '{', '{', '{', '{', '{', '{', '{', '{', '{', '{', '{', '{', '{', '{', '{', @@ -214,7 +214,7 @@ TEST_F(JsonTest, StackContextUtf8) stack_context.device_to_host_async(stream); // Make sure we copied back the stack context - stream.synchronize(); + stream.wait(); std::vector const golden_stack_context{ '_', '[', '{', '{', '{', '{', '{', '{', '{', '{', '{', '{', '{', '{', '{', '{', '{', @@ -282,7 +282,7 @@ TEST_P(JsonDelimiterParamTest, StackContextRecovering) stack_context.device_to_host_async(stream); // Make sure we copied back the stack context - stream.synchronize(); + stream.wait(); // Verify results ASSERT_EQ(golden_stack_context.size(), stack_context.size()); @@ -390,7 +390,7 @@ TEST_P(JsonDelimiterParamTest, StackContextRecoveringFuzz) stack_context.device_to_host_async(stream); // Make sure we copied back the stack context - stream.synchronize(); + stream.wait(); ASSERT_EQ(expected_stack_context.size(), stack_context.size()); CUDF_TEST_EXPECT_VECTOR_EQUAL(expected_stack_context, stack_context, stack_context.size()); @@ -435,7 +435,7 @@ TEST_F(JsonNewlineDelimiterTest, TokenStream) // Copy back the number of tokens that were written auto const tokens_gpu = cudf::detail::make_std_vector_async(d_tokens_gpu, stream); auto const token_indices_gpu = cudf::detail::make_std_vector_async(d_token_indices_gpu, stream); - stream.synchronize(); + stream.wait(); // Golden token stream sample using token_t = cuio_json::token_t; @@ -570,7 +570,7 @@ TEST_F(JsonNewlineDelimiterTest, TokenStream2) // Copy back the number of tokens that were written auto const tokens_gpu = cudf::detail::make_std_vector_async(d_tokens_gpu, stream); auto const token_indices_gpu = cudf::detail::make_std_vector_async(d_token_indices_gpu, stream); - stream.synchronize(); + stream.wait(); // Golden token stream sample using token_t = cuio_json::token_t; @@ -730,7 +730,7 @@ TEST_P(JsonDelimiterParamTest, RecoveringTokenStream) auto const tokens_gpu = cudf::detail::make_std_vector_async(d_tokens_gpu, stream); auto const token_indices_gpu = cudf::detail::make_std_vector_async(d_token_indices_gpu, stream); - stream.synchronize(); + stream.wait(); // Verify the number of tokens matches ASSERT_EQ(golden_token_stream.size(), tokens_gpu.size()); ASSERT_EQ(golden_token_stream.size(), token_indices_gpu.size()); @@ -852,7 +852,7 @@ TEST_F(JsonTest, PostProcessTokenStream) auto const filtered_tokens = cudf::detail::make_std_vector_async(d_filtered_tokens, stream); auto const filtered_indices = cudf::detail::make_std_vector_async(d_filtered_indices, stream); - stream.synchronize(); + stream.wait(); // Verify the number of tokens matches ASSERT_EQ(filtered_tokens.size(), expected_output.size()); @@ -1169,7 +1169,7 @@ TEST_P(JsonDelimiterParamTest, RecoveringTokenStreamNewlineAndDelimiter) auto const tokens_gpu = cudf::detail::make_std_vector_async(d_tokens_gpu, stream); auto const token_indices_gpu = cudf::detail::make_std_vector_async(d_token_indices_gpu, stream); - stream.synchronize(); + stream.wait(); // Verify the number of tokens matches ASSERT_EQ(golden_token_stream.size(), tokens_gpu.size()); ASSERT_EQ(golden_token_stream.size(), token_indices_gpu.size()); @@ -1346,7 +1346,7 @@ TEST_P(JsonDelimiterParamTest, RecoveringTokenStreamNewlineAsWSAndDelimiter) auto const tokens_gpu = cudf::detail::make_std_vector_async(d_tokens_gpu, stream); auto const token_indices_gpu = cudf::detail::make_std_vector_async(d_token_indices_gpu, stream); - stream.synchronize(); + stream.wait(); // Verify the number of tokens matches ASSERT_EQ(golden_token_stream.size(), tokens_gpu.size()); ASSERT_EQ(golden_token_stream.size(), token_indices_gpu.size()); @@ -1413,7 +1413,7 @@ TEST_F(JsonTest, RejectsUnquotedValuesWithInvalidLeadingChar) cuio_json::detail::validate_token_stream(d_input, d_tokens, d_token_indices, opts, stream); auto const validated_tokens = cudf::detail::make_std_vector_async(d_tokens, stream); - stream.synchronize(); + stream.wait(); EXPECT_NE(std::find(validated_tokens.begin(), validated_tokens.end(), token_t::ErrorBegin), validated_tokens.end()) << "value " << bad << " was unexpectedly accepted as a number"; diff --git a/cpp/tests/io/orc_chunked_reader_test.cu b/cpp/tests/io/orc_chunked_reader_test.cu index 4b8d2cac8d68..ac4c1870d570 100644 --- a/cpp/tests/io/orc_chunked_reader_test.cu +++ b/cpp/tests/io/orc_chunked_reader_test.cu @@ -31,10 +31,10 @@ #include #include -#include #include #include +#include namespace { enum class output_limit : std::size_t {}; diff --git a/cpp/tests/io/parquet_chunked_reader_test.cu b/cpp/tests/io/parquet_chunked_reader_test.cu index 4e259ab719d1..543dddebcf67 100644 --- a/cpp/tests/io/parquet_chunked_reader_test.cu +++ b/cpp/tests/io/parquet_chunked_reader_test.cu @@ -33,10 +33,10 @@ #include #include -#include #include #include +#include #include #include @@ -2417,7 +2417,7 @@ TEST_F(ParquetReaderTest, ManyLargeLists) bools_iter + (num_rows * bools_per_row), bools_col->mutable_view().begin()); - stream.synchronize(); + stream.wait(); // list column auto list_col = cudf::make_lists_column( diff --git a/cpp/tests/io/parquet_deletion_vectors_test.cpp b/cpp/tests/io/parquet_deletion_vectors_test.cpp index c261fe172be7..43357812232b 100644 --- a/cpp/tests/io/parquet_deletion_vectors_test.cpp +++ b/cpp/tests/io/parquet_deletion_vectors_test.cpp @@ -15,9 +15,8 @@ #include #include -#include - #include +#include #include #include @@ -70,7 +69,7 @@ std::vector write_parquet(cudf::table_view const& input_table, std::size_t template auto build_column_from_host_data(cudf::host_span host_data, cudf::type_id data_type, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { CUDF_EXPECTS(not host_data.empty(), "Host data vector must not be empty"); @@ -144,7 +143,7 @@ auto build_expected_row_indices(cudf::host_span row_group_off auto build_roaring_bitmap_and_expected_row_mask(cudf::size_type num_rows, float deletion_probability, cudf::host_span row_indices, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr, bool are_retention_vectors = false) { @@ -200,7 +199,7 @@ std::unique_ptr build_expected_table( cudf::table_view const& input_table_view, cudf::column_view const& expected_row_index_column, cudf::column_view const& row_mask_column, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { auto const num_rows = input_table_view.num_rows(); @@ -232,7 +231,7 @@ void test_read_parquet_and_apply_mask( cudf::table_view const& input_table_view, cudf::column_view const& expected_row_mask_column, cudf::column_view const& expected_row_index_column, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { static_assert(std::cmp_greater_equal(num_concat, 1), diff --git a/cpp/tests/io/parquet_writer_test.cpp b/cpp/tests/io/parquet_writer_test.cpp index ec0267c3bfea..efc34151c60a 100644 --- a/cpp/tests/io/parquet_writer_test.cpp +++ b/cpp/tests/io/parquet_writer_test.cpp @@ -305,20 +305,20 @@ class custom_test_data_sink : public cudf::io::data_sink { [[nodiscard]] bool supports_device_write() const override { return true; } - void device_write(void const* gpu_data, size_t size, rmm::cuda_stream_view stream) override + void device_write(void const* gpu_data, size_t size, cuda::stream_ref stream) override { this->device_write_async(gpu_data, size, stream).get(); } std::future device_write_async(void const* gpu_data, size_t size, - rmm::cuda_stream_view stream) override + cuda::stream_ref stream) override { return std::async(std::launch::deferred, [=, this] { char* ptr = nullptr; CUDF_CUDA_TRY(cudaMallocHost(&ptr, size)); - CUDF_CUDA_TRY(cudaMemcpyAsync(ptr, gpu_data, size, cudaMemcpyDefault, stream.value())); - stream.synchronize(); + CUDF_CUDA_TRY(cudaMemcpyAsync(ptr, gpu_data, size, cudaMemcpyDefault, stream.get())); + stream.wait(); outfile_.write(ptr, size); CUDF_CUDA_TRY(cudaFreeHost(ptr)); }); @@ -2437,20 +2437,20 @@ class custom_test_memmap_sink : public cudf::io::data_sink { [[nodiscard]] bool supports_device_write() const override { return supports_device_writes; } - void device_write(void const* gpu_data, size_t size, rmm::cuda_stream_view stream) override + void device_write(void const* gpu_data, size_t size, cuda::stream_ref stream) override { this->device_write_async(gpu_data, size, stream).get(); } std::future device_write_async(void const* gpu_data, size_t size, - rmm::cuda_stream_view stream) override + cuda::stream_ref stream) override { return std::async(std::launch::deferred, [=, this] { char* ptr = nullptr; CUDF_CUDA_TRY(cudaMallocHost(&ptr, size)); - CUDF_CUDA_TRY(cudaMemcpyAsync(ptr, gpu_data, size, cudaMemcpyDefault, stream.value())); - stream.synchronize(); + CUDF_CUDA_TRY(cudaMemcpyAsync(ptr, gpu_data, size, cudaMemcpyDefault, stream.get())); + stream.wait(); mm_writer->host_write(ptr, size); CUDF_CUDA_TRY(cudaFreeHost(ptr)); }); diff --git a/cpp/tests/io/text/data_chunk_source_test.cpp b/cpp/tests/io/text/data_chunk_source_test.cpp index 17f32afb1fc4..bd6f5305587e 100644 --- a/cpp/tests/io/text/data_chunk_source_test.cpp +++ b/cpp/tests/io/text/data_chunk_source_test.cpp @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: Copyright (c) 2021-2026, NVIDIA CORPORATION. + * SPDX-FileCopyrightText: Copyright (c) 2021-2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved. * SPDX-License-Identifier: Apache-2.0 */ @@ -36,7 +36,7 @@ void test_source(std::string const& content, cudf::io::text::data_chunk_source c // full contents auto reader = source.create_reader(); auto const chunk = reader->get_next_chunk(content.size(), stream); - stream.synchronize(); + stream.wait(); EXPECT_EQ(chunk->size(), content.size()); EXPECT_EQ(chunk_to_host(*chunk), content); } @@ -45,7 +45,7 @@ void test_source(std::string const& content, cudf::io::text::data_chunk_source c auto reader = source.create_reader(); reader->skip_bytes(4); auto const chunk = reader->get_next_chunk(content.size(), stream); - stream.synchronize(); + stream.wait(); EXPECT_EQ(chunk->size(), content.size() - 4); EXPECT_EQ(chunk_to_host(*chunk), content.substr(4)); } @@ -54,7 +54,7 @@ void test_source(std::string const& content, cudf::io::text::data_chunk_source c auto reader = source.create_reader(); auto const chunk1 = reader->get_next_chunk(5, stream); auto const chunk2 = reader->get_next_chunk(content.size() - 5, stream); - stream.synchronize(); + stream.wait(); EXPECT_EQ(chunk1->size(), 5); EXPECT_EQ(chunk2->size(), content.size() - 5); EXPECT_EQ(chunk_to_host(*chunk1), content.substr(0, 5)); @@ -65,7 +65,7 @@ void test_source(std::string const& content, cudf::io::text::data_chunk_source c auto reader = source.create_reader(); auto const chunk1 = reader->get_next_chunk(content.size() / 2, stream); auto const chunk2 = reader->get_next_chunk(content.size() - content.size() / 2, stream); - stream.synchronize(); + stream.wait(); EXPECT_EQ(chunk1->size(), content.size() / 2); EXPECT_EQ(chunk2->size(), content.size() - content.size() / 2); EXPECT_EQ(chunk_to_host(*chunk1), content.substr(0, content.size() / 2)); @@ -75,11 +75,11 @@ void test_source(std::string const& content, cudf::io::text::data_chunk_source c // reading too many bytes auto reader = source.create_reader(); auto const chunk = reader->get_next_chunk(content.size() + 10, stream); - stream.synchronize(); + stream.wait(); EXPECT_EQ(chunk->size(), content.size()); EXPECT_EQ(chunk_to_host(*chunk), content); auto next_chunk = reader->get_next_chunk(1, stream); - stream.synchronize(); + stream.wait(); EXPECT_EQ(next_chunk->size(), 0); } { @@ -87,7 +87,7 @@ void test_source(std::string const& content, cudf::io::text::data_chunk_source c auto reader = source.create_reader(); reader->skip_bytes(content.size() + 10); auto const next_chunk = reader->get_next_chunk(1, stream); - stream.synchronize(); + stream.wait(); EXPECT_EQ(next_chunk->size(), 0); } cudf::set_pinned_memory_resource(last_mr); diff --git a/cpp/tests/io/type_inference_test.cpp b/cpp/tests/io/type_inference_test.cpp index 3a3425044616..e783b2822637 100644 --- a/cpp/tests/io/type_inference_test.cpp +++ b/cpp/tests/io/type_inference_test.cpp @@ -13,11 +13,11 @@ #include #include -#include #include #include #include +#include #include #include From 8411b33bf0bf3407534e2f2401ba77bdd0fa391d Mon Sep 17 00:00:00 2001 From: Vyas Ramasubramani Date: Thu, 13 Aug 2026 10:11:49 -0700 Subject: [PATCH 02/10] Add stream_ref factory coverage --- cpp/tests/streams/scalar_test.cpp | 13 +++++++++- cpp/tests/streams/strings/factory_test.cpp | 28 +++++++++++++++++++++- 2 files changed, 39 insertions(+), 2 deletions(-) diff --git a/cpp/tests/streams/scalar_test.cpp b/cpp/tests/streams/scalar_test.cpp index 06f4aa8af56c..7ebe3d2e0864 100644 --- a/cpp/tests/streams/scalar_test.cpp +++ b/cpp/tests/streams/scalar_test.cpp @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: Copyright (c) 2025, NVIDIA CORPORATION. + * SPDX-FileCopyrightText: Copyright (c) 2025-2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved. * SPDX-License-Identifier: Apache-2.0 */ @@ -9,6 +9,7 @@ #include #include +#include template struct TypedScalarTest : public cudf::test::BaseFixture {}; @@ -32,4 +33,14 @@ TEST_F(StringScalarTest, DefaultValidity) EXPECT_EQ(value, s.to_string(cudf::test::get_default_stream())); } +TEST_F(StringScalarTest, StringFactory) +{ + std::string value = "test string"; + auto s = cudf::make_string_scalar(value, cudf::test::get_default_stream()); + auto string_s = static_cast(s.get()); + + EXPECT_EQ(value, string_s->to_string(cudf::test::get_default_stream())); + EXPECT_TRUE(string_s->is_valid(cudf::test::get_default_stream())); +} + CUDF_TEST_PROGRAM_MAIN() diff --git a/cpp/tests/streams/strings/factory_test.cpp b/cpp/tests/streams/strings/factory_test.cpp index 7edcdbcb903a..5df8fc604f95 100644 --- a/cpp/tests/streams/strings/factory_test.cpp +++ b/cpp/tests/streams/strings/factory_test.cpp @@ -1,9 +1,10 @@ /* - * SPDX-FileCopyrightText: Copyright (c) 2024-2025, NVIDIA CORPORATION. + * SPDX-FileCopyrightText: Copyright (c) 2024-2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved. * SPDX-License-Identifier: Apache-2.0 */ #include +#include #include #include @@ -53,3 +54,28 @@ TEST_F(StringsFactoryTest, StringBatchConstruction) 10, cudf::device_span{d_input.data(), d_input.size()}); cudf::make_strings_column_batch(input, stream); } + +TEST_F(StringsFactoryTest, StructConstruction) +{ + auto const stream = cudf::test::get_default_stream(); + + std::vector> children; + children.push_back(cudf::test::fixed_width_column_wrapper{1, 2, 3}.release()); + children.push_back(cudf::test::strings_column_wrapper{"a", "b", "c"}.release()); + + auto result = cudf::make_structs_column(3, std::move(children), 0, rmm::device_buffer{}, stream); + EXPECT_EQ(result->size(), 3); +} + +TEST_F(StringsFactoryTest, StructHierarchyConstruction) +{ + auto const stream = cudf::test::get_default_stream(); + + std::vector> children; + children.push_back(cudf::test::fixed_width_column_wrapper{1, 2, 3}.release()); + children.push_back(cudf::test::strings_column_wrapper{"a", "b", "c"}.release()); + + auto result = + cudf::create_structs_hierarchy(3, std::move(children), 0, rmm::device_buffer{}, stream); + EXPECT_EQ(result->size(), 3); +} From 535d6d750eb59819f9d08dd6a17a9a0e00c47425 Mon Sep 17 00:00:00 2001 From: Vyas Ramasubramani Date: Fri, 14 Aug 2026 15:13:52 -0700 Subject: [PATCH 03/10] Fix batch 4 stream_ref sync calls --- cpp/src/io/avro/reader_impl.cu | 2 +- cpp/src/io/comp/compression.cpp | 2 +- cpp/src/io/comp/debrotli.cu | 2 +- cpp/src/io/comp/decompression.cpp | 2 +- cpp/src/io/csv/reader_impl.cu | 2 +- cpp/src/io/cudftable.cpp | 2 +- cpp/src/io/json/column_tree_construction.cu | 2 +- cpp/src/io/json/host_tree_algorithms.cu | 8 +++---- cpp/src/io/json/json_normalization.cu | 2 +- cpp/src/io/json/nested_json_gpu.cu | 4 ++-- cpp/src/io/json/read_json.cu | 8 +++---- cpp/src/io/json/write_json.cpp | 2 +- cpp/src/io/orc/reader_impl_chunking.cu | 4 ++-- cpp/src/io/orc/reader_impl_decode.cu | 2 +- cpp/src/io/orc/writer_impl.cu | 2 +- .../experimental/hybrid_scan_chunking.cu | 2 +- .../experimental/hybrid_scan_preprocess.cu | 2 +- .../parquet/experimental/page_index_filter.cu | 2 +- .../io/parquet/io_utils/parquet_io_utils.cpp | 6 ++--- cpp/src/io/parquet/reader_impl.cpp | 2 +- cpp/src/io/parquet/reader_impl_chunking.cu | 4 ++-- .../io/parquet/reader_impl_chunking_utils.cuh | 2 +- cpp/src/io/parquet/reader_impl_preprocess.cu | 10 ++++----- .../parquet/reader_impl_preprocess_utils.cu | 6 ++--- cpp/src/io/parquet/stats_filter_helpers.hpp | 6 ++--- cpp/src/io/parquet/writer_impl.cu | 12 +++++----- cpp/src/io/utilities/data_sink.cpp | 4 ++-- cpp/src/io/utilities/datasource.cpp | 6 ++--- cpp/src/io/utilities/hostdevice_span.hpp | 4 ++-- cpp/src/io/utilities/hostdevice_vector.hpp | 4 ++-- cpp/src/lists/dremel.cu | 4 ++-- cpp/src/strings/case.cu | 2 +- cpp/src/strings/copying/concatenate.cu | 2 +- cpp/src/strings/regex/gkexec.cpp | 2 +- cpp/src/strings/regex/regexec.cpp | 2 +- cpp/src/strings/strings_column_factories.cu | 2 +- cpp/src/text/replace.cu | 2 +- cpp/tests/io/cudftable_test.cpp | 2 +- .../io/experimental/hybrid_scan_test.cpp | 2 +- cpp/tests/io/fst/fst_test.cu | 2 +- cpp/tests/io/fst/logical_stack_test.cu | 2 +- cpp/tests/io/json/json_tree.cpp | 4 ++-- cpp/tests/io/json/json_tree_csr.cu | 8 +++---- cpp/tests/io/json/nested_json_test.cpp | 22 +++++++++---------- cpp/tests/io/parquet_chunked_reader_test.cu | 2 +- cpp/tests/io/parquet_writer_test.cpp | 4 ++-- cpp/tests/io/text/data_chunk_source_test.cpp | 14 ++++++------ 47 files changed, 98 insertions(+), 98 deletions(-) diff --git a/cpp/src/io/avro/reader_impl.cu b/cpp/src/io/avro/reader_impl.cu index b52461a31337..80911227a538 100644 --- a/cpp/src/io/avro/reader_impl.cu +++ b/cpp/src/io/avro/reader_impl.cu @@ -554,7 +554,7 @@ table_with_metadata read_avro(std::unique_ptr&& source, d_global_dict_data = cudf::detail::make_device_uvector_async( h_global_dict_data, stream, cudf::get_current_device_resource_ref()); - stream.wait(); + stream.sync(); } auto out_buffers = decode_data(meta, diff --git a/cpp/src/io/comp/compression.cpp b/cpp/src/io/comp/compression.cpp index d55efe0fe144..59915889c033 100644 --- a/cpp/src/io/comp/compression.cpp +++ b/cpp/src/io/comp/compression.cpp @@ -322,7 +322,7 @@ void host_compress(compression_type compression, auto const num_chunks = inputs.size(); auto const h_inputs = cudf::detail::make_host_vector_async(inputs, stream); auto const h_outputs = cudf::detail::make_host_vector_async(outputs, stream); - stream.wait(); + stream.sync(); auto h_results = cudf::detail::make_pinned_vector(results, stream); diff --git a/cpp/src/io/comp/debrotli.cu b/cpp/src/io/comp/debrotli.cu index 5ba36a7ebb98..bbd01303846f 100644 --- a/cpp/src/io/comp/debrotli.cu +++ b/cpp/src/io/comp/debrotli.cu @@ -2110,7 +2110,7 @@ void gpu_debrotli(device_span const> inputs, while (cur < fb_heap_size && !(cur & 3)) { CUDF_CUDA_TRY( cudf::detail::memcpy_async(&dump[0], scratch.data() + cur, 2 * sizeof(uint32_t), stream)); - stream.wait(); + stream.sync(); printf("@%d: next = %d, size = %d\n", cur, dump[0], dump[1]); cur = (dump[0] > cur) ? dump[0] : 0xffff'ffffu; } diff --git a/cpp/src/io/comp/decompression.cpp b/cpp/src/io/comp/decompression.cpp index b0f6fff918a3..4a7c518c5eb8 100644 --- a/cpp/src/io/comp/decompression.cpp +++ b/cpp/src/io/comp/decompression.cpp @@ -557,7 +557,7 @@ void host_decompress(compression_type compression, auto const num_chunks = inputs.size(); auto const h_inputs = cudf::detail::make_host_vector_async(inputs, stream); auto const h_outputs = cudf::detail::make_host_vector_async(outputs, stream); - stream.wait(); + stream.sync(); std::vector> tasks; auto const num_streams = diff --git a/cpp/src/io/csv/reader_impl.cu b/cpp/src/io/csv/reader_impl.cu index 98caa3984001..14923fa83653 100644 --- a/cpp/src/io/csv/reader_impl.cu +++ b/cpp/src/io/csv/reader_impl.cu @@ -605,7 +605,7 @@ void infer_column_types(parse_options const& parse_opts, row_offsets, num_inferred_columns, stream); - stream.wait(); + stream.sync(); auto inf_col_idx = 0; for (auto col_idx = 0u; col_idx < column_flags.size(); ++col_idx) { diff --git a/cpp/src/io/cudftable.cpp b/cpp/src/io/cudftable.cpp index 09d4fcd3de02..a3342c25f096 100644 --- a/cpp/src/io/cudftable.cpp +++ b/cpp/src/io/cudftable.cpp @@ -122,7 +122,7 @@ packed_table read_cudftable(datasource* source, auto host_buffer = source->host_read(data_offset, header.data_length); CUDF_CUDA_TRY(cudf::detail::memcpy_async( packed.gpu_data->data(), host_buffer->data(), header.data_length, stream)); - stream.wait(); + stream.sync(); } auto unpacked_view = cudf::unpack(packed); diff --git a/cpp/src/io/json/column_tree_construction.cu b/cpp/src/io/json/column_tree_construction.cu index 619db5d6604f..aa5a030b62ac 100644 --- a/cpp/src/io/json/column_tree_construction.cu +++ b/cpp/src/io/json/column_tree_construction.cu @@ -35,7 +35,7 @@ using row_offset_t = size_type; template void print(device_span d_vec, std::string name, cuda::stream_ref stream) { - stream.wait(); + stream.sync(); auto h_vec = cudf::detail::make_std_vector(d_vec, stream); std::cout << name << " = "; for (auto e : h_vec) { diff --git a/cpp/src/io/json/host_tree_algorithms.cu b/cpp/src/io/json/host_tree_algorithms.cu index c1ba3a5f5bbd..2c1313551c49 100644 --- a/cpp/src/io/json/host_tree_algorithms.cu +++ b/cpp/src/io/json/host_tree_algorithms.cu @@ -131,7 +131,7 @@ std::vector copy_strings_to_host_sync( d_offsets.begin()); auto const h_offsets = cudf::detail::make_host_vector_async( cudf::device_span(d_offsets.data(), d_offsets.size()), stream); - stream.wait(); + stream.sync(); // build std::string vector from chars and offsets std::vector host_data; @@ -445,7 +445,7 @@ void make_device_json_column(device_span input, cudf::detail::make_pinned_vector_async(d_column_tree.parent_node_ids, stream); auto const h_node_categories = cudf::detail::make_pinned_vector_async(tree.node_categories, stream); - stream.wait(); + stream.sync(); std::map> rows_by_top_level_column; for (size_type node_id = 0; node_id < static_cast(h_col_ids.size()); ++node_id) { @@ -520,7 +520,7 @@ void make_device_json_column(device_span input, cudf::detail::make_host_vector_async(d_column_tree.node_range_begin, stream); auto const max_row_offsets = cudf::detail::make_host_vector_async(d_max_row_offsets, stream); auto num_columns = d_unique_col_ids.size(); - stream.wait(); + stream.sync(); auto to_json_col_type = [](auto category) { switch (category) { @@ -1164,7 +1164,7 @@ void scatter_offsets(tree_meta_t const& tree, cuda::maximum{}); } } - stream.wait(); + stream.sync(); } } // namespace cudf::io::json::detail diff --git a/cpp/src/io/json/json_normalization.cu b/cpp/src/io/json/json_normalization.cu index f244f8868705..0d087afca700 100644 --- a/cpp/src/io/json/json_normalization.cu +++ b/cpp/src/io/json/json_normalization.cu @@ -443,7 +443,7 @@ std:: inbuf_offsets.begin(), 0); - stream.wait(); + stream.sync(); return std::tuple{std::move(inbuf), std::move(inbuf_offsets), std::move(inbuf_lengths)}; } diff --git a/cpp/src/io/json/nested_json_gpu.cu b/cpp/src/io/json/nested_json_gpu.cu index 75d2517ccbbe..73d800a42881 100644 --- a/cpp/src/io/json/nested_json_gpu.cu +++ b/cpp/src/io/json/nested_json_gpu.cu @@ -1616,7 +1616,7 @@ std::pair, rmm::device_uvector> ge stream); // Make sure memory of the FST's lookup tables isn't freed before the FST completes - stream.wait(); + stream.sync(); } constexpr auto max_translation_table_size = @@ -1708,7 +1708,7 @@ void make_json_column(json_column& root_column, auto token_indices_gpu = cudf::detail::make_host_vector_async(d_token_indices_gpu, stream); // Make sure tokens have been copied to the host - stream.wait(); + stream.sync(); // Whether this token is the valid token to begin the JSON document with auto is_valid_root_token = [](PdaTokenT const token) { diff --git a/cpp/src/io/json/read_json.cu b/cpp/src/io/json/read_json.cu index 31724b783745..77420f9f0b0d 100644 --- a/cpp/src/io/json/read_json.cu +++ b/cpp/src/io/json/read_json.cu @@ -180,7 +180,7 @@ class compressed_host_buffer_source final : public datasource { return thread_pool.submit_task([this, offset, size, dst, stream] { auto hbuf = host_read(offset, size); CUDF_CUDA_TRY(cudf::detail::memcpy_async(dst, hbuf->data(), hbuf->size(), stream)); - stream.wait(); + stream.sync(); return hbuf->size(); }); } @@ -492,7 +492,7 @@ std::pair> read_batch( reader_opts.get_delimiter(), stream, cudf::get_current_device_resource_ref()); - stream.wait(); + stream.sync(); } // Helper: parse one buffer, optionally appending schema-mismatch diagnostics. The two call sites @@ -519,7 +519,7 @@ std::pair> read_batch( reader_opts.get_delimiter(), stream, cudf::get_current_device_resource_ref()); - stream.wait(); + stream.sync(); } buffer = cudf::device_span( reinterpret_cast(owning_buffers.second.value().data()), @@ -821,7 +821,7 @@ device_span ingest_raw_input(device_span buffer, d_delimiter_map.data(), buffer.data()); } - stream.wait(); + stream.sync(); if (thread_tasks.size()) { auto const bytes_read = std::accumulate( diff --git a/cpp/src/io/json/write_json.cpp b/cpp/src/io/json/write_json.cpp index 8b73f5641a51..096378e9c4b7 100644 --- a/cpp/src/io/json/write_json.cpp +++ b/cpp/src/io/json/write_json.cpp @@ -452,7 +452,7 @@ void write_json(data_sink* out_sink, std::vector hbuf; auto hbuf_sink_ptr = data_sink::create(&hbuf); write_json_uncompressed(hbuf_sink_ptr.get(), table, options, stream); - stream.wait(); + stream.sync(); auto comp_hbuf = cudf::io::detail::compress( options.get_compression(), host_span(reinterpret_cast(hbuf.data()), hbuf.size())); diff --git a/cpp/src/io/orc/reader_impl_chunking.cu b/cpp/src/io/orc/reader_impl_chunking.cu index e4ceaf9aa1ec..3c38cc6bb13d 100644 --- a/cpp/src/io/orc/reader_impl_chunking.cu +++ b/cpp/src/io/orc/reader_impl_chunking.cu @@ -507,7 +507,7 @@ void reader_impl::load_next_stripe_data(read_mode mode) // Instead, it may use some other stream(s) to sync the H->D memcpy. // As such, we need to make sure the device buffers in `lvl_stripe_data` are ready first. if (!stream_synchronized) { - _stream.wait(); + _stream.sync(); stream_synchronized = true; } device_read_tasks.emplace_back( @@ -528,7 +528,7 @@ void reader_impl::load_next_stripe_data(read_mode mode) CUDF_CUDA_TRY( cudf::detail::memcpy_async(dev_dst, host_buffer->data(), host_buffer->size(), _stream)); } - _stream.wait(); + _stream.sync(); for (auto& task : device_read_tasks) { // if there were device reads CUDF_EXPECTS(task.first.get() == task.second, "Unexpected discrepancy in bytes read."); diff --git a/cpp/src/io/orc/reader_impl_decode.cu b/cpp/src/io/orc/reader_impl_decode.cu index f2b4f46c1ee6..257145956f28 100644 --- a/cpp/src/io/orc/reader_impl_decode.cu +++ b/cpp/src/io/orc/reader_impl_decode.cu @@ -477,7 +477,7 @@ void scan_null_counts(cudf::detail::hostdevice_2dvector const& chun thrust::inclusive_scan(thrust::seq, psums, psums + num_stripes, psums); }); // `prefix_sums_to_update` goes out of scope, copy has to be done before we return - stream.wait(); + stream.sync(); } /** diff --git a/cpp/src/io/orc/writer_impl.cu b/cpp/src/io/orc/writer_impl.cu index ad890ed86fe8..4795eb0c8d4e 100644 --- a/cpp/src/io/orc/writer_impl.cu +++ b/cpp/src/io/orc/writer_impl.cu @@ -2368,7 +2368,7 @@ stripe_dictionaries build_dictionaries(orc_table_view& orc_table, get_dictionary_indices(stripe_dicts, orc_table.d_columns, stream); // synchronize to ensure the copy is complete before we clear `map_slots` - stream.wait(); + stream.sync(); // deallocate hash map storage, unused after this point map_storage.reset(); diff --git a/cpp/src/io/parquet/experimental/hybrid_scan_chunking.cu b/cpp/src/io/parquet/experimental/hybrid_scan_chunking.cu index c70b94e739c6..b64b23ba67f7 100644 --- a/cpp/src/io/parquet/experimental/hybrid_scan_chunking.cu +++ b/cpp/src/io/parquet/experimental/hybrid_scan_chunking.cu @@ -165,7 +165,7 @@ void hybrid_scan_reader_impl::setup_next_pass( } } - _stream.wait(); + _stream.sync(); } } diff --git a/cpp/src/io/parquet/experimental/hybrid_scan_preprocess.cu b/cpp/src/io/parquet/experimental/hybrid_scan_preprocess.cu index 169dcbcf6be7..d4a2207ffc4b 100644 --- a/cpp/src/io/parquet/experimental/hybrid_scan_preprocess.cu +++ b/cpp/src/io/parquet/experimental/hybrid_scan_preprocess.cu @@ -93,7 +93,7 @@ void decode_dictionary_page_headers( pages.device_to_host_async(stream); chunks.device_to_host_async(stream); - stream.wait(); + stream.sync(); } } // namespace diff --git a/cpp/src/io/parquet/experimental/page_index_filter.cu b/cpp/src/io/parquet/experimental/page_index_filter.cu index dbdf47f40275..b5e5f4d2fd1c 100644 --- a/cpp/src/io/parquet/experimental/page_index_filter.cu +++ b/cpp/src/io/parquet/experimental/page_index_filter.cu @@ -1178,7 +1178,7 @@ thrust::host_vector aggregate_reader_metadata::compute_data_page_mask( auto const total_pages = pinned_page_offsets.size() - num_columns; auto data_page_mask = thrust::host_vector(total_pages); auto host_results_iter = host_results.begin(); - stream.wait(); + stream.sync(); // Discard results for invalid ranges. i.e. ranges starting at the last page of a column and // ending at the first page of the next column diff --git a/cpp/src/io/parquet/io_utils/parquet_io_utils.cpp b/cpp/src/io/parquet/io_utils/parquet_io_utils.cpp index bdc838601c0f..5c3eb19c61a7 100644 --- a/cpp/src/io/parquet/io_utils/parquet_io_utils.cpp +++ b/cpp/src/io/parquet/io_utils/parquet_io_utils.cpp @@ -423,7 +423,7 @@ fetch_byte_ranges_to_device_async_impl( } // `device_read_async` is not guaranteed to follow stream-ordering (see datasource API docs) - stream.wait(); + stream.sync(); // Schedule device reads holding the `device_read_mutex` so that all reads for a caller thread // are scheduled without interleaving with reads from other threads yielding better pipelining @@ -452,7 +452,7 @@ fetch_byte_ranges_to_device_async_impl( } // Synchronize stream if `memcpy_batch_async` was called to safely discard the host buffers - if (not host_buffers.empty()) { stream.wait(); } + if (not host_buffers.empty()) { stream.sync(); } auto sync_function = [](decltype(device_read_tasks) device_read_tasks) { for (auto& task : device_read_tasks) { @@ -637,7 +637,7 @@ fetch_bloom_filters_to_device_impl( CUDF_CUDA_TRY(cudf::detail::memcpy_batch_async( copy_dsts.data(), copy_srcs.data(), copy_sizes.data(), total_filters, stream)); } - stream.wait(); + stream.sync(); } std::vector bitset_buffers; diff --git a/cpp/src/io/parquet/reader_impl.cpp b/cpp/src/io/parquet/reader_impl.cpp index 15b6d9c55d2e..40df8984fccb 100644 --- a/cpp/src/io/parquet/reader_impl.cpp +++ b/cpp/src/io/parquet/reader_impl.cpp @@ -492,7 +492,7 @@ void reader_impl::decode_page_data(read_mode mode, size_t skip_rows, size_t num_ } } - _stream.wait(); + _stream.sync(); } reader_impl::reader_impl() : _options{} {} diff --git a/cpp/src/io/parquet/reader_impl_chunking.cu b/cpp/src/io/parquet/reader_impl_chunking.cu index 3157f524dce6..aef477a31c92 100644 --- a/cpp/src/io/parquet/reader_impl_chunking.cu +++ b/cpp/src/io/parquet/reader_impl_chunking.cu @@ -201,7 +201,7 @@ void reader_impl::setup_next_pass(read_mode mode) } #endif - _stream.wait(); + _stream.sync(); } } @@ -333,7 +333,7 @@ void reader_impl::setup_next_subpass(read_mode mode) auto h_spans = cudf::detail::make_pinned_vector_async(page_indices, _stream); subpass.pages.device_to_host_async(_stream); - _stream.wait(); + _stream.sync(); subpass.column_page_count = std::vector(num_columns); std::transform( diff --git a/cpp/src/io/parquet/reader_impl_chunking_utils.cuh b/cpp/src/io/parquet/reader_impl_chunking_utils.cuh index 54de9d1a5fe5..c33ac468c932 100644 --- a/cpp/src/io/parquet/reader_impl_chunking_utils.cuh +++ b/cpp/src/io/parquet/reader_impl_chunking_utils.cuh @@ -101,7 +101,7 @@ int64_t find_next_split(int64_t cur_pos, * By doing this, we can now look at row X and know the total * byte cost for all pages that span row X, not just the cost up to row X itself. * - * This function is asynchronous. Call stream.wait() before using the + * This function is asynchronous. Call stream.sync() before using the * results. */ std::pair, rmm::device_uvector> diff --git a/cpp/src/io/parquet/reader_impl_preprocess.cu b/cpp/src/io/parquet/reader_impl_preprocess.cu index 363f6772ec54..30ed747142eb 100644 --- a/cpp/src/io/parquet/reader_impl_preprocess.cu +++ b/cpp/src/io/parquet/reader_impl_preprocess.cu @@ -470,7 +470,7 @@ void reader_impl::compute_page_string_offset_indices(size_t skip_rows, size_t nu // Transfer the updated chunks to device pass.chunks.host_to_device_async(_stream); - _stream.wait(); + _stream.sync(); // Pre-process string offsets for non-dictionary string columns kernel_error error_code(_stream); @@ -717,7 +717,7 @@ void reader_impl::generate_list_column_row_counts(is_estimate_row_counts is_esti pass.chunks.device_to_host_async(_stream); pass.pages.device_to_host_async(_stream); - _stream.wait(); + _stream.sync(); } void reader_impl::preprocess_subpass_pages(read_mode mode, size_t chunk_read_limit) @@ -870,7 +870,7 @@ void reader_impl::preprocess_subpass_pages(read_mode mode, size_t chunk_read_lim // retrieve pages back pass.pages.device_to_host_async(_stream); if (!subpass.single_subpass) { subpass.pages.device_to_host_async(_stream); } - _stream.wait(); + _stream.sync(); // at this point we have an accurate row count so we can compute how many rows we will actually be // able to decode for this pass. we will have selected a set of pages for each column in the @@ -1227,7 +1227,7 @@ std::unique_ptr reader_impl::synthesize_row_index_column(row_range const map_global_to_local_row_index{ rg_global_offsets.data(), rg_local_offsets.data(), rg_global_offsets.size()}, stream.get())); - stream.wait(); + stream.sync(); } return std::make_unique(std::move(col_data), rmm::device_buffer{0, stream, mr}, 0); @@ -1271,7 +1271,7 @@ std::unique_ptr reader_impl::synthesize_source_index_column( host_row_offsets, stream, cudf::get_current_device_resource_ref()); cudf::detail::label_segments( row_offsets.begin(), row_offsets.end(), col_data.begin(), col_data.end(), stream); - stream.wait(); + stream.sync(); } return std::make_unique(std::move(col_data), rmm::device_buffer{0, stream, mr}, 0); diff --git a/cpp/src/io/parquet/reader_impl_preprocess_utils.cu b/cpp/src/io/parquet/reader_impl_preprocess_utils.cu index de8707aabd3a..4cc1750ca61f 100644 --- a/cpp/src/io/parquet/reader_impl_preprocess_utils.cu +++ b/cpp/src/io/parquet/reader_impl_preprocess_utils.cu @@ -305,7 +305,7 @@ void fill_in_page_info(host_span chunks, iter, iter + num_pages, copy_page_info{d_page_indexes, pages}); - stream.wait(); // ensures the page_indexes is not destroyed before the copy is completed + stream.sync(); // ensures the page_indexes is not destroyed before the copy is completed } std::string encoding_to_string(Encoding encoding) @@ -407,7 +407,7 @@ cudf::detail::hostdevice_vector sort_pages(device_span sort_indices.end(), unsorted_pages.data(), pass_pages.d_begin()); - stream.wait(); + stream.sync(); return pass_pages; } @@ -621,7 +621,7 @@ void decode_page_headers_impl(pass_intermediate_data& pass, pass.pages.device_to_host_async(stream); pass.chunks.device_to_host_async(stream); - stream.wait(); + stream.sync(); } } // namespace diff --git a/cpp/src/io/parquet/stats_filter_helpers.hpp b/cpp/src/io/parquet/stats_filter_helpers.hpp index 2d4e3ea66396..22781c9fff1f 100644 --- a/cpp/src/io/parquet/stats_filter_helpers.hpp +++ b/cpp/src/io/parquet/stats_filter_helpers.hpp @@ -270,7 +270,7 @@ class stats_caster_base { auto d_chars = cudf::detail::make_device_uvector_async(host_chars, stream, mr); auto d_offsets = cudf::detail::make_device_uvector_async(offsets, stream, mr); auto d_sizes = cudf::detail::make_device_uvector_async(sizes, stream, mr); - stream.wait(); // ensures the vectors are not destroyed before the copy is completed + stream.sync(); // ensures the vectors are not destroyed before the copy is completed return {std::move(d_chars), std::move(d_offsets), std::move(d_sizes)}; } @@ -282,7 +282,7 @@ class stats_caster_base { auto [d_chars, d_offsets, _] = make_strings_children(val, chars, stream, mr); auto null_mask_buffer = rmm::device_buffer{ null_mask.data(), cudf::bitmask_allocation_size_bytes(val.size()), stream, mr}; - stream.wait(); + stream.sync(); return cudf::make_strings_column( val.size(), std::make_unique(std::move(d_offsets), rmm::device_buffer{0, stream, mr}, 0), @@ -293,7 +293,7 @@ class stats_caster_base { auto data = cudf::detail::make_device_uvector_async(val, stream, mr); auto null_mask_buffer = rmm::device_buffer{ null_mask.data(), cudf::bitmask_allocation_size_bytes(val.size()), stream, mr}; - stream.wait(); + stream.sync(); return std::make_unique( dtype, val.size(), data.release(), std::move(null_mask_buffer), null_count); } diff --git a/cpp/src/io/parquet/writer_impl.cu b/cpp/src/io/parquet/writer_impl.cu index 68c995c4cc23..c9f0724adbf1 100644 --- a/cpp/src/io/parquet/writer_impl.cu +++ b/cpp/src/io/parquet/writer_impl.cu @@ -1098,7 +1098,7 @@ parquet_column_view::parquet_column_view(schema_tree_node const& schema_node, _def_level = std::move(dremel.def_level); _data_count = dremel.leaf_data_size; // Needed for knowing what size dictionary to allocate - stream.wait(); + stream.sync(); } else { // For non-list struct, the size of the root column is the same as the size of the leaf column _data_count = cudf_col.size(); @@ -1194,7 +1194,7 @@ void gather_fragment_statistics(device_span frag_stats, InitFragmentStatistics(frag_stats_group, frags, stream); detail::calculate_group_statistics( frag_stats.data(), frag_stats_group.data(), frag_stats.size(), stream, int96_timestamps); - stream.wait(); + stream.sync(); } auto init_page_sizes(hostdevice_2dvector& chunks, @@ -1478,7 +1478,7 @@ void init_encoder_pages(hostdevice_2dvector& chunks, stream); } } - stream.wait(); + stream.sync(); } /** @@ -1549,7 +1549,7 @@ void encode_pages(hostdevice_2dvector& chunks, if (comp_stats.has_value()) { comp_stats.value() += collect_compression_statistics(comp_in, comp_res, stream); } - stream.wait(); + stream.sync(); } /** @@ -2218,7 +2218,7 @@ auto convert_table_to_parquet_data(table_input_metadata& table_meta, } // Sync before calling the next `encode_pages` which may alter the stats data. - if (need_sync) { stream.wait(); } + if (need_sync) { stream.sync(); } // now add to the column chunk SizeStatistics if necessary if (stats_granularity == statistics_freq::STATISTICS_COLUMN) { @@ -2579,7 +2579,7 @@ void writer::impl::write_parquet_data_to_sink( if (is_byte_arr) { offset_idx.unencoded_byte_array_data_bytes = std::move(var_bytes); } - _stream.wait(); + _stream.sync(); _agg_meta->file(p).offset_indexes.emplace_back(std::move(offset_idx)); _agg_meta->file(p).column_indexes.emplace_back(std::move(column_idx)); } diff --git a/cpp/src/io/utilities/data_sink.cpp b/cpp/src/io/utilities/data_sink.cpp index 70c79e7a0ff8..20f397dc4083 100644 --- a/cpp/src/io/utilities/data_sink.cpp +++ b/cpp/src/io/utilities/data_sink.cpp @@ -64,7 +64,7 @@ class file_sink : public data_sink { size_t const offset = _bytes_written; _bytes_written += size; - stream.wait(); + stream.sync(); // Start the write now via the capture-initializer; only the `.get()` wait is deferred. return std::async(std::launch::deferred, @@ -120,7 +120,7 @@ class host_buffer_sink : public data_sink { // stream ordering or pre-reserve buffer to avoid reallocation. CUDF_CUDA_TRY(cudaMemcpyAsync( buffer_->data() + current_size, gpu_data, size, cudaMemcpyDeviceToHost, stream.get())); - return std::async(std::launch::deferred, [stream]() -> void { stream.wait(); }); + return std::async(std::launch::deferred, [stream]() -> void { stream.sync(); }); } void flush() override {} diff --git a/cpp/src/io/utilities/datasource.cpp b/cpp/src/io/utilities/datasource.cpp index c1d4d8960d59..11382b0d8998 100644 --- a/cpp/src/io/utilities/datasource.cpp +++ b/cpp/src/io/utilities/datasource.cpp @@ -103,7 +103,7 @@ class kvikio_source : public datasource { { CUDF_EXPECTS(supports_device_read(), "Device reads are not supported for this file."); auto const read_size = std::min(size, this->size() - offset); - stream.wait(); + stream.sync(); return _kvikio_handle.pread(dst, read_size, offset); } @@ -154,7 +154,7 @@ class file_source : public kvikio_source { { CUDF_EXPECTS(supports_device_read(), "Device reads are not supported for this file."); auto const read_size = std::min(size, this->size() - offset); - stream.wait(); + stream.sync(); return _kvikio_handle.pread(dst, read_size, offset, @@ -214,7 +214,7 @@ class device_buffer_source final : public datasource { auto const stream = cudf::detail::global_cuda_stream_pool().get_stream(); auto h_data = cudf::detail::make_host_vector_async( cudf::device_span{_d_buffer.data() + offset, count}, stream); - stream.synchronize(); + stream.sync(); return std::make_unique>>(std::move(h_data)); } diff --git a/cpp/src/io/utilities/hostdevice_span.hpp b/cpp/src/io/utilities/hostdevice_span.hpp index 60b899511aa8..577f9306816f 100644 --- a/cpp/src/io/utilities/hostdevice_span.hpp +++ b/cpp/src/io/utilities/hostdevice_span.hpp @@ -162,7 +162,7 @@ class hostdevice_span { cuda::stream_ref stream) const { host_to_device_async(stream); - stream.wait(); + stream.sync(); } void device_to_host_async(cuda::stream_ref stream) const @@ -175,7 +175,7 @@ class hostdevice_span { void device_to_host(cuda::stream_ref stream) const { device_to_host_async(stream); - stream.wait(); + stream.sync(); } private: diff --git a/cpp/src/io/utilities/hostdevice_vector.hpp b/cpp/src/io/utilities/hostdevice_vector.hpp index 662de8bda8b9..640eac1d0059 100644 --- a/cpp/src/io/utilities/hostdevice_vector.hpp +++ b/cpp/src/io/utilities/hostdevice_vector.hpp @@ -100,7 +100,7 @@ class hostdevice_vector { [[deprecated("Use host_to_device_async instead")]] void host_to_device(cuda::stream_ref stream) { host_to_device_async(stream); - stream.wait(); + stream.sync(); } void device_to_host_async(cuda::stream_ref stream) { @@ -110,7 +110,7 @@ class hostdevice_vector { void device_to_host(cuda::stream_ref stream) { device_to_host_async(stream); - stream.wait(); + stream.sync(); } /** diff --git a/cpp/src/lists/dremel.cu b/cpp/src/lists/dremel.cu index 076c6d5e63d5..dc9b17fb220f 100644 --- a/cpp/src/lists/dremel.cu +++ b/cpp/src/lists/dremel.cu @@ -255,7 +255,7 @@ dremel_data get_encoding(column_view h_col, auto column_offsets = cudf::detail::make_host_vector_async(d_column_offsets, stream); auto column_ends = cudf::detail::make_host_vector_async(d_column_ends, stream); - stream.wait(); + stream.sync(); size_t max_vals_size = 0; for (size_t l = 0; l < column_offsets.size(); ++l) { @@ -462,7 +462,7 @@ dremel_data get_encoding(column_view h_col, rep_level.resize(level_vals_size, stream); def_level.resize(level_vals_size, stream); - stream.wait(); + stream.sync(); size_type leaf_data_size = column_ends.back() - column_offsets.back(); diff --git a/cpp/src/strings/case.cu b/cpp/src/strings/case.cu index 9ddea2b354da..be8b74b527b3 100644 --- a/cpp/src/strings/case.cu +++ b/cpp/src/strings/case.cu @@ -479,7 +479,7 @@ std::unique_ptr convert_case(strings_column_view const& input, sub_offsets.begin(), sub_offsets.end(), tmp_offsets.begin()); - stream.wait(); // protect against destruction of sub_offsets + stream.sync(); // protect against destruction of sub_offsets } // run case conversion over the new sub-strings diff --git a/cpp/src/strings/copying/concatenate.cu b/cpp/src/strings/copying/concatenate.cu index 4dc9a8a572fc..31a6ed054737 100644 --- a/cpp/src/strings/copying/concatenate.cu +++ b/cpp/src/strings/copying/concatenate.cu @@ -95,7 +95,7 @@ auto create_strings_device_views(host_span views, cuda::strea chars_size_transform{}, cuda::std::plus{}); auto const output_chars_size = d_partition_offsets.back_element(stream); - stream.wait(); // ensure copy of output_chars_size is complete before returning + stream.sync(); // ensure copy of output_chars_size is complete before returning return std::make_tuple(std::move(device_view_owners), device_views_ptr, diff --git a/cpp/src/strings/regex/gkexec.cpp b/cpp/src/strings/regex/gkexec.cpp index 8c6a143d6467..c8341d3e9d9e 100644 --- a/cpp/src/strings/regex/gkexec.cpp +++ b/cpp/src/strings/regex/gkexec.cpp @@ -147,7 +147,7 @@ std::unique_ptr> gkprog_devic delete d_buffer; }; - stream.wait(); // wait for h_buffer to finish copying + stream.sync(); // wait for h_buffer to finish copying auto result = std::unique_ptr>(d_prog.get(), deleter); diff --git a/cpp/src/strings/regex/regexec.cpp b/cpp/src/strings/regex/regexec.cpp index facfe9d4359c..4d56d2300783 100644 --- a/cpp/src/strings/regex/regexec.cpp +++ b/cpp/src/strings/regex/regexec.cpp @@ -117,7 +117,7 @@ std::unique_ptr> reprog_devic delete d_buffer; }; - stream.wait(); // wait for h_buffer to finish copying + stream.sync(); // wait for h_buffer to finish copying return std::unique_ptr>(d_prog, deleter); } diff --git a/cpp/src/strings/strings_column_factories.cu b/cpp/src/strings/strings_column_factories.cu index 511062d0c187..763f9b5a4421 100644 --- a/cpp/src/strings/strings_column_factories.cu +++ b/cpp/src/strings/strings_column_factories.cu @@ -114,7 +114,7 @@ std::vector> make_strings_column_batch( // Except for other stream syncs in `CUB` that we cannot control, // this should be the only stream sync we need in the entire API. - stream.wait(); + stream.sync(); auto const threshold = cudf::strings::get_offset64_threshold(); auto const overflow_count = diff --git a/cpp/src/text/replace.cu b/cpp/src/text/replace.cu index e7a7772272cd..b289c929a018 100644 --- a/cpp/src/text/replace.cu +++ b/cpp/src/text/replace.cu @@ -314,7 +314,7 @@ std::unique_ptr replace_helper(ReplacerFn replacer, sub_offsets.begin() + sub_count, tmp_offsets.begin()); tmp_offsets.resize(sub_count + input.size() + 1, stream); - stream.wait(); // protect against destruction of sub_offsets + stream.sync(); // protect against destruction of sub_offsets } // cobble together a column_view of type STRING using the original data and the tmp offsets diff --git a/cpp/tests/io/cudftable_test.cpp b/cpp/tests/io/cudftable_test.cpp index a3276a4dd8a6..8c86e226f0a2 100644 --- a/cpp/tests/io/cudftable_test.cpp +++ b/cpp/tests/io/cudftable_test.cpp @@ -518,7 +518,7 @@ TEST_F(CudftableTest, DeviceBufferSource) device_buffer.data(), buffer.data(), buffer.size(), cudaMemcpyHostToDevice, stream.get())); // Ensure the data is copied to the device before the host read, because the host read does not // take the stream - stream.wait(); + stream.sync(); auto device_span = cudf::device_span( static_cast(device_buffer.data()), device_buffer.size()); diff --git a/cpp/tests/io/experimental/hybrid_scan_test.cpp b/cpp/tests/io/experimental/hybrid_scan_test.cpp index ff05dc64e11c..4be065216149 100644 --- a/cpp/tests/io/experimental/hybrid_scan_test.cpp +++ b/cpp/tests/io/experimental/hybrid_scan_test.cpp @@ -1189,7 +1189,7 @@ TEST_F(HybridScanTest, RowGroupPassesMatchesChunkedReader) writer.write(chunk_table); } writer.close(); - stream.wait(); + stream.sync(); } // Pick a pass_read_limit that forces multiple passes but groups some row groups together diff --git a/cpp/tests/io/fst/fst_test.cu b/cpp/tests/io/fst/fst_test.cu index 4862fa56f3b0..383f29cbe50f 100644 --- a/cpp/tests/io/fst/fst_test.cu +++ b/cpp/tests/io/fst/fst_test.cu @@ -195,7 +195,7 @@ TEST_F(FstTest, GroundTruth) std::back_inserter(out_index_cpu)); // Make sure results have been copied back to host - stream.synchronize(); + stream.sync(); // Verify results ASSERT_EQ(output_gpu_size[0], output_cpu.size()); diff --git a/cpp/tests/io/fst/logical_stack_test.cu b/cpp/tests/io/fst/logical_stack_test.cu index abe486ab4a66..bf27ec7c1977 100644 --- a/cpp/tests/io/fst/logical_stack_test.cu +++ b/cpp/tests/io/fst/logical_stack_test.cu @@ -232,7 +232,7 @@ TEST_F(LogicalStackTest, GroundTruth) std::back_inserter(top_of_stack_cpu)); // Make sure results have been copied back to host - stream.synchronize(); + stream.sync(); // Verify results ASSERT_EQ(string_size, top_of_stack_cpu.size()); diff --git a/cpp/tests/io/json/json_tree.cpp b/cpp/tests/io/json/json_tree.cpp index 150feda6e515..d8b90baae652 100644 --- a/cpp/tests/io/json/json_tree.cpp +++ b/cpp/tests/io/json/json_tree.cpp @@ -40,7 +40,7 @@ tree_meta_t2 to_cpu_tree(cuio_json::tree_meta_t const& d_value, cuda::stream_ref cudf::detail::make_std_vector_async(d_value.node_levels, stream), cudf::detail::make_std_vector_async(d_value.node_range_begin, stream), cudf::detail::make_std_vector_async(d_value.node_range_end, stream)}; - stream.wait(); + stream.sync(); return result; } @@ -227,7 +227,7 @@ tree_meta_t2 get_tree_representation_cpu( auto token_indices = cudf::detail::make_host_vector_async(token_indices_gpu1, stream); // Make sure tokens have been copied to the host - stream.wait(); + stream.sync(); #if LIBCUDF_JSON_DEBUG_DUMP // DEBUG print diff --git a/cpp/tests/io/json/json_tree_csr.cu b/cpp/tests/io/json/json_tree_csr.cu index 3095d0467a37..81eb039afbdd 100644 --- a/cpp/tests/io/json/json_tree_csr.cu +++ b/cpp/tests/io/json/json_tree_csr.cu @@ -61,7 +61,7 @@ bool check_equality(cuio_json::tree_meta_t& d_a, cuda::stream_ref stream) { // convert from tree_meta_t to column_tree_csr - stream.wait(); + stream.sync(); h_tree_meta_t a{cudf::detail::make_std_vector_async(d_a.node_categories, stream), cudf::detail::make_std_vector_async(d_a.parent_node_ids, stream), @@ -76,7 +76,7 @@ bool check_equality(cuio_json::tree_meta_t& d_a, auto a_max_row_offsets = cudf::detail::make_std_vector_async(d_a_max_row_offsets, stream); auto b_max_row_offsets = cudf::detail::make_std_vector_async(d_b_ctp.max_row_offsets, stream); - stream.wait(); + stream.sync(); auto num_nodes = a.parent_node_ids.size(); if (num_nodes > 1) { @@ -148,7 +148,7 @@ void run_test(std::string const& input, bool enable_lines = true) sizeof(cuio_json::node_t) * size_to_copy, cudaMemcpyDefault, stream.get())); - stream.wait(); + stream.sync(); if (options.is_enabled_lines()) return h_node_categories[0] == cuio_json::NC_LIST; return h_node_categories[0] == cuio_json::NC_LIST and h_node_categories[1] == cuio_json::NC_LIST; @@ -187,7 +187,7 @@ void run_test(std::string const& input, bool enable_lines = true) sizeof(cudf::size_type), cudaMemcpyDefault, stream.get())); - stream.wait(); + stream.sync(); return value; }(); diff --git a/cpp/tests/io/json/nested_json_test.cpp b/cpp/tests/io/json/nested_json_test.cpp index 219755f8f923..2bcbfd05c0dc 100644 --- a/cpp/tests/io/json/nested_json_test.cpp +++ b/cpp/tests/io/json/nested_json_test.cpp @@ -163,7 +163,7 @@ TEST_F(JsonTest, StackContext) stack_context.device_to_host_async(stream); // Make sure we copied back the stack context - stream.wait(); + stream.sync(); std::vector const golden_stack_context{ '_', '_', '_', '[', '{', '{', '{', '{', '{', '{', '{', '{', '{', '{', '{', '{', '{', '{', '{', @@ -214,7 +214,7 @@ TEST_F(JsonTest, StackContextUtf8) stack_context.device_to_host_async(stream); // Make sure we copied back the stack context - stream.wait(); + stream.sync(); std::vector const golden_stack_context{ '_', '[', '{', '{', '{', '{', '{', '{', '{', '{', '{', '{', '{', '{', '{', '{', '{', @@ -282,7 +282,7 @@ TEST_P(JsonDelimiterParamTest, StackContextRecovering) stack_context.device_to_host_async(stream); // Make sure we copied back the stack context - stream.wait(); + stream.sync(); // Verify results ASSERT_EQ(golden_stack_context.size(), stack_context.size()); @@ -390,7 +390,7 @@ TEST_P(JsonDelimiterParamTest, StackContextRecoveringFuzz) stack_context.device_to_host_async(stream); // Make sure we copied back the stack context - stream.wait(); + stream.sync(); ASSERT_EQ(expected_stack_context.size(), stack_context.size()); CUDF_TEST_EXPECT_VECTOR_EQUAL(expected_stack_context, stack_context, stack_context.size()); @@ -435,7 +435,7 @@ TEST_F(JsonNewlineDelimiterTest, TokenStream) // Copy back the number of tokens that were written auto const tokens_gpu = cudf::detail::make_std_vector_async(d_tokens_gpu, stream); auto const token_indices_gpu = cudf::detail::make_std_vector_async(d_token_indices_gpu, stream); - stream.wait(); + stream.sync(); // Golden token stream sample using token_t = cuio_json::token_t; @@ -570,7 +570,7 @@ TEST_F(JsonNewlineDelimiterTest, TokenStream2) // Copy back the number of tokens that were written auto const tokens_gpu = cudf::detail::make_std_vector_async(d_tokens_gpu, stream); auto const token_indices_gpu = cudf::detail::make_std_vector_async(d_token_indices_gpu, stream); - stream.wait(); + stream.sync(); // Golden token stream sample using token_t = cuio_json::token_t; @@ -730,7 +730,7 @@ TEST_P(JsonDelimiterParamTest, RecoveringTokenStream) auto const tokens_gpu = cudf::detail::make_std_vector_async(d_tokens_gpu, stream); auto const token_indices_gpu = cudf::detail::make_std_vector_async(d_token_indices_gpu, stream); - stream.wait(); + stream.sync(); // Verify the number of tokens matches ASSERT_EQ(golden_token_stream.size(), tokens_gpu.size()); ASSERT_EQ(golden_token_stream.size(), token_indices_gpu.size()); @@ -852,7 +852,7 @@ TEST_F(JsonTest, PostProcessTokenStream) auto const filtered_tokens = cudf::detail::make_std_vector_async(d_filtered_tokens, stream); auto const filtered_indices = cudf::detail::make_std_vector_async(d_filtered_indices, stream); - stream.wait(); + stream.sync(); // Verify the number of tokens matches ASSERT_EQ(filtered_tokens.size(), expected_output.size()); @@ -1169,7 +1169,7 @@ TEST_P(JsonDelimiterParamTest, RecoveringTokenStreamNewlineAndDelimiter) auto const tokens_gpu = cudf::detail::make_std_vector_async(d_tokens_gpu, stream); auto const token_indices_gpu = cudf::detail::make_std_vector_async(d_token_indices_gpu, stream); - stream.wait(); + stream.sync(); // Verify the number of tokens matches ASSERT_EQ(golden_token_stream.size(), tokens_gpu.size()); ASSERT_EQ(golden_token_stream.size(), token_indices_gpu.size()); @@ -1346,7 +1346,7 @@ TEST_P(JsonDelimiterParamTest, RecoveringTokenStreamNewlineAsWSAndDelimiter) auto const tokens_gpu = cudf::detail::make_std_vector_async(d_tokens_gpu, stream); auto const token_indices_gpu = cudf::detail::make_std_vector_async(d_token_indices_gpu, stream); - stream.wait(); + stream.sync(); // Verify the number of tokens matches ASSERT_EQ(golden_token_stream.size(), tokens_gpu.size()); ASSERT_EQ(golden_token_stream.size(), token_indices_gpu.size()); @@ -1413,7 +1413,7 @@ TEST_F(JsonTest, RejectsUnquotedValuesWithInvalidLeadingChar) cuio_json::detail::validate_token_stream(d_input, d_tokens, d_token_indices, opts, stream); auto const validated_tokens = cudf::detail::make_std_vector_async(d_tokens, stream); - stream.wait(); + stream.sync(); EXPECT_NE(std::find(validated_tokens.begin(), validated_tokens.end(), token_t::ErrorBegin), validated_tokens.end()) << "value " << bad << " was unexpectedly accepted as a number"; diff --git a/cpp/tests/io/parquet_chunked_reader_test.cu b/cpp/tests/io/parquet_chunked_reader_test.cu index 543dddebcf67..66655ec1daac 100644 --- a/cpp/tests/io/parquet_chunked_reader_test.cu +++ b/cpp/tests/io/parquet_chunked_reader_test.cu @@ -2417,7 +2417,7 @@ TEST_F(ParquetReaderTest, ManyLargeLists) bools_iter + (num_rows * bools_per_row), bools_col->mutable_view().begin()); - stream.wait(); + stream.sync(); // list column auto list_col = cudf::make_lists_column( diff --git a/cpp/tests/io/parquet_writer_test.cpp b/cpp/tests/io/parquet_writer_test.cpp index efc34151c60a..84b7e181ee85 100644 --- a/cpp/tests/io/parquet_writer_test.cpp +++ b/cpp/tests/io/parquet_writer_test.cpp @@ -318,7 +318,7 @@ class custom_test_data_sink : public cudf::io::data_sink { char* ptr = nullptr; CUDF_CUDA_TRY(cudaMallocHost(&ptr, size)); CUDF_CUDA_TRY(cudaMemcpyAsync(ptr, gpu_data, size, cudaMemcpyDefault, stream.get())); - stream.wait(); + stream.sync(); outfile_.write(ptr, size); CUDF_CUDA_TRY(cudaFreeHost(ptr)); }); @@ -2450,7 +2450,7 @@ class custom_test_memmap_sink : public cudf::io::data_sink { char* ptr = nullptr; CUDF_CUDA_TRY(cudaMallocHost(&ptr, size)); CUDF_CUDA_TRY(cudaMemcpyAsync(ptr, gpu_data, size, cudaMemcpyDefault, stream.get())); - stream.wait(); + stream.sync(); mm_writer->host_write(ptr, size); CUDF_CUDA_TRY(cudaFreeHost(ptr)); }); diff --git a/cpp/tests/io/text/data_chunk_source_test.cpp b/cpp/tests/io/text/data_chunk_source_test.cpp index bd6f5305587e..561be9b4d1bf 100644 --- a/cpp/tests/io/text/data_chunk_source_test.cpp +++ b/cpp/tests/io/text/data_chunk_source_test.cpp @@ -36,7 +36,7 @@ void test_source(std::string const& content, cudf::io::text::data_chunk_source c // full contents auto reader = source.create_reader(); auto const chunk = reader->get_next_chunk(content.size(), stream); - stream.wait(); + stream.sync(); EXPECT_EQ(chunk->size(), content.size()); EXPECT_EQ(chunk_to_host(*chunk), content); } @@ -45,7 +45,7 @@ void test_source(std::string const& content, cudf::io::text::data_chunk_source c auto reader = source.create_reader(); reader->skip_bytes(4); auto const chunk = reader->get_next_chunk(content.size(), stream); - stream.wait(); + stream.sync(); EXPECT_EQ(chunk->size(), content.size() - 4); EXPECT_EQ(chunk_to_host(*chunk), content.substr(4)); } @@ -54,7 +54,7 @@ void test_source(std::string const& content, cudf::io::text::data_chunk_source c auto reader = source.create_reader(); auto const chunk1 = reader->get_next_chunk(5, stream); auto const chunk2 = reader->get_next_chunk(content.size() - 5, stream); - stream.wait(); + stream.sync(); EXPECT_EQ(chunk1->size(), 5); EXPECT_EQ(chunk2->size(), content.size() - 5); EXPECT_EQ(chunk_to_host(*chunk1), content.substr(0, 5)); @@ -65,7 +65,7 @@ void test_source(std::string const& content, cudf::io::text::data_chunk_source c auto reader = source.create_reader(); auto const chunk1 = reader->get_next_chunk(content.size() / 2, stream); auto const chunk2 = reader->get_next_chunk(content.size() - content.size() / 2, stream); - stream.wait(); + stream.sync(); EXPECT_EQ(chunk1->size(), content.size() / 2); EXPECT_EQ(chunk2->size(), content.size() - content.size() / 2); EXPECT_EQ(chunk_to_host(*chunk1), content.substr(0, content.size() / 2)); @@ -75,11 +75,11 @@ void test_source(std::string const& content, cudf::io::text::data_chunk_source c // reading too many bytes auto reader = source.create_reader(); auto const chunk = reader->get_next_chunk(content.size() + 10, stream); - stream.wait(); + stream.sync(); EXPECT_EQ(chunk->size(), content.size()); EXPECT_EQ(chunk_to_host(*chunk), content); auto next_chunk = reader->get_next_chunk(1, stream); - stream.wait(); + stream.sync(); EXPECT_EQ(next_chunk->size(), 0); } { @@ -87,7 +87,7 @@ void test_source(std::string const& content, cudf::io::text::data_chunk_source c auto reader = source.create_reader(); reader->skip_bytes(content.size() + 10); auto const next_chunk = reader->get_next_chunk(1, stream); - stream.wait(); + stream.sync(); EXPECT_EQ(next_chunk->size(), 0); } cudf::set_pinned_memory_resource(last_mr); From 0db0fa9b1030c1c26ad1a6fc594be4c153c8f15a Mon Sep 17 00:00:00 2001 From: Vyas Ramasubramani Date: Fri, 14 Aug 2026 15:33:54 -0700 Subject: [PATCH 04/10] Use cuda stream header for stream_ref --- cpp/include/cudf/detail/structs/utilities.hpp | 2 +- cpp/include/cudf/io/data_sink.hpp | 2 +- cpp/include/cudf/io/datasource.hpp | 2 +- cpp/include/cudf/io/detail/avro.hpp | 2 +- cpp/include/cudf/io/detail/codec.hpp | 2 +- cpp/include/cudf/io/detail/csv.hpp | 2 +- cpp/include/cudf/io/detail/json.hpp | 2 +- cpp/include/cudf/io/detail/orc.hpp | 2 +- cpp/include/cudf/io/detail/parquet.hpp | 2 +- cpp/include/cudf/io/detail/tokenize_json.hpp | 2 +- cpp/include/cudf/io/experimental/cudftable.hpp | 2 +- cpp/include/cudf/io/experimental/hybrid_scan.hpp | 2 +- cpp/include/cudf/io/experimental/hybrid_scan_multifile.hpp | 2 +- cpp/include/cudf/io/experimental/variant.hpp | 2 +- cpp/include/cudf/io/parquet_io_utils.hpp | 2 +- cpp/include/cudf/io/text/detail/trie.hpp | 2 +- cpp/include/cudf/lists/detail/concatenate.hpp | 2 +- cpp/include/cudf/lists/detail/copying.hpp | 2 +- cpp/include/cudf/lists/detail/gather.cuh | 2 +- cpp/include/cudf/lists/detail/interleave_columns.hpp | 2 +- cpp/include/cudf/lists/detail/set_operations.hpp | 2 +- cpp/include/cudf/lists/detail/sorting.hpp | 2 +- cpp/include/cudf/lists/filling.hpp | 2 +- cpp/include/cudf/lists/lists_column_view.hpp | 2 +- cpp/include/cudf/strings/detail/char_tables.hpp | 2 +- cpp/include/cudf/strings/detail/combine.hpp | 2 +- cpp/include/cudf/strings/detail/concatenate.hpp | 2 +- cpp/include/cudf/strings/detail/converters.hpp | 2 +- cpp/include/cudf/strings/detail/copy_if_else.cuh | 2 +- cpp/include/cudf/strings/detail/copy_range.hpp | 2 +- cpp/include/cudf/strings/detail/copying.hpp | 2 +- cpp/include/cudf/strings/detail/fill.hpp | 2 +- cpp/include/cudf/strings/detail/gather.cuh | 2 +- cpp/include/cudf/strings/detail/merge.hpp | 2 +- cpp/include/cudf/strings/detail/replace.hpp | 2 +- cpp/include/cudf/strings/detail/scan.hpp | 2 +- cpp/include/cudf/strings/detail/scatter.cuh | 2 +- cpp/include/cudf/strings/detail/strings_children.cuh | 2 +- cpp/include/cudf/strings/detail/strings_column_factories.cuh | 2 +- cpp/include/cudf/strings/detail/utilities.hpp | 2 +- cpp/include/cudf/structs/detail/scan.hpp | 2 +- cpp/include/cudf/structs/structs_column_view.hpp | 2 +- cpp/include/nvtext/deduplicate.hpp | 2 +- cpp/include/nvtext/detail/tokenize.hpp | 2 +- cpp/include/nvtext/normalize.hpp | 2 +- cpp/src/io/avro/avro_gpu.cu | 2 +- cpp/src/io/avro/avro_gpu.hpp | 2 +- cpp/src/io/avro/reader_impl.cu | 2 +- cpp/src/io/comp/debrotli.cu | 2 +- cpp/src/io/comp/gpuinflate.cu | 2 +- cpp/src/io/comp/gpuinflate.hpp | 2 +- cpp/src/io/comp/nvcomp_adapter.cuh | 2 +- cpp/src/io/comp/nvcomp_adapter.hpp | 2 +- cpp/src/io/comp/snap.cu | 2 +- cpp/src/io/comp/unsnap.cu | 2 +- cpp/src/io/csv/csv_gpu.cu | 2 +- cpp/src/io/csv/csv_gpu.hpp | 2 +- cpp/src/io/csv/durations.cu | 2 +- cpp/src/io/csv/durations.hpp | 2 +- cpp/src/io/csv/reader_impl.cu | 2 +- cpp/src/io/csv/writer_impl.cu | 2 +- cpp/src/io/cudftable.cpp | 2 +- cpp/src/io/json/column_tree_construction.cu | 2 +- cpp/src/io/json/host_tree_algorithms.cu | 2 +- cpp/src/io/json/json_column.cu | 2 +- cpp/src/io/json/json_normalization.cu | 2 +- cpp/src/io/json/json_tree.cu | 2 +- cpp/src/io/json/read_json.hpp | 2 +- cpp/src/io/json/write_json.cu | 2 +- cpp/src/io/json/write_json.hpp | 2 +- cpp/src/io/orc/dict_enc.cu | 2 +- cpp/src/io/orc/orc_gpu.hpp | 2 +- cpp/src/io/orc/reader_impl.hpp | 2 +- cpp/src/io/orc/reader_impl_decode.cu | 2 +- cpp/src/io/orc/reader_impl_helpers.hpp | 2 +- cpp/src/io/orc/stats_enc.cu | 2 +- cpp/src/io/orc/stripe_data.cu | 2 +- cpp/src/io/orc/stripe_enc.cu | 2 +- cpp/src/io/orc/stripe_init.cu | 2 +- cpp/src/io/orc/writer_impl.cu | 2 +- cpp/src/io/orc/writer_impl.hpp | 2 +- cpp/src/io/parquet/bloom_filter_reader.cu | 2 +- cpp/src/io/parquet/error.hpp | 2 +- cpp/src/io/parquet/experimental/deletion_vectors.cu | 2 +- cpp/src/io/parquet/experimental/deletion_vectors_helpers.hpp | 2 +- cpp/src/io/parquet/experimental/dictionary_page_filter.cu | 2 +- cpp/src/io/parquet/experimental/hybrid_scan_helpers.hpp | 2 +- cpp/src/io/parquet/experimental/hybrid_scan_impl.hpp | 2 +- cpp/src/io/parquet/experimental/hybrid_scan_preprocess.cu | 2 +- cpp/src/io/parquet/experimental/page_index_filter.cu | 2 +- cpp/src/io/parquet/experimental/page_index_filter_utils.cu | 2 +- cpp/src/io/parquet/experimental/page_index_filter_utils.hpp | 2 +- cpp/src/io/parquet/experimental/variant_extract.cu | 2 +- cpp/src/io/parquet/expression_transform_helpers.hpp | 2 +- cpp/src/io/parquet/io_utils/parquet_io_utils.cpp | 2 +- cpp/src/io/parquet/page_enc.cu | 2 +- cpp/src/io/parquet/page_hdr.cu | 2 +- cpp/src/io/parquet/parquet_gpu.hpp | 2 +- cpp/src/io/parquet/reader_impl.hpp | 2 +- cpp/src/io/parquet/reader_impl_chunking_utils.cuh | 2 +- cpp/src/io/parquet/reader_impl_preprocess_utils.cuh | 2 +- cpp/src/io/parquet/writer_impl.cu | 2 +- cpp/src/io/parquet/writer_impl.hpp | 2 +- cpp/src/io/statistics/statistics.cuh | 2 +- cpp/src/io/text/bgzip_data_chunk_source.cu | 2 +- cpp/src/io/text/multibyte_split.cu | 2 +- cpp/src/io/utilities/column_buffer.hpp | 2 +- cpp/src/io/utilities/column_utils.cuh | 2 +- cpp/src/io/utilities/data_casting.cu | 2 +- cpp/src/io/utilities/data_sink.cpp | 2 +- cpp/src/io/utilities/hostdevice_span.hpp | 2 +- cpp/src/io/utilities/hostdevice_vector.hpp | 2 +- cpp/src/io/utilities/output_builder.cuh | 2 +- cpp/src/io/utilities/string_parsing.hpp | 2 +- cpp/src/io/utilities/trie.hpp | 2 +- cpp/src/lists/combine/concatenate_list_elements.cu | 2 +- cpp/src/lists/combine/concatenate_rows.cu | 2 +- cpp/src/lists/copying/concatenate.cu | 2 +- cpp/src/lists/copying/copying.cu | 2 +- cpp/src/lists/copying/gather.cu | 2 +- cpp/src/lists/copying/segmented_gather.cu | 2 +- cpp/src/lists/count_elements.cu | 2 +- cpp/src/lists/explode.cu | 2 +- cpp/src/lists/extract.cu | 2 +- cpp/src/lists/interleave_columns.cu | 2 +- cpp/src/lists/lists_column_factories.cu | 2 +- cpp/src/lists/lists_column_view.cu | 2 +- cpp/src/lists/reverse.cu | 2 +- cpp/src/lists/segmented_sort.cu | 2 +- cpp/src/lists/sequences.cu | 2 +- cpp/src/lists/set_operations.cu | 2 +- cpp/src/lists/stream_compaction/distinct.cu | 2 +- cpp/src/lists/utilities.hpp | 2 +- cpp/src/strings/attributes.cu | 2 +- cpp/src/strings/capitalize.cu | 2 +- cpp/src/strings/case.cu | 2 +- cpp/src/strings/char_types/char_types.cu | 2 +- cpp/src/strings/combine/concatenate.cu | 2 +- cpp/src/strings/combine/join.cu | 2 +- cpp/src/strings/combine/join_list_elements.cu | 2 +- cpp/src/strings/contains.cu | 2 +- cpp/src/strings/convert/convert_booleans.cu | 2 +- cpp/src/strings/convert/convert_datetime.cu | 2 +- cpp/src/strings/convert/convert_durations.cu | 2 +- cpp/src/strings/convert/convert_fixed_point.cu | 2 +- cpp/src/strings/convert/convert_floats.cu | 2 +- cpp/src/strings/convert/convert_hex.cu | 2 +- cpp/src/strings/convert/convert_integers.cu | 2 +- cpp/src/strings/convert/convert_ipv4.cu | 2 +- cpp/src/strings/convert/convert_lists.cu | 2 +- cpp/src/strings/convert/convert_urls.cu | 2 +- cpp/src/strings/convert/int_cast.cu | 2 +- cpp/src/strings/copying/concatenate.cu | 2 +- cpp/src/strings/copying/copy_range.cu | 2 +- cpp/src/strings/copying/copying.cu | 2 +- cpp/src/strings/copying/shift.cu | 2 +- cpp/src/strings/count_matches.hpp | 2 +- cpp/src/strings/extract/extract.cu | 2 +- cpp/src/strings/extract/extract_all.cu | 2 +- cpp/src/strings/filling/fill.cu | 2 +- cpp/src/strings/filter_chars.cu | 2 +- cpp/src/strings/like.cu | 2 +- cpp/src/strings/merge/merge.cu | 2 +- cpp/src/strings/padding.cu | 2 +- cpp/src/strings/positions.cu | 2 +- cpp/src/strings/positions.hpp | 2 +- cpp/src/strings/regex/gkexec.cpp | 2 +- cpp/src/strings/regex/glushkov.cuh | 2 +- cpp/src/strings/regex/regex.cuh | 2 +- cpp/src/strings/regex/regex_program_impl.h | 2 +- cpp/src/strings/regex/regexec.cpp | 2 +- cpp/src/strings/regex/utilities.cuh | 2 +- cpp/src/strings/repeat_strings.cu | 2 +- cpp/src/strings/replace/backref_re.cu | 2 +- cpp/src/strings/replace/backref_re.cuh | 2 +- cpp/src/strings/replace/find_replace.cu | 2 +- cpp/src/strings/replace/multi.cu | 2 +- cpp/src/strings/replace/replace.cu | 2 +- cpp/src/strings/replace/replace_nulls.cu | 2 +- cpp/src/strings/replace/replace_re.cu | 2 +- cpp/src/strings/replace/replace_slice.cu | 2 +- cpp/src/strings/reverse.cu | 2 +- cpp/src/strings/scan/scan_inclusive.cu | 2 +- cpp/src/strings/search/contains_multiple.cu | 2 +- cpp/src/strings/search/count.cu | 2 +- cpp/src/strings/search/find.cu | 2 +- cpp/src/strings/search/find_instance.cu | 2 +- cpp/src/strings/search/find_multiple.cu | 2 +- cpp/src/strings/search/findall.cu | 2 +- cpp/src/strings/slice.cu | 2 +- cpp/src/strings/split/partition.cu | 2 +- cpp/src/strings/split/split.cu | 2 +- cpp/src/strings/split/split.cuh | 2 +- cpp/src/strings/split/split_part.cu | 2 +- cpp/src/strings/split/split_re.cu | 2 +- cpp/src/strings/split/split_record.cu | 2 +- cpp/src/strings/strings_column_factories.cu | 2 +- cpp/src/strings/strings_column_view.cpp | 2 +- cpp/src/strings/strings_scalar_factories.cpp | 2 +- cpp/src/strings/strip.cu | 2 +- cpp/src/strings/translate.cu | 2 +- cpp/src/strings/utilities.cu | 2 +- cpp/src/strings/wrap.cu | 2 +- cpp/src/structs/copying/concatenate.cu | 2 +- cpp/src/structs/scan/scan_inclusive.cu | 2 +- cpp/src/structs/structs_column_factories.cu | 2 +- cpp/src/text/bpe/byte_pair_encoding.cu | 2 +- cpp/src/text/bpe/byte_pair_encoding.cuh | 2 +- cpp/src/text/bpe/load_merge_pairs.cu | 2 +- cpp/src/text/deduplicate.cu | 2 +- cpp/src/text/detokenize.cu | 2 +- cpp/src/text/edit_distance.cu | 2 +- cpp/src/text/generate_ngrams.cu | 2 +- cpp/src/text/jaccard.cu | 2 +- cpp/src/text/minhash.cu | 2 +- cpp/src/text/ngrams_tokenize.cu | 2 +- cpp/src/text/normalize.cu | 2 +- cpp/src/text/normalize.cuh | 2 +- cpp/src/text/replace.cu | 2 +- cpp/src/text/stemmer.cu | 2 +- cpp/src/text/tokenize.cu | 2 +- cpp/src/text/vocabulary_tokenize.cu | 2 +- cpp/src/text/wordpiece_tokenize.cu | 2 +- cpp/tests/io/experimental/hybrid_scan_common.hpp | 2 +- cpp/tests/io/fst/fst_test.cu | 2 +- cpp/tests/io/fst/logical_stack_test.cu | 2 +- cpp/tests/io/json/json_tree.cpp | 2 +- cpp/tests/io/json/json_tree_csr.cu | 2 +- cpp/tests/io/json/json_utils.hpp | 2 +- cpp/tests/io/json/json_whitespace_normalization_test.cpp | 2 +- cpp/tests/io/orc_chunked_reader_test.cu | 2 +- cpp/tests/io/parquet_chunked_reader_test.cu | 2 +- cpp/tests/io/parquet_deletion_vectors_test.cpp | 2 +- cpp/tests/io/type_inference_test.cpp | 2 +- 234 files changed, 234 insertions(+), 234 deletions(-) diff --git a/cpp/include/cudf/detail/structs/utilities.hpp b/cpp/include/cudf/detail/structs/utilities.hpp index 088f8c6916a1..e41efb48f135 100644 --- a/cpp/include/cudf/detail/structs/utilities.hpp +++ b/cpp/include/cudf/detail/structs/utilities.hpp @@ -13,7 +13,7 @@ #include -#include +#include namespace CUDF_EXPORT cudf { namespace structs::detail { diff --git a/cpp/include/cudf/io/data_sink.hpp b/cpp/include/cudf/io/data_sink.hpp index cd31a92bf97f..24ce588ea584 100644 --- a/cpp/include/cudf/io/data_sink.hpp +++ b/cpp/include/cudf/io/data_sink.hpp @@ -8,7 +8,7 @@ #include #include -#include +#include #include #include diff --git a/cpp/include/cudf/io/datasource.hpp b/cpp/include/cudf/io/datasource.hpp index 1c205d996837..cd6c99aab155 100644 --- a/cpp/include/cudf/io/datasource.hpp +++ b/cpp/include/cudf/io/datasource.hpp @@ -10,7 +10,7 @@ #include #include -#include +#include #include #include diff --git a/cpp/include/cudf/io/detail/avro.hpp b/cpp/include/cudf/io/detail/avro.hpp index 10a40078c150..367f029858b5 100644 --- a/cpp/include/cudf/io/detail/avro.hpp +++ b/cpp/include/cudf/io/detail/avro.hpp @@ -9,7 +9,7 @@ #include #include -#include +#include namespace cudf { namespace io::detail::avro { diff --git a/cpp/include/cudf/io/detail/codec.hpp b/cpp/include/cudf/io/detail/codec.hpp index 24c5460768cd..bbd2c28c839f 100644 --- a/cpp/include/cudf/io/detail/codec.hpp +++ b/cpp/include/cudf/io/detail/codec.hpp @@ -13,7 +13,7 @@ #include #include -#include +#include #include #include diff --git a/cpp/include/cudf/io/detail/csv.hpp b/cpp/include/cudf/io/detail/csv.hpp index 1d1182528e60..d62e54afbae1 100644 --- a/cpp/include/cudf/io/detail/csv.hpp +++ b/cpp/include/cudf/io/detail/csv.hpp @@ -8,7 +8,7 @@ #include #include -#include +#include namespace cudf { namespace io::detail::csv { diff --git a/cpp/include/cudf/io/detail/json.hpp b/cpp/include/cudf/io/detail/json.hpp index 1156a2d64933..25430f69d285 100644 --- a/cpp/include/cudf/io/detail/json.hpp +++ b/cpp/include/cudf/io/detail/json.hpp @@ -10,7 +10,7 @@ #include #include -#include +#include namespace CUDF_EXPORT cudf { namespace io::json::detail { diff --git a/cpp/include/cudf/io/detail/orc.hpp b/cpp/include/cudf/io/detail/orc.hpp index b2498a11507e..36c5d4b88b8d 100644 --- a/cpp/include/cudf/io/detail/orc.hpp +++ b/cpp/include/cudf/io/detail/orc.hpp @@ -13,7 +13,7 @@ #include #include -#include +#include #include #include diff --git a/cpp/include/cudf/io/detail/parquet.hpp b/cpp/include/cudf/io/detail/parquet.hpp index 826f9b2bb605..6f33c476ba07 100644 --- a/cpp/include/cudf/io/detail/parquet.hpp +++ b/cpp/include/cudf/io/detail/parquet.hpp @@ -16,7 +16,7 @@ #include #include -#include +#include #include #include diff --git a/cpp/include/cudf/io/detail/tokenize_json.hpp b/cpp/include/cudf/io/detail/tokenize_json.hpp index dd9fc410cedb..906736b3a525 100644 --- a/cpp/include/cudf/io/detail/tokenize_json.hpp +++ b/cpp/include/cudf/io/detail/tokenize_json.hpp @@ -12,7 +12,7 @@ #include -#include +#include namespace cudf::io::json { diff --git a/cpp/include/cudf/io/experimental/cudftable.hpp b/cpp/include/cudf/io/experimental/cudftable.hpp index dad8d3e59363..4c73a18e83b3 100644 --- a/cpp/include/cudf/io/experimental/cudftable.hpp +++ b/cpp/include/cudf/io/experimental/cudftable.hpp @@ -12,7 +12,7 @@ #include #include -#include +#include #include diff --git a/cpp/include/cudf/io/experimental/hybrid_scan.hpp b/cpp/include/cudf/io/experimental/hybrid_scan.hpp index 74867200c517..bf8991b8557b 100644 --- a/cpp/include/cudf/io/experimental/hybrid_scan.hpp +++ b/cpp/include/cudf/io/experimental/hybrid_scan.hpp @@ -14,7 +14,7 @@ #include -#include +#include #include #include diff --git a/cpp/include/cudf/io/experimental/hybrid_scan_multifile.hpp b/cpp/include/cudf/io/experimental/hybrid_scan_multifile.hpp index 73ef5406fd3f..24992f447fab 100644 --- a/cpp/include/cudf/io/experimental/hybrid_scan_multifile.hpp +++ b/cpp/include/cudf/io/experimental/hybrid_scan_multifile.hpp @@ -15,7 +15,7 @@ #include -#include +#include #include #include diff --git a/cpp/include/cudf/io/experimental/variant.hpp b/cpp/include/cudf/io/experimental/variant.hpp index 05165621419d..3ca602e41c9b 100644 --- a/cpp/include/cudf/io/experimental/variant.hpp +++ b/cpp/include/cudf/io/experimental/variant.hpp @@ -12,7 +12,7 @@ #include #include -#include +#include #include #include diff --git a/cpp/include/cudf/io/parquet_io_utils.hpp b/cpp/include/cudf/io/parquet_io_utils.hpp index 117f274f6ead..c2892f5c80ec 100644 --- a/cpp/include/cudf/io/parquet_io_utils.hpp +++ b/cpp/include/cudf/io/parquet_io_utils.hpp @@ -11,7 +11,7 @@ #include #include -#include +#include #include #include diff --git a/cpp/include/cudf/io/text/detail/trie.hpp b/cpp/include/cudf/io/text/detail/trie.hpp index 321ff3b23591..b224977a54cb 100644 --- a/cpp/include/cudf/io/text/detail/trie.hpp +++ b/cpp/include/cudf/io/text/detail/trie.hpp @@ -12,7 +12,7 @@ #include -#include +#include #include #include diff --git a/cpp/include/cudf/lists/detail/concatenate.hpp b/cpp/include/cudf/lists/detail/concatenate.hpp index 62d58f0e71de..0d220c281a10 100644 --- a/cpp/include/cudf/lists/detail/concatenate.hpp +++ b/cpp/include/cudf/lists/detail/concatenate.hpp @@ -11,7 +11,7 @@ #include #include -#include +#include namespace cudf { namespace lists::detail { diff --git a/cpp/include/cudf/lists/detail/copying.hpp b/cpp/include/cudf/lists/detail/copying.hpp index cb537cc364e2..7fce061b0395 100644 --- a/cpp/include/cudf/lists/detail/copying.hpp +++ b/cpp/include/cudf/lists/detail/copying.hpp @@ -7,7 +7,7 @@ #include #include -#include +#include namespace cudf { namespace lists::detail { diff --git a/cpp/include/cudf/lists/detail/gather.cuh b/cpp/include/cudf/lists/detail/gather.cuh index 7d9502dbdd07..4155242f7601 100644 --- a/cpp/include/cudf/lists/detail/gather.cuh +++ b/cpp/include/cudf/lists/detail/gather.cuh @@ -17,7 +17,7 @@ #include #include -#include +#include #include namespace cudf { diff --git a/cpp/include/cudf/lists/detail/interleave_columns.hpp b/cpp/include/cudf/lists/detail/interleave_columns.hpp index 2b9cc320dfae..87be6d82228b 100644 --- a/cpp/include/cudf/lists/detail/interleave_columns.hpp +++ b/cpp/include/cudf/lists/detail/interleave_columns.hpp @@ -8,7 +8,7 @@ #include #include -#include +#include namespace cudf { namespace lists::detail { diff --git a/cpp/include/cudf/lists/detail/set_operations.hpp b/cpp/include/cudf/lists/detail/set_operations.hpp index a7045b947d47..4a4396783a76 100644 --- a/cpp/include/cudf/lists/detail/set_operations.hpp +++ b/cpp/include/cudf/lists/detail/set_operations.hpp @@ -10,7 +10,7 @@ #include #include -#include +#include namespace cudf { namespace lists::detail { diff --git a/cpp/include/cudf/lists/detail/sorting.hpp b/cpp/include/cudf/lists/detail/sorting.hpp index d616537c2d20..0f25d853c297 100644 --- a/cpp/include/cudf/lists/detail/sorting.hpp +++ b/cpp/include/cudf/lists/detail/sorting.hpp @@ -7,7 +7,7 @@ #include #include -#include +#include namespace cudf { namespace lists::detail { diff --git a/cpp/include/cudf/lists/filling.hpp b/cpp/include/cudf/lists/filling.hpp index 7062be53b5fd..fa00b60cd0b9 100644 --- a/cpp/include/cudf/lists/filling.hpp +++ b/cpp/include/cudf/lists/filling.hpp @@ -9,7 +9,7 @@ #include #include -#include +#include #include diff --git a/cpp/include/cudf/lists/lists_column_view.hpp b/cpp/include/cudf/lists/lists_column_view.hpp index 12b3640aeb0e..dce853bb2ca9 100644 --- a/cpp/include/cudf/lists/lists_column_view.hpp +++ b/cpp/include/cudf/lists/lists_column_view.hpp @@ -8,7 +8,7 @@ #include #include -#include +#include /** * @file diff --git a/cpp/include/cudf/strings/detail/char_tables.hpp b/cpp/include/cudf/strings/detail/char_tables.hpp index 8756d35fd083..c01616cbfffb 100644 --- a/cpp/include/cudf/strings/detail/char_tables.hpp +++ b/cpp/include/cudf/strings/detail/char_tables.hpp @@ -8,7 +8,7 @@ #include #include -#include +#include #include diff --git a/cpp/include/cudf/strings/detail/combine.hpp b/cpp/include/cudf/strings/detail/combine.hpp index 36646837a144..9bd5647d8241 100644 --- a/cpp/include/cudf/strings/detail/combine.hpp +++ b/cpp/include/cudf/strings/detail/combine.hpp @@ -12,7 +12,7 @@ #include #include -#include +#include namespace cudf { namespace strings::detail { diff --git a/cpp/include/cudf/strings/detail/concatenate.hpp b/cpp/include/cudf/strings/detail/concatenate.hpp index 99beb89075bc..13111de77512 100644 --- a/cpp/include/cudf/strings/detail/concatenate.hpp +++ b/cpp/include/cudf/strings/detail/concatenate.hpp @@ -11,7 +11,7 @@ #include #include -#include +#include namespace cudf { namespace strings::detail { diff --git a/cpp/include/cudf/strings/detail/converters.hpp b/cpp/include/cudf/strings/detail/converters.hpp index faaab2cbf5f5..93ed47700a9e 100644 --- a/cpp/include/cudf/strings/detail/converters.hpp +++ b/cpp/include/cudf/strings/detail/converters.hpp @@ -9,7 +9,7 @@ #include #include -#include +#include namespace cudf { namespace strings::detail { diff --git a/cpp/include/cudf/strings/detail/copy_if_else.cuh b/cpp/include/cudf/strings/detail/copy_if_else.cuh index f28b618a797a..a5e37c953727 100644 --- a/cpp/include/cudf/strings/detail/copy_if_else.cuh +++ b/cpp/include/cudf/strings/detail/copy_if_else.cuh @@ -15,7 +15,7 @@ #include #include #include -#include +#include #include namespace cudf { diff --git a/cpp/include/cudf/strings/detail/copy_range.hpp b/cpp/include/cudf/strings/detail/copy_range.hpp index 242fc664bcae..4f8868d2b934 100644 --- a/cpp/include/cudf/strings/detail/copy_range.hpp +++ b/cpp/include/cudf/strings/detail/copy_range.hpp @@ -8,7 +8,7 @@ #include #include -#include +#include namespace cudf { namespace strings::detail { diff --git a/cpp/include/cudf/strings/detail/copying.hpp b/cpp/include/cudf/strings/detail/copying.hpp index f300bd739200..e9231c40fcd6 100644 --- a/cpp/include/cudf/strings/detail/copying.hpp +++ b/cpp/include/cudf/strings/detail/copying.hpp @@ -10,7 +10,7 @@ #include #include -#include +#include namespace cudf { namespace strings::detail { diff --git a/cpp/include/cudf/strings/detail/fill.hpp b/cpp/include/cudf/strings/detail/fill.hpp index d2e5a9701b03..8c88cd53e394 100644 --- a/cpp/include/cudf/strings/detail/fill.hpp +++ b/cpp/include/cudf/strings/detail/fill.hpp @@ -10,7 +10,7 @@ #include #include -#include +#include namespace cudf { namespace strings::detail { diff --git a/cpp/include/cudf/strings/detail/gather.cuh b/cpp/include/cudf/strings/detail/gather.cuh index 691ab8ca2a39..f683d28cf9be 100644 --- a/cpp/include/cudf/strings/detail/gather.cuh +++ b/cpp/include/cudf/strings/detail/gather.cuh @@ -24,7 +24,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/cpp/include/cudf/strings/detail/merge.hpp b/cpp/include/cudf/strings/detail/merge.hpp index c989717b66f4..be37e7390a6d 100644 --- a/cpp/include/cudf/strings/detail/merge.hpp +++ b/cpp/include/cudf/strings/detail/merge.hpp @@ -10,7 +10,7 @@ #include -#include +#include namespace cudf { namespace strings::detail { diff --git a/cpp/include/cudf/strings/detail/replace.hpp b/cpp/include/cudf/strings/detail/replace.hpp index 09976ce9e0ea..9cfa7532bf6d 100644 --- a/cpp/include/cudf/strings/detail/replace.hpp +++ b/cpp/include/cudf/strings/detail/replace.hpp @@ -10,7 +10,7 @@ #include #include -#include +#include namespace cudf { namespace strings::detail { diff --git a/cpp/include/cudf/strings/detail/scan.hpp b/cpp/include/cudf/strings/detail/scan.hpp index a8bb071ae291..2ea5638c59fd 100644 --- a/cpp/include/cudf/strings/detail/scan.hpp +++ b/cpp/include/cudf/strings/detail/scan.hpp @@ -8,7 +8,7 @@ #include #include -#include +#include namespace cudf { namespace strings::detail { diff --git a/cpp/include/cudf/strings/detail/scatter.cuh b/cpp/include/cudf/strings/detail/scatter.cuh index 2c0b288c7b9b..a3505e5b4213 100644 --- a/cpp/include/cudf/strings/detail/scatter.cuh +++ b/cpp/include/cudf/strings/detail/scatter.cuh @@ -16,7 +16,7 @@ #include #include -#include +#include #include #include diff --git a/cpp/include/cudf/strings/detail/strings_children.cuh b/cpp/include/cudf/strings/detail/strings_children.cuh index 4962ce813ed9..e06c48c5e272 100644 --- a/cpp/include/cudf/strings/detail/strings_children.cuh +++ b/cpp/include/cudf/strings/detail/strings_children.cuh @@ -22,7 +22,7 @@ #include #include #include -#include +#include #include #include diff --git a/cpp/include/cudf/strings/detail/strings_column_factories.cuh b/cpp/include/cudf/strings/detail/strings_column_factories.cuh index 0afa4c60952a..69b4901e9a72 100644 --- a/cpp/include/cudf/strings/detail/strings_column_factories.cuh +++ b/cpp/include/cudf/strings/detail/strings_column_factories.cuh @@ -17,7 +17,7 @@ #include #include #include -#include +#include #include namespace cudf { diff --git a/cpp/include/cudf/strings/detail/utilities.hpp b/cpp/include/cudf/strings/detail/utilities.hpp index 7fa02f214a7a..3ee60fe1d636 100644 --- a/cpp/include/cudf/strings/detail/utilities.hpp +++ b/cpp/include/cudf/strings/detail/utilities.hpp @@ -13,7 +13,7 @@ #include -#include +#include namespace CUDF_EXPORT cudf { namespace strings::detail { diff --git a/cpp/include/cudf/structs/detail/scan.hpp b/cpp/include/cudf/structs/detail/scan.hpp index 056d62b1aaba..d174bbf78a55 100644 --- a/cpp/include/cudf/structs/detail/scan.hpp +++ b/cpp/include/cudf/structs/detail/scan.hpp @@ -8,7 +8,7 @@ #include #include -#include +#include namespace cudf { namespace structs::detail { diff --git a/cpp/include/cudf/structs/structs_column_view.hpp b/cpp/include/cudf/structs/structs_column_view.hpp index 75e084c15732..2e5837d6f4d8 100644 --- a/cpp/include/cudf/structs/structs_column_view.hpp +++ b/cpp/include/cudf/structs/structs_column_view.hpp @@ -8,7 +8,7 @@ #include #include -#include +#include /** * @file diff --git a/cpp/include/nvtext/deduplicate.hpp b/cpp/include/nvtext/deduplicate.hpp index 8b5b57530276..a938809e0163 100644 --- a/cpp/include/nvtext/deduplicate.hpp +++ b/cpp/include/nvtext/deduplicate.hpp @@ -11,7 +11,7 @@ #include -#include +#include //! NVText APIs namespace CUDF_EXPORT nvtext { diff --git a/cpp/include/nvtext/detail/tokenize.hpp b/cpp/include/nvtext/detail/tokenize.hpp index 8f9df14624fa..19998f575cd6 100644 --- a/cpp/include/nvtext/detail/tokenize.hpp +++ b/cpp/include/nvtext/detail/tokenize.hpp @@ -10,7 +10,7 @@ #include #include -#include +#include namespace nvtext { namespace detail { diff --git a/cpp/include/nvtext/normalize.hpp b/cpp/include/nvtext/normalize.hpp index 8d5af661097a..b24a473e7b4c 100644 --- a/cpp/include/nvtext/normalize.hpp +++ b/cpp/include/nvtext/normalize.hpp @@ -10,7 +10,7 @@ #include #include -#include +#include //! NVText APIs namespace CUDF_EXPORT nvtext { diff --git a/cpp/src/io/avro/avro_gpu.cu b/cpp/src/io/avro/avro_gpu.cu index b5778ac97a0d..f923a0d7dd13 100644 --- a/cpp/src/io/avro/avro_gpu.cu +++ b/cpp/src/io/avro/avro_gpu.cu @@ -5,7 +5,7 @@ #include "avro_gpu.hpp" #include "io/utilities/block_utils.cuh" -#include +#include using cudf::device_span; diff --git a/cpp/src/io/avro/avro_gpu.hpp b/cpp/src/io/avro/avro_gpu.hpp index 7165dd5347e9..a4b6ebc6480f 100644 --- a/cpp/src/io/avro/avro_gpu.hpp +++ b/cpp/src/io/avro/avro_gpu.hpp @@ -8,7 +8,7 @@ #include -#include +#include namespace cudf { namespace io { diff --git a/cpp/src/io/avro/reader_impl.cu b/cpp/src/io/avro/reader_impl.cu index 80911227a538..919145420501 100644 --- a/cpp/src/io/avro/reader_impl.cu +++ b/cpp/src/io/avro/reader_impl.cu @@ -26,7 +26,7 @@ #include #include -#include +#include #include #include diff --git a/cpp/src/io/comp/debrotli.cu b/cpp/src/io/comp/debrotli.cu index bbd01303846f..67802207ac01 100644 --- a/cpp/src/io/comp/debrotli.cu +++ b/cpp/src/io/comp/debrotli.cu @@ -53,7 +53,7 @@ THE SOFTWARE. #include #include -#include +#include namespace cudf::io::detail { diff --git a/cpp/src/io/comp/gpuinflate.cu b/cpp/src/io/comp/gpuinflate.cu index 36ac6ff2e346..58912908424d 100644 --- a/cpp/src/io/comp/gpuinflate.cu +++ b/cpp/src/io/comp/gpuinflate.cu @@ -47,7 +47,7 @@ Mark Adler madler@alumni.caltech.edu #include #include #include -#include +#include #include #include #include diff --git a/cpp/src/io/comp/gpuinflate.hpp b/cpp/src/io/comp/gpuinflate.hpp index a9015b55f384..acce266c286a 100644 --- a/cpp/src/io/comp/gpuinflate.hpp +++ b/cpp/src/io/comp/gpuinflate.hpp @@ -12,7 +12,7 @@ #include #include -#include +#include #include diff --git a/cpp/src/io/comp/nvcomp_adapter.cuh b/cpp/src/io/comp/nvcomp_adapter.cuh index 989d81024e8e..3cebbd36f9f0 100644 --- a/cpp/src/io/comp/nvcomp_adapter.cuh +++ b/cpp/src/io/comp/nvcomp_adapter.cuh @@ -11,7 +11,7 @@ #include -#include +#include #include diff --git a/cpp/src/io/comp/nvcomp_adapter.hpp b/cpp/src/io/comp/nvcomp_adapter.hpp index a64154586fc1..5b7d91ab10c9 100644 --- a/cpp/src/io/comp/nvcomp_adapter.hpp +++ b/cpp/src/io/comp/nvcomp_adapter.hpp @@ -11,7 +11,7 @@ #include #include -#include +#include #include diff --git a/cpp/src/io/comp/snap.cu b/cpp/src/io/comp/snap.cu index f9c599b6be7a..bd3635bf5685 100644 --- a/cpp/src/io/comp/snap.cu +++ b/cpp/src/io/comp/snap.cu @@ -6,7 +6,7 @@ #include "gpuinflate.hpp" #include "io/utilities/block_utils.cuh" -#include +#include namespace cudf::io::detail { constexpr int hash_bits = 12; diff --git a/cpp/src/io/comp/unsnap.cu b/cpp/src/io/comp/unsnap.cu index 0189ecadcb77..ad96277be893 100644 --- a/cpp/src/io/comp/unsnap.cu +++ b/cpp/src/io/comp/unsnap.cu @@ -11,7 +11,7 @@ #include #include -#include +#include namespace cudf::io::detail { constexpr int32_t batch_size = (1 << 5); diff --git a/cpp/src/io/csv/csv_gpu.cu b/cpp/src/io/csv/csv_gpu.cu index 32b9f56cd865..5e3b0918ee11 100644 --- a/cpp/src/io/csv/csv_gpu.cu +++ b/cpp/src/io/csv/csv_gpu.cu @@ -28,7 +28,7 @@ #include #include -#include +#include #include #include #include diff --git a/cpp/src/io/csv/csv_gpu.hpp b/cpp/src/io/csv/csv_gpu.hpp index c4b4563962f4..6120cb425a2e 100644 --- a/cpp/src/io/csv/csv_gpu.hpp +++ b/cpp/src/io/csv/csv_gpu.hpp @@ -10,7 +10,7 @@ #include #include -#include +#include using cudf::device_span; diff --git a/cpp/src/io/csv/durations.cu b/cpp/src/io/csv/durations.cu index 8c282dc7e8a1..da150552e5a1 100644 --- a/cpp/src/io/csv/durations.cu +++ b/cpp/src/io/csv/durations.cu @@ -15,7 +15,7 @@ #include #include -#include +#include #include #include diff --git a/cpp/src/io/csv/durations.hpp b/cpp/src/io/csv/durations.hpp index 00dfa9caafc1..88569a4ff440 100644 --- a/cpp/src/io/csv/durations.hpp +++ b/cpp/src/io/csv/durations.hpp @@ -8,7 +8,7 @@ #include #include -#include +#include #include diff --git a/cpp/src/io/csv/reader_impl.cu b/cpp/src/io/csv/reader_impl.cu index 14923fa83653..1078a69e4bdb 100644 --- a/cpp/src/io/csv/reader_impl.cu +++ b/cpp/src/io/csv/reader_impl.cu @@ -43,7 +43,7 @@ #include #include -#include +#include #include #include diff --git a/cpp/src/io/csv/writer_impl.cu b/cpp/src/io/csv/writer_impl.cu index 1f393bc66b0d..3090dd9fe873 100644 --- a/cpp/src/io/csv/writer_impl.cu +++ b/cpp/src/io/csv/writer_impl.cu @@ -34,7 +34,7 @@ #include -#include +#include #include #include #include diff --git a/cpp/src/io/cudftable.cpp b/cpp/src/io/cudftable.cpp index a3342c25f096..040ffe65fe43 100644 --- a/cpp/src/io/cudftable.cpp +++ b/cpp/src/io/cudftable.cpp @@ -15,7 +15,7 @@ #include -#include +#include namespace cudf::io::experimental { namespace detail { diff --git a/cpp/src/io/json/column_tree_construction.cu b/cpp/src/io/json/column_tree_construction.cu index aa5a030b62ac..299c34008e64 100644 --- a/cpp/src/io/json/column_tree_construction.cu +++ b/cpp/src/io/json/column_tree_construction.cu @@ -19,7 +19,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/cpp/src/io/json/host_tree_algorithms.cu b/cpp/src/io/json/host_tree_algorithms.cu index 2c1313551c49..6070e01ae490 100644 --- a/cpp/src/io/json/host_tree_algorithms.cu +++ b/cpp/src/io/json/host_tree_algorithms.cu @@ -26,7 +26,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/cpp/src/io/json/json_column.cu b/cpp/src/io/json/json_column.cu index 1ce481815005..8d62eef09fc2 100644 --- a/cpp/src/io/json/json_column.cu +++ b/cpp/src/io/json/json_column.cu @@ -25,7 +25,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/cpp/src/io/json/json_normalization.cu b/cpp/src/io/json/json_normalization.cu index 0d087afca700..81f6cc140cd9 100644 --- a/cpp/src/io/json/json_normalization.cu +++ b/cpp/src/io/json/json_normalization.cu @@ -22,7 +22,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/cpp/src/io/json/json_tree.cu b/cpp/src/io/json/json_tree.cu index 87273aca5ced..273d59651c7e 100644 --- a/cpp/src/io/json/json_tree.cu +++ b/cpp/src/io/json/json_tree.cu @@ -31,7 +31,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/cpp/src/io/json/read_json.hpp b/cpp/src/io/json/read_json.hpp index 09fdec9110d8..a5773b7cf1c0 100644 --- a/cpp/src/io/json/read_json.hpp +++ b/cpp/src/io/json/read_json.hpp @@ -12,7 +12,7 @@ #include #include -#include +#include #include diff --git a/cpp/src/io/json/write_json.cu b/cpp/src/io/json/write_json.cu index 9d49d31d93bb..3a9e9bd2e247 100644 --- a/cpp/src/io/json/write_json.cu +++ b/cpp/src/io/json/write_json.cu @@ -41,7 +41,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/cpp/src/io/json/write_json.hpp b/cpp/src/io/json/write_json.hpp index ffa5ecb90213..f73ac32bd239 100644 --- a/cpp/src/io/json/write_json.hpp +++ b/cpp/src/io/json/write_json.hpp @@ -12,7 +12,7 @@ #include -#include +#include #include diff --git a/cpp/src/io/orc/dict_enc.cu b/cpp/src/io/orc/dict_enc.cu index c9e18e29764b..8236855f4f74 100644 --- a/cpp/src/io/orc/dict_enc.cu +++ b/cpp/src/io/orc/dict_enc.cu @@ -11,7 +11,7 @@ #include #include -#include +#include namespace cudf::io::orc::detail { diff --git a/cpp/src/io/orc/orc_gpu.hpp b/cpp/src/io/orc/orc_gpu.hpp index be40df5598d7..ab2475fc28b5 100644 --- a/cpp/src/io/orc/orc_gpu.hpp +++ b/cpp/src/io/orc/orc_gpu.hpp @@ -20,7 +20,7 @@ #include #include -#include +#include namespace cudf::io::orc::detail { diff --git a/cpp/src/io/orc/reader_impl.hpp b/cpp/src/io/orc/reader_impl.hpp index c85a6468dae7..12ee62e83d68 100644 --- a/cpp/src/io/orc/reader_impl.hpp +++ b/cpp/src/io/orc/reader_impl.hpp @@ -13,7 +13,7 @@ #include #include -#include +#include #include diff --git a/cpp/src/io/orc/reader_impl_decode.cu b/cpp/src/io/orc/reader_impl_decode.cu index 257145956f28..d6181389e1cd 100644 --- a/cpp/src/io/orc/reader_impl_decode.cu +++ b/cpp/src/io/orc/reader_impl_decode.cu @@ -30,7 +30,7 @@ #include #include -#include +#include #include #include #include diff --git a/cpp/src/io/orc/reader_impl_helpers.hpp b/cpp/src/io/orc/reader_impl_helpers.hpp index 83c4fbc34f01..583d8fb41c96 100644 --- a/cpp/src/io/orc/reader_impl_helpers.hpp +++ b/cpp/src/io/orc/reader_impl_helpers.hpp @@ -9,7 +9,7 @@ #include "io/orc/orc.hpp" #include "io/utilities/column_buffer.hpp" -#include +#include #include #include diff --git a/cpp/src/io/orc/stats_enc.cu b/cpp/src/io/orc/stats_enc.cu index 48e031e0a94e..017097278faf 100644 --- a/cpp/src/io/orc/stats_enc.cu +++ b/cpp/src/io/orc/stats_enc.cu @@ -10,7 +10,7 @@ #include #include -#include +#include namespace cudf::io::orc::detail { diff --git a/cpp/src/io/orc/stripe_data.cu b/cpp/src/io/orc/stripe_data.cu index 5c131dcf3435..92670a0465c7 100644 --- a/cpp/src/io/orc/stripe_data.cu +++ b/cpp/src/io/orc/stripe_data.cu @@ -11,7 +11,7 @@ #include #include -#include +#include namespace cudf::io::orc::detail { diff --git a/cpp/src/io/orc/stripe_enc.cu b/cpp/src/io/orc/stripe_enc.cu index 4deeef5733e6..f303e0f0b943 100644 --- a/cpp/src/io/orc/stripe_enc.cu +++ b/cpp/src/io/orc/stripe_enc.cu @@ -24,7 +24,7 @@ #include #include #include -#include +#include #include #include diff --git a/cpp/src/io/orc/stripe_init.cu b/cpp/src/io/orc/stripe_init.cu index 185bf6c66535..15cd3241dd3f 100644 --- a/cpp/src/io/orc/stripe_init.cu +++ b/cpp/src/io/orc/stripe_init.cu @@ -11,7 +11,7 @@ #include #include -#include +#include #include #include diff --git a/cpp/src/io/orc/writer_impl.cu b/cpp/src/io/orc/writer_impl.cu index 4795eb0c8d4e..951c53f780df 100644 --- a/cpp/src/io/orc/writer_impl.cu +++ b/cpp/src/io/orc/writer_impl.cu @@ -41,7 +41,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/cpp/src/io/orc/writer_impl.hpp b/cpp/src/io/orc/writer_impl.hpp index dbc2ff249b37..5e93b54bc91b 100644 --- a/cpp/src/io/orc/writer_impl.hpp +++ b/cpp/src/io/orc/writer_impl.hpp @@ -21,7 +21,7 @@ #include #include -#include +#include #include #include diff --git a/cpp/src/io/parquet/bloom_filter_reader.cu b/cpp/src/io/parquet/bloom_filter_reader.cu index c844a4913ea5..a9a758ecb6ff 100644 --- a/cpp/src/io/parquet/bloom_filter_reader.cu +++ b/cpp/src/io/parquet/bloom_filter_reader.cu @@ -27,7 +27,7 @@ #include #include -#include +#include #include #include diff --git a/cpp/src/io/parquet/error.hpp b/cpp/src/io/parquet/error.hpp index 3e4dc9894667..23abeefe0ddd 100644 --- a/cpp/src/io/parquet/error.hpp +++ b/cpp/src/io/parquet/error.hpp @@ -7,7 +7,7 @@ #include "io/utilities/hostdevice_vector.hpp" -#include +#include #include #include diff --git a/cpp/src/io/parquet/experimental/deletion_vectors.cu b/cpp/src/io/parquet/experimental/deletion_vectors.cu index 4e8b940f806c..33f8bff64f83 100644 --- a/cpp/src/io/parquet/experimental/deletion_vectors.cu +++ b/cpp/src/io/parquet/experimental/deletion_vectors.cu @@ -20,7 +20,7 @@ #include #include #include -#include +#include #include diff --git a/cpp/src/io/parquet/experimental/deletion_vectors_helpers.hpp b/cpp/src/io/parquet/experimental/deletion_vectors_helpers.hpp index 7aa8121cc09c..735032cb0ed3 100644 --- a/cpp/src/io/parquet/experimental/deletion_vectors_helpers.hpp +++ b/cpp/src/io/parquet/experimental/deletion_vectors_helpers.hpp @@ -14,7 +14,7 @@ #include #include -#include +#include #include #include diff --git a/cpp/src/io/parquet/experimental/dictionary_page_filter.cu b/cpp/src/io/parquet/experimental/dictionary_page_filter.cu index e56fb5ee7a11..f5f3c8ff0b9c 100644 --- a/cpp/src/io/parquet/experimental/dictionary_page_filter.cu +++ b/cpp/src/io/parquet/experimental/dictionary_page_filter.cu @@ -28,7 +28,7 @@ #include #include #include -#include +#include #include diff --git a/cpp/src/io/parquet/experimental/hybrid_scan_helpers.hpp b/cpp/src/io/parquet/experimental/hybrid_scan_helpers.hpp index 12ae0b5aaedf..d4b17613394f 100644 --- a/cpp/src/io/parquet/experimental/hybrid_scan_helpers.hpp +++ b/cpp/src/io/parquet/experimental/hybrid_scan_helpers.hpp @@ -14,7 +14,7 @@ #include #include -#include +#include #include #include diff --git a/cpp/src/io/parquet/experimental/hybrid_scan_impl.hpp b/cpp/src/io/parquet/experimental/hybrid_scan_impl.hpp index 944db5589ae7..4c2bf670953d 100644 --- a/cpp/src/io/parquet/experimental/hybrid_scan_impl.hpp +++ b/cpp/src/io/parquet/experimental/hybrid_scan_impl.hpp @@ -19,7 +19,7 @@ #include #include -#include +#include #include #include diff --git a/cpp/src/io/parquet/experimental/hybrid_scan_preprocess.cu b/cpp/src/io/parquet/experimental/hybrid_scan_preprocess.cu index d4a2207ffc4b..994176176a71 100644 --- a/cpp/src/io/parquet/experimental/hybrid_scan_preprocess.cu +++ b/cpp/src/io/parquet/experimental/hybrid_scan_preprocess.cu @@ -23,7 +23,7 @@ #include #include #include -#include +#include #include #include diff --git a/cpp/src/io/parquet/experimental/page_index_filter.cu b/cpp/src/io/parquet/experimental/page_index_filter.cu index b5e5f4d2fd1c..6f63b711f41e 100644 --- a/cpp/src/io/parquet/experimental/page_index_filter.cu +++ b/cpp/src/io/parquet/experimental/page_index_filter.cu @@ -36,7 +36,7 @@ #include #include -#include +#include #include #include diff --git a/cpp/src/io/parquet/experimental/page_index_filter_utils.cu b/cpp/src/io/parquet/experimental/page_index_filter_utils.cu index c3862079b3a8..07c81c787afe 100644 --- a/cpp/src/io/parquet/experimental/page_index_filter_utils.cu +++ b/cpp/src/io/parquet/experimental/page_index_filter_utils.cu @@ -13,7 +13,7 @@ #include -#include +#include #include #include diff --git a/cpp/src/io/parquet/experimental/page_index_filter_utils.hpp b/cpp/src/io/parquet/experimental/page_index_filter_utils.hpp index d8306b42192b..264510ff48fd 100644 --- a/cpp/src/io/parquet/experimental/page_index_filter_utils.hpp +++ b/cpp/src/io/parquet/experimental/page_index_filter_utils.hpp @@ -15,7 +15,7 @@ #include -#include +#include #include diff --git a/cpp/src/io/parquet/experimental/variant_extract.cu b/cpp/src/io/parquet/experimental/variant_extract.cu index 82962e47f271..eb37728045a7 100644 --- a/cpp/src/io/parquet/experimental/variant_extract.cu +++ b/cpp/src/io/parquet/experimental/variant_extract.cu @@ -40,7 +40,7 @@ #include #include #include -#include +#include #include #include diff --git a/cpp/src/io/parquet/expression_transform_helpers.hpp b/cpp/src/io/parquet/expression_transform_helpers.hpp index 655cb118d645..98523892d3cb 100644 --- a/cpp/src/io/parquet/expression_transform_helpers.hpp +++ b/cpp/src/io/parquet/expression_transform_helpers.hpp @@ -14,7 +14,7 @@ #include #include -#include +#include #include #include diff --git a/cpp/src/io/parquet/io_utils/parquet_io_utils.cpp b/cpp/src/io/parquet/io_utils/parquet_io_utils.cpp index 5c3eb19c61a7..a28f00c9aca1 100644 --- a/cpp/src/io/parquet/io_utils/parquet_io_utils.cpp +++ b/cpp/src/io/parquet/io_utils/parquet_io_utils.cpp @@ -24,7 +24,7 @@ #include #include -#include +#include #include #include diff --git a/cpp/src/io/parquet/page_enc.cu b/cpp/src/io/parquet/page_enc.cu index a0debc79f8a4..129e71dea9b2 100644 --- a/cpp/src/io/parquet/page_enc.cu +++ b/cpp/src/io/parquet/page_enc.cu @@ -29,7 +29,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/cpp/src/io/parquet/page_hdr.cu b/cpp/src/io/parquet/page_hdr.cu index d0caf236e7e7..f833cf6ded8b 100644 --- a/cpp/src/io/parquet/page_hdr.cu +++ b/cpp/src/io/parquet/page_hdr.cu @@ -19,7 +19,7 @@ #include #include #include -#include +#include #include namespace cudf::io::parquet::detail { diff --git a/cpp/src/io/parquet/parquet_gpu.hpp b/cpp/src/io/parquet/parquet_gpu.hpp index 1dd401f08260..2b1b49a4d376 100644 --- a/cpp/src/io/parquet/parquet_gpu.hpp +++ b/cpp/src/io/parquet/parquet_gpu.hpp @@ -23,7 +23,7 @@ #include #include #include -#include +#include #include #include diff --git a/cpp/src/io/parquet/reader_impl.hpp b/cpp/src/io/parquet/reader_impl.hpp index 9451adafcc3b..6552d268e79c 100644 --- a/cpp/src/io/parquet/reader_impl.hpp +++ b/cpp/src/io/parquet/reader_impl.hpp @@ -22,7 +22,7 @@ #include #include -#include +#include #include #include diff --git a/cpp/src/io/parquet/reader_impl_chunking_utils.cuh b/cpp/src/io/parquet/reader_impl_chunking_utils.cuh index c33ac468c932..9151d3aacaba 100644 --- a/cpp/src/io/parquet/reader_impl_chunking_utils.cuh +++ b/cpp/src/io/parquet/reader_impl_chunking_utils.cuh @@ -15,7 +15,7 @@ #include #include -#include +#include #include namespace cudf::io::parquet::detail { diff --git a/cpp/src/io/parquet/reader_impl_preprocess_utils.cuh b/cpp/src/io/parquet/reader_impl_preprocess_utils.cuh index abdec7231ecf..af7c96f8316a 100644 --- a/cpp/src/io/parquet/reader_impl_preprocess_utils.cuh +++ b/cpp/src/io/parquet/reader_impl_preprocess_utils.cuh @@ -10,7 +10,7 @@ #include #include -#include +#include #include #include diff --git a/cpp/src/io/parquet/writer_impl.cu b/cpp/src/io/parquet/writer_impl.cu index c9f0724adbf1..9ea88f66d534 100644 --- a/cpp/src/io/parquet/writer_impl.cu +++ b/cpp/src/io/parquet/writer_impl.cu @@ -41,7 +41,7 @@ #include #include -#include +#include #include #include diff --git a/cpp/src/io/parquet/writer_impl.hpp b/cpp/src/io/parquet/writer_impl.hpp index 5e4c5c5f0e20..a2f6445a283d 100644 --- a/cpp/src/io/parquet/writer_impl.hpp +++ b/cpp/src/io/parquet/writer_impl.hpp @@ -20,7 +20,7 @@ #include #include -#include +#include #include #include diff --git a/cpp/src/io/statistics/statistics.cuh b/cpp/src/io/statistics/statistics.cuh index e2943cf97583..79e4c5cb4da2 100644 --- a/cpp/src/io/statistics/statistics.cuh +++ b/cpp/src/io/statistics/statistics.cuh @@ -17,7 +17,7 @@ #include #include -#include +#include #include diff --git a/cpp/src/io/text/bgzip_data_chunk_source.cu b/cpp/src/io/text/bgzip_data_chunk_source.cu index 8a48a79caba5..ae3c66971ebb 100644 --- a/cpp/src/io/text/bgzip_data_chunk_source.cu +++ b/cpp/src/io/text/bgzip_data_chunk_source.cu @@ -24,7 +24,7 @@ #include #include -#include +#include #include #include diff --git a/cpp/src/io/text/multibyte_split.cu b/cpp/src/io/text/multibyte_split.cu index 1d55897c597e..a9076e415544 100644 --- a/cpp/src/io/text/multibyte_split.cu +++ b/cpp/src/io/text/multibyte_split.cu @@ -33,7 +33,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/cpp/src/io/utilities/column_buffer.hpp b/cpp/src/io/utilities/column_buffer.hpp index ede57a1ac036..fec442a2c83f 100644 --- a/cpp/src/io/utilities/column_buffer.hpp +++ b/cpp/src/io/utilities/column_buffer.hpp @@ -19,7 +19,7 @@ #include #include -#include +#include #include diff --git a/cpp/src/io/utilities/column_utils.cuh b/cpp/src/io/utilities/column_utils.cuh index 7bdb099e873d..ea0a88f56119 100644 --- a/cpp/src/io/utilities/column_utils.cuh +++ b/cpp/src/io/utilities/column_utils.cuh @@ -16,7 +16,7 @@ #include #include -#include +#include #include namespace cudf { diff --git a/cpp/src/io/utilities/data_casting.cu b/cpp/src/io/utilities/data_casting.cu index 0b92c0eb2909..9503e945e32a 100644 --- a/cpp/src/io/utilities/data_casting.cu +++ b/cpp/src/io/utilities/data_casting.cu @@ -27,7 +27,7 @@ #include #include #include -#include +#include #include #include diff --git a/cpp/src/io/utilities/data_sink.cpp b/cpp/src/io/utilities/data_sink.cpp index 20f397dc4083..8d91e044621d 100644 --- a/cpp/src/io/utilities/data_sink.cpp +++ b/cpp/src/io/utilities/data_sink.cpp @@ -11,7 +11,7 @@ #include -#include +#include #include namespace cudf { diff --git a/cpp/src/io/utilities/hostdevice_span.hpp b/cpp/src/io/utilities/hostdevice_span.hpp index 577f9306816f..10a32a364fc3 100644 --- a/cpp/src/io/utilities/hostdevice_span.hpp +++ b/cpp/src/io/utilities/hostdevice_span.hpp @@ -9,7 +9,7 @@ #include #include -#include +#include namespace cudf::detail { diff --git a/cpp/src/io/utilities/hostdevice_vector.hpp b/cpp/src/io/utilities/hostdevice_vector.hpp index 640eac1d0059..c587d8003ed7 100644 --- a/cpp/src/io/utilities/hostdevice_vector.hpp +++ b/cpp/src/io/utilities/hostdevice_vector.hpp @@ -18,7 +18,7 @@ #include -#include +#include namespace cudf::detail { diff --git a/cpp/src/io/utilities/output_builder.cuh b/cpp/src/io/utilities/output_builder.cuh index 533d790631ba..b050f47f51fd 100644 --- a/cpp/src/io/utilities/output_builder.cuh +++ b/cpp/src/io/utilities/output_builder.cuh @@ -13,7 +13,7 @@ #include #include -#include +#include #include #include diff --git a/cpp/src/io/utilities/string_parsing.hpp b/cpp/src/io/utilities/string_parsing.hpp index f987a041a371..86e1c453f7d3 100644 --- a/cpp/src/io/utilities/string_parsing.hpp +++ b/cpp/src/io/utilities/string_parsing.hpp @@ -13,7 +13,7 @@ #include #include -#include +#include namespace cudf::io { /** diff --git a/cpp/src/io/utilities/trie.hpp b/cpp/src/io/utilities/trie.hpp index 8a757a4ff49e..7fcd43430383 100644 --- a/cpp/src/io/utilities/trie.hpp +++ b/cpp/src/io/utilities/trie.hpp @@ -13,7 +13,7 @@ #include #include -#include +#include #include #include diff --git a/cpp/src/lists/combine/concatenate_list_elements.cu b/cpp/src/lists/combine/concatenate_list_elements.cu index 23d9f2dc0b56..927706969f63 100644 --- a/cpp/src/lists/combine/concatenate_list_elements.cu +++ b/cpp/src/lists/combine/concatenate_list_elements.cu @@ -23,7 +23,7 @@ #include #include -#include +#include #include #include #include diff --git a/cpp/src/lists/combine/concatenate_rows.cu b/cpp/src/lists/combine/concatenate_rows.cu index 5f3579c2f097..bef9633018bd 100644 --- a/cpp/src/lists/combine/concatenate_rows.cu +++ b/cpp/src/lists/combine/concatenate_rows.cu @@ -20,7 +20,7 @@ #include #include -#include +#include #include #include diff --git a/cpp/src/lists/copying/concatenate.cu b/cpp/src/lists/copying/concatenate.cu index 208474709435..f2fc6d002410 100644 --- a/cpp/src/lists/copying/concatenate.cu +++ b/cpp/src/lists/copying/concatenate.cu @@ -18,7 +18,7 @@ #include -#include +#include #include #include diff --git a/cpp/src/lists/copying/copying.cu b/cpp/src/lists/copying/copying.cu index 6e271a70e4c8..4d598f514ebc 100644 --- a/cpp/src/lists/copying/copying.cu +++ b/cpp/src/lists/copying/copying.cu @@ -13,7 +13,7 @@ #include -#include +#include #include #include diff --git a/cpp/src/lists/copying/gather.cu b/cpp/src/lists/copying/gather.cu index 69edf1cceefe..270a96bab11a 100644 --- a/cpp/src/lists/copying/gather.cu +++ b/cpp/src/lists/copying/gather.cu @@ -9,7 +9,7 @@ #include #include -#include +#include #include #include diff --git a/cpp/src/lists/copying/segmented_gather.cu b/cpp/src/lists/copying/segmented_gather.cu index e5d542fd664d..e73b7a48c278 100644 --- a/cpp/src/lists/copying/segmented_gather.cu +++ b/cpp/src/lists/copying/segmented_gather.cu @@ -15,7 +15,7 @@ #include #include -#include +#include #include #include diff --git a/cpp/src/lists/count_elements.cu b/cpp/src/lists/count_elements.cu index c331e3489302..8e7b64ae2f89 100644 --- a/cpp/src/lists/count_elements.cu +++ b/cpp/src/lists/count_elements.cu @@ -18,7 +18,7 @@ #include #include -#include +#include #include #include diff --git a/cpp/src/lists/explode.cu b/cpp/src/lists/explode.cu index c536b39c5d35..083cfd1f3dc5 100644 --- a/cpp/src/lists/explode.cu +++ b/cpp/src/lists/explode.cu @@ -20,7 +20,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/cpp/src/lists/extract.cu b/cpp/src/lists/extract.cu index 8f761ba68b12..9d3ffddda15d 100644 --- a/cpp/src/lists/extract.cu +++ b/cpp/src/lists/extract.cu @@ -19,7 +19,7 @@ #include -#include +#include #include #include diff --git a/cpp/src/lists/interleave_columns.cu b/cpp/src/lists/interleave_columns.cu index 835ae5b97ca4..8a27b3a04143 100644 --- a/cpp/src/lists/interleave_columns.cu +++ b/cpp/src/lists/interleave_columns.cu @@ -21,7 +21,7 @@ #include #include -#include +#include #include #include #include diff --git a/cpp/src/lists/lists_column_factories.cu b/cpp/src/lists/lists_column_factories.cu index a25a5ffacb8a..bb384d0e09a4 100644 --- a/cpp/src/lists/lists_column_factories.cu +++ b/cpp/src/lists/lists_column_factories.cu @@ -15,7 +15,7 @@ #include #include -#include +#include #include namespace cudf { diff --git a/cpp/src/lists/lists_column_view.cu b/cpp/src/lists/lists_column_view.cu index 82af9ba053b8..c71dd8e6a156 100644 --- a/cpp/src/lists/lists_column_view.cu +++ b/cpp/src/lists/lists_column_view.cu @@ -9,7 +9,7 @@ #include #include -#include +#include namespace cudf { diff --git a/cpp/src/lists/reverse.cu b/cpp/src/lists/reverse.cu index bac6e5ce7e3d..55a6b4031c74 100644 --- a/cpp/src/lists/reverse.cu +++ b/cpp/src/lists/reverse.cu @@ -18,7 +18,7 @@ #include #include -#include +#include #include namespace cudf::lists { diff --git a/cpp/src/lists/segmented_sort.cu b/cpp/src/lists/segmented_sort.cu index e60230ad258c..ee06f1fc10d8 100644 --- a/cpp/src/lists/segmented_sort.cu +++ b/cpp/src/lists/segmented_sort.cu @@ -17,7 +17,7 @@ #include -#include +#include #include namespace cudf { diff --git a/cpp/src/lists/sequences.cu b/cpp/src/lists/sequences.cu index cc655fff9db1..5b35211c5839 100644 --- a/cpp/src/lists/sequences.cu +++ b/cpp/src/lists/sequences.cu @@ -19,7 +19,7 @@ #include #include -#include +#include #include #include #include diff --git a/cpp/src/lists/set_operations.cu b/cpp/src/lists/set_operations.cu index 552283cd83c6..7f3e50f8a27a 100644 --- a/cpp/src/lists/set_operations.cu +++ b/cpp/src/lists/set_operations.cu @@ -25,7 +25,7 @@ #include #include -#include +#include #include #include diff --git a/cpp/src/lists/stream_compaction/distinct.cu b/cpp/src/lists/stream_compaction/distinct.cu index f3074c53ec74..7cc08c7dc2df 100644 --- a/cpp/src/lists/stream_compaction/distinct.cu +++ b/cpp/src/lists/stream_compaction/distinct.cu @@ -17,7 +17,7 @@ #include #include -#include +#include #include #include diff --git a/cpp/src/lists/utilities.hpp b/cpp/src/lists/utilities.hpp index c87086adb22c..435bc4b801dd 100644 --- a/cpp/src/lists/utilities.hpp +++ b/cpp/src/lists/utilities.hpp @@ -9,7 +9,7 @@ #include #include -#include +#include namespace cudf::lists::detail { diff --git a/cpp/src/strings/attributes.cu b/cpp/src/strings/attributes.cu index 8faab9f28c87..13fb165496df 100644 --- a/cpp/src/strings/attributes.cu +++ b/cpp/src/strings/attributes.cu @@ -25,7 +25,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/cpp/src/strings/capitalize.cu b/cpp/src/strings/capitalize.cu index c291a96e14a9..6e317c9f5dc0 100644 --- a/cpp/src/strings/capitalize.cu +++ b/cpp/src/strings/capitalize.cu @@ -19,7 +19,7 @@ #include #include #include -#include +#include #include #include diff --git a/cpp/src/strings/case.cu b/cpp/src/strings/case.cu index be8b74b527b3..90534840aeba 100644 --- a/cpp/src/strings/case.cu +++ b/cpp/src/strings/case.cu @@ -29,7 +29,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/cpp/src/strings/char_types/char_types.cu b/cpp/src/strings/char_types/char_types.cu index b8f12c6a9749..a60ca863c9d8 100644 --- a/cpp/src/strings/char_types/char_types.cu +++ b/cpp/src/strings/char_types/char_types.cu @@ -20,7 +20,7 @@ #include #include -#include +#include #include namespace cudf { diff --git a/cpp/src/strings/combine/concatenate.cu b/cpp/src/strings/combine/concatenate.cu index e726b52480b3..d3fedcdfc596 100644 --- a/cpp/src/strings/combine/concatenate.cu +++ b/cpp/src/strings/combine/concatenate.cu @@ -24,7 +24,7 @@ #include #include -#include +#include #include #include diff --git a/cpp/src/strings/combine/join.cu b/cpp/src/strings/combine/join.cu index a81ea9844674..162586ba59ab 100644 --- a/cpp/src/strings/combine/join.cu +++ b/cpp/src/strings/combine/join.cu @@ -24,7 +24,7 @@ #include #include -#include +#include #include #include diff --git a/cpp/src/strings/combine/join_list_elements.cu b/cpp/src/strings/combine/join_list_elements.cu index 4201175211f6..0a4c980ddbb1 100644 --- a/cpp/src/strings/combine/join_list_elements.cu +++ b/cpp/src/strings/combine/join_list_elements.cu @@ -21,7 +21,7 @@ #include #include -#include +#include namespace cudf { namespace strings { diff --git a/cpp/src/strings/contains.cu b/cpp/src/strings/contains.cu index 9c27ba0547b9..852fb68a77fb 100644 --- a/cpp/src/strings/contains.cu +++ b/cpp/src/strings/contains.cu @@ -20,7 +20,7 @@ #include #include -#include +#include namespace cudf { namespace strings { diff --git a/cpp/src/strings/convert/convert_booleans.cu b/cpp/src/strings/convert/convert_booleans.cu index 329109b6ddcf..9264a2302b48 100644 --- a/cpp/src/strings/convert/convert_booleans.cu +++ b/cpp/src/strings/convert/convert_booleans.cu @@ -18,7 +18,7 @@ #include #include -#include +#include #include namespace cudf { diff --git a/cpp/src/strings/convert/convert_datetime.cu b/cpp/src/strings/convert/convert_datetime.cu index 3facac97746e..21b14ace40cb 100644 --- a/cpp/src/strings/convert/convert_datetime.cu +++ b/cpp/src/strings/convert/convert_datetime.cu @@ -30,7 +30,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/cpp/src/strings/convert/convert_durations.cu b/cpp/src/strings/convert/convert_durations.cu index 2c431a609023..5cea800f63c0 100644 --- a/cpp/src/strings/convert/convert_durations.cu +++ b/cpp/src/strings/convert/convert_durations.cu @@ -20,7 +20,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/cpp/src/strings/convert/convert_fixed_point.cu b/cpp/src/strings/convert/convert_fixed_point.cu index bf42d86ee0ce..32853c86afb9 100644 --- a/cpp/src/strings/convert/convert_fixed_point.cu +++ b/cpp/src/strings/convert/convert_fixed_point.cu @@ -25,7 +25,7 @@ #include #include #include -#include +#include #include #include diff --git a/cpp/src/strings/convert/convert_floats.cu b/cpp/src/strings/convert/convert_floats.cu index c3a99809d092..cc8e19f94646 100644 --- a/cpp/src/strings/convert/convert_floats.cu +++ b/cpp/src/strings/convert/convert_floats.cu @@ -21,7 +21,7 @@ #include #include -#include +#include #include #include diff --git a/cpp/src/strings/convert/convert_hex.cu b/cpp/src/strings/convert/convert_hex.cu index e030359ad9bb..af8de817fc90 100644 --- a/cpp/src/strings/convert/convert_hex.cu +++ b/cpp/src/strings/convert/convert_hex.cu @@ -21,7 +21,7 @@ #include #include -#include +#include #include #include #include diff --git a/cpp/src/strings/convert/convert_integers.cu b/cpp/src/strings/convert/convert_integers.cu index 78fc1505e8de..2b9258ab9ea8 100644 --- a/cpp/src/strings/convert/convert_integers.cu +++ b/cpp/src/strings/convert/convert_integers.cu @@ -25,7 +25,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/cpp/src/strings/convert/convert_ipv4.cu b/cpp/src/strings/convert/convert_ipv4.cu index 3f7f6bcad4ce..512494561900 100644 --- a/cpp/src/strings/convert/convert_ipv4.cu +++ b/cpp/src/strings/convert/convert_ipv4.cu @@ -16,7 +16,7 @@ #include #include -#include +#include #include namespace cudf { diff --git a/cpp/src/strings/convert/convert_lists.cu b/cpp/src/strings/convert/convert_lists.cu index ad4f227e0b6f..8beeb4d196f3 100644 --- a/cpp/src/strings/convert/convert_lists.cu +++ b/cpp/src/strings/convert/convert_lists.cu @@ -12,7 +12,7 @@ #include #include -#include +#include namespace cudf { namespace strings { diff --git a/cpp/src/strings/convert/convert_urls.cu b/cpp/src/strings/convert/convert_urls.cu index fbee11358fba..8106be1918c3 100644 --- a/cpp/src/strings/convert/convert_urls.cu +++ b/cpp/src/strings/convert/convert_urls.cu @@ -27,7 +27,7 @@ #include #include #include -#include +#include namespace cudf { namespace strings { diff --git a/cpp/src/strings/convert/int_cast.cu b/cpp/src/strings/convert/int_cast.cu index e4536166fb2b..910ccc536c76 100644 --- a/cpp/src/strings/convert/int_cast.cu +++ b/cpp/src/strings/convert/int_cast.cu @@ -22,7 +22,7 @@ #include #include #include -#include +#include #include #include diff --git a/cpp/src/strings/copying/concatenate.cu b/cpp/src/strings/copying/concatenate.cu index 31a6ed054737..890743c7c255 100644 --- a/cpp/src/strings/copying/concatenate.cu +++ b/cpp/src/strings/copying/concatenate.cu @@ -23,7 +23,7 @@ #include #include -#include +#include #include #include #include diff --git a/cpp/src/strings/copying/copy_range.cu b/cpp/src/strings/copying/copy_range.cu index a44adfa0902c..098865c45a98 100644 --- a/cpp/src/strings/copying/copy_range.cu +++ b/cpp/src/strings/copying/copy_range.cu @@ -16,7 +16,7 @@ #include #include -#include +#include #include namespace cudf { diff --git a/cpp/src/strings/copying/copying.cu b/cpp/src/strings/copying/copying.cu index 662fe4f425b5..b58528ae4f75 100644 --- a/cpp/src/strings/copying/copying.cu +++ b/cpp/src/strings/copying/copying.cu @@ -16,7 +16,7 @@ #include #include -#include +#include #include namespace cudf { diff --git a/cpp/src/strings/copying/shift.cu b/cpp/src/strings/copying/shift.cu index 94a301adaf40..b716b6924f13 100644 --- a/cpp/src/strings/copying/shift.cu +++ b/cpp/src/strings/copying/shift.cu @@ -16,7 +16,7 @@ #include #include -#include +#include #include namespace cudf::strings::detail { diff --git a/cpp/src/strings/count_matches.hpp b/cpp/src/strings/count_matches.hpp index d4b7efdf077b..5874be08d292 100644 --- a/cpp/src/strings/count_matches.hpp +++ b/cpp/src/strings/count_matches.hpp @@ -8,7 +8,7 @@ #include #include -#include +#include namespace cudf { diff --git a/cpp/src/strings/extract/extract.cu b/cpp/src/strings/extract/extract.cu index a79e1612b25a..23eb5098c17d 100644 --- a/cpp/src/strings/extract/extract.cu +++ b/cpp/src/strings/extract/extract.cu @@ -20,7 +20,7 @@ #include #include -#include +#include #include #include diff --git a/cpp/src/strings/extract/extract_all.cu b/cpp/src/strings/extract/extract_all.cu index 45d05999fac7..98c927069530 100644 --- a/cpp/src/strings/extract/extract_all.cu +++ b/cpp/src/strings/extract/extract_all.cu @@ -21,7 +21,7 @@ #include #include -#include +#include #include namespace cudf { diff --git a/cpp/src/strings/filling/fill.cu b/cpp/src/strings/filling/fill.cu index d0b7ddd3a673..d5acf378ed6e 100644 --- a/cpp/src/strings/filling/fill.cu +++ b/cpp/src/strings/filling/fill.cu @@ -12,7 +12,7 @@ #include #include -#include +#include #include namespace cudf { diff --git a/cpp/src/strings/filter_chars.cu b/cpp/src/strings/filter_chars.cu index 872235fdf0f6..89a76935d2b4 100644 --- a/cpp/src/strings/filter_chars.cu +++ b/cpp/src/strings/filter_chars.cu @@ -22,7 +22,7 @@ #include #include -#include +#include #include #include #include diff --git a/cpp/src/strings/like.cu b/cpp/src/strings/like.cu index 5ea9244696de..d273e7df5301 100644 --- a/cpp/src/strings/like.cu +++ b/cpp/src/strings/like.cu @@ -22,7 +22,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/cpp/src/strings/merge/merge.cu b/cpp/src/strings/merge/merge.cu index 7ac934eb6c94..19caf6e9a85f 100644 --- a/cpp/src/strings/merge/merge.cu +++ b/cpp/src/strings/merge/merge.cu @@ -13,7 +13,7 @@ #include #include -#include +#include #include namespace cudf { diff --git a/cpp/src/strings/padding.cu b/cpp/src/strings/padding.cu index 9a8ce1d216b2..655cc9febae6 100644 --- a/cpp/src/strings/padding.cu +++ b/cpp/src/strings/padding.cu @@ -17,7 +17,7 @@ #include #include -#include +#include namespace cudf { namespace strings { diff --git a/cpp/src/strings/positions.cu b/cpp/src/strings/positions.cu index c25380865835..eda9efb10f3a 100644 --- a/cpp/src/strings/positions.cu +++ b/cpp/src/strings/positions.cu @@ -14,7 +14,7 @@ #include #include -#include +#include #include #include #include diff --git a/cpp/src/strings/positions.hpp b/cpp/src/strings/positions.hpp index 2f214c438aad..386d52aa02b0 100644 --- a/cpp/src/strings/positions.hpp +++ b/cpp/src/strings/positions.hpp @@ -9,7 +9,7 @@ #include #include -#include +#include namespace cudf::strings::detail { diff --git a/cpp/src/strings/regex/gkexec.cpp b/cpp/src/strings/regex/gkexec.cpp index c8341d3e9d9e..8cbcd76f51f5 100644 --- a/cpp/src/strings/regex/gkexec.cpp +++ b/cpp/src/strings/regex/gkexec.cpp @@ -14,7 +14,7 @@ #include -#include +#include #include #include diff --git a/cpp/src/strings/regex/glushkov.cuh b/cpp/src/strings/regex/glushkov.cuh index 82ced8f8172c..249b33bc11e4 100644 --- a/cpp/src/strings/regex/glushkov.cuh +++ b/cpp/src/strings/regex/glushkov.cuh @@ -11,7 +11,7 @@ #include #include #include -#include +#include #include #include diff --git a/cpp/src/strings/regex/regex.cuh b/cpp/src/strings/regex/regex.cuh index cebc37b9a915..26b583472586 100644 --- a/cpp/src/strings/regex/regex.cuh +++ b/cpp/src/strings/regex/regex.cuh @@ -11,7 +11,7 @@ #include #include -#include +#include #include #include diff --git a/cpp/src/strings/regex/regex_program_impl.h b/cpp/src/strings/regex/regex_program_impl.h index 40f2808787be..d1990cb2ff2a 100644 --- a/cpp/src/strings/regex/regex_program_impl.h +++ b/cpp/src/strings/regex/regex_program_impl.h @@ -12,7 +12,7 @@ #include #include -#include +#include #include diff --git a/cpp/src/strings/regex/regexec.cpp b/cpp/src/strings/regex/regexec.cpp index 4d56d2300783..479087850308 100644 --- a/cpp/src/strings/regex/regexec.cpp +++ b/cpp/src/strings/regex/regexec.cpp @@ -14,7 +14,7 @@ #include -#include +#include #include #include diff --git a/cpp/src/strings/regex/utilities.cuh b/cpp/src/strings/regex/utilities.cuh index dc6118e68129..3016fe9bb16e 100644 --- a/cpp/src/strings/regex/utilities.cuh +++ b/cpp/src/strings/regex/utilities.cuh @@ -19,7 +19,7 @@ #include -#include +#include #include #include diff --git a/cpp/src/strings/repeat_strings.cu b/cpp/src/strings/repeat_strings.cu index a7038c6382b5..827da42bdc8d 100644 --- a/cpp/src/strings/repeat_strings.cu +++ b/cpp/src/strings/repeat_strings.cu @@ -20,7 +20,7 @@ #include #include -#include +#include #include #include #include diff --git a/cpp/src/strings/replace/backref_re.cu b/cpp/src/strings/replace/backref_re.cu index 1eacb6f026a0..24d51caaf9cd 100644 --- a/cpp/src/strings/replace/backref_re.cu +++ b/cpp/src/strings/replace/backref_re.cu @@ -19,7 +19,7 @@ #include #include -#include +#include #include diff --git a/cpp/src/strings/replace/backref_re.cuh b/cpp/src/strings/replace/backref_re.cuh index 6f1236bf97dd..d7c539d1a673 100644 --- a/cpp/src/strings/replace/backref_re.cuh +++ b/cpp/src/strings/replace/backref_re.cuh @@ -13,7 +13,7 @@ #include #include -#include +#include #include #include diff --git a/cpp/src/strings/replace/find_replace.cu b/cpp/src/strings/replace/find_replace.cu index 52af5026143f..cc5232f308f9 100644 --- a/cpp/src/strings/replace/find_replace.cu +++ b/cpp/src/strings/replace/find_replace.cu @@ -11,7 +11,7 @@ #include #include -#include +#include #include #include diff --git a/cpp/src/strings/replace/multi.cu b/cpp/src/strings/replace/multi.cu index 70a216c2eda3..29257e932029 100644 --- a/cpp/src/strings/replace/multi.cu +++ b/cpp/src/strings/replace/multi.cu @@ -30,7 +30,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/cpp/src/strings/replace/replace.cu b/cpp/src/strings/replace/replace.cu index 63289de8cf0d..6997a08ffd59 100644 --- a/cpp/src/strings/replace/replace.cu +++ b/cpp/src/strings/replace/replace.cu @@ -31,7 +31,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/cpp/src/strings/replace/replace_nulls.cu b/cpp/src/strings/replace/replace_nulls.cu index b29507ccd454..02880822b0f4 100644 --- a/cpp/src/strings/replace/replace_nulls.cu +++ b/cpp/src/strings/replace/replace_nulls.cu @@ -20,7 +20,7 @@ #include #include -#include +#include #include namespace cudf { diff --git a/cpp/src/strings/replace/replace_re.cu b/cpp/src/strings/replace/replace_re.cu index 320b742d1856..19c7ff56a5db 100644 --- a/cpp/src/strings/replace/replace_re.cu +++ b/cpp/src/strings/replace/replace_re.cu @@ -19,7 +19,7 @@ #include #include -#include +#include namespace cudf { namespace strings { diff --git a/cpp/src/strings/replace/replace_slice.cu b/cpp/src/strings/replace/replace_slice.cu index 508a3f56c276..d44d7e844f4e 100644 --- a/cpp/src/strings/replace/replace_slice.cu +++ b/cpp/src/strings/replace/replace_slice.cu @@ -17,7 +17,7 @@ #include #include -#include +#include namespace cudf { namespace strings { diff --git a/cpp/src/strings/reverse.cu b/cpp/src/strings/reverse.cu index dd0be2ea81b8..a1c7bbd720ee 100644 --- a/cpp/src/strings/reverse.cu +++ b/cpp/src/strings/reverse.cu @@ -18,7 +18,7 @@ #include #include -#include +#include namespace cudf { namespace strings { diff --git a/cpp/src/strings/scan/scan_inclusive.cu b/cpp/src/strings/scan/scan_inclusive.cu index a95b1cf3b95e..f2fe812446dc 100644 --- a/cpp/src/strings/scan/scan_inclusive.cu +++ b/cpp/src/strings/scan/scan_inclusive.cu @@ -15,7 +15,7 @@ #include #include -#include +#include #include #include diff --git a/cpp/src/strings/search/contains_multiple.cu b/cpp/src/strings/search/contains_multiple.cu index fc2a3461a05e..cd8cbd2c251f 100644 --- a/cpp/src/strings/search/contains_multiple.cu +++ b/cpp/src/strings/search/contains_multiple.cu @@ -25,7 +25,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/cpp/src/strings/search/count.cu b/cpp/src/strings/search/count.cu index 7b3dc606d8a0..66a85983c334 100644 --- a/cpp/src/strings/search/count.cu +++ b/cpp/src/strings/search/count.cu @@ -17,7 +17,7 @@ #include -#include +#include #include namespace cudf { diff --git a/cpp/src/strings/search/find.cu b/cpp/src/strings/search/find.cu index f1f08dd86595..4eaaa9d69798 100644 --- a/cpp/src/strings/search/find.cu +++ b/cpp/src/strings/search/find.cu @@ -27,7 +27,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/cpp/src/strings/search/find_instance.cu b/cpp/src/strings/search/find_instance.cu index b817a727fbc5..111c008b9d8f 100644 --- a/cpp/src/strings/search/find_instance.cu +++ b/cpp/src/strings/search/find_instance.cu @@ -21,7 +21,7 @@ #include #include #include -#include +#include namespace cudf { namespace strings { diff --git a/cpp/src/strings/search/find_multiple.cu b/cpp/src/strings/search/find_multiple.cu index 83e177b51bec..f9e3580f0542 100644 --- a/cpp/src/strings/search/find_multiple.cu +++ b/cpp/src/strings/search/find_multiple.cu @@ -18,7 +18,7 @@ #include #include -#include +#include #include namespace cudf { diff --git a/cpp/src/strings/search/findall.cu b/cpp/src/strings/search/findall.cu index f334655ef9f6..ae8adf72636b 100644 --- a/cpp/src/strings/search/findall.cu +++ b/cpp/src/strings/search/findall.cu @@ -22,7 +22,7 @@ #include -#include +#include namespace cudf { namespace strings { diff --git a/cpp/src/strings/slice.cu b/cpp/src/strings/slice.cu index a72b3c3557ab..d58a38af5385 100644 --- a/cpp/src/strings/slice.cu +++ b/cpp/src/strings/slice.cu @@ -28,7 +28,7 @@ #include #include #include -#include +#include #include namespace cudf { diff --git a/cpp/src/strings/split/partition.cu b/cpp/src/strings/split/partition.cu index 38ca45e2aff7..1d306c8e1981 100644 --- a/cpp/src/strings/split/partition.cu +++ b/cpp/src/strings/split/partition.cu @@ -20,7 +20,7 @@ #include #include #include -#include +#include #include #include diff --git a/cpp/src/strings/split/split.cu b/cpp/src/strings/split/split.cu index f6baac564ea5..602e1e978fa9 100644 --- a/cpp/src/strings/split/split.cu +++ b/cpp/src/strings/split/split.cu @@ -23,7 +23,7 @@ #include #include -#include +#include #include #include #include diff --git a/cpp/src/strings/split/split.cuh b/cpp/src/strings/split/split.cuh index 777f316a4503..7f43bfe91a7f 100644 --- a/cpp/src/strings/split/split.cuh +++ b/cpp/src/strings/split/split.cuh @@ -29,7 +29,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/cpp/src/strings/split/split_part.cu b/cpp/src/strings/split/split_part.cu index 6c23a24c8d90..71cd25333413 100644 --- a/cpp/src/strings/split/split_part.cu +++ b/cpp/src/strings/split/split_part.cu @@ -20,7 +20,7 @@ #include #include -#include +#include #include namespace cudf { diff --git a/cpp/src/strings/split/split_re.cu b/cpp/src/strings/split/split_re.cu index aaed60acb88f..aa5fb259c4e0 100644 --- a/cpp/src/strings/split/split_re.cu +++ b/cpp/src/strings/split/split_re.cu @@ -23,7 +23,7 @@ #include #include #include -#include +#include #include namespace cudf { diff --git a/cpp/src/strings/split/split_record.cu b/cpp/src/strings/split/split_record.cu index 2b1d1fd428c1..1c94542d7786 100644 --- a/cpp/src/strings/split/split_record.cu +++ b/cpp/src/strings/split/split_record.cu @@ -19,7 +19,7 @@ #include #include -#include +#include #include #include #include diff --git a/cpp/src/strings/strings_column_factories.cu b/cpp/src/strings/strings_column_factories.cu index 763f9b5a4421..7a3301a9ee0f 100644 --- a/cpp/src/strings/strings_column_factories.cu +++ b/cpp/src/strings/strings_column_factories.cu @@ -19,7 +19,7 @@ #include #include -#include +#include #include #include #include diff --git a/cpp/src/strings/strings_column_view.cpp b/cpp/src/strings/strings_column_view.cpp index e8cc4e135acc..46add3e513e0 100644 --- a/cpp/src/strings/strings_column_view.cpp +++ b/cpp/src/strings/strings_column_view.cpp @@ -7,7 +7,7 @@ #include #include -#include +#include namespace cudf { // diff --git a/cpp/src/strings/strings_scalar_factories.cpp b/cpp/src/strings/strings_scalar_factories.cpp index 279ed9974720..8f759a5e4409 100644 --- a/cpp/src/strings/strings_scalar_factories.cpp +++ b/cpp/src/strings/strings_scalar_factories.cpp @@ -6,7 +6,7 @@ #include #include -#include +#include namespace cudf { // Create a strings-type column from array of pointer/size pairs diff --git a/cpp/src/strings/strip.cu b/cpp/src/strings/strip.cu index 81c769fafab4..c135b74969fb 100644 --- a/cpp/src/strings/strip.cu +++ b/cpp/src/strings/strip.cu @@ -17,7 +17,7 @@ #include #include -#include +#include namespace cudf { namespace strings { diff --git a/cpp/src/strings/translate.cu b/cpp/src/strings/translate.cu index 339d528e7c90..ac10fda34fbd 100644 --- a/cpp/src/strings/translate.cu +++ b/cpp/src/strings/translate.cu @@ -19,7 +19,7 @@ #include #include -#include +#include #include #include #include diff --git a/cpp/src/strings/utilities.cu b/cpp/src/strings/utilities.cu index 121d5f3679c9..14fb290d5ed6 100644 --- a/cpp/src/strings/utilities.cu +++ b/cpp/src/strings/utilities.cu @@ -21,7 +21,7 @@ #include #include -#include +#include #include #include diff --git a/cpp/src/strings/wrap.cu b/cpp/src/strings/wrap.cu index 6b3909b9e9e0..96e8c659e1a1 100644 --- a/cpp/src/strings/wrap.cu +++ b/cpp/src/strings/wrap.cu @@ -20,7 +20,7 @@ #include #include -#include +#include #include namespace cudf { diff --git a/cpp/src/structs/copying/concatenate.cu b/cpp/src/structs/copying/concatenate.cu index 217c33163de0..6a8371e84c58 100644 --- a/cpp/src/structs/copying/concatenate.cu +++ b/cpp/src/structs/copying/concatenate.cu @@ -14,7 +14,7 @@ #include #include -#include +#include #include #include diff --git a/cpp/src/structs/scan/scan_inclusive.cu b/cpp/src/structs/scan/scan_inclusive.cu index af211cc135dd..3e011ed66ff2 100644 --- a/cpp/src/structs/scan/scan_inclusive.cu +++ b/cpp/src/structs/scan/scan_inclusive.cu @@ -15,7 +15,7 @@ #include #include -#include +#include #include #include diff --git a/cpp/src/structs/structs_column_factories.cu b/cpp/src/structs/structs_column_factories.cu index bfbd4c5eebb5..b2d8ceb04bb8 100644 --- a/cpp/src/structs/structs_column_factories.cu +++ b/cpp/src/structs/structs_column_factories.cu @@ -8,7 +8,7 @@ #include #include -#include +#include #include #include diff --git a/cpp/src/text/bpe/byte_pair_encoding.cu b/cpp/src/text/bpe/byte_pair_encoding.cu index 3d7f49fe9dc9..66d495072a27 100644 --- a/cpp/src/text/bpe/byte_pair_encoding.cu +++ b/cpp/src/text/bpe/byte_pair_encoding.cu @@ -27,7 +27,7 @@ #include #include -#include +#include #include #include #include diff --git a/cpp/src/text/bpe/byte_pair_encoding.cuh b/cpp/src/text/bpe/byte_pair_encoding.cuh index 9d5dbd4b8bde..ad4412212eff 100644 --- a/cpp/src/text/bpe/byte_pair_encoding.cuh +++ b/cpp/src/text/bpe/byte_pair_encoding.cuh @@ -20,7 +20,7 @@ #include #include #include -#include +#include #include #include diff --git a/cpp/src/text/bpe/load_merge_pairs.cu b/cpp/src/text/bpe/load_merge_pairs.cu index ff2ba5db5081..8bf09c3b2519 100644 --- a/cpp/src/text/bpe/load_merge_pairs.cu +++ b/cpp/src/text/bpe/load_merge_pairs.cu @@ -20,7 +20,7 @@ #include #include -#include +#include #include #include diff --git a/cpp/src/text/deduplicate.cu b/cpp/src/text/deduplicate.cu index 87be198c5ed6..f8e53d0636b0 100644 --- a/cpp/src/text/deduplicate.cu +++ b/cpp/src/text/deduplicate.cu @@ -24,7 +24,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/cpp/src/text/detokenize.cu b/cpp/src/text/detokenize.cu index 4e630cdbcc1d..13082eeac197 100644 --- a/cpp/src/text/detokenize.cu +++ b/cpp/src/text/detokenize.cu @@ -25,7 +25,7 @@ #include #include -#include +#include namespace nvtext { namespace detail { diff --git a/cpp/src/text/edit_distance.cu b/cpp/src/text/edit_distance.cu index 146834819b0a..7df6e91b0f71 100644 --- a/cpp/src/text/edit_distance.cu +++ b/cpp/src/text/edit_distance.cu @@ -26,7 +26,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/cpp/src/text/generate_ngrams.cu b/cpp/src/text/generate_ngrams.cu index 2918d2595e8b..4569fde45e83 100644 --- a/cpp/src/text/generate_ngrams.cu +++ b/cpp/src/text/generate_ngrams.cu @@ -30,7 +30,7 @@ #include #include #include -#include +#include #include #include diff --git a/cpp/src/text/jaccard.cu b/cpp/src/text/jaccard.cu index 8a74b77db875..5e6f215d6a57 100644 --- a/cpp/src/text/jaccard.cu +++ b/cpp/src/text/jaccard.cu @@ -28,7 +28,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/cpp/src/text/minhash.cu b/cpp/src/text/minhash.cu index c7fdf4848321..388e2ecd94e4 100644 --- a/cpp/src/text/minhash.cu +++ b/cpp/src/text/minhash.cu @@ -35,7 +35,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/cpp/src/text/ngrams_tokenize.cu b/cpp/src/text/ngrams_tokenize.cu index c3afe28cf81c..f50cb675966f 100644 --- a/cpp/src/text/ngrams_tokenize.cu +++ b/cpp/src/text/ngrams_tokenize.cu @@ -25,7 +25,7 @@ #include #include -#include +#include #include #include diff --git a/cpp/src/text/normalize.cu b/cpp/src/text/normalize.cu index 8528e496b7ca..e52fa61b9da7 100644 --- a/cpp/src/text/normalize.cu +++ b/cpp/src/text/normalize.cu @@ -32,7 +32,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/cpp/src/text/normalize.cuh b/cpp/src/text/normalize.cuh index 7e4a294ff28b..603a0217505d 100644 --- a/cpp/src/text/normalize.cuh +++ b/cpp/src/text/normalize.cuh @@ -9,7 +9,7 @@ #include -#include +#include #include diff --git a/cpp/src/text/replace.cu b/cpp/src/text/replace.cu index b289c929a018..1e721e9b4e66 100644 --- a/cpp/src/text/replace.cu +++ b/cpp/src/text/replace.cu @@ -26,7 +26,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/cpp/src/text/stemmer.cu b/cpp/src/text/stemmer.cu index ab79e89f3936..ec55b6ff1ddb 100644 --- a/cpp/src/text/stemmer.cu +++ b/cpp/src/text/stemmer.cu @@ -21,7 +21,7 @@ #include #include -#include +#include #include #include diff --git a/cpp/src/text/tokenize.cu b/cpp/src/text/tokenize.cu index 7839665ef810..800d334f547d 100644 --- a/cpp/src/text/tokenize.cu +++ b/cpp/src/text/tokenize.cu @@ -25,7 +25,7 @@ #include #include -#include +#include #include #include #include diff --git a/cpp/src/text/vocabulary_tokenize.cu b/cpp/src/text/vocabulary_tokenize.cu index 26ad038c1136..730082f16eb4 100644 --- a/cpp/src/text/vocabulary_tokenize.cu +++ b/cpp/src/text/vocabulary_tokenize.cu @@ -33,7 +33,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/cpp/src/text/wordpiece_tokenize.cu b/cpp/src/text/wordpiece_tokenize.cu index 88923f7d251c..5d826d9dc55e 100644 --- a/cpp/src/text/wordpiece_tokenize.cu +++ b/cpp/src/text/wordpiece_tokenize.cu @@ -36,7 +36,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/cpp/tests/io/experimental/hybrid_scan_common.hpp b/cpp/tests/io/experimental/hybrid_scan_common.hpp index 1264a0ce6fa1..31eec8b23631 100644 --- a/cpp/tests/io/experimental/hybrid_scan_common.hpp +++ b/cpp/tests/io/experimental/hybrid_scan_common.hpp @@ -21,7 +21,7 @@ #include #include -#include +#include #include #include diff --git a/cpp/tests/io/fst/fst_test.cu b/cpp/tests/io/fst/fst_test.cu index 383f29cbe50f..ed4bcbae3daf 100644 --- a/cpp/tests/io/fst/fst_test.cu +++ b/cpp/tests/io/fst/fst_test.cu @@ -20,7 +20,7 @@ #include #include -#include +#include #include #include diff --git a/cpp/tests/io/fst/logical_stack_test.cu b/cpp/tests/io/fst/logical_stack_test.cu index bf27ec7c1977..d7c402a13458 100644 --- a/cpp/tests/io/fst/logical_stack_test.cu +++ b/cpp/tests/io/fst/logical_stack_test.cu @@ -13,7 +13,7 @@ #include #include -#include +#include #include diff --git a/cpp/tests/io/json/json_tree.cpp b/cpp/tests/io/json/json_tree.cpp index d8b90baae652..7539a39f45e1 100644 --- a/cpp/tests/io/json/json_tree.cpp +++ b/cpp/tests/io/json/json_tree.cpp @@ -13,7 +13,7 @@ #include #include -#include +#include #include #include diff --git a/cpp/tests/io/json/json_tree_csr.cu b/cpp/tests/io/json/json_tree_csr.cu index 81eb039afbdd..c8431d50ceae 100644 --- a/cpp/tests/io/json/json_tree_csr.cu +++ b/cpp/tests/io/json/json_tree_csr.cu @@ -17,7 +17,7 @@ #include #include -#include +#include #include #include diff --git a/cpp/tests/io/json/json_utils.hpp b/cpp/tests/io/json/json_utils.hpp index 760836e320d7..e86b3ccf7136 100644 --- a/cpp/tests/io/json/json_utils.hpp +++ b/cpp/tests/io/json/json_utils.hpp @@ -11,7 +11,7 @@ #include -#include +#include #include diff --git a/cpp/tests/io/json/json_whitespace_normalization_test.cpp b/cpp/tests/io/json/json_whitespace_normalization_test.cpp index 9e9a199c3e94..536c2619aed5 100644 --- a/cpp/tests/io/json/json_whitespace_normalization_test.cpp +++ b/cpp/tests/io/json/json_whitespace_normalization_test.cpp @@ -16,7 +16,7 @@ #include -#include +#include #include diff --git a/cpp/tests/io/orc_chunked_reader_test.cu b/cpp/tests/io/orc_chunked_reader_test.cu index ac4c1870d570..8fb00b629ae9 100644 --- a/cpp/tests/io/orc_chunked_reader_test.cu +++ b/cpp/tests/io/orc_chunked_reader_test.cu @@ -34,7 +34,7 @@ #include #include -#include +#include namespace { enum class output_limit : std::size_t {}; diff --git a/cpp/tests/io/parquet_chunked_reader_test.cu b/cpp/tests/io/parquet_chunked_reader_test.cu index 66655ec1daac..6ab62efdde77 100644 --- a/cpp/tests/io/parquet_chunked_reader_test.cu +++ b/cpp/tests/io/parquet_chunked_reader_test.cu @@ -36,7 +36,7 @@ #include #include -#include +#include #include #include diff --git a/cpp/tests/io/parquet_deletion_vectors_test.cpp b/cpp/tests/io/parquet_deletion_vectors_test.cpp index 43357812232b..735d0a1ec0a3 100644 --- a/cpp/tests/io/parquet_deletion_vectors_test.cpp +++ b/cpp/tests/io/parquet_deletion_vectors_test.cpp @@ -16,7 +16,7 @@ #include #include -#include +#include #include #include diff --git a/cpp/tests/io/type_inference_test.cpp b/cpp/tests/io/type_inference_test.cpp index e783b2822637..11f24dcf6138 100644 --- a/cpp/tests/io/type_inference_test.cpp +++ b/cpp/tests/io/type_inference_test.cpp @@ -17,7 +17,7 @@ #include #include -#include +#include #include #include From 68e5399f71f5d819b908ea728b9082d9d8ae0f4d Mon Sep 17 00:00:00 2001 From: Vyas Ramasubramani Date: Sat, 15 Aug 2026 15:21:38 -0700 Subject: [PATCH 05/10] Use stream_ref for variant type inspection --- cpp/include/cudf/io/experimental/variant.hpp | 2 +- cpp/src/io/parquet/experimental/variant_extract.cu | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cpp/include/cudf/io/experimental/variant.hpp b/cpp/include/cudf/io/experimental/variant.hpp index 3ca602e41c9b..22e94d116328 100644 --- a/cpp/include/cudf/io/experimental/variant.hpp +++ b/cpp/include/cudf/io/experimental/variant.hpp @@ -127,7 +127,7 @@ namespace io::parquet::experimental { */ [[nodiscard]] std::unique_ptr get_variant_type_id( column_view const& values, - 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()); /** @} */ diff --git a/cpp/src/io/parquet/experimental/variant_extract.cu b/cpp/src/io/parquet/experimental/variant_extract.cu index eb37728045a7..2f1ecac85bf0 100644 --- a/cpp/src/io/parquet/experimental/variant_extract.cu +++ b/cpp/src/io/parquet/experimental/variant_extract.cu @@ -1000,7 +1000,7 @@ std::unique_ptr cast_variant(column_view const& values, } std::unique_ptr get_variant_type_id(column_view const& values, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { validate_variant_child(values); @@ -1059,7 +1059,7 @@ std::unique_ptr cast_variant(column_view const& values, } std::unique_ptr get_variant_type_id(column_view const& values, - rmm::cuda_stream_view stream, + cuda::stream_ref stream, rmm::device_async_resource_ref mr) { CUDF_FUNC_RANGE(); From d94020665d46ef3575cbe98aded5510b3d6de156 Mon Sep 17 00:00:00 2001 From: Vyas Ramasubramani Date: Sat, 15 Aug 2026 15:52:07 -0700 Subject: [PATCH 06/10] Fix pooled stream synchronization --- cpp/src/io/utilities/datasource.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cpp/src/io/utilities/datasource.cpp b/cpp/src/io/utilities/datasource.cpp index 11382b0d8998..7cb277f6797a 100644 --- a/cpp/src/io/utilities/datasource.cpp +++ b/cpp/src/io/utilities/datasource.cpp @@ -214,7 +214,7 @@ class device_buffer_source final : public datasource { auto const stream = cudf::detail::global_cuda_stream_pool().get_stream(); auto h_data = cudf::detail::make_host_vector_async( cudf::device_span{_d_buffer.data() + offset, count}, stream); - stream.sync(); + stream.synchronize(); return std::make_unique>>(std::move(h_data)); } From 8c82d7f28776cd118a7d5fff32d149f01f03448e Mon Sep 17 00:00:00 2001 From: Vyas Ramasubramani Date: Sat, 15 Aug 2026 16:22:49 -0700 Subject: [PATCH 07/10] Fix batch 4 stream_ref CI failures --- cpp/src/io/parquet/reader_impl.cpp | 2 +- .../native/include/multi_host_buffer_source.hpp | 13 ++++--------- java/src/main/native/src/DataSourceHelperJni.cpp | 11 ++++------- java/src/main/native/src/jni_writer_data_sink.hpp | 14 +++++++------- .../main/native/src/multi_host_buffer_source.cpp | 10 +++++----- 5 files changed, 21 insertions(+), 29 deletions(-) diff --git a/cpp/src/io/parquet/reader_impl.cpp b/cpp/src/io/parquet/reader_impl.cpp index 40df8984fccb..917b9f10f5af 100644 --- a/cpp/src/io/parquet/reader_impl.cpp +++ b/cpp/src/io/parquet/reader_impl.cpp @@ -495,7 +495,7 @@ void reader_impl::decode_page_data(read_mode mode, size_t skip_rows, size_t num_ _stream.sync(); } -reader_impl::reader_impl() : _options{} {} +reader_impl::reader_impl() : _stream{cudaStream_t{nullptr}}, _options{} {} reader_impl::reader_impl(std::vector>&& sources, std::vector&& parquet_metadatas, diff --git a/java/src/main/native/include/multi_host_buffer_source.hpp b/java/src/main/native/include/multi_host_buffer_source.hpp index 38d50ef76f77..3527acd7d72e 100644 --- a/java/src/main/native/include/multi_host_buffer_source.hpp +++ b/java/src/main/native/include/multi_host_buffer_source.hpp @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: Copyright (c) 2025, NVIDIA CORPORATION. + * SPDX-FileCopyrightText: Copyright (c) 2025-2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved. * SPDX-License-Identifier: Apache-2.0 */ #pragma once @@ -28,17 +28,12 @@ class multi_host_buffer_source : public cudf::io::datasource { size_t host_read(size_t offset, size_t size, uint8_t* dst) override; bool supports_device_read() const override { return true; } bool is_device_read_preferred(size_t size) const override { return true; } - std::unique_ptr device_read(size_t offset, - size_t size, - rmm::cuda_stream_view stream) override; - size_t device_read(size_t offset, - size_t size, - uint8_t* dst, - rmm::cuda_stream_view stream) override; + std::unique_ptr device_read(size_t offset, size_t size, cuda::stream_ref stream) override; + size_t device_read(size_t offset, size_t size, uint8_t* dst, cuda::stream_ref stream) override; std::future device_read_async(size_t offset, size_t size, uint8_t* dst, - rmm::cuda_stream_view stream) override; + cuda::stream_ref stream) override; size_t size() const override { return offsets_.back(); } }; diff --git a/java/src/main/native/src/DataSourceHelperJni.cpp b/java/src/main/native/src/DataSourceHelperJni.cpp index 9a19b06aa6d5..684e587ee106 100644 --- a/java/src/main/native/src/DataSourceHelperJni.cpp +++ b/java/src/main/native/src/DataSourceHelperJni.cpp @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: Copyright (c) 2023-2025, NVIDIA CORPORATION. + * SPDX-FileCopyrightText: Copyright (c) 2023-2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved. * SPDX-License-Identifier: Apache-2.0 */ @@ -151,10 +151,7 @@ class jni_datasource : public cudf::io::datasource { return device_read_supported && size >= device_read_cutoff; } - size_t device_read(size_t offset, - size_t size, - uint8_t* dst, - rmm::cuda_stream_view stream) override + size_t device_read(size_t offset, size_t size, uint8_t* dst, cuda::stream_ref stream) override { JNIEnv* env = nullptr; if (jvm->GetEnv(reinterpret_cast(&env), cudf::jni::MINIMUM_JNI_VERSION) != JNI_OK) { @@ -166,7 +163,7 @@ class jni_datasource : public cudf::io::datasource { offset, size, reinterpret_cast(dst), - reinterpret_cast(stream.value())); + reinterpret_cast(stream.get())); if (env->ExceptionOccurred()) { throw cudf::jni::jni_exception("Java exception in deviceRead"); } @@ -176,7 +173,7 @@ class jni_datasource : public cudf::io::datasource { std::future device_read_async(size_t offset, size_t size, uint8_t* dst, - rmm::cuda_stream_view stream) override + cuda::stream_ref stream) override { auto amount_read = device_read(offset, size, dst, stream); // This is a bit ugly, but we don't have a good way or a need to return diff --git a/java/src/main/native/src/jni_writer_data_sink.hpp b/java/src/main/native/src/jni_writer_data_sink.hpp index d102c51eff6f..5b55403352ed 100644 --- a/java/src/main/native/src/jni_writer_data_sink.hpp +++ b/java/src/main/native/src/jni_writer_data_sink.hpp @@ -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 */ #pragma once @@ -72,7 +72,7 @@ class jni_writer_data_sink final : public cudf::io::data_sink { bool supports_device_write() const override { return true; } - void device_write(void const* gpu_data, size_t size, rmm::cuda_stream_view stream) override + void device_write(void const* gpu_data, size_t size, cuda::stream_ref stream) override { JNIEnv* env = cudf::jni::get_jni_env(jvm); long left_to_copy = static_cast(size); @@ -81,7 +81,7 @@ class jni_writer_data_sink final : public cudf::io::data_sink { long buffer_amount_available = current_buffer_len - current_buffer_written; if (buffer_amount_available <= 0) { // should never be < 0, but just to be safe - stream.synchronize(); + stream.sync(); rotate_buffer(env); buffer_amount_available = current_buffer_len - current_buffer_written; } @@ -89,20 +89,20 @@ class jni_writer_data_sink final : public cudf::io::data_sink { left_to_copy < buffer_amount_available ? left_to_copy : buffer_amount_available; char* copy_to = current_buffer_data + current_buffer_written; - CUDF_CUDA_TRY(cudaMemcpyAsync( - copy_to, copy_from, amount_to_copy, cudaMemcpyDeviceToHost, stream.value())); + CUDF_CUDA_TRY( + cudaMemcpyAsync(copy_to, copy_from, amount_to_copy, cudaMemcpyDeviceToHost, stream.get())); copy_from = copy_from + amount_to_copy; current_buffer_written += amount_to_copy; total_written += amount_to_copy; left_to_copy -= amount_to_copy; } - stream.synchronize(); + stream.sync(); } std::future device_write_async(void const* gpu_data, size_t size, - rmm::cuda_stream_view stream) override + cuda::stream_ref stream) override { // Call the sync version until figuring out how to write asynchronously. device_write(gpu_data, size, stream); diff --git a/java/src/main/native/src/multi_host_buffer_source.cpp b/java/src/main/native/src/multi_host_buffer_source.cpp index abc4cc806c8c..5359587c4ee8 100644 --- a/java/src/main/native/src/multi_host_buffer_source.cpp +++ b/java/src/main/native/src/multi_host_buffer_source.cpp @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: Copyright (c) 2025, NVIDIA CORPORATION. + * SPDX-FileCopyrightText: Copyright (c) 2025-2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved. * SPDX-License-Identifier: Apache-2.0 */ @@ -85,7 +85,7 @@ size_t multi_host_buffer_source::host_read(size_t offset, size_t size, uint8_t* } std::unique_ptr multi_host_buffer_source::device_read( - size_t offset, size_t size, rmm::cuda_stream_view stream) + size_t offset, size_t size, cuda::stream_ref stream) { rmm::device_buffer buf(size, stream); auto dst = static_cast(buf.data()); @@ -101,7 +101,7 @@ std::unique_ptr multi_host_buffer_source::device_r size_t multi_host_buffer_source::device_read(size_t offset, size_t size, uint8_t* dst, - rmm::cuda_stream_view stream) + cuda::stream_ref stream) { if (size == 0) { return 0; } if (offset < 0 || offset >= offsets_.back()) { throw std::runtime_error("bad offset"); } @@ -114,7 +114,7 @@ size_t multi_host_buffer_source::device_read(size_t offset, auto buffer_offset = offset - offsets_[buffer_index]; auto src = addrs_[buffer_index] + buffer_offset; auto copy_size = std::min(buffer_left, bytes_left); - CUDF_CUDA_TRY(cudaMemcpyAsync(dst, src, copy_size, cudaMemcpyHostToDevice, stream.value())); + CUDF_CUDA_TRY(cudaMemcpyAsync(dst, src, copy_size, cudaMemcpyHostToDevice, stream.get())); offset += copy_size; dst += copy_size; bytes_left -= copy_size; @@ -126,7 +126,7 @@ size_t multi_host_buffer_source::device_read(size_t offset, std::future multi_host_buffer_source::device_read_async(size_t offset, size_t size, uint8_t* dst, - rmm::cuda_stream_view stream) + cuda::stream_ref stream) { std::promise p; p.set_value(device_read(offset, size, dst, stream)); From 046b06958cf35c82fc92765db8e01c200a21e418 Mon Sep 17 00:00:00 2001 From: Vyas Ramasubramani Date: Sat, 15 Aug 2026 17:29:29 -0700 Subject: [PATCH 08/10] Fix RMM stream usage in IO tests --- cpp/tests/io/comp/comp_test.cpp | 2 +- cpp/tests/io/cudftable_test.cpp | 4 ++-- .../io/experimental/hybrid_scan_test.cpp | 2 +- cpp/tests/io/fst/fst_test.cu | 2 +- cpp/tests/io/fst/logical_stack_test.cu | 2 +- cpp/tests/io/json/json_tree_csr.cu | 8 +++---- cpp/tests/io/json/nested_json_test.cpp | 22 +++++++++---------- cpp/tests/io/parquet_chunked_reader_test.cu | 2 +- cpp/tests/io/text/data_chunk_source_test.cpp | 14 ++++++------ 9 files changed, 29 insertions(+), 29 deletions(-) diff --git a/cpp/tests/io/comp/comp_test.cpp b/cpp/tests/io/comp/comp_test.cpp index 8dc2f429d2fc..cdb14b949516 100644 --- a/cpp/tests/io/comp/comp_test.cpp +++ b/cpp/tests/io/comp/comp_test.cpp @@ -89,7 +89,7 @@ struct DecompressTest static_cast(this)->device_dispatch(inf_in, inf_out, inf_stat); CUDF_CUDA_TRY(cudaMemcpyAsync( - decompressed.data(), dst.data(), dst.size(), cudaMemcpyDefault, stream.get())); + decompressed.data(), dst.data(), dst.size(), cudaMemcpyDefault, stream.value())); inf_stat.device_to_host(stream); CUDF_EXPECTS(inf_stat[0].status == codec_status::SUCCESS, "Failure in device decompression"); diff --git a/cpp/tests/io/cudftable_test.cpp b/cpp/tests/io/cudftable_test.cpp index 8c86e226f0a2..63859cb99d30 100644 --- a/cpp/tests/io/cudftable_test.cpp +++ b/cpp/tests/io/cudftable_test.cpp @@ -515,10 +515,10 @@ TEST_F(CudftableTest, DeviceBufferSource) rmm::device_buffer device_buffer(buffer.size(), cudf::get_default_stream()); auto const stream = cudf::get_default_stream(); CUDF_CUDA_TRY(cudaMemcpyAsync( - device_buffer.data(), buffer.data(), buffer.size(), cudaMemcpyHostToDevice, stream.get())); + device_buffer.data(), buffer.data(), buffer.size(), cudaMemcpyHostToDevice, stream.value())); // Ensure the data is copied to the device before the host read, because the host read does not // take the stream - stream.sync(); + stream.synchronize(); auto device_span = cudf::device_span( static_cast(device_buffer.data()), device_buffer.size()); diff --git a/cpp/tests/io/experimental/hybrid_scan_test.cpp b/cpp/tests/io/experimental/hybrid_scan_test.cpp index 4be065216149..6607c941e51c 100644 --- a/cpp/tests/io/experimental/hybrid_scan_test.cpp +++ b/cpp/tests/io/experimental/hybrid_scan_test.cpp @@ -1189,7 +1189,7 @@ TEST_F(HybridScanTest, RowGroupPassesMatchesChunkedReader) writer.write(chunk_table); } writer.close(); - stream.sync(); + stream.synchronize(); } // Pick a pass_read_limit that forces multiple passes but groups some row groups together diff --git a/cpp/tests/io/fst/fst_test.cu b/cpp/tests/io/fst/fst_test.cu index ed4bcbae3daf..4efd2958ad4e 100644 --- a/cpp/tests/io/fst/fst_test.cu +++ b/cpp/tests/io/fst/fst_test.cu @@ -195,7 +195,7 @@ TEST_F(FstTest, GroundTruth) std::back_inserter(out_index_cpu)); // Make sure results have been copied back to host - stream.sync(); + stream.synchronize(); // Verify results ASSERT_EQ(output_gpu_size[0], output_cpu.size()); diff --git a/cpp/tests/io/fst/logical_stack_test.cu b/cpp/tests/io/fst/logical_stack_test.cu index d7c402a13458..7f56989fbee1 100644 --- a/cpp/tests/io/fst/logical_stack_test.cu +++ b/cpp/tests/io/fst/logical_stack_test.cu @@ -232,7 +232,7 @@ TEST_F(LogicalStackTest, GroundTruth) std::back_inserter(top_of_stack_cpu)); // Make sure results have been copied back to host - stream.sync(); + stream.synchronize(); // Verify results ASSERT_EQ(string_size, top_of_stack_cpu.size()); diff --git a/cpp/tests/io/json/json_tree_csr.cu b/cpp/tests/io/json/json_tree_csr.cu index c8431d50ceae..d5b0f1a17540 100644 --- a/cpp/tests/io/json/json_tree_csr.cu +++ b/cpp/tests/io/json/json_tree_csr.cu @@ -147,8 +147,8 @@ void run_test(std::string const& input, bool enable_lines = true) gpu_tree.node_categories.data(), sizeof(cuio_json::node_t) * size_to_copy, cudaMemcpyDefault, - stream.get())); - stream.sync(); + stream.value())); + stream.synchronize(); if (options.is_enabled_lines()) return h_node_categories[0] == cuio_json::NC_LIST; return h_node_categories[0] == cuio_json::NC_LIST and h_node_categories[1] == cuio_json::NC_LIST; @@ -186,8 +186,8 @@ void run_test(std::string const& input, bool enable_lines = true) gpu_col_id.data() + list_node_index, sizeof(cudf::size_type), cudaMemcpyDefault, - stream.get())); - stream.sync(); + stream.value())); + stream.synchronize(); return value; }(); diff --git a/cpp/tests/io/json/nested_json_test.cpp b/cpp/tests/io/json/nested_json_test.cpp index 2bcbfd05c0dc..9966101d6200 100644 --- a/cpp/tests/io/json/nested_json_test.cpp +++ b/cpp/tests/io/json/nested_json_test.cpp @@ -163,7 +163,7 @@ TEST_F(JsonTest, StackContext) stack_context.device_to_host_async(stream); // Make sure we copied back the stack context - stream.sync(); + stream.synchronize(); std::vector const golden_stack_context{ '_', '_', '_', '[', '{', '{', '{', '{', '{', '{', '{', '{', '{', '{', '{', '{', '{', '{', '{', @@ -214,7 +214,7 @@ TEST_F(JsonTest, StackContextUtf8) stack_context.device_to_host_async(stream); // Make sure we copied back the stack context - stream.sync(); + stream.synchronize(); std::vector const golden_stack_context{ '_', '[', '{', '{', '{', '{', '{', '{', '{', '{', '{', '{', '{', '{', '{', '{', '{', @@ -282,7 +282,7 @@ TEST_P(JsonDelimiterParamTest, StackContextRecovering) stack_context.device_to_host_async(stream); // Make sure we copied back the stack context - stream.sync(); + stream.synchronize(); // Verify results ASSERT_EQ(golden_stack_context.size(), stack_context.size()); @@ -390,7 +390,7 @@ TEST_P(JsonDelimiterParamTest, StackContextRecoveringFuzz) stack_context.device_to_host_async(stream); // Make sure we copied back the stack context - stream.sync(); + stream.synchronize(); ASSERT_EQ(expected_stack_context.size(), stack_context.size()); CUDF_TEST_EXPECT_VECTOR_EQUAL(expected_stack_context, stack_context, stack_context.size()); @@ -435,7 +435,7 @@ TEST_F(JsonNewlineDelimiterTest, TokenStream) // Copy back the number of tokens that were written auto const tokens_gpu = cudf::detail::make_std_vector_async(d_tokens_gpu, stream); auto const token_indices_gpu = cudf::detail::make_std_vector_async(d_token_indices_gpu, stream); - stream.sync(); + stream.synchronize(); // Golden token stream sample using token_t = cuio_json::token_t; @@ -570,7 +570,7 @@ TEST_F(JsonNewlineDelimiterTest, TokenStream2) // Copy back the number of tokens that were written auto const tokens_gpu = cudf::detail::make_std_vector_async(d_tokens_gpu, stream); auto const token_indices_gpu = cudf::detail::make_std_vector_async(d_token_indices_gpu, stream); - stream.sync(); + stream.synchronize(); // Golden token stream sample using token_t = cuio_json::token_t; @@ -730,7 +730,7 @@ TEST_P(JsonDelimiterParamTest, RecoveringTokenStream) auto const tokens_gpu = cudf::detail::make_std_vector_async(d_tokens_gpu, stream); auto const token_indices_gpu = cudf::detail::make_std_vector_async(d_token_indices_gpu, stream); - stream.sync(); + stream.synchronize(); // Verify the number of tokens matches ASSERT_EQ(golden_token_stream.size(), tokens_gpu.size()); ASSERT_EQ(golden_token_stream.size(), token_indices_gpu.size()); @@ -852,7 +852,7 @@ TEST_F(JsonTest, PostProcessTokenStream) auto const filtered_tokens = cudf::detail::make_std_vector_async(d_filtered_tokens, stream); auto const filtered_indices = cudf::detail::make_std_vector_async(d_filtered_indices, stream); - stream.sync(); + stream.synchronize(); // Verify the number of tokens matches ASSERT_EQ(filtered_tokens.size(), expected_output.size()); @@ -1169,7 +1169,7 @@ TEST_P(JsonDelimiterParamTest, RecoveringTokenStreamNewlineAndDelimiter) auto const tokens_gpu = cudf::detail::make_std_vector_async(d_tokens_gpu, stream); auto const token_indices_gpu = cudf::detail::make_std_vector_async(d_token_indices_gpu, stream); - stream.sync(); + stream.synchronize(); // Verify the number of tokens matches ASSERT_EQ(golden_token_stream.size(), tokens_gpu.size()); ASSERT_EQ(golden_token_stream.size(), token_indices_gpu.size()); @@ -1346,7 +1346,7 @@ TEST_P(JsonDelimiterParamTest, RecoveringTokenStreamNewlineAsWSAndDelimiter) auto const tokens_gpu = cudf::detail::make_std_vector_async(d_tokens_gpu, stream); auto const token_indices_gpu = cudf::detail::make_std_vector_async(d_token_indices_gpu, stream); - stream.sync(); + stream.synchronize(); // Verify the number of tokens matches ASSERT_EQ(golden_token_stream.size(), tokens_gpu.size()); ASSERT_EQ(golden_token_stream.size(), token_indices_gpu.size()); @@ -1413,7 +1413,7 @@ TEST_F(JsonTest, RejectsUnquotedValuesWithInvalidLeadingChar) cuio_json::detail::validate_token_stream(d_input, d_tokens, d_token_indices, opts, stream); auto const validated_tokens = cudf::detail::make_std_vector_async(d_tokens, stream); - stream.sync(); + stream.synchronize(); EXPECT_NE(std::find(validated_tokens.begin(), validated_tokens.end(), token_t::ErrorBegin), validated_tokens.end()) << "value " << bad << " was unexpectedly accepted as a number"; diff --git a/cpp/tests/io/parquet_chunked_reader_test.cu b/cpp/tests/io/parquet_chunked_reader_test.cu index 6ab62efdde77..5096920b97e7 100644 --- a/cpp/tests/io/parquet_chunked_reader_test.cu +++ b/cpp/tests/io/parquet_chunked_reader_test.cu @@ -2417,7 +2417,7 @@ TEST_F(ParquetReaderTest, ManyLargeLists) bools_iter + (num_rows * bools_per_row), bools_col->mutable_view().begin()); - stream.sync(); + stream.synchronize(); // list column auto list_col = cudf::make_lists_column( diff --git a/cpp/tests/io/text/data_chunk_source_test.cpp b/cpp/tests/io/text/data_chunk_source_test.cpp index 561be9b4d1bf..f921de63ba02 100644 --- a/cpp/tests/io/text/data_chunk_source_test.cpp +++ b/cpp/tests/io/text/data_chunk_source_test.cpp @@ -36,7 +36,7 @@ void test_source(std::string const& content, cudf::io::text::data_chunk_source c // full contents auto reader = source.create_reader(); auto const chunk = reader->get_next_chunk(content.size(), stream); - stream.sync(); + stream.synchronize(); EXPECT_EQ(chunk->size(), content.size()); EXPECT_EQ(chunk_to_host(*chunk), content); } @@ -45,7 +45,7 @@ void test_source(std::string const& content, cudf::io::text::data_chunk_source c auto reader = source.create_reader(); reader->skip_bytes(4); auto const chunk = reader->get_next_chunk(content.size(), stream); - stream.sync(); + stream.synchronize(); EXPECT_EQ(chunk->size(), content.size() - 4); EXPECT_EQ(chunk_to_host(*chunk), content.substr(4)); } @@ -54,7 +54,7 @@ void test_source(std::string const& content, cudf::io::text::data_chunk_source c auto reader = source.create_reader(); auto const chunk1 = reader->get_next_chunk(5, stream); auto const chunk2 = reader->get_next_chunk(content.size() - 5, stream); - stream.sync(); + stream.synchronize(); EXPECT_EQ(chunk1->size(), 5); EXPECT_EQ(chunk2->size(), content.size() - 5); EXPECT_EQ(chunk_to_host(*chunk1), content.substr(0, 5)); @@ -65,7 +65,7 @@ void test_source(std::string const& content, cudf::io::text::data_chunk_source c auto reader = source.create_reader(); auto const chunk1 = reader->get_next_chunk(content.size() / 2, stream); auto const chunk2 = reader->get_next_chunk(content.size() - content.size() / 2, stream); - stream.sync(); + stream.synchronize(); EXPECT_EQ(chunk1->size(), content.size() / 2); EXPECT_EQ(chunk2->size(), content.size() - content.size() / 2); EXPECT_EQ(chunk_to_host(*chunk1), content.substr(0, content.size() / 2)); @@ -75,11 +75,11 @@ void test_source(std::string const& content, cudf::io::text::data_chunk_source c // reading too many bytes auto reader = source.create_reader(); auto const chunk = reader->get_next_chunk(content.size() + 10, stream); - stream.sync(); + stream.synchronize(); EXPECT_EQ(chunk->size(), content.size()); EXPECT_EQ(chunk_to_host(*chunk), content); auto next_chunk = reader->get_next_chunk(1, stream); - stream.sync(); + stream.synchronize(); EXPECT_EQ(next_chunk->size(), 0); } { @@ -87,7 +87,7 @@ void test_source(std::string const& content, cudf::io::text::data_chunk_source c auto reader = source.create_reader(); reader->skip_bytes(content.size() + 10); auto const next_chunk = reader->get_next_chunk(1, stream); - stream.sync(); + stream.synchronize(); EXPECT_EQ(next_chunk->size(), 0); } cudf::set_pinned_memory_resource(last_mr); From aad4ead2880e71da67222883a65ca5f589906618 Mon Sep 17 00:00:00 2001 From: Vyas Ramasubramani Date: Sat, 15 Aug 2026 18:28:32 -0700 Subject: [PATCH 09/10] Ignore rapids-xgboost publish warning in cudf.pandas tests --- .../third_party_integration_tests/tests/pytest.ini | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/python/cudf/cudf_pandas_tests/third_party_integration_tests/tests/pytest.ini b/python/cudf/cudf_pandas_tests/third_party_integration_tests/tests/pytest.ini index 46b3213a4c83..9cf6b6779ba9 100644 --- a/python/cudf/cudf_pandas_tests/third_party_integration_tests/tests/pytest.ini +++ b/python/cudf/cudf_pandas_tests/third_party_integration_tests/tests/pytest.ini @@ -1,8 +1,10 @@ -# SPDX-FileCopyrightText: Copyright (c) 2024, NVIDIA CORPORATION. +# SPDX-FileCopyrightText: Copyright (c) 2024-2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved. # SPDX-License-Identifier: Apache-2.0 [pytest] xfail_strict=true +filterwarnings = + ignore:`rapids-xgboost` will no longer be published.*:FutureWarning:xgboost\._c_api markers= assert_eq: custom binary asserter for a test xfail_gold: this test is expected to fail in the gold pass From aab0af977fcbfc41990244867b31183781a6808c Mon Sep 17 00:00:00 2001 From: Vyas Ramasubramani Date: Sat, 15 Aug 2026 19:23:17 -0700 Subject: [PATCH 10/10] Suppress rapids-xgboost import warning --- .../tests/test_xgboost.py | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/python/cudf/cudf_pandas_tests/third_party_integration_tests/tests/test_xgboost.py b/python/cudf/cudf_pandas_tests/third_party_integration_tests/tests/test_xgboost.py index 3cbd58e0c1d9..fd858f00a4d8 100644 --- a/python/cudf/cudf_pandas_tests/third_party_integration_tests/tests/test_xgboost.py +++ b/python/cudf/cudf_pandas_tests/third_party_integration_tests/tests/test_xgboost.py @@ -1,15 +1,24 @@ -# SPDX-FileCopyrightText: Copyright (c) 2023-2025, NVIDIA CORPORATION. +# SPDX-FileCopyrightText: Copyright (c) 2023-2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved. # SPDX-License-Identifier: Apache-2.0 from __future__ import annotations +import warnings + import numpy as np import pandas as pd import pytest import scipy.sparse -import xgboost as xgb from sklearn.datasets import make_regression -from xgboost.testing import IteratorForTest, make_categorical + +with warnings.catch_warnings(): + warnings.filterwarnings( + "ignore", + category=FutureWarning, + message="`rapids-xgboost` will no longer be published.*", + ) + import xgboost as xgb + from xgboost.testing import IteratorForTest, make_categorical n_samples = 128 n_features = 16