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

Fix large strings handling in nvtext::character_tokenize #15829

Merged
merged 15 commits into from
Jun 10, 2024

Conversation

davidwendt
Copy link
Contributor

Description

Fix logic for nvtext::character_tokenize to handle large strings input. The output for > 2GB input strings column will turn characters into rows and so will likely overflow the size_type rows as expected. The thrust::count_if is replaced with a raw kernel to produce the appropriate count that can be checked against max row size.
Also changed the API to not accept null rows since the code does not check for them and can return invalid results for inputs with unsanitized-null rows.

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 bug Something isn't working 2 - In Progress Currently a work in progress libcudf Affects libcudf (C++/CUDA) code. strings strings issues (C++ and Python) non-breaking Non-breaking change labels May 22, 2024
@davidwendt davidwendt self-assigned this May 22, 2024
@github-actions github-actions bot added the Python Affects Python cuDF API. label May 24, 2024
@davidwendt davidwendt added 3 - Ready for Review Ready for review by team breaking Breaking change and removed 2 - In Progress Currently a work in progress non-breaking Non-breaking change labels May 24, 2024
@davidwendt davidwendt marked this pull request as ready for review May 29, 2024 17:21
@davidwendt davidwendt requested review from a team as code owners May 29, 2024 17:21
Copy link
Contributor

@bdice bdice 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. Is this a breaking change to null handling behavior?

edit: good, it is marked as such. Thanks!

Copy link
Member

@PointKernel PointKernel left a comment

Choose a reason for hiding this comment

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

Looks great! Thanks

cpp/src/text/tokenize.cu Show resolved Hide resolved
Copy link
Contributor

@wence- wence- left a comment

Choose a reason for hiding this comment

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

Python changes look good to me

@davidwendt
Copy link
Contributor Author

/merge

@rapids-bot rapids-bot bot merged commit ae12634 into rapidsai:branch-24.08 Jun 10, 2024
70 checks passed
@davidwendt davidwendt deleted the char-tokenize-ls branch June 10, 2024 13:51
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 breaking Breaking change bug Something isn't working libcudf Affects libcudf (C++/CUDA) code. Python Affects Python cuDF API. strings strings issues (C++ and Python)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants