TL;DR
This paper introduces MSREP, a novel framework for efficiently handling sparse matrix operations across multiple GPUs. By augmenting common sparse matrix formats (CSR, CSC, COO) and implementing a balanced workload distribution strategy, MSREP significantly boosts performance for tasks like sparse matrix-vector multiplication (SpMV) on modern multi-GPU systems.
What Problem Does This Paper Address?
As datasets grow and computational demands increase, a single GPU is no longer sufficient for many scientific and data analytics applications that rely on sparse linear algebra. While multi-GPU systems are becoming commonplace, effectively distributing sparse computations across them is challenging. Unlike dense operations, the inherent sparsity of matrices makes it difficult to balance the workload evenly among GPUs, leading to performance bottlenecks. Existing solutions often struggle with communication overhead or fail to fully utilize high-speed interconnects like NVLink. This paper aims to bridge this gap by providing a scalable and efficient framework for multi-GPU sparse linear algebra.
Methods
The core of MSREP lies in its novel "partial" sparse matrix formats: pCSR, pCSC, and pCOO. These formats allow for fine-grained partitioning of sparse matrices, enabling better workload distribution. They are designed to be efficiently converted from standard CSR, CSC, and COO formats with minimal overhead. The framework also incorporates a multi-threaded approach for workload partitioning and management across GPUs. For SpMV, the paper details how these partial formats are used to distribute computations, and crucially, how partial results are merged efficiently. The framework also considers NUMA effects, optimizing data placement and movement between CPU and GPU memory across different NUMA nodes.
Datasets
The evaluation uses matrices from the SuitSparse Matrix Collection, specifically noting matrices with strong power-law characteristics, which are common in real-world applications like social networks and web graphs. Specific matrices mentioned include HV15R, com-Orkut, mouse_gene, hollywood-2009, com-LiveJournal, and wb-edu. No new benchmark datasets were introduced.
Key Insights and Ideas
- Sparsity is the enemy of balanced distribution: Unlike dense matrices where simply dividing rows or columns works well, the irregular distribution of non-zero elements in sparse matrices makes naive partitioning lead to significant workload imbalance.
- Augmenting existing formats is key: Instead of creating entirely new formats, enhancing popular ones like CSR, CSC, and COO with "partial" versions (pCSR, pCSC, pCOO) allows MSREP to leverage existing optimized single-GPU kernels and libraries.
- Fine-grained partitioning is crucial: The pCSR, pCSC, and pCOO formats enable splitting matrices into smaller, manageable chunks that can be distributed more evenly, leading to better GPU utilization.
- NUMA awareness matters for scaling: On multi-socket systems with multiple GPUs per socket (like Summit), naive data placement can create bottlenecks. MSREP's two-level partitioning strategy addresses this by distributing workloads across NUMA nodes and then across GPUs within those nodes.
- Efficient result merging is non-trivial: How partial results are combined significantly impacts performance, especially for CSC formats. MSREP proposes strategies to optimize this merging process, often involving GPU acceleration.
Key Results
The MSREP framework, particularly with optimizations (p*-opt), demonstrated significant speedups on multi-GPU systems.
- On the Summit supercomputer, using 6 GPUs, MSREP achieved a 5.5x speedup.
- On an NVIDIA V100-DGX-1 system, using 8 GPUs, MSREP achieved a 6.2x speedup.
- The framework showed near linear speedup with an increasing number of GPUs when all optimizations were applied.
- Partitioning overhead was significantly reduced (to <2%) with optimizations, especially for COO formats which initially had very high overhead (up to 85%).
- NUMA-aware design was shown to be critical for scaling beyond 3 GPUs on systems like Summit.
Limitations and Future Work
- Overhead of partitioning: While optimized, the partitioning process itself can still introduce overhead, particularly for COO formats. The paper notes that this overhead can be up to 85% in some cases before optimizations.
- CPU involvement: While GPUs are leveraged for computation, some partitioning and result merging steps still involve the CPU, which can become a bottleneck.
- Future Work: The authors suggest that their framework can be extended to support other sparse linear algebra kernels beyond SpMV. They also highlight the potential for MSREP to benefit graph algorithms and other applications that rely on sparse matrix operations, especially in the context of distributed GPU systems and GraphBLAS. The compatibility with existing single-GPU kernels is a key enabler for future integration.
Summary updated