Efficient Parallel Knuth-Morris-Pratt Algorithm for Multi-GPUs with CUDA

String matching is an important technique among various applications. The traditional string matching algorithm needs the backtracking procedure and does the comparison repeatedly, thus these factors affect its efficiency. Knuth-Morris-Pratt (KMP) is one of well-known and efficient string matching algorithms. However, the computation time of KMP algorithm still is large for processing thousands of pattern strings. Current high-end graphics processing units (GPUs), contain up to hundreds cores per chip, are very popular in the high performance computing community. In this paper, we proposed an efficient parallel KMP algorithm, called KMP-GPU, for multi-GPUs with CUDA. The experimental results showed that the proposed KMP-GPU algorithm can achieve 97x speedups compared with the CPU-based KMP algorithm.

[1]  Ronald L. Rivest,et al.  Introduction to Algorithms , 1990 .

[2]  Nilay Khare,et al.  Time Efficient String Matching Solution for Single and Multiple Pattern using Bit Parallelism , 2012 .

[3]  Ali Peiravi Application of string matching in internet security and reliability , 2010 .

[4]  Michael J. Flynn,et al.  Some Computer Organizations and Their Effectiveness , 1972, IEEE Transactions on Computers.

[5]  Robert S. Boyer,et al.  A fast string searching algorithm , 1977, CACM.

[6]  Antonino Tumeo,et al.  Accelerating DNA analysis applications on GPU clusters , 2010, 2010 IEEE 8th Symposium on Application Specific Processors (SASP).

[7]  Kevin Skadron,et al.  Scalable parallel programming , 2008, 2008 IEEE Hot Chips 20 Symposium (HCS).

[8]  Lin Quan,et al.  The implementation of KMP algorithm based on MPI + OpenMP , 2012, FSKD.

[9]  Siu-Ming Yiu,et al.  Approximate string matching in DNA sequences , 2003, Eighth International Conference on Database Systems for Advanced Applications, 2003. (DASFAA 2003). Proceedings..

[10]  Suping Wu,et al.  Parallel research on KMP algorithm , 2011, 2011 International Conference on Consumer Electronics, Communications and Networks (CECNet).

[11]  Donald E. Knuth,et al.  Fast Pattern Matching in Strings , 1977, SIAM J. Comput..