CUDASW++: optimizing Smith-Waterman sequence database searches for CUDA-enabled graphics processing units

Yongchao Liu, Douglas L. Maskell, Bertil SchmidtBMC 2009

Abstract

CUDASW++ is an open-source software tool designed to accelerate Smith-Waterman protein sequence database searches by leveraging the parallel compute capabilities of NVIDIA GPUs. By implementing a dual-stage parallelization strategy and optimizing memory access patterns, CUDASW++ achieves significant performance gains over previous CPU and GPU-based implementations, reaching speeds of up to 16.087 billion cell updates per second (GCUPS).

Introduction

The Smith-Waterman (SW) algorithm is the gold standard for biological sequence alignment, providing mathematically optimal local alignments through dynamic programming. However, its $O(mn)$ computational complexity makes it prohibitively slow for large-scale database searches on traditional CPUs. While heuristic methods like BLAST offer speed, they sacrifice sensitivity. CUDASW++ addresses this bottleneck by harnessing the massive parallelism of CUDA-enabled graphics processing units (GPUs) to make optimal alignment practical for modern genomic research.

Methodology: Novel Parallelization and Memory Management

The core innovation of CUDASW++ lies in how it distributes workloads and manages memory to maximize GPU throughput:

  • Two-Stage Parallelization: The system uses a threshold (3,072 amino acids) to switch between strategies. Inter-task parallelization is used for shorter sequences, where each GPU thread handles one independent alignment. For longer sequences, intra-task parallelization allows multiple threads to cooperate on a single alignment matrix, exploiting parallelism along the matrix diagonals.
  • Memory Coalescing: Subject sequences are sorted by length before processing. This ensures that threads within a "warp" (32 threads) access memory in a synchronized, contiguous fashion, preventing the GPU from idling while waiting for data.
  • Cell Block Division: The alignment matrix is divided into $8 \times 8$ blocks. This allows the system to perform multiple calculations using fast registers before writing results back to slower global memory, drastically reducing bandwidth demand.
  • Constant Memory Utilization: Query sequences and scoring matrices are stored in the GPU’s cached "constant memory," providing high-speed access for all threads simultaneously.

Performance Results

Performance is measured in GCUPS (Giga Cell Updates Per Second), representing billions of dynamic programming cells calculated per second. Benchmarks were conducted using the Swiss-Prot Release 56.6 database (over 400,000 sequences) with query sequences ranging from 144 to 5,478 amino acids.

Performance comparison of CUDASW++ (Single and Multi-GPU) against SWPS3/SSE2 across various query sequence lengths.

Key findings include:

  • Single GPU (GTX 280): Achieved an average of 9.509 GCUPS, with a peak of 9.660 GCUPS.
  • Dual GPU (GTX 295): Achieved an average of 14.484 GCUPS, with a peak of 16.087 GCUPS.
  • Comparison: CUDASW++ significantly outperformed existing tools, proving roughly 3x faster than the previous GPU-based SW-CUDA and outstripping SIMD-optimized CPU versions like SWPS3 for the majority of query lengths.

Discussion and Limitations

The authors noted that certain "SWAT-like" optimizations—which skip calculations for low-scoring cells—actually reduced performance on GPUs. This is because the conditional logic required for skipping caused "thread divergence," breaking the massive parallelism that makes GPUs efficient.

CUDASW++ demonstrates that with hardware-specific optimization, researchers do not have to choose between the speed of heuristic methods and the mathematical sensitivity of Smith-Waterman. As many-core architectures evolve, CUDASW++ provides a robust framework for high-throughput biological sequence analysis.

Summary updated

BibTeX
@inproceedings{liu2009cudasw,
  author = {Yongchao Liu and Douglas L. Maskell and Bertil Schmidt},
  title = {{CUDASW++: optimizing Smith-Waterman sequence database searches for CUDA-enabled graphics processing units}},
  booktitle = {BMC},
  year = {2009},
  doi = {10.1186/1756-0500-2-73},
}
Figure