Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move chars column to parent data buffer in strings column #14202

Merged
Merged
Show file tree
Hide file tree
Changes from 67 commits
Commits
Show all changes
73 commits
Select commit Hold shift + click to select a range
f5ca3d3
add stream to chars(), chars_size, chars_end, use head()
karthikeyann Sep 26, 2023
aced40d
src/ changes
karthikeyann Sep 26, 2023
7c34040
tests/ changes
karthikeyann Sep 26, 2023
b592458
benchmarks/ changes
karthikeyann Sep 26, 2023
86a1e59
java/ changes
karthikeyann Sep 26, 2023
55dce95
examples/ changes
karthikeyann Sep 26, 2023
8212300
Merge branch 'branch-23.10' into fea-char_limit_experiment
karthikeyann Sep 27, 2023
a874f32
fix typo
karthikeyann Sep 27, 2023
3b23642
python/ changes
karthikeyann Sep 29, 2023
766c939
Merge branch 'branch-23.12' into fea-char_limit_experiment
karthikeyann Oct 3, 2023
75d683c
string fixes for contiguous split (nvdbaranec)
karthikeyann Oct 3, 2023
5e4ef98
fix view char ptr, naming with numbers for a pytest
karthikeyann Oct 4, 2023
8ff34b0
Merge branch 'branch-23.12' of github.com:rapidsai/cudf into fea-char…
karthikeyann Oct 4, 2023
a900572
base_data fix in strings column in Cython
karthikeyann Nov 2, 2023
88c2b36
Merge branch 'branch-23.12' of github.com:rapidsai/cudf into fea-char…
karthikeyann Nov 2, 2023
ee1fff2
fix serialization of sliced string column
karthikeyann Nov 3, 2023
dc5acd9
fix test_assert_column_memory_basic_same for string column
karthikeyann Nov 6, 2023
902b466
fix test_deserialize_cudf_0_16, rename to 23_12
karthikeyann Nov 6, 2023
13aa651
fix ParquetWriterTest.StringsAsBinary test
karthikeyann Nov 6, 2023
7f67403
Merge branch 'branch-23.12' into fea-char_limit_experiment
karthikeyann Nov 6, 2023
ddca840
fix tokenize_with_vocabulary for new string design
karthikeyann Nov 6, 2023
e2fd78c
fix strings column_view creation children
karthikeyann Nov 10, 2023
804797c
revert bpe change for resolving merge conflicts
karthikeyann Nov 10, 2023
bc977fb
Merge branch 'branch-23.12' of github.com:rapidsai/cudf into fea-char…
karthikeyann Nov 10, 2023
678d171
fix bpe after merge
karthikeyann Nov 10, 2023
cdbc925
java-fixes.patch by @jlowe
karthikeyann Nov 11, 2023
a99aef7
Merge branch 'branch-24.02' of github.com:rapidsai/cudf into fea-char…
karthikeyann Nov 22, 2023
979f032
address review comments (use head() instead of data())
karthikeyann Dec 11, 2023
47f421a
add rmm buffer for chars for string factory
karthikeyann Dec 11, 2023
08084ef
remove chars() in strings_column_view
karthikeyann Dec 11, 2023
f171405
fix nullable column_view to device_span error
karthikeyann Dec 11, 2023
4dfb1ab
Merge branch 'branch-24.02' into fea-char_limit_experiment
karthikeyann Dec 11, 2023
71017bd
remove char hack for rep layout
karthikeyann Dec 11, 2023
71451d7
deprecate chars()
karthikeyann Dec 11, 2023
a7c14c7
Merge branch 'branch-24.02' into fea-char_limit_experiment
karthikeyann Dec 12, 2023
ff1decf
Apply suggestions from code review
karthikeyann Dec 13, 2023
fa6ba9d
style fix
karthikeyann Dec 13, 2023
85643e8
Merge branch 'branch-24.02' into fea-char_limit_experiment
karthikeyann Dec 14, 2023
57f1d47
add proclaim_return_type to device lambda
karthikeyann Dec 14, 2023
7b213f7
Update cpp/tests/strings/array_tests.cpp
karthikeyann Dec 14, 2023
2773242
remove offset() and use offsets.size()
karthikeyann Jan 2, 2024
74b3567
add stream to chars_begin()
karthikeyann Jan 2, 2024
53fbbff
Merge branch 'branch-24.02' of github.com:rapidsai/cudf into fea-char…
karthikeyann Jan 2, 2024
1878691
copyright year update
karthikeyann Jan 2, 2024
d89caab
merge fix
karthikeyann Jan 2, 2024
a368c35
Revert "copyright year update"
karthikeyann Jan 2, 2024
54591c6
copyright year update
karthikeyann Jan 2, 2024
15a43e1
fix missing stream, fix typo
karthikeyann Jan 2, 2024
f4294de
fix format, address review comments
karthikeyann Jan 3, 2024
d9a2c5b
fix stream
karthikeyann Jan 4, 2024
dfc34a0
Merge branch 'branch-24.02' into fea-char_limit_experiment
karthikeyann Jan 4, 2024
a04413f
remove unused file copyright year
karthikeyann Jan 8, 2024
84de944
string column children fix in column_empty
karthikeyann Jan 8, 2024
8d4dc7d
Merge branch 'branch-24.02' into fea-char_limit_experiment
karthikeyann Jan 8, 2024
40553fe
StringsColumnTest.GatherTooBig test column_view fix children
karthikeyann Jan 8, 2024
b31d7f0
cleanup string.py
karthikeyann Jan 8, 2024
d311a68
remove chars_data, use data itself with special case for string
karthikeyann Jan 8, 2024
a37555d
Merge branch 'branch-24.02' of github.com:rapidsai/cudf into fea-char…
karthikeyann Jan 8, 2024
d175bb9
avoid deep copy for offset=0, in string column .data
karthikeyann Jan 8, 2024
95b2a3f
Merge branch 'branch-24.02' into fea-char_limit_experiment
karthikeyann Jan 9, 2024
d3db9e7
address review comments
karthikeyann Jan 9, 2024
f543551
Merge branch 'branch-24.02' into fea-char_limit_experiment
karthikeyann Jan 9, 2024
f2e6e15
zero size buffer for column_empty
karthikeyann Jan 10, 2024
e7ff5c0
Merge branch 'branch-24.02' into fea-char_limit_experiment
karthikeyann Jan 10, 2024
906f27e
Update DEVELOPER_GUIDE.md
karthikeyann Jan 12, 2024
39ee47d
Merge branch 'branch-24.02' into fea-char_limit_experiment
karthikeyann Jan 12, 2024
555cc67
update strings.png
karthikeyann Jan 12, 2024
4f4ee07
Update cpp/doxygen/developer_guide/DEVELOPER_GUIDE.md
karthikeyann Jan 12, 2024
87b8bce
remove space at end
karthikeyann Jan 12, 2024
3ed1557
remove int8 usage in string.py
karthikeyann Jan 12, 2024
debf7de
Merge branch 'branch-24.02' into fea-char_limit_experiment
karthikeyann Jan 12, 2024
f8e5845
Merge branch 'branch-24.02' into fea-char_limit_experiment
karthikeyann Jan 16, 2024
a577c88
Merge branch 'branch-24.02' into fea-char_limit_experiment
karthikeyann Jan 17, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions cpp/benchmarks/hashing/hash.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2021-2023, NVIDIA CORPORATION.
* Copyright (c) 2021-2024, NVIDIA CORPORATION.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -43,7 +43,7 @@ static void bench_hash(nvbench::state& state)

// collect statistics
cudf::strings_column_view input(data->get_column(1).view());
auto const chars_size = input.chars_size();
auto const chars_size = input.chars_size(stream);
// add memory read from string column
state.add_global_memory_reads<nvbench::int8_t>(chars_size);
// add memory read from int64_t column
Expand Down
4 changes: 2 additions & 2 deletions cpp/benchmarks/json/json.cu
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2021-2023, NVIDIA CORPORATION.
* Copyright (c) 2021-2024, NVIDIA CORPORATION.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -190,7 +190,7 @@ void BM_case(benchmark::State& state, std::string query_arg)
int desired_bytes = state.range(1);
auto input = build_json_string_column(desired_bytes, num_rows);
cudf::strings_column_view scv(input->view());
size_t num_chars = scv.chars().size();
size_t num_chars = scv.chars_size(cudf::get_default_stream());

std::string json_path(query_arg);

Expand Down
18 changes: 9 additions & 9 deletions cpp/benchmarks/string/case.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2021-2023, NVIDIA CORPORATION.
* Copyright (c) 2021-2024, NVIDIA CORPORATION.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -43,28 +43,28 @@ void bench_case(nvbench::state& state)
if (encoding == "ascii") {
data_profile ascii_profile = data_profile_builder().no_validity().distribution(
cudf::type_id::INT8, distribution_id::UNIFORM, 32, 126); // nice ASCII range
auto input = cudf::strings_column_view(col_view);
auto ascii_column =
create_random_column(cudf::type_id::INT8, row_count{input.chars_size()}, ascii_profile);
auto input = cudf::strings_column_view(col_view);
auto ascii_column = create_random_column(
cudf::type_id::INT8, row_count{input.chars_size(cudf::get_default_stream())}, ascii_profile);
auto ascii_data = ascii_column->view();

col_view = cudf::column_view(col_view.type(),
col_view.size(),
nullptr,
ascii_data.data<char>(),
col_view.null_mask(),
col_view.null_count(),
0,
{input.offsets(), ascii_data});
{input.offsets()});

