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

Create a dispatcher for invoking regex kernel functions #10349

Merged
merged 9 commits into from
Mar 2, 2022

Conversation

davidwendt
Copy link
Contributor

Closes #10138

Refactor the various regex function calls to use a dispatcher instead of if-else clauses. Each regex call currently requires different stack sizes (and later launch parameters). Changes to these parameters are sometimes difficult to coordinate since they usually need to be duplicated across about 10 APIs that are currently using regex calls. The new regex_dispatcher makes calling these much cleaner and easier to maintain. This will be helpful when experimenting with possibly using different launch parameters.

No functions have changed. Mostly this is a refactoring and cleanup effort. The findall.cu was also recoded to use the new count_matches utility.

@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 Feb 23, 2022
@davidwendt davidwendt self-assigned this Feb 23, 2022
@codecov
Copy link

codecov bot commented Feb 23, 2022

Codecov Report

Merging #10349 (a3732ad) into branch-22.04 (4c9ef51) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@              Coverage Diff              @@
##           branch-22.04   #10349   +/-   ##
=============================================
  Coverage         10.58%   10.58%           
=============================================
  Files               125      125           
  Lines             21058    21058           
=============================================
  Hits               2228     2228           
  Misses            18830    18830           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4c9ef51...a3732ad. Read the comment docs.

@davidwendt davidwendt added 3 - Ready for Review Ready for review by team and removed 2 - In Progress Currently a work in progress labels Feb 24, 2022
@davidwendt davidwendt marked this pull request as ready for review February 24, 2022 14:41
@davidwendt davidwendt requested a review from a team as a code owner February 24, 2022 14:41
Copy link
Contributor

@vyasr vyasr left a comment

Choose a reason for hiding this comment

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

A few minor suggestions, but no blockers. LGTM!

cpp/src/strings/regex/dispatcher.hpp Outdated Show resolved Hide resolved
cpp/src/strings/replace/multi_re.cu Outdated Show resolved Hide resolved
cpp/src/strings/contains.cu Outdated Show resolved Hide resolved
cpp/src/strings/contains.cu Show resolved Hide resolved
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.

This is awesome! Cleans up a lot of code. I have a few suggestions.

cpp/src/strings/contains.cu Outdated Show resolved Hide resolved
cpp/src/strings/regex/dispatcher.hpp Show resolved Hide resolved
cpp/src/strings/search/findall.cu Outdated Show resolved Hide resolved
cpp/src/strings/contains.cu Outdated Show resolved Hide resolved
@davidwendt davidwendt requested a review from bdice March 1, 2022 22:07
@davidwendt
Copy link
Contributor Author

@gpucibot merge

@rapids-bot rapids-bot bot merged commit 1217f24 into rapidsai:branch-22.04 Mar 2, 2022
@davidwendt davidwendt deleted the regex-dispatcher branch March 2, 2022 15:52
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.

Create dispatcher for different regex stack sizes
5 participants