High-throughput Pairwise Alignment with the Wavefront Algorithm using Processing-in-Memory

Safaa Diab, Amir Nassereldine, Mohammed Alser, Juan Gómez-Luna, Onur Mutlu, Izzat El Hajj · DOI

Introduction

Pairwise sequence alignment is a fundamental operation in genomics, used to determine the similarity between DNA sequences. As genomic datasets continue to expand, the computational burden of these alignments has become a significant bottleneck. The Wavefront Algorithm (WFA) is currently the state-of-the-art approach for this task; however, its performance on traditional CPU-based architectures is increasingly limited by the "memory wall." This paper presents the first efficient implementation of WFA for Processing-in-Memory (PIM) architectures, specifically leveraging the UPMEM system to overcome memory bandwidth constraints.

The Challenge: The Memory Wall in Genomics

In traditional von Neumann architectures, data must be moved from memory to the processor for every calculation. Sequence alignment involves massive amounts of data movement, which frequently saturates the available memory bandwidth. Consequently, adding more CPU cores often fails to improve performance because the cores remain idle while waiting for data.

Processing-in-Memory (PIM) offers a solution by placing functional processing units directly inside DRAM chips. This architecture provides massive aggregate bandwidth and significantly reduces the energy and time costs associated with data movement. This study utilizes the UPMEM PIM system, which consists of standard DDR4 DIMMs equipped with hundreds of small DRAM Processing Units (DPUs).

Implementation: Porting WFA to UPMEM

The researchers developed a custom implementation of WFA tailored for the constraints of the UPMEM architecture. Key technical challenges included:

  • Memory Hierarchy Management: Each DPU contains 64MB of slow Main RAM (MRAM) and a very limited 64KB fast scratchpad (WRAM). The authors implemented a custom allocator to manage this hierarchy and ensure strict 8-byte alignment required by the hardware.
  • Metadata Swapping: Because the 64KB WRAM is too small to store metadata for multiple concurrent threads, the implementation stores metadata in MRAM and swaps it into WRAM on demand.
  • Parallel Distribution: To maximize efficiency, a host CPU thread distributes read pairs across 2,560 DPUs. Each DPU thread operates independently, avoiding the performance penalties associated with inter-thread synchronization.
  • Hardware Constraints: To ensure a fair comparison with CPU baselines, the authors did not use PIM-specific optimizations and removed vectorization (SIMD) from the PIM version, as the current UPMEM hardware does not support it.

Experimental Results

The PIM-based WFA was evaluated using a dataset of 5 million genomic read pairs (100bp each) at edit distance thresholds ($E$) of 2% and 4%. The baseline for comparison was a high-end dual-socket server featuring two Intel Xeon Gold 5120 processors (56 total hardware threads).

Throughput and Scalability

The PIM system demonstrated significant performance gains over the CPU baseline:

  • Total Throughput: The PIM implementation achieved 4.87× higher throughput for a 2% edit distance and 4.05× for a 4% edit distance.
  • Kernel Performance: When excluding the time required to transfer data from the CPU to the PIM modules, the PIM system's computation was 37.4× faster (at 2% error) and 12.3× faster (at 4% error) than the CPU.

Crucially, the study confirmed that while CPU performance plateaus as thread counts increase due to bandwidth saturation, the PIM system scales linearly with the number of DPUs available.

Conclusion and Future Work

This work demonstrates that PIM architectures can effectively resolve the memory-bound nature of sequence alignment. By providing massive aggregate bandwidth, the UPMEM-based WFA implementation significantly outperforms high-end multi-core CPUs.

Future research will focus on extending this implementation to handle longer reads (such as those from Oxford Nanopore or PacBio) and higher edit distance thresholds, which will require more sophisticated memory management strategies. Additionally, the authors plan to benchmark PIM-WFA against other emerging PIM-based alignment algorithms to further refine the technology for large-scale genomic analysis.

Summary updated

BibTeX
@inproceedings{diab2022high,
  author = {Safaa Diab and Amir Nassereldine and Mohammed Alser and Juan Gómez-Luna and Onur Mutlu and Izzat El Hajj},
  title = {{High-throughput Pairwise Alignment with the Wavefront Algorithm using Processing-in-Memory}},
  booktitle = {Workshops @ IPDPS},
  year = {2022},
  url = {https://openreview.net/forum?id=9Ibb3xolpf},
}
Figure