Accelerating the eigensolver on GPUs is getting more and more attention due to its ubiquitous usage in scientific and engineering fields. However, it is very challenging to achieve high performance on eigensolvers because of the intricate computational patterns which cause inefficient memory access and workload imbalance on GPUs. In this work, we propose a series of optimizations for generalized dense symmetric eigenvalue problems from both the system and operator perspectives on AMD GPUs. Firstly, we adjust the workload assignments between CPUs and GPUs and find the computational performance balance between different levels of computation. Besides, we propose a multi-level pre-aggregation strategy for symmetric matrix-vector multiplication (SYMV) and general matrix-vector multiplication (GEMV) operators to tackle the performance issue caused by lacking hardware support for atomic operation. Furthermore, we optimize Cholesky decomposition and SYR2K by adopting a better overlapping method and utilizing symmetry to reduce computation. Experiments on AMD MI60 GPUs show that our optimized eigensolver outperforms the previous state-of-the-art with roughly 1.8x–3.8x speedups.
- Article type
- Year
- Co-author
With the advent of the big data era, the amounts of sampling data and the dimensions of data features are rapidly growing. It is highly desired to enable fast and efficient clustering of unlabeled samples based on feature similarities. As a fundamental primitive for data clustering, the k-means operation is receiving increasingly more attentions today. To achieve high performance k-means computations on modern multi-core/many-core systems, we propose a matrix-based fused framework that can achieve high performance by conducting computations on a distance matrix and at the same time can improve the memory reuse through the fusion of the distance-matrix computation and the nearest centroids reduction. We implement and optimize the parallel k-means algorithm on the SW26010 many-core processor, which is the major horsepower of Sunway TaihuLight. In particular, we design a task mapping strategy for load-balanced task distribution, a data sharing scheme to reduce the memory footprint and a register blocking strategy to increase the data locality. Optimization techniques such as instruction reordering and double buffering are further applied to improve the sustained performance. Discussions on block-size tuning and performance modeling are also presented. We show by experiments on both randomly generated and real-world datasets that our parallel implementation of k-means on SW26010 can sustain a double-precision performance of over 348.1 Gflops, which is 46.9% of the peak performance and 84% of the theoretical performance upper bound on a single core group, and can achieve a nearly ideal scalability to the whole SW26010 processor of four core groups. Performance comparisons with the previous state-of-the-art on both CPU and GPU are also provided to show the superiority of our optimized k-means kernel.
京公网安备11010802044758号