ascii_contents = ascii_column->release();
}
auto input = cudf::strings_column_view(col_view);

state.set_cuda_stream(nvbench::make_cuda_stream_view(cudf::get_default_stream().value()));

state.add_element_count(input.chars_size(), "chars_size");
state.add_global_memory_reads<nvbench::int8_t>(input.chars_size());
state.add_global_memory_writes<nvbench::int8_t>(input.chars_size());
state.add_element_count(input.chars_size(cudf::get_default_stream()), "chars_size");
state.add_global_memory_reads<nvbench::int8_t>(input.chars_size(cudf::get_default_stream()));
state.add_global_memory_writes<nvbench::int8_t>(input.chars_size(cudf::get_default_stream()));

state.exec(nvbench::exec_tag::sync,
[&](nvbench::launch& launch) { auto result = cudf::strings::to_lower(input); });
Expand Down
4 changes: 2 additions & 2 deletions cpp/benchmarks/string/char_types.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2023, NVIDIA CORPORATION.
* Copyright (c) 2023-2024, NVIDIA CORPORATION.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -42,7 +42,7 @@ static void bench_char_types(nvbench::state& state)

state.set_cuda_stream(nvbench::make_cuda_stream_view(cudf::get_default_stream().value()));
// gather some throughput statistics as well
auto chars_size = input.chars_size();
auto chars_size = input.chars_size(cudf::get_default_stream());
state.add_global_memory_reads<nvbench::int8_t>(chars_size); // all bytes are read;
if (api_type == "all") {
state.add_global_memory_writes<nvbench::int8_t>(num_rows); // output is a bool8 per row
Expand Down
5 changes: 3 additions & 2 deletions cpp/benchmarks/string/combine.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2021-2023, NVIDIA CORPORATION.
* Copyright (c) 2021-2024, NVIDIA CORPORATION.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -44,7 +44,8 @@ static void BM_combine(benchmark::State& state)
cudf::strings::concatenate(table->view(), separator);
}

state.SetBytesProcessed(state.iterations() * (input1.chars_size() + input2.chars_size()));
state.SetBytesProcessed(state.iterations() * (input1.chars_size(cudf::get_default_stream()) +
input2.chars_size(cudf::get_default_stream())));
}

