Abstract
Pairwise sequence alignment is a critical bottleneck in long-read genomic sequencing. While the X-drop heuristic effectively prunes the search space to manage computational costs, its adaptive nature makes it difficult to implement efficiently on GPUs. This paper presents LOGAN, the first high-performance GPU implementation of the X-drop algorithm. By employing multi-level parallelism and hardware-aware optimizations such as memory coalescing and reduced memory footprints, LOGAN achieves up to a 30.7× speedup over state-of-the-art CPU-based tools, reaching a throughput of 181.6 GCUPS on a single NVIDIA V100 GPU.
Introduction
Pairwise sequence alignment—the process of determining similarity between two DNA strings—is the fundamental "workhorse" of bioinformatics. However, it faces a massive scaling challenge as sequencing technology shifts from short fragments to "long reads" (ranging from 1Kb to 1Mb). Traditional exact algorithms, such as Smith-Waterman, possess a quadratic time complexity ($O(mn)$), causing computational costs to explode as read lengths increase.
To mitigate this, researchers utilize heuristics like the X-drop algorithm. X-drop saves time by "dropping" an alignment path if its score falls too far below the current maximum, effectively pruning the search space. While X-drop is widely used in CPU-based software (e.g., BLAST and minimap2), it is notoriously difficult to implement on GPUs. Its adaptive nature—where the active computation "band" changes dynamically based on the data—makes it challenging to achieve the regular, predictable workloads that GPU architectures require.
Methods
The authors introduce LOGAN (High-Performance GPU-Based X-Drop), which manages the irregularities of X-drop through three distinct levels of parallelism:
- Intra-sequence Parallelism: A single alignment is computed across threads within a GPU block. To handle the dynamic width of the X-drop band, anti-diagonals are split into segments, and in-warp reductions (using registers) are used to quickly find the maximum score across threads.
- Inter-sequence Parallelism: Multiple pairs of sequences are aligned simultaneously by assigning each pair to a different GPU block.
- Multi-GPU Parallelism: A host-side load balancer distributes batches of alignments across multiple GPUs to ensure high hardware utilization.
Hardware-Aware Optimizations
Beyond parallelism, LOGAN incorporates several key optimizations to maximize GPU performance:
- Memory Coalescing: By reversing one sequence in each pair, the GPU can read both sequences in a "coalesced" manner (adjacent threads reading adjacent memory), which is critical for maximizing memory bandwidth.
- Reduced Memory Footprint: Instead of storing the entire $O(mn)$ matrix, LOGAN only stores three anti-diagonals at a time, significantly reducing the memory required per alignment and allowing more concurrent computations.
Key Results and Evaluation
LOGAN was evaluated using synthetic benchmarks (100,000 read pairs) and real-world genomic data, including an E. coli dataset and a large C. elegans dataset. It was compared against SeqAn (standard CPU X-drop) and ksw2 (the alignment kernel in minimap2).
- Raw Throughput: LOGAN achieved up to 181.6 GCUPS (Giga Cell Updates Per Second) on a single GPU.
- Significant Speedups: Compared to SeqAn running on 168 CPU threads, LOGAN was 6.6× faster on one GPU and 30.7× faster on six GPUs. It also outperformed the vectorized ksw2 kernel by 2.3×.
- Real-World Impact: When integrated into the BELLA long-read mapper, LOGAN improved total runtime by up to 10.6×, reducing hours of computation to mere minutes.
Conclusion and Future Work
LOGAN demonstrates that the irregular search space of X-drop can be tamed on a GPU through dynamic thread scheduling and hardware-centric design. By adapting the Roofline Model, the authors showed that LOGAN operates near the theoretical compute-bound maximum of the NVIDIA V100.
Future work will focus on refining the host-side load balancer to improve linear scaling across larger GPU clusters and extending the implementation to support protein alignment, which requires different scoring matrices. Additionally, the authors plan to implement "traceback" functionality to provide the actual alignment path alongside the score.
Summary updated