Add Glushkov regex fast-path to libcudf - #21936
Merged
rapids-bot[bot] merged 97 commits intoJul 14, 2026
Merged
Conversation
lingyany-nv
marked this pull request as draft
March 25, 2026 21:24
…e the quadratic search to O(n); don't allocate working memory when Glushkov is applicable
…tmost-matching; fix the multi_re working memory issue
…but skip as in Glushkov
Contributor
|
/ok to test 41caa42 |
davidwendt
requested review from
PointKernel and
davidwendt
and removed request for
Matt711 and
davidwendt
July 9, 2026 12:52
Contributor
|
/ok to test cc0e60a |
lamarrr
approved these changes
Jul 9, 2026
PointKernel
approved these changes
Jul 9, 2026
PointKernel
left a comment
Member
There was a problem hiding this comment.
Some final nitpicks otherwise LGTM
Member
There was a problem hiding this comment.
I'm happy with that. As a small suggestion, would it make sense for new headers like glushkov_regcomp.h to use the .hpp extension?
| */ | ||
| void ordered_eps_frontier(int32_t const start, | ||
| reprog const& prog, | ||
| std::vector<int32_t> const& inst_to_pos, |
Contributor
|
/ok to test 8eaf307 |
bdice
approved these changes
Jul 14, 2026
bdice
left a comment
Contributor
There was a problem hiding this comment.
Approving CMake (did not review C++).
Contributor
There was a problem hiding this comment.
I'm favorable towards changing this. If not in this PR, in an immediate follow-up.
Contributor
|
/ok to test 0e54aa9 |
Contributor
|
/ok to test faf578d |
Contributor
|
/merge |
3 tasks
This was referenced Jul 16, 2026
This was referenced Jul 16, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Add bit-parallel Glushkov NFA regex engine with shared memory optimization
Implement Glushkov's NFA for regex string matching in libcudf: references (1) hyperscan paper (2) HybridSA paper (3) vectorscan repo.
Basically, this is Glushkov's NFA compared with the other popular Thompson's NFA (also used in current libcudf regex). The Glushkov engine represents NFA state as a single uint64_t bitmask (max 64 positions), requiring no global memory per thread. Shared memory is used to hold the static instructions like in the current implementation.
Key changes
Limitations
When above condition is detected, it falls back to use the current Thompson's NFA.
Unit tests + benchmark
Checklist