static void generate_bench_args(benchmark::internal::Benchmark* b)
Expand Down
4 changes: 2 additions & 2 deletions cpp/benchmarks/string/contains.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2021-2023, NVIDIA CORPORATION.
* Copyright (c) 2021-2024, NVIDIA CORPORATION.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -100,7 +100,7 @@ static void bench_contains(nvbench::state& state)
auto pattern = patterns[pattern_index];
auto program = cudf::strings::regex_program::create(pattern);

auto chars_size = input.chars_size();
auto chars_size = input.chars_size(cudf::get_default_stream());
state.add_element_count(chars_size, "chars_size");
state.add_global_memory_reads<nvbench::int8_t>(chars_size);
state.add_global_memory_writes<nvbench::int32_t>(input.size());
Expand Down
5 changes: 3 additions & 2 deletions cpp/benchmarks/string/convert_datetime.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2021-2023, NVIDIA CORPORATION.
* Copyright (c) 2021-2024, NVIDIA CORPORATION.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -48,7 +48,8 @@ void BM_convert_datetime(benchmark::State& state, direction dir)
cudf::strings::from_timestamps(input, "%Y-%m-%d %H:%M:%S");
}

auto const bytes = dir == direction::to ? source_string.chars_size() : n_rows * sizeof(TypeParam);
auto const bytes = dir == direction::to ? source_string.chars_size(cudf::get_default_stream())
: n_rows * sizeof(TypeParam);
state.SetBytesProcessed(state.iterations() * bytes);
}

Expand Down
10 changes: 6 additions & 4 deletions cpp/benchmarks/string/convert_fixed_point.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2021-2023, NVIDIA CORPORATION.
* Copyright (c) 2021-2024, NVIDIA CORPORATION.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -49,8 +49,9 @@ void convert_to_fixed_point(benchmark::State& state)
}

// bytes_processed = bytes_input + bytes_output
state.SetBytesProcessed(state.iterations() *
(strings_view.chars_size() + rows * cudf::size_of(dtype)));
state.SetBytesProcessed(
state.iterations() *
(strings_view.chars_size(cudf::get_default_stream()) + rows * cudf::size_of(dtype)));
}

class StringsFromFixedPoint : public cudf::benchmark {};
Expand All @@ -74,7 +75,8 @@ void convert_from_fixed_point(benchmark::State& state)
// bytes_processed = bytes_input + bytes_output
state.SetBytesProcessed(
state.iterations() *
(cudf::strings_column_view(results->view()).chars_size() + rows * cudf::size_of(dtype)));
(cudf::strings_column_view(results->view()).chars_size(cudf::get_default_stream()) +
rows * cudf::size_of(dtype)));
}

#define CONVERT_TO_FIXED_POINT_BMD(name, fixed_point_type) \
Expand Down
10 changes: 6 additions & 4 deletions cpp/benchmarks/string/convert_numerics.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2021-2023, NVIDIA CORPORATION.
* Copyright (c) 2021-2024, NVIDIA CORPORATION.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -63,8 +63,9 @@ void convert_to_number(benchmark::State& state)
}

// bytes_processed = bytes_input + bytes_output
state.SetBytesProcessed(state.iterations() *
(strings_view.chars_size() + rows * sizeof(NumericType)));
state.SetBytesProcessed(
state.iterations() *
(strings_view.chars_size(cudf::get_default_stream()) + rows * sizeof(NumericType)));
}

class StringsFromNumeric : public cudf::benchmark {};
Expand All @@ -90,7 +91,8 @@ void convert_from_number(benchmark::State& state)
// bytes_processed = bytes_input + bytes_output
state.SetBytesProcessed(
state.iterations() *
(cudf::strings_column_view(results->view()).chars_size() + rows * sizeof(NumericType)));
(cudf::strings_column_view(results->view()).chars_size(cudf::get_default_stream()) +
rows * sizeof(NumericType)));
}

#define CONVERT_TO_NUMERICS_BD(name, type) \
Expand Down
7 changes: 4 additions & 3 deletions cpp/benchmarks/string/copy.cu
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2021-2023, NVIDIA CORPORATION.
* Copyright (c) 2021-2024, NVIDIA CORPORATION.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -64,8 +64,9 @@ static void BM_copy(benchmark::State& state, copy_type ct)
}
}

state.SetBytesProcessed(state.iterations() *
cudf::strings_column_view(source->view().column(0)).chars_size());
state.SetBytesProcessed(
state.iterations() *
cudf::strings_column_view(source->view().column(0)).chars_size(cudf::get_default_stream()));
}

static void generate_bench_args(benchmark::internal::Benchmark* b)
Expand Down
4 changes: 2 additions & 2 deletions cpp/benchmarks/string/count.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2021-2023, NVIDIA CORPORATION.
* Copyright (c) 2021-2024, NVIDIA CORPORATION.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -47,7 +47,7 @@ static void bench_count(nvbench::state& state)

state.set_cuda_stream(nvbench::make_cuda_stream_view(cudf::get_default_stream().value()));
// gather some throughput statistics as well
auto chars_size = input.chars_size();
auto chars_size = input.chars_size(cudf::get_default_stream());
state.add_element_count(chars_size, "chars_size");
state.add_global_memory_reads<nvbench::int8_t>(chars_size);
state.add_global_memory_writes<nvbench::int32_t>(input.size());
Expand Down
4 changes: 2 additions & 2 deletions cpp/benchmarks/string/extract.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2021-2023, NVIDIA CORPORATION.
* Copyright (c) 2021-2024, NVIDIA CORPORATION.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -67,7 +67,7 @@ static void bench_extract(nvbench::state& state)

state.set_cuda_stream(nvbench::make_cuda_stream_view(cudf::get_default_stream().value()));
// gather some throughput statistics as well
auto chars_size = strings_view.chars_size();
auto chars_size = strings_view.chars_size(cudf::get_default_stream());
state.add_element_count(chars_size, "chars_size"); // number of bytes;
state.add_global_memory_reads<nvbench::int8_t>(chars_size); // all bytes are read;
state.add_global_memory_writes<nvbench::int8_t>(chars_size); // all bytes are written
Expand Down
4 changes: 2 additions & 2 deletions cpp/benchmarks/string/factory.cu
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2021-2023, NVIDIA CORPORATION.
* Copyright (c) 2021-2024, NVIDIA CORPORATION.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -67,7 +67,7 @@ static void BM_factory(benchmark::State& state)
}

cudf::strings_column_view input(column->view());
state.SetBytesProcessed(state.iterations() * input.chars_size());
state.SetBytesProcessed(state.iterations() * input.chars_size(cudf::get_default_stream()));
}

static void generate_bench_args(benchmark::internal::Benchmark* b)
Expand Down
4 changes: 2 additions & 2 deletions cpp/benchmarks/string/filter.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2021-2023, NVIDIA CORPORATION.
* Copyright (c) 2021-2024, NVIDIA CORPORATION.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -57,7 +57,7 @@ static void BM_filter_chars(benchmark::State& state, FilterAPI api)
}
}

state.SetBytesProcessed(state.iterations() * input.chars_size());
state.SetBytesProcessed(state.iterations() * input.chars_size(cudf::get_default_stream()));
}

static void generate_bench_args(benchmark::internal::Benchmark* b)
Expand Down
4 changes: 2 additions & 2 deletions cpp/benchmarks/string/find.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2021-2023, NVIDIA CORPORATION.
* Copyright (c) 2021-2024, NVIDIA CORPORATION.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -56,7 +56,7 @@ static void BM_find_scalar(benchmark::State& state, FindAPI find_api)
}
}

state.SetBytesProcessed(state.iterations() * input.chars_size());
state.SetBytesProcessed(state.iterations() * input.chars_size(cudf::get_default_stream()));
}

static void generate_bench_args(benchmark::internal::Benchmark* b)
Expand Down
5 changes: 3 additions & 2 deletions cpp/benchmarks/string/gather.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2023, NVIDIA CORPORATION.
* Copyright (c) 2023-2024, NVIDIA CORPORATION.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -43,7 +43,8 @@ static void bench_gather(nvbench::state& state)
create_random_table({cudf::type_id::INT32}, row_count{num_rows}, map_profile);

state.set_cuda_stream(nvbench::make_cuda_stream_view(cudf::get_default_stream().value()));
auto chars_size = cudf::strings_column_view(input_table->view().column(0)).chars_size();
auto chars_size =
cudf::strings_column_view(input_table->view().column(0)).chars_size(cudf::get_default_stream());
state.add_global_memory_reads<nvbench::int8_t>(chars_size); // all bytes are read;
state.add_global_memory_writes<nvbench::int8_t>(chars_size);

Expand Down
4 changes: 2 additions & 2 deletions cpp/benchmarks/string/join_strings.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2023, NVIDIA CORPORATION.
* Copyright (c) 2023-2024, NVIDIA CORPORATION.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -40,7 +40,7 @@ static void bench_join(nvbench::state& state)

state.set_cuda_stream(nvbench::make_cuda_stream_view(cudf::get_default_stream().value()));
// gather some throughput statistics as well
auto const chars_size = input.chars_size();
auto const chars_size = input.chars_size(cudf::get_default_stream());
state.add_element_count(chars_size, "chars_size"); // number of bytes;
state.add_global_memory_reads<nvbench::int8_t>(chars_size); // all bytes are read;
state.add_global_memory_writes<nvbench::int8_t>(chars_size); // all bytes are written
Expand Down
4 changes: 2 additions & 2 deletions cpp/benchmarks/string/lengths.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2023, NVIDIA CORPORATION.
* Copyright (c) 2023-2024, NVIDIA CORPORATION.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -40,7 +40,7 @@ static void bench_lengths(nvbench::state& state)

state.set_cuda_stream(nvbench::make_cuda_stream_view(cudf::get_default_stream().value()));
// gather some throughput statistics as well
auto chars_size = input.chars_size();
auto chars_size = input.chars_size(cudf::get_default_stream());
state.add_global_memory_reads<nvbench::int8_t>(chars_size); // all bytes are read;
state.add_global_memory_writes<nvbench::int32_t>(num_rows); // output is an integer per row

Expand Down
4 changes: 2 additions & 2 deletions cpp/benchmarks/string/like.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2022-2023, NVIDIA CORPORATION.
* Copyright (c) 2022-2024, NVIDIA CORPORATION.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -99,7 +99,7 @@ static void bench_like(nvbench::state& state)

state.set_cuda_stream(nvbench::make_cuda_stream_view(cudf::get_default_stream().value()));
// gather some throughput statistics as well
auto chars_size = input.chars_size();
auto chars_size = input.chars_size(cudf::get_default_stream());
state.add_element_count(chars_size, "chars_size"); // number of bytes;
state.add_global_memory_reads<nvbench::int8_t>(chars_size); // all bytes are read;
state.add_global_memory_writes<nvbench::int8_t>(n_rows); // writes are BOOL8
Expand Down
8 changes: 4 additions & 4 deletions cpp/benchmarks/string/repeat_strings.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2021-2023, NVIDIA CORPORATION.
* Copyright (c) 2021-2024, NVIDIA CORPORATION.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -59,7 +59,7 @@ static void BM_repeat_strings_scalar_times(benchmark::State& state)
cudf::strings::repeat_strings(strings_col, default_repeat_times);
}

state.SetBytesProcessed(state.iterations() * strings_col.chars_size());
state.SetBytesProcessed(state.iterations() * strings_col.chars_size(cudf::get_default_stream()));
}

static void BM_repeat_strings_column_times(benchmark::State& state)
Expand All @@ -75,8 +75,8 @@ static void BM_repeat_strings_column_times(benchmark::State& state)
cudf::strings::repeat_strings(strings_col, repeat_times_col);
}

state.SetBytesProcessed(state.iterations() *
(strings_col.chars_size() + repeat_times_col.size() * sizeof(int32_t)));
state.SetBytesProcessed(state.iterations() * (strings_col.chars_size(cudf::get_default_stream()) +
repeat_times_col.size() * sizeof(int32_t)));
}

static void generate_bench_args(benchmark::internal::Benchmark* b)
Expand Down
Loading