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 offsetalator in nvtext::byte_pair_encoding #14888

Merged
merged 3 commits into from
Feb 6, 2024

Conversation

davidwendt
Copy link
Contributor

Description

Replaces hardcoded offset types as size-type with the offsetalator or int64 (for temporary vectors).

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. strings strings issues (C++ and Python) improvement Improvement / enhancement to an existing function non-breaking Non-breaking change labels Jan 25, 2024
@davidwendt davidwendt self-assigned this Jan 25, 2024
@davidwendt davidwendt added 3 - Ready for Review Ready for review by team and removed 2 - In Progress Currently a work in progress labels Jan 25, 2024
@davidwendt davidwendt marked this pull request as ready for review January 30, 2024 20:51
@davidwendt davidwendt requested a review from a team as a code owner January 30, 2024 20:51
d_strings.child(cudf::strings_column_view::offsets_column_index).data<cudf::size_type>();
auto const offset = offsets[str_idx + d_strings.offset()] - offsets[d_strings.offset()];
auto const d_str = d_strings.element<cudf::string_view>(str_idx);
auto const offset = thrust::distance(d_input_chars, d_str.data());
Copy link
Contributor

Choose a reason for hiding this comment

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

Nice.

@davidwendt
Copy link
Contributor Author

/merge

@rapids-bot rapids-bot bot merged commit 0665575 into rapidsai:branch-24.04 Feb 6, 2024
69 checks passed
@davidwendt davidwendt deleted the bpe-offsetalator branch February 6, 2024 16:31
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 strings strings issues (C++ and Python)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants