Interleaved Bitstream Execution for Multi-Pattern Regex Matching on GPUs
摘要
Pattern matching is a key operation in unstructured data analytics, commonly supported by regular expression (regex) engines. Bitparallel regex engines compile regexes into bitstream programs, which expose fine-grained parallelism and are well-suited for GPU execution. A straightforward strategy executes each bitstream instruction sequentially, processing all data blocks in a loop. However, this execution suffers from poor data reuse and high memory consumption, limiting throughput. Our key insight is to adopt an interleaved execution model, where all bitstream instructions are fused into a single loop and executed block-wise. While interleaved execution could improve data reuse, enabling it on GPUs is non-trivial due to cross-block data dependencies. To address this, we introduce 1) Dependency-Aware Thread-Data Mapping, which resolves cross-block dependencies via selective recomputation. We further improve interleaved execution performance with two additional optimizations: 2) Shift Rebalancing, which balances dependency chains to reduce synchronization barriers; and 3) Zero Block Skipping, which exploits bitstream sparsity to skip computation on zero blocks. Together, these techniques make interleaved execution practical and efficient. Experiments on real-world regex benchmarks demonstrate a 19.5× geometric mean speedup over the state-of-theart GPU regex engine.
问 Lune
几分钟读透这篇 Paper,不用再花一下午。
Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。
已有 2 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。
脉络
- Static Analysis for Efficient Streaming Tokenization 引用了 Software-hardware codesign for efficient in-memory regular pattern matching
- Software-hardware codesign for efficient in-memory regular pattern matching 引用了 Why GPUs are Slow at Executing NFAs and How to Make them Faster
- Software-hardware codesign for efficient in-memory regular pattern matching 引用了 Impala: Algorithm/Architecture Co-Design for In-Memory Multi-Stride Pattern Matching
引用它的顶会 Paper2
它引用的 Paper18
- Impala: Algorithm/Architecture Co-Design for In-Memory Multi-Stride Pattern MatchingElaheh Sadredini, Reza Rahimi, Marzieh Lenjani, Mircea Stan 等HPCA 2020 · 43 次引用
- Achieving 100Gbps Intrusion Prevention on a Single ServerZhipeng Zhao, Hugo Sadok, Nirav Atre, James C. Hoe 等OSDI 2020 · 38 次引用
- Why GPUs are Slow at Executing NFAs and How to Make them FasterHongyuan Liu, Sreepathi Pai, Adwait JogASPLOS 2020 · 31 次引用
- Software-hardware codesign for efficient in-memory regular pattern matchingLingkun Kong, Qixuan Yu, Agnishom Chattopadhyay, Alexis Le Glaunec 等PLDI 2022 · 23 次引用
- FlexAmata: A Universal and Efficient Adaption of Applications to Spatial Automata Processing AcceleratorsElaheh Sadredini, Reza Rahimi, Marzieh Lenjani, Mircea Stan 等ASPLOS 2020 · 23 次引用
相关 Paper
- HybridSA: GPU Acceleration of Multi-pattern Regex Matching using Bit ParallelismAlexis Le Glaunec, Lingkun Kong, Konstantinos MamourasOOPSLA 2024 · 6 次引用
- New Regular Expressions on Old AcceleratorsJackson Woodruff, Michael F. P. O'BoyleDAC 2021 · 3 次引用
- Search-Based Regular Expression Inference on a GPUMojtaba Valizadeh, Martin BergerPLDI 2023 · 11 次引用
- ngAP: Non-blocking Large-scale Automata Processing on GPUsTianao Ge, Tong Zhang, Hongyuan LiuASPLOS 2024 · 11 次引用
- Challenging Sequential Bitstream Processing via Principled Bitwise SpeculationJunqiao Qiu, Lin Jiang, Zhijia ZhaoASPLOS 2020 · 9 次引用
