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

Use make_host_vector instead of make_std_vector to facilitate pinned memory optimizations #16386

Merged
merged 9 commits into from
Aug 28, 2024

Conversation

vuule
Copy link
Contributor

@vuule vuule commented Jul 24, 2024

Description

Replaced most of make_std_vector calls with make_host_vector to allow pinned memory and kernel copies, when enabled.
Skipped places where the change would impact the public API.

Checklist

  • I am familiar with the Contributing Guidelines.
  • New or existing tests cover these changes.
  • The documentation is up to date with these changes.

Copy link

copy-pr-bot bot commented Jul 24, 2024

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@github-actions github-actions bot added libcudf Affects libcudf (C++/CUDA) code. Python Affects Python cuDF API. CMake CMake build issue Java Affects Java cuDF API. cudf.polars Issues specific to cudf.polars labels Jul 24, 2024
@vuule vuule added Performance Performance related issue non-breaking Non-breaking change improvement Improvement / enhancement to an existing function and removed libcudf Affects libcudf (C++/CUDA) code. Python Affects Python cuDF API. CMake CMake build issue Java Affects Java cuDF API. cudf.polars Issues specific to cudf.polars labels Jul 24, 2024
@github-actions github-actions bot added libcudf Affects libcudf (C++/CUDA) code. Python Affects Python cuDF API. CMake CMake build issue Java Affects Java cuDF API. cudf.polars Issues specific to cudf.polars labels Jul 24, 2024
@vuule vuule changed the base branch from branch-24.08 to branch-24.10 July 24, 2024 21:12
@github-actions github-actions bot removed Python Affects Python cuDF API. CMake CMake build issue Java Affects Java cuDF API. cudf.polars Issues specific to cudf.polars labels Jul 24, 2024
@@ -1991,14 +1991,14 @@ encoder_decimal_info decimal_chunk_sizes(orc_table_view& orc_table,
return src[rg_bounds[idx][col_idx].end - 1];
});

rg_sizes[col_idx] = cudf::detail::make_std_vector_async(d_tmp_rowgroup_sizes, stream);
rg_sizes.emplace(col_idx, cudf::detail::make_host_vector_async(d_tmp_rowgroup_sizes, stream));
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is the only way to add elements to a map when the value type is not default-constructible.

@vuule vuule marked this pull request as ready for review July 26, 2024 15:53
@vuule vuule requested a review from a team as a code owner July 26, 2024 15:53
@vuule vuule requested review from shrshi and nvdbaranec July 26, 2024 15:53
@vuule vuule added the 3 - Ready for Review Ready for review by team label Jul 26, 2024
@vuule vuule requested a review from ttnghia August 27, 2024 19:57
@vuule
Copy link
Contributor Author

vuule commented Aug 27, 2024

/ok to test

Copy link
Contributor

@shrshi shrshi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One question -

cpp/src/io/json/json_column.cu Show resolved Hide resolved
is_str_column_all_nulls = cudf::detail::make_std_vector_sync(
is_all_nulls_each_column(input, d_column_tree, tree, col_ids, options, stream), stream);
}
auto const is_str_column_all_nulls = [&, &column_tree = d_column_tree]() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a neat change!

@vuule
Copy link
Contributor Author

vuule commented Aug 28, 2024

/merge

@rapids-bot rapids-bot bot merged commit 60f30d8 into rapidsai:branch-24.10 Aug 28, 2024
88 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3 - Ready for Review Ready for review by team improvement Improvement / enhancement to an existing function libcudf Affects libcudf (C++/CUDA) code. non-breaking Non-breaking change Performance Performance related issue
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants