Hostname: page-component-74656f9884-c52kr Total loading time: 0 Render date: 2026-11-07T12:06:57.466Z Has data issue: false hasContentIssue false

Linear algebra software for large-scale accelerated multicore computing*

Published online by Cambridge University Press:  23 May 2016

A. Abdelfattah
Affiliation:
Innovative Computing Laboratory, University of Tennessee, 1122 Volunteer BoulevardSuite 203 Claxton, Knoxville, TN 37996, USA E-mail: ahmad@icl.utk.edu, hanzt@icl.utk.edu, dongarra@icl.utk.edu, mgates3@icl.utk.edu, haidar@icl.utk.edu, kurza@icl.utk.edu, luszczek@icl.utk.edu, tomov@icl.utk.edu, iyamazak@icl.utk.edu, yarkhan@icl.utk.edu
H. Anzt
Affiliation:
Innovative Computing Laboratory, University of Tennessee, 1122 Volunteer BoulevardSuite 203 Claxton, Knoxville, TN 37996, USA E-mail: ahmad@icl.utk.edu, hanzt@icl.utk.edu, dongarra@icl.utk.edu, mgates3@icl.utk.edu, haidar@icl.utk.edu, kurza@icl.utk.edu, luszczek@icl.utk.edu, tomov@icl.utk.edu, iyamazak@icl.utk.edu, yarkhan@icl.utk.edu
J. Dongarra
Affiliation:
Innovative Computing Laboratory, University of Tennessee, 1122 Volunteer BoulevardSuite 203 Claxton, Knoxville, TN 37996, USA E-mail: ahmad@icl.utk.edu, hanzt@icl.utk.edu, dongarra@icl.utk.edu, mgates3@icl.utk.edu, haidar@icl.utk.edu, kurza@icl.utk.edu, luszczek@icl.utk.edu, tomov@icl.utk.edu, iyamazak@icl.utk.edu, yarkhan@icl.utk.edu
M. Gates
Affiliation:
Innovative Computing Laboratory, University of Tennessee, 1122 Volunteer BoulevardSuite 203 Claxton, Knoxville, TN 37996, USA E-mail: ahmad@icl.utk.edu, hanzt@icl.utk.edu, dongarra@icl.utk.edu, mgates3@icl.utk.edu, haidar@icl.utk.edu, kurza@icl.utk.edu, luszczek@icl.utk.edu, tomov@icl.utk.edu, iyamazak@icl.utk.edu, yarkhan@icl.utk.edu
A. Haidar
Affiliation:
Innovative Computing Laboratory, University of Tennessee, 1122 Volunteer BoulevardSuite 203 Claxton, Knoxville, TN 37996, USA E-mail: ahmad@icl.utk.edu, hanzt@icl.utk.edu, dongarra@icl.utk.edu, mgates3@icl.utk.edu, haidar@icl.utk.edu, kurza@icl.utk.edu, luszczek@icl.utk.edu, tomov@icl.utk.edu, iyamazak@icl.utk.edu, yarkhan@icl.utk.edu
J. Kurzak
Affiliation:
Innovative Computing Laboratory, University of Tennessee, 1122 Volunteer BoulevardSuite 203 Claxton, Knoxville, TN 37996, USA E-mail: ahmad@icl.utk.edu, hanzt@icl.utk.edu, dongarra@icl.utk.edu, mgates3@icl.utk.edu, haidar@icl.utk.edu, kurza@icl.utk.edu, luszczek@icl.utk.edu, tomov@icl.utk.edu, iyamazak@icl.utk.edu, yarkhan@icl.utk.edu
P. Luszczek
Affiliation:
Innovative Computing Laboratory, University of Tennessee, 1122 Volunteer BoulevardSuite 203 Claxton, Knoxville, TN 37996, USA E-mail: ahmad@icl.utk.edu, hanzt@icl.utk.edu, dongarra@icl.utk.edu, mgates3@icl.utk.edu, haidar@icl.utk.edu, kurza@icl.utk.edu, luszczek@icl.utk.edu, tomov@icl.utk.edu, iyamazak@icl.utk.edu, yarkhan@icl.utk.edu
S. Tomov
Affiliation:
Innovative Computing Laboratory, University of Tennessee, 1122 Volunteer BoulevardSuite 203 Claxton, Knoxville, TN 37996, USA E-mail: ahmad@icl.utk.edu, hanzt@icl.utk.edu, dongarra@icl.utk.edu, mgates3@icl.utk.edu, haidar@icl.utk.edu, kurza@icl.utk.edu, luszczek@icl.utk.edu, tomov@icl.utk.edu, iyamazak@icl.utk.edu, yarkhan@icl.utk.edu
I. Yamazaki
Affiliation:
Innovative Computing Laboratory, University of Tennessee, 1122 Volunteer BoulevardSuite 203 Claxton, Knoxville, TN 37996, USA E-mail: ahmad@icl.utk.edu, hanzt@icl.utk.edu, dongarra@icl.utk.edu, mgates3@icl.utk.edu, haidar@icl.utk.edu, kurza@icl.utk.edu, luszczek@icl.utk.edu, tomov@icl.utk.edu, iyamazak@icl.utk.edu, yarkhan@icl.utk.edu
A. YarKhan
Affiliation:
Innovative Computing Laboratory, University of Tennessee, 1122 Volunteer BoulevardSuite 203 Claxton, Knoxville, TN 37996, USA E-mail: ahmad@icl.utk.edu, hanzt@icl.utk.edu, dongarra@icl.utk.edu, mgates3@icl.utk.edu, haidar@icl.utk.edu, kurza@icl.utk.edu, luszczek@icl.utk.edu, tomov@icl.utk.edu, iyamazak@icl.utk.edu, yarkhan@icl.utk.edu
Rights & Permissions [Opens in a new window]

Abstract

Many crucial scientific computing applications, ranging from national security to medical advances, rely on high-performance linear algebra algorithms and technologies, underscoring their importance and broad impact. Here we present the state-of-the-art design and implementation practices for the acceleration of the predominant linear algebra algorithms on large-scale accelerated multicore systems. Examples are given with fundamental dense linear algebra algorithms – from the LU, QR, Cholesky, and LDLT factorizations needed for solving linear systems of equations, to eigenvalue and singular value decomposition (SVD) problems. The implementations presented are readily available via the open-source PLASMA and MAGMA libraries, which represent the next generation modernization of the popular LAPACK library for accelerated multicore systems.

To generate the extreme level of parallelism needed for the efficient use of these systems, algorithms of interest are redesigned and then split into well-chosen computational tasks. The task execution is scheduled over the computational components of a hybrid system of multicore CPUs with GPU accelerators and/or Xeon Phi coprocessors, using either static scheduling or light-weight runtime systems. The use of light-weight runtime systems keeps scheduling overheads low, similar to static scheduling, while enabling the expression of parallelism through sequential-like code. This simplifies the development effort and allows exploration of the unique strengths of the various hardware components. Finally, we emphasize the development of innovative linear algebra algorithms using three technologies – mixed precision arithmetic, batched operations, and asynchronous iterations – that are currently of high interest for accelerated multicore systems.

Information

Type
Research Article
Copyright
© Cambridge University Press, 2016 
Figure 0

Figure 1.1. LINPACK variant of LU factorization. This is the original FORTRAN 66 code; if LINPACK were written today it would use a modern Fortran standard.

Figure 1

Figure 1.2. LAPACK’s LU factorization routine DGETRF using FORTRAN 77.

Figure 2

Table 1.1. Comparison between parameters of DGEMM and PDGEMM.

Figure 3

Figure 3.1. The software stack of PLASMA, version 2.7.

Figure 4

Figure 3.2. Tile Cholesky algorithm using OpenMP 4.0 tasks with dependencies.

Figure 5

Figure 3.3. The DAG of a $4\times 4$ (tiles) Cholesky factorization.

Figure 6

Figure 3.4. Trace of a $9\times 9$ (tiles) Cholesky factorization.

Figure 7

Figure 3.5. Cholesky factorization performance: DPOTRF Intel Xeon E5-2650 v3 (Haswell) 2.3 GHz, 20 cores.

Figure 8

Figure 3.6. Cholesky factorization performance: DPOTRF AMD Opteron 8439 SE (Istanbul) 2.8 GHz, 48 cores (8 sockets, 6 cores).

Figure 9

Figure 3.7. Serial LU factorization.

Figure 10

Figure 3.8. The DAG of a $3\times 3$ (tiles) LU factorization.

Figure 11

Figure 3.9. Trace of a $10\times 10$ (tiles) LU factorization.

Figure 12

Figure 3.10. LU factorization performance: DGETRF Intel Xeon E5-2650 v3 (Haswell) 2.3 GHz, 20 cores.

Figure 13

Figure 3.11. LU factorization performance: DGETRF AMD Opteron 8439 SE (Istanbul) 2.8 GHz, 48 cores (8 sockets, 6 cores).

Figure 14

Figure 3.12. The software stack of PLASMA, version 1.2.

Figure 15

Figure 3.13. Tile Cholesky algorithm expressed using the JDF notation.

Figure 16

Figure 3.14. DAG execution in PaRSEC.

Figure 17

Figure 3.15. Cholesky factorization performance: DPOTRF Cray XT5 (Kraken).

Figure 18

Figure 3.16. Cholesky factorization performance: distributed hybrid DPOTRF Keeneland 64 nodes (1024 cores, 192 M2090 GPUs, InfiniBand 20G).

Figure 19

Figure 4.1. The block LU factorization (Level 3 BLAS algorithm of LAPACK).

Figure 20

Figure 4.2. Incremental LU factorization.

Figure 21

Figure 4.3. Example of tournament pivoting with $p_{r}=4$ processors, using a binary tree for the reduction operation.

Figure 22

Figure 4.4. Asymptotic performance comparison of LU factorization algorithms on AMD Opteron.

Figure 23

Figure 4.5. Asymptotic performance comparison of LU factorization algorithms on Intel Sandy Bridge.

Figure 24

Table 4.1. Summary of floating-point operations (add, multiply, divide), floating-point comparisons, best known growth factor bound, and average-case growth factor. Differences in flops compared to partial pivoting are shown in bold. References: [1] Trefethen and Schreiber (1990); [2] Grigori et al. (2011); [3] Buttari et al. (2009); [4] Baboulin et al. (2013); [5] Yeung and Chan (1995).

Figure 25

Table 4.2. Properties of test matrices and stability results of using partial pivoting $(n=m=30\,000)$.

Figure 26

Figure 4.6. Numerical accuracy of LU factorization algorithms, showing error before refinement (top point of each line) and after each refinement iteration (subsequent points). Number of iterations is given at the bottom of (a); ‘F’ indicates failure (e.g. overflow).

Figure 27

Figure 5.1. Graphical representation of one iteration of the outer loop of the tiled QR algorithm with a matrix with $3\times 3$ tiles.

Figure 28

Figure 6.1. Performance scalability of Cholesky factorization on multicore CPU and multiple accelerators (up to six NVIDIA Kepler K20c GPUs).

Figure 29

Figure 6.2. Performance scalability of Cholesky factorization on multicore CPU and multiple accelerators (up to three Xeon Phi accelerators).

Figure 30

Figure 7.1. Residual norms of blocked Aasen’s algorithm on a random matrix.

Figure 31

Figure 7.2. Parallel performance on random matrix with $n_{b}=250$ on up to eight $6$-core $2.8$ MHz AMD Opteron processors.

Figure 32

Figure 7.3. Performance of symmetric factorization on two 8-core Intel Xeon X5680 CPUs with an NVIDIA Kepler K20 GPU (double precision).

Figure 33

Figure 8.1. The percentage of the time spent in each phase of the SVD solver using the classical one-stage approach to compute the bidiagonal form.

Figure 34

Figure 8.2. Two-stage technique for the reduction phase.

Figure 35

Figure 8.3. Kernel execution of the BRD algorithm during the first stage.

Figure 36

Figure 8.4. Kernel execution of the BRD algorithm during the second stage.

Figure 37

Figure 8.5. (a) Tiling of $V_{1}$. (b) Blocking used to apply $V_{2}$.

Figure 38

Figure 8.6. The speedup obtained by our implementation of DGESDD versus its counterpart from the Intel MKL library on 48 AMD cores of system A.

Figure 39

Figure 8.7. The speedup obtained by our implementation of DGESDD versus its counterpart from the Intel MKL library on 16 Sandy Bridge cores of system B.

Figure 40

Figure 8.8. The speedup obtained by our implementation of DGESVD versus its counterpart from the Intel MKL library on 48 AMD cores of system A.

Figure 41

Figure 8.9. The speedup obtained by our implementation of DGESVD versus its counterpart from the Intel MKL library on 16 Sandy Bridge cores of system B.

Figure 42

Figure 8.10. The percentage of the time spent in each phase of the eigensolver using the classical one-stage approach for the tridiagonal reduction.

Figure 43

Figure 8.11. Two-stage technique for the reduction phase.

Figure 44

Figure 8.12. Two-stage technique for the reduction phase.

Figure 45

Figure 8.13. Speedup of our new two-stage implementation over the classic one-stage approach when both eigenvalues and eigenvectors are computed on 28 Intel E5-2697 cores.

Figure 46

Figure 8.14. Speedup of our new two-stage implementation over the classic one-stage approach when only eigenvalues are computed using 28 Intel Xeon E5-2697 cores.

Figure 47

Figure 8.15. Execution time and operation count of LAPACK eigenvalue solver (DGEEV), annotated with parallel speedup for 16 cores.

Figure 48

Figure 8.16. Execution time of Hessenberg reduction (DGEHRD) using two 8-core CPUs and up to three NVIDIA Kepler K40 GPUs. Dashed lines indicate performance bound, $P_{\max }=5P_{\text{GEMV}}$, for CPU and single GPU implementations.

Figure 49

Figure 8.17. Execution time of eigenvalue solver (DGEEV) using 16 cores, annotated with cumulative speedup with each improvement.

Figure 50

Figure 8.18. Parallel speedup of individual phases, for $p=16$ versus $p=1$.

Figure 51

Figure 8.19. Overall improvement of eigenvalue solver (DGEEV) compared to LAPACK, after various improvements, using $p=16$ threads.

Figure 52

Figure 9.1. Mixed precision, iterative refinement method from MAGMA 1.6.2 for the solution of dense linear systems on the NVIDIA’s TITAN X GPU.

Figure 53

Table 9.1. Performance improvements for direct sparse methods when going from a full double precision solve (reference time) to a mixed precision solve.

Figure 54

Table 9.2. Test matrices for sparse mixed precision, iterative refinement solution methods.

Figure 55

Figure 9.2. Mixed precision iterative refinement with FGMRES–GMRES$_{\text{SP}}$ from Algorithm 16 versus FGMRES–GMRES$_{\text{DP}}$.

Figure 56

Figure 9.3. Number of iterations needed for our mixed precision method (to converge to an accuracy better than the associated double precision solve) as a function of the condition number of the coefficient matrix, in the context of direct dense non-symmetric solves.

Figure 57

Figure 10.1. Schematic view of a batched one-sided factorization problem for a set of $k$ dense matrices.

Figure 58

Table 10.1. Panel factorization and trailing matrix update routines.

Figure 59

Figure 10.2. Execution trace of the batched LU factorization using either classical swap (a) or our new parallel swap (b).

Figure 60

Figure 10.3. Performance in Gflops of the different versions of our batched LU factorizations compared to the cuBLAS implementation for different matrix sizes, where $m=n$.

Figure 61

Figure 10.4. Recursive nested blocking.

Figure 62

Figure 10.5. Execution trace of the batched LU factorization using either classical GETF2 (a) or our recursive GETF2 (b).

Figure 63

Figure 10.6. The shape of the matrix $T$ for different levels of the recursion during the QR decomposition.

Figure 64

Figure 10.7. Performance comparison between streamed and batched DGEMM kernels for different $K$ and different matrix sizes when $m=n$.

Figure 65

Figure 10.8. Execution trace of the batched LU factorization using either batched DGEMM (a) or streamed/batched DGEMM (b).

Figure 66

Figure 10.9. Performance in Gflops of our different versions of the batched LU factorization compared to the cuBLAS implementation for different matrix sizes where $m=n$.

Figure 67

Figure 10.10. Performance of the GPU versus CPU versions of our batched Cholesky factorizations for different matrix sizes, where $m=n$.

Figure 68

Figure 10.11. Performance of the GPU versus CPU versions of our batched QR decomposition for different matrix sizes, where $m=n$.

Figure 69

Figure 10.12. Comparison of the power consumption for the QR decomposition of $4000$ matrices of size $512\times 512$.

Figure 70

Figure 11.1. (a) A $6\times 6$ mesh using a five-point stencil partitioned into nine subdomains of size $2\times 2$. The corresponding matrix (b) orders rows and columns subdomain by subdomain. The bold edges in the mesh correspond to the non-zeros in the matrix marked with squares, and identify the elements assigned to one of the thread blocks. (c) The partitioning of the matrix after applying reverse Cuthill–McKee (RCM) and using 12 partitions.

Figure 71

Table 11.1. PCG solver iteration counts using preconditioners constructed with up to five sweeps, and timings for five sweeps. IC denotes the exact factorization computed using NVIDIA’s cuSPARSE library. The speedup shown is that of five sweeps relative to IC.

Figure 72

Figure 11.2. Solving the sparse triangular systems for the lower and upper triangular ILU(0) factors of the Laplace problem in three dimensions using a 27-point stencil discretization on a $64\times 64\times 64$ grid. Convergence (a, c) and runtime (b, d) of synchronous Jacobi and block-asynchronous Jacobi (averaged results).