Abstract
The Approximate Minimum Degree (AMD) ordering algorithm is a critical heuristic for reducing fill-in during the factorization of sparse matrices. While numerical factorization has seen significant parallelization on modern architectures, AMD has remained a sequential bottleneck in sparse solver pipelines. This paper presents the first scalable shared-memory parallel implementation of AMD. By utilizing distance-2 independent sets for inter-elimination parallelism and employing specialized concurrent data structures, the proposed algorithm achieves up to a 7.29× speedup on 64 threads. Evaluation on large-scale matrices demonstrates that the parallel approach effectively reduces total execution time when paired with high-performance solvers, despite a modest increase in fill-in.
1. Introduction
In the solution of sparse linear systems, such as those found in Cholesky factorization, "fill-in" occurs when zero entries in the original matrix become non-zeros during the elimination process. This phenomenon significantly increases both memory usage and computational cost. To mitigate this, engineers use reordering heuristics like the Approximate Minimum Degree (AMD) algorithm to permute the matrix before factorization.
While the numerical factorization phase has been heavily parallelized for multi-core CPUs and GPUs, the AMD reordering step has historically remained sequential. As solvers continue to improve, this sequential preprocessing step is increasingly becoming the primary performance bottleneck. Previous attempts at parallelizing AMD often struggled with high memory contention or significant degradation in ordering quality.
2. Methodology
The proposed implementation shifts from traditional "intra-elimination" parallelism to "inter-elimination" parallelism, focusing on processing multiple elimination steps simultaneously.
2.1 Distance-2 Independent Sets
The key to achieving scalable parallelism without excessive synchronization is the use of distance-2 independent sets. While a standard independent set ensures no two selected nodes are adjacent, a distance-2 independent set ensures that no two selected "pivot" nodes share a common neighbor.
This property provides the necessary isolation for threads to update their respective neighborhoods concurrently without memory contention or overlapping updates, which is the primary challenge in parallelizing AMD.
2.2 Relaxed Selection and Concurrent Data Structures
To maintain high thread utilization, the algorithm relaxes the strict minimum degree requirement. Pivots are selected from a pool of candidates whose degrees are within a multiplicative factor ($mult$) of the absolute minimum.
Furthermore, the implementation utilizes specialized data structures to minimize overhead:
- Elbow Room: The algorithm pre-allocates 1.5× the required memory for the graph structure. Empirically, the authors found that connection updates never exceed this threshold, allowing them to avoid expensive dynamic reallocation and global synchronization during memory management.
- Affinity Arrays and Lazy Reclamation: Each thread maintains local degree lists. A shared affinity array tracks which thread holds the most up-to-date information for a specific vertex, enabling "lazy" updates and minimizing synchronization costs.
3. Experimental Evaluation
The algorithm was evaluated using 16 large-scale sparse matrices from the SuiteSparse and M3E collections, representing applications in 3D mesh problems, structural engineering, and fluid dynamics.
3.1 Performance and Scalability
The parallel implementation achieved a maximum speedup of 7.29× using 64 threads on an AMD EPYC 7763 CPU compared to the state-of-the-art sequential implementation. While most matrices scaled well, smaller matrices showed limited scaling as the available distance-2 independent sets were insufficient to saturate all threads.
3.2 Ordering Quality and End-to-End Impact
The parallel version typically produces a slightly higher fill-in ratio (approximately 1.1× that of the sequential version). However, when paired with a GPU-accelerated solver like cuDSS, the reduction in ordering time consistently outweighed the slight increase in factorization time, leading to a lower total execution time.
4. Conclusion
This work presents the first scalable parallel AMD implementation, successfully removing a long-standing sequential bottleneck in sparse solver pipelines. By prioritizing thread isolation through distance-2 independent sets and employing efficient concurrent data management, the authors demonstrate significant end-to-end performance gains. Future work will explore dynamic adaptation of the relaxation factor to further optimize the balance between parallelism and ordering quality.
Summary updated