Nonzero pattern analysis and memory access optimization in GPU-based sparse LU factorization for circuit simulation

Xiaoming Chen, Du Su, Yu Wang, Huazhong YangIA3@SC 2013

TL;DR

This paper tackles the performance bottleneck of sparse LU factorization in circuit simulation on GPUs by analyzing the irregular nonzero patterns and memory access characteristics. They propose a novel "crisscross blocked" GPU implementation that significantly outperforms existing methods, achieving up to 2.2x speedup over a multi-threaded CPU solver.

What Problem Does This Paper Address?

Circuit simulators, particularly those used for post-layout simulations of complex integrated circuits, rely heavily on sparse matrix solvers. These solvers, especially LU factorization, are computationally intensive and are repeated thousands of times during time-domain simulations. While GPUs offer massive parallelism, their performance is often hampered by the irregular structure of sparse matrices, leading to inefficient memory access patterns. Existing GPU-based sparse LU solvers, while faster than CPU counterparts, still fall far short of theoretical GPU peak performance. This paper aims to bridge this gap by understanding and exploiting the specific characteristics of sparse matrices arising from circuit simulations to optimize GPU LU factorization.

Methods

The authors first perform a theoretical analysis of the "nonzero patterns" in sparse LU factorization using an "elimination graph" model. This analysis reveals that the remaining submatrix tends to become denser as factorization progresses, particularly in the bottom-right corner.

Building on this, they analyze "memory access patterns" using novel visualization techniques: "Memory Request Distribution" (MemReqDist) and "Memory Access Stride Distribution" (MemStrdDist). These tools highlight that the bottom-right corner exhibits denser nonzeros, leading to more memory requests but smaller access strides, while other regions have sparser nonzeros with larger strides.

Based on these insights, they propose a "crisscross blocked LU factorization" approach. This method divides the matrix into four blocks and applies different strategies: sparse algorithms for the outer blocks and a dense algorithm for the dense bottom-right block. They also introduce a method for selecting an optimal "division point" to balance the performance of sparse and dense computations.

Datasets

The authors evaluated their approach using seventeen matrices from the University of Florida Sparse Matrix Collection. They specifically highlight the performance on "circuit matrices" and compare it with "non-circuit matrices" to demonstrate the effectiveness of their approach for the target domain.

Key Insights and Ideas

  • Irregularity is Key: The core challenge isn't just sparsity, but the irregularity of sparsity and its impact on GPU memory access.
  • Bottom-Right Dense Block: A crucial finding is the consistent emergence of a denser block in the bottom-right corner of the matrix during LU factorization of circuit matrices. This block behaves differently from the rest of the matrix.
  • Hybrid Approach is Optimal: Recognizing the distinct characteristics of the dense bottom-right block and the sparser outer regions suggests a hybrid strategy: use dense algorithms for the former and sparse algorithms for the latter.
  • GPU Memory Access Matters: The analysis of MemReqDist and MemStrdDist provides concrete evidence of how memory access patterns differ across the matrix and how this influences performance.
  • Optimizing the Division: The performance of the blocked approach is sensitive to the division point, and the paper proposes a method to find an optimal split to maximize overall speedup.

Key Results

  • The proposed crisscross blocked LU factorization achieves an average speedup of 1.68x compared to an unblocked GPU implementation.
  • It achieves an average speedup of 2.2x compared to a 4-threaded PARDISO solver (a multi-threaded CPU solver).
  • The dense LU factorization step within the blocked approach can achieve very high memory bandwidth (over 1000 GB/s), significantly exceeding the GPU's global memory bandwidth due to the use of shared memory.
  • The dense factorization part achieves about half of the theoretical peak performance of the NVIDIA GTX580 GPU.

Limitations and Future Work

  • Theoretical Analysis Limitations: The authors acknowledge that their theoretical analysis of nonzero patterns is not a strict proof and may not hold for all matrices, particularly those that can be permuted into a banded shape or have specific structures that avoid fill-ins. However, they argue these special cases are less common in circuit simulation.
  • Division Point Selection: While they propose a method for selecting the division point, it relies on fitting performance models. Future work could explore more adaptive or dynamic methods for determining this point.
  • Further Performance Gains: The authors note that the performance of the dense LU factorization component is still significantly below the GPU's peak, suggesting that further improvements in dense kernel optimization could lead to even greater overall speedups. They also mention that the performance of the proposed blocked LU factorization can be further increased if the performance of dense LU factorization is improved.

Summary updated

BibTeX
@inproceedings{chen2013nonzero,
  author = {Xiaoming Chen and Du Su and Yu Wang and Huazhong Yang},
  title = {{Nonzero pattern analysis and memory access optimization in GPU-based sparse LU factorization for circuit simulation}},
  booktitle = {IA3@SC},
  year = {2013},
  doi = {10.1145/2535753.2535763},
}

Loading related content...

Figure