skip to main content
research-article

Combining SIMD and Many/Multi-core Parallelism for Finite-state Machines with Enumerative Speculation

Published:21 June 2020Publication History
Skip Abstract Section

Abstract

Finite-state Machine (FSM) is the key kernel behind many popular applications, including regular expression matching, text tokenization, and Huffman decoding. Parallelizing FSMs is extremely difficult because of the strong dependencies and unpredictable memory accesses. Previous efforts have largely focused on multi-core parallelization and used different approaches, including speculative and enumerative execution, both of which have been effective but also have limitations. With increasing width and improving flexibility in SIMD instruction sets, this article focuses on combining SIMD and many/multi-core parallelism for FSMs. We have developed a novel strategy, called enumerative speculation. Instead of speculating on a single state as in speculative execution or enumerating all possible states as in enumerative execution, our strategy speculates transitions from several possible states, reducing the prediction overheads of speculation approach and the large amount of redundant work in the enumerative approach. A simple lookback approach produces a set of guessed states to achieve high speculation success rates in our enumerative speculation. In addition, to enable continued scalability of enumerative speculation with a large number of threads, we have developed a parallel merge method. We evaluate our method with four popular FSM applications: Huffman decoding, regular expression matching, HTML tokenization, and Div7. We obtain up to 2.5× speedup using SIMD on 1 core and up to 95× combining SIMD with 60 cores of an Intel Xeon Phi. On a single core, we outperform the best single-state speculative execution version by an average of 1.6×, and in combining SIMD and many-core parallelism, outperform enumerative execution by an average of 2×. Finally, when evaluate on a GPU, we show that our parallel merge implementations are 2.02--6.74× more efficient than corresponding sequential merge implementations and achieve better scalability on an Nvidia V100 GPU.

References

  1. Krste Asanovic, Rastislav Bodik, James Demmel, Tony Keaveny, Kurt Keutzer, John Kubiatowicz, Nelson Morgan, David Patterson, Koushik Sen, John Wawrzynek, David Wessel, and Katherine Yelick. 2009. A view of the parallel computing landscape. Commun. ACM 52, 10 (Oct. 2009), 56--67. DOI:https://doi.org/10.1145/1562764.1562783Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. Guy E. Blelloch. 1990. Prefix Sums and Their Applications. Technical Report CMU-CS-90-190. School of Computer Science, Carnegie Mellon University.Google ScholarGoogle Scholar
  3. Linchuan Chen, Peng Jiang, and Gagan Agrawal. 2016. Exploiting recent SIMD architectural advances for irregular applications. In Proceedings of the International Symposium on Code Generation and Optimization (CGO’16).Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. F. Franchetti and M. Puschel. 2002. A SIMD Vectorizing Compiler for Digital Signal Processing Algorithms. In Proceedings of the IEEE International Parallel and Distributed Processing Symposium (IPDPS’02). IEEE, 20--26.Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. C. Garca, R. Lario, M. Prieto, L. Piuel, and F. Tirado. 2003. Vectorization of Multigrid Codes Using SIMD ISA Extensions. Proceedings of the IEEE Inernational Parallel and Distributed Processing Symposium (IPDPS’03). 58a.Google ScholarGoogle Scholar
  6. W. Daniel Hillis and Guy L. Steele, Jr. 1986. Data parallel algorithms. Commun. ACM 29, 12 (Dec. 1986).Google ScholarGoogle Scholar
  7. Jan Holub and Stanislav Štekr. 2009. On parallel implementations of deterministic finite automata. In Proceedings of the 14th International Conference on Implementation and Application of Automata (CIAA’09).Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. N. Ide, M. Hirano, Y. Endo, S. Yoshioka, H. Murakami, A. Kunimatsu, T. Sato, T. Kamei, T. Okada, and M. Suzuoki. 2000. 2.44-GFLOPS 300-MHz Floating-Point Vector-Processing Unit for High-performance 3D Graphics Computing. IEEE J. Solid-State Circ. 35, 7 (July 2000), 1025 --1033.Google ScholarGoogle ScholarCross RefCross Ref
  9. Peng Jiang, Linchuan Chen, and Gagan Agrawal. 2016. Reusing data reorganization for efficient SIMD parallelization of adaptive irregular applications. In Proceedings of the International Conference on Supercomputing (ICS’16).Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. Farzad Khorasani, Keval Vora, Rajiv Gupta, and Laxmi N. Bhuyan. 2014. CuSha: Vertex-centric graph processing on GPUs. In Proceedings of the 23rd International Symposium on High-performance Parallel and Distributed Computing (HPDC’14).Google ScholarGoogle Scholar
  11. Seonggun Kim and Hwansoo Han. 2012. Efficient SIMD code generation for irregular kernels. In Proceedings of the 17th ACM SIGPLAN Symposium on Principles and Practice of Parallel Programming (PPoPP’12). ACM, New York, NY, 55--64. DOI:https://doi.org/10.1145/2145816.2145824Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. Shmuel Tomi Klein and Yair Wiseman. 2003. Parallel huffman decoding with applications to JPEG files. Comput. J. 46 (2003), 487--497.Google ScholarGoogle ScholarCross RefCross Ref
  13. Richard E. Ladner and Michael J. Fischer. 1980. Parallel prefix computation. J. ACM 27, 4 (Oct. 1980).Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. Xing Liu, Mikhail Smelyanskiy, Edmond Chow, and Pradeep Dubey. 2013. Efficient sparse matrix-vector multiplication on x86-based many-core processors. In Proceedings of the International Conference on Supercomputing (ICS’13).Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. D. Luchaup, R. Smith, C. Estan, and S. Jha. 2011. Speculative parallel pattern matching. IEEE Trans. Info. Forensics Secur. 6, 2 (June 2011), 438--451.Google ScholarGoogle Scholar
  16. Duane Merrill, Michael Garland, and Andrew Grimshaw. 2012. Scalable GPU graph traversal. In Proceedings of the 17th ACM SIGPLAN Symposium on Principles and Practice of Parallel Programming (PPoPP’12). ACM, New York, NY, 117--128. DOI:https://doi.org/10.1145/2145816.2145832Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. Todd Mytkowicz, Madanlal Musuvathi, and Wolfram Schulte. 2014. Data-parallel finite-state machines. In Proceedings of the 19th International Conference on Architectural Support for Programming Languages and Operating Systems (ASPLOS’14). ACM, New York, NY, 529--542.Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. Yinfei Pan, Ying Zhang, and K. Chiu. 2008. Simultaneous transducers for data-parallel XML parsing. In Proceedings of the IEEE International Symposium on Parallel and Distributed Processing (IPDPS’08). 1--12.Google ScholarGoogle Scholar
  19. Simon J. Pennycook, Chris J. Hughes, M. Smelyanskiy, and S. A. Jarvis. 2013. Exploring SIMD for molecular dynamics, using intel xeon processors and intel xeon phi coprocessors. In Proceedings of the IEEE 27th International Symposium on Parallel and Distributed Processing (IPDPS’13).Google ScholarGoogle Scholar
  20. Prakash Prabhu, G Ramalingam, and Kapil Vaswani. 2010. Safe programmable speculative parallelism. In Proceedings of Programming Language Design and Implementation (PLDI’10). Association for Computing Machinery, Inc.Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. Junqiao Qiu, Zhijia Zhao, and Bin Ren. 2016. MicroSpec: Speculation-centric fine-grained parallelization for FSM computations. In Proceedings of the International Conference on Parallel Architectures and Compilation (PACT’16). ACM, New York, NY, 221--233. DOI:https://doi.org/10.1145/2967938.2967965Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. T. Rognes and E. Seeberg. 2000. Six-Fold speed-up of SmithWaterman sequence database searches using parallel processing on common microprocessors. Bioinformatics 16, 8 (2000), 699--706.Google ScholarGoogle ScholarCross RefCross Ref
  23. Erik Saule and Ümit V. Catalyurek. 2012. An early evaluation of the scalability of graph algorithms on the intel MIC architecture. In Proceedings of the IEEE 26th International Parallel and Distributed Processing Symposium Workshops 8 PhD Forum (IPDPSW’12). IEEE, Washington, DC, 1629--1639. DOI:https://doi.org/10.1109/IPDPSW.2012.204Google ScholarGoogle Scholar
  24. Wai Teng Tang, Ruizhe Zhao, Mian Lu, Yun Liang, Huynh Phung Huynh, Xibai Li, and Rick Siow Mong Goh. 2015. Optimizing and auto-tuning scale-free sparse matrix-vector multiplication on Intel Xeon Phi. In Proceedings of the 13th Annual IEEE/ACM International Symposium on Code Generation and Optimization (CGO’15).Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. Zhijia Zhao and Xipeng Shen. 2015. On-the-fly principled speculation for FSM parallelization. SIGARCH Comput. Archit. News 43, 1 (Mar. 2015).Google ScholarGoogle ScholarDigital LibraryDigital Library
  26. Zhijia Zhao, Bo Wu, and Xipeng Shen. 2014. Challenging the “embarrassingly sequential”: Parallelizing finite state machine-based computations through principled speculation. ACM SIGARCH Computer Architecture News 42, 1 (2014), 543--558.Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Combining SIMD and Many/Multi-core Parallelism for Finite-state Machines with Enumerative Speculation

      Recommendations

      Comments

      Login options

      Check if you have access through your login credentials or your institution to get full access on this article.

      Sign in

      Full Access

      • Published in

        cover image ACM Transactions on Parallel Computing
        ACM Transactions on Parallel Computing  Volume 7, Issue 3
        Special Issue on PPoPP 2017 (Part 2) and Regular Papers
        September 2020
        182 pages
        ISSN:2329-4949
        EISSN:2329-4957
        DOI:10.1145/3407694
        Issue’s Table of Contents

        Copyright © 2020 ACM

        Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

        Publisher

        Association for Computing Machinery

        New York, NY, United States

        Publication History

        • Published: 21 June 2020
        • Revised: 1 April 2020
        • Accepted: 1 April 2020
        • Received: 1 July 2018
        Published in topc Volume 7, Issue 3

        Permissions

        Request permissions about this article.

        Request Permissions

        Check for updates

        Qualifiers

        • research-article
        • Research
        • Refereed

      PDF Format

      View or Download as a PDF file.

      PDF

      eReader

      View online with eReader.

      eReader

      HTML Format

      View this article in HTML Format .

      View HTML Format