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

Large strings support in cudf::merge #15374

Merged
merged 26 commits into from
Apr 22, 2024

Conversation

davidwendt
Copy link
Contributor

@davidwendt davidwendt commented Mar 22, 2024

Description

Enable large strings support in cudf::merge.
Simplifies the strings specialization to use the gather-based strings factory function which is already optimized for long strings and is now appropriately enabled for large strings.
Also moved source from include/cudf/strings/detail/merge.cuh to src/strings/merge/merge.cu file since the template implemenation was not actually required.

Checklist

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

@davidwendt davidwendt added 2 - In Progress Currently a work in progress libcudf Affects libcudf (C++/CUDA) code. improvement Improvement / enhancement to an existing function non-breaking Non-breaking change labels Mar 22, 2024
@davidwendt davidwendt self-assigned this Mar 22, 2024
@github-actions github-actions bot added the CMake CMake build issue label Mar 22, 2024
@davidwendt davidwendt added 3 - Ready for Review Ready for review by team and removed 2 - In Progress Currently a work in progress labels Apr 8, 2024
@davidwendt davidwendt marked this pull request as ready for review April 10, 2024 13:54
@davidwendt davidwendt requested review from a team as code owners April 10, 2024 13:54
@davidwendt davidwendt requested review from vuule and nvdbaranec April 10, 2024 13:54
Copy link
Contributor

@robertmaynard robertmaynard left a comment

Choose a reason for hiding this comment

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

Approving CMake changes

total_bytes < threshold, "Size of output exceeds the column size limit", std::overflow_error);
}
if (total_bytes >= get_offset64_threshold()) {
// recompute as int64 offsets when above the threshold
Copy link
Contributor

Choose a reason for hiding this comment

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

Once large strings are the default behavior, I wonder if we should do a first pass in int64 and then cast the offsets down if it fits in int32, rather than recomputing as int64 on overflow. I don't know how expensive the downcast would be compared to recomputing. Of course this also depends on whether we expect large strings to be common. I don't expect any action here, but would be open to your thoughts.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't really expect large strings to be very common. At least not in the near to mid future.
I'd rather force any performance hit into the int64 path right now if possible.

cpp/src/strings/merge/merge.cu Outdated Show resolved Hide resolved
@davidwendt davidwendt requested a review from bdice April 18, 2024 12:10
Copy link
Contributor

@vuule vuule left a comment

Choose a reason for hiding this comment

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

Looks good, just a single optional suggestion.

cpp/include/cudf/strings/detail/strings_children.cuh Outdated Show resolved Hide resolved
@davidwendt davidwendt requested a review from vuule April 19, 2024 12:46
@davidwendt
Copy link
Contributor Author

/merge

@rapids-bot rapids-bot bot merged commit a2c81e7 into rapidsai:branch-24.06 Apr 22, 2024
71 checks passed
@davidwendt davidwendt deleted the ls-merge branch April 22, 2024 12:29
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 CMake CMake build issue improvement Improvement / enhancement to an existing function libcudf Affects libcudf (C++/CUDA) code. non-breaking Non-breaking change
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants