A Compiler for Linear Algebra Operations

Size: px
Start display at page:

Download "A Compiler for Linear Algebra Operations"

Transcription

1 A Compiler for Linear Algebra Operations Paolo Bientinesi In collaboration with Diego Fabregat AICES, RWTH Aachen CScADS Autotuning Workshop 2012 August 13-14, 2012 Snowbird, Utah Paolo Bientinesi (AICES, RWTH Aachen) A Compiler for Linear Algebra Operations August 13-14, / 20

2 1 Objective 2 Automation: CLAK 3 Algorithms and results 4 Conclusions & future work Paolo Bientinesi (AICES, RWTH Aachen) A Compiler for Linear Algebra Operations August 13-14, / 20

3 int main( ) { double vec[] = {.0, 0.1, 1.2, 3.3, -4.0, -55,.66, 7}; int i; for( i=0; i<6; i++ ) printf(" array[%d]=%g\n", i, vec[i] ); } return( 0 ); Paolo Bientinesi (AICES, RWTH Aachen) A Compiler for Linear Algebra Operations August 13-14, / 20

4 int main( ) { double vec[] = {.0, 0.1, 1.2, 3.3, -4.0, -55,.66, 7}; } int i; for( i=0; i<6; i++ ) printf(" array[%d]=%g\n", i, vec[i] ); return( 0 ); [...] L3: movl -4(%rbp), %eax cltq movsd -96(%rbp,%rax,8), %xmm0 movl -4(%rbp), %esi leaq LC10(%rip), %rdi movl $1, %eax call _printf incl -4(%rbp) L2: cmpl $9, -4(%rbp) jle L3 movl $0, %eax leave ret Paolo Bientinesi (AICES, RWTH Aachen) A Compiler for Linear Algebra Operations August 13-14, / 20

5 M := L 1 AL T Paolo Bientinesi (AICES, RWTH Aachen) A Compiler for Linear Algebra Operations August 13-14, / 20

6 M := L 1 AL T >> M = inv(l) * A * inv(l ); Paolo Bientinesi (AICES, RWTH Aachen) A Compiler for Linear Algebra Operations August 13-14, / 20

7 M := L 1 AL T >> M = inv(l) * A * inv(l ); >> M == M ans = Paolo Bientinesi (AICES, RWTH Aachen) A Compiler for Linear Algebra Operations August 13-14, / 20

8 M := L 1 AL T >> M = L \ A / L ; Paolo Bientinesi (AICES, RWTH Aachen) A Compiler for Linear Algebra Operations August 13-14, / 20

9 M := L 1 AL T >> M = L \ A / L ; >> M == M ans = Paolo Bientinesi (AICES, RWTH Aachen) A Compiler for Linear Algebra Operations August 13-14, / 20

10 M := L 1 AL T >> M = L \ A / L ; >> M = tril(m,-1) + tril(m,-1) + diag(real(diag(m))); Paolo Bientinesi (AICES, RWTH Aachen) A Compiler for Linear Algebra Operations August 13-14, / 20

11 M := L 1 AL T >> M = L \ A / L ; >> M = tril(m,-1) + tril(m,-1) + diag(real(diag(m))); >> M == M ans = Paolo Bientinesi (AICES, RWTH Aachen) A Compiler for Linear Algebra Operations August 13-14, / 20

12 Domain-specific Compiler Input: M := L^-1 * A * L^-T; Input(A, L); Output(M); Hermitian(A); LowerTriangular(L); Paolo Bientinesi (AICES, RWTH Aachen) A Compiler for Linear Algebra Operations August 13-14, / 20

13 Domain-specific Compiler Input: M := L^-1 * A * L^-T; Input(A, L); Output(M); Hermitian(A); LowerTriangular(L); Objectives Express M in terms of available building blocks (BLAS, LAPACK,... ) Paolo Bientinesi (AICES, RWTH Aachen) A Compiler for Linear Algebra Operations August 13-14, / 20

14 Domain-specific Compiler Input: M := L^-1 * A * L^-T; Input(A, L); Output(M); Hermitian(A); LowerTriangular(L); Objectives Express M in terms of available building blocks (BLAS, LAPACK,... ) High-performance Paolo Bientinesi (AICES, RWTH Aachen) A Compiler for Linear Algebra Operations August 13-14, / 20

15 Domain-specific Compiler Input: M := L^-1 * A * L^-T; Input(A, L); Output(M); Hermitian(A); LowerTriangular(L); Objectives Express M in terms of available building blocks (BLAS, LAPACK,... ) High-performance Exploit problem-specific knowledge Paolo Bientinesi (AICES, RWTH Aachen) A Compiler for Linear Algebra Operations August 13-14, / 20

16 Domain-specific Compiler Input: M := L^-1 * A * L^-T; Input(A, L); Output(M); Hermitian(A); LowerTriangular(L); Objectives Express M in terms of available building blocks (BLAS, LAPACK,... ) High-performance Exploit problem-specific knowledge One vs. many algorithms Paolo Bientinesi (AICES, RWTH Aachen) A Compiler for Linear Algebra Operations August 13-14, / 20

17 What this is talk is NOT about {LU = A, A, L, U R n n, LowerTriUni(L), UpperTri(U)} ( ) AT L A T R Partition A A BL A BR where A T L is 0 0 While size(a T L ) < size(a) do Repartition ( ) A AT L A 00 A 01 A 02 T R A A BL A 10 A 11 A 12 BR A 20 A 21 A 22 A 01 := L 1 00 A01 A 10 := A 10U 1 00 A 11 := LU(A 11 A 10A 01) Continue ( ) A AT L A 00 A 01 A 02 T R A 10 A 11 A 12 A BL A BR A 20 A 21 A 22 endwhile Paolo Bientinesi (AICES, RWTH Aachen) A Compiler for Linear Algebra Operations August 13-14, / 20

18 What this is talk is NOT about ( AT L A T R Partition A A BL A BR where A T L is 0 0 While size(a T L ) < size(a) do Repartition ( ) A {LU = A, AT L A 00 A 01 A 02 T R A A, L, U R n n A BL A 10 A 11 A 12 BR, A 20 A 21 A 22 LowerTriUni(L), A 01 := L 1 00 A01 UpperTri(U)} A 10 := A 10U 1 00 A 11 := LU(A 11 A 10A 01) Continue ( ) A AT L A 00 A 01 A 02 T R A 10 A 11 A 12 A BL A BR A 20 A 21 A 22 endwhile ) Paolo Bientinesi (AICES, RWTH Aachen) A Compiler for Linear Algebra Operations August 13-14, / 20

19 Target operations b := ( X T M 1 X ) 1 X T M 1 y Paolo Bientinesi (AICES, RWTH Aachen) A Compiler for Linear Algebra Operations August 13-14, / 20

20 Target operations b := ( X T M 1 X ) 1 X T M 1 y d (Ax = b) dv =? Paolo Bientinesi (AICES, RWTH Aachen) A Compiler for Linear Algebra Operations August 13-14, / 20

21 Target operations b := ( X T M 1 X ) 1 X T M 1 y d (Ax = b) dv =? { b := ( X T M 1 X ) 1 X T M 1 y M := hφ + (1 h)i Paolo Bientinesi (AICES, RWTH Aachen) A Compiler for Linear Algebra Operations August 13-14, / 20

22 Target operations b := ( X T M 1 X ) 1 X T M 1 y d (Ax = b) dv =? { b := ( X T M 1 X ) 1 X T M 1 y M := hφ + (1 h)i Ax i = y i with i = 1... n Paolo Bientinesi (AICES, RWTH Aachen) A Compiler for Linear Algebra Operations August 13-14, / 20

23 Example Linear regression with non-independent outcomes b := ( X T M 1 X ) 1 X T M 1 y Genome-wide association study Inputs M R n n, SP D(M), n [10 3,..., 10 4 ] X R n p, p [1,..., 20] y R n Output b R p To be repeated thousands of times Paolo Bientinesi (AICES, RWTH Aachen) A Compiler for Linear Algebra Operations August 13-14, / 20

24 Algorithm: full breakdown b := ( X T M 1 X ) 1 X T M 1 y Paolo Bientinesi (AICES, RWTH Aachen) A Compiler for Linear Algebra Operations August 13-14, / 20

25 Algorithm: full breakdown b := ( X T M 1 X ) 1 X T M 1 y 1 LL T = M Chol Fact Paolo Bientinesi (AICES, RWTH Aachen) A Compiler for Linear Algebra Operations August 13-14, / 20

26 Algorithm: full breakdown b := ( X T (LL T ) 1 X ) 1 X T (LL T ) 1 y 1 LL T = M Chol Fact Paolo Bientinesi (AICES, RWTH Aachen) A Compiler for Linear Algebra Operations August 13-14, / 20

27 Algorithm: full breakdown b := ( X T L T L 1 X ) 1 X T L T L 1 y 1 LL T = M Chol Fact Paolo Bientinesi (AICES, RWTH Aachen) A Compiler for Linear Algebra Operations August 13-14, / 20

28 Algorithm: full breakdown b := ( X T L T L 1 X ) 1 X T L T L 1 y 1 LL T = M Chol Fact 2 X T X T L T TRSM Paolo Bientinesi (AICES, RWTH Aachen) A Compiler for Linear Algebra Operations August 13-14, / 20

29 Algorithm: full breakdown b := ( X T X ) 1 X T L 1 y 1 LL T = M Chol Fact 2 X T X T L T TRSM Paolo Bientinesi (AICES, RWTH Aachen) A Compiler for Linear Algebra Operations August 13-14, / 20

30 Algorithm: full breakdown b := ( X T X ) 1 X T L 1 y 1 LL T = M Chol Fact 2 X T X T L T TRSM 3 y L 1 y TRSV Paolo Bientinesi (AICES, RWTH Aachen) A Compiler for Linear Algebra Operations August 13-14, / 20

31 Algorithm: full breakdown b := ( X T X ) 1 X T y 1 LL T = M Chol Fact 2 X T X T L T TRSM 3 y L 1 y TRSV Paolo Bientinesi (AICES, RWTH Aachen) A Compiler for Linear Algebra Operations August 13-14, / 20

32 Algorithm: full breakdown b := ( X T X ) 1 X T y 1 LL T = M Chol Fact 2 X T X T L T TRSM 3 y L 1 y TRSV 4 b (X T X) 1 X T y DGELS Paolo Bientinesi (AICES, RWTH Aachen) A Compiler for Linear Algebra Operations August 13-14, / 20

33 Algorithm: full breakdown b := ( X T X ) 1 X T L 1 y 1 LL T = M Chol Fact 2 X T X T L T TRSM Paolo Bientinesi (AICES, RWTH Aachen) A Compiler for Linear Algebra Operations August 13-14, / 20

34 Algorithm: full breakdown b := ( X T X ) 1 X T L 1 y 1 LL T = M Chol Fact 2 X T X T L T TRSM 3 QR = X QR Fact Paolo Bientinesi (AICES, RWTH Aachen) A Compiler for Linear Algebra Operations August 13-14, / 20

35 Algorithm: full breakdown b := ( R T Q T Q R ) 1 R T Q T L 1 y 1 LL T = M Chol Fact 2 X T X T L T TRSM 3 QR = X QR Fact Paolo Bientinesi (AICES, RWTH Aachen) A Compiler for Linear Algebra Operations August 13-14, / 20

36 Algorithm: full breakdown b := ( R T ( Q T Q ) R ) 1 R T Q T L 1 y 1 LL T = M Chol Fact 2 X T X T L T TRSM 3 QR = X QR Fact Paolo Bientinesi (AICES, RWTH Aachen) A Compiler for Linear Algebra Operations August 13-14, / 20

37 Algorithm: full breakdown b := ( R T R ) 1 R T Q T L 1 y 1 LL T = M Chol Fact 2 X T X T L T TRSM 3 QR = X QR Fact Paolo Bientinesi (AICES, RWTH Aachen) A Compiler for Linear Algebra Operations August 13-14, / 20

38 Algorithm: full breakdown b := R 1 R T R T Q T L 1 y 1 LL T = M Chol Fact 2 X T X T L T TRSM 3 QR = X QR Fact Paolo Bientinesi (AICES, RWTH Aachen) A Compiler for Linear Algebra Operations August 13-14, / 20

39 Algorithm: full breakdown b := R 1 ( R T R T ) Q T L 1 y 1 LL T = M Chol Fact 2 X T X T L T TRSM 3 QR = X QR Fact Paolo Bientinesi (AICES, RWTH Aachen) A Compiler for Linear Algebra Operations August 13-14, / 20

40 Algorithm: full breakdown b := R 1 Q T L 1 y 1 LL T = M Chol Fact 2 X T X T L T TRSM 3 QR = X QR Fact Paolo Bientinesi (AICES, RWTH Aachen) A Compiler for Linear Algebra Operations August 13-14, / 20

41 Algorithm: full breakdown b := R 1 Q T L 1 y 1 LL T = M Chol Fact 2 X T X T L T TRSM 3 QR = X QR Fact 4 y L 1 y TRSV Paolo Bientinesi (AICES, RWTH Aachen) A Compiler for Linear Algebra Operations August 13-14, / 20

42 Algorithm: full breakdown b := R 1 Q T y 1 LL T = M Chol Fact 2 X T X T L T TRSM 3 QR = X QR Fact 4 y L 1 y TRSV 5 b Q T y GEMV Paolo Bientinesi (AICES, RWTH Aachen) A Compiler for Linear Algebra Operations August 13-14, / 20

43 Algorithm: full breakdown b := R 1 b 1 LL T = M Chol Fact 2 X T X T L T TRSM 3 QR = X QR Fact 4 y L 1 y TRSV 5 b Q T y GEMV 6 b R 1 b TRSV Paolo Bientinesi (AICES, RWTH Aachen) A Compiler for Linear Algebra Operations August 13-14, / 20

44 1 Objective 2 Automation: CLAK 3 Algorithms and results 4 Conclusions & future work Paolo Bientinesi (AICES, RWTH Aachen) A Compiler for Linear Algebra Operations August 13-14, / 20

45 CLAK Domain-specific compiler Symbolic system (Mathematica) Paolo Bientinesi (AICES, RWTH Aachen) A Compiler for Linear Algebra Operations August 13-14, / 20

46 CLAK Domain-specific compiler Symbolic system (Mathematica) Pattern matching & rewrite rules Constructive: no exhaustive search Paolo Bientinesi (AICES, RWTH Aachen) A Compiler for Linear Algebra Operations August 13-14, / 20

47 CLAK Domain-specific compiler Symbolic system (Mathematica) Pattern matching & rewrite rules Constructive: no exhaustive search Knowledge: 1) encoded + 2) derived Paolo Bientinesi (AICES, RWTH Aachen) A Compiler for Linear Algebra Operations August 13-14, / 20

48 CLAK Domain-specific compiler Symbolic system (Mathematica) Pattern matching & rewrite rules Constructive: no exhaustive search Knowledge: 1) encoded + 2) derived Matrix algebra Sequences dependencies Inference of properties Cost analysis Building blocks Code generation Paolo Bientinesi (AICES, RWTH Aachen) A Compiler for Linear Algebra Operations August 13-14, / 20

49 1) Knowledge encoded Operand types: scalars, vectors, matrices Size: (1 m) (1 n) Properties: full rank, orthogonal, symmetric, triangular, SPD, diagonal, identity,... Paolo Bientinesi (AICES, RWTH Aachen) A Compiler for Linear Algebra Operations August 13-14, / 20

50 1) Knowledge encoded Operand types: scalars, vectors, matrices Size: (1 m) (1 n) Properties: full rank, orthogonal, symmetric, triangular, SPD, diagonal, identity,... Linear Algebra operators: +, -,, T, 1 Linear Algebra properties: precedence, associativity, commutativity, distributivity of transposition and inversion... Paolo Bientinesi (AICES, RWTH Aachen) A Compiler for Linear Algebra Operations August 13-14, / 20

51 1) Knowledge encoded Operand types: scalars, vectors, matrices Size: (1 m) (1 n) Properties: full rank, orthogonal, symmetric, triangular, SPD, diagonal, identity,... Linear Algebra operators: +, -,, T, 1 Linear Algebra properties: precedence, associativity, commutativity, distributivity of transposition and inversion... Interface to building blocks Paolo Bientinesi (AICES, RWTH Aachen) A Compiler for Linear Algebra Operations August 13-14, / 20

52 1) Knowledge encoded Operand types: scalars, vectors, matrices Size: (1 m) (1 n) Properties: full rank, orthogonal, symmetric, triangular, SPD, diagonal, identity,... Linear Algebra operators: +, -,, T, 1 Linear Algebra properties: precedence, associativity, commutativity, distributivity of transposition and inversion... Interface to building blocks Guidelines, priorities Paolo Bientinesi (AICES, RWTH Aachen) A Compiler for Linear Algebra Operations August 13-14, / 20

53 2) Knowledge inferred Operand type and size X R n p, M R n n X T M 1 X R p p Paolo Bientinesi (AICES, RWTH Aachen) A Compiler for Linear Algebra Operations August 13-14, / 20

54 2) Knowledge inferred Operand type and size X R n p, M R n n X T M 1 X R p p Properties L is lower tri., D is diagonal, U is upper tri. LD 1 U T is lower triangular X is full rank, SP D(M) SP D(X T M 1 X) Paolo Bientinesi (AICES, RWTH Aachen) A Compiler for Linear Algebra Operations August 13-14, / 20

55 2) Knowledge inferred Operand type and size X R n p, M R n n X T M 1 X R p p Properties L is lower tri., D is diagonal, U is upper tri. LD 1 U T is lower triangular X is full rank, SP D(M) SP D(X T M 1 X) Arithmetic (R T Q T QR) 1 R T Q T R 1 Q T Paolo Bientinesi (AICES, RWTH Aachen) A Compiler for Linear Algebra Operations August 13-14, / 20

56 Sequences Naive approach: for i, for j,... b ij = ( X T i M 1 j X i ) 1 X T i M 1 j y j for i = 1 : m for j = 1 : t LL T = M j X T Xi T L T QR = X y L 1 y j b Q T y b ij R 1 b Paolo Bientinesi (AICES, RWTH Aachen) A Compiler for Linear Algebra Operations August 13-14, / 20

57 Sequences Tracking the dependencies LL T = M j L j L T j = M j X T Xi T L T j Xij T Xi T L T j for i = 1 : m for j = 1 : t L j L T j = M j X T ij XT i L T j Q ij R ij = X ij y j L 1 j y j b ij Q T ij y j b ij R 1 ij b ij Paolo Bientinesi (AICES, RWTH Aachen) A Compiler for Linear Algebra Operations August 13-14, / 20

58 Sequences Loop Transposition LL T = M j L j L T j = M j X T Xi T L T j Xij T Xi T L T j for i = 1 : m for j = 1 : t for j = 1 : t for i = 1 : m L j L T j = M j L j L T j = M j X T ij XT i L T j Q ij R ij = X ij y j L 1 j y j b ij Q T ij y j b ij R 1 ij b ij X T ij XT i L T j Q ij R ij = X ij y j L 1 j y j b ij Q T ij y j b ij R 1 ij b ij Paolo Bientinesi (AICES, RWTH Aachen) A Compiler for Linear Algebra Operations August 13-14, / 20

59 Sequences Reordering LL T = M j L j L T j = M j X T Xi T L T j Xij T Xi T L T j for i = 1 : m for j = 1 : t for j = 1 : t for i = 1 : m L j L T j = M j L j L T j = M j X T ij XT i L T j Q ij R ij = X ij y j L 1 j y j b ij Q T ij y j b ij R 1 ij b ij X T ij XT i L T j Q ij R ij = X ij y j L 1 j y j b ij Q T ij y j b ij R 1 ij b ij Paolo Bientinesi (AICES, RWTH Aachen) A Compiler for Linear Algebra Operations August 13-14, / 20

60 Sequences Reordering LL T = M j L j L T j = M j X T Xi T L T j Xij T Xi T L T j for i = 1 : m for j = 1 : t L j L T j = M j X T ij XT i L T j Q ij R ij = X ij y j L 1 j y j b ij Q T ij y j b ij R 1 ij b ij for j = 1 : t L j L T j = M j y j L 1 j y j for i = 1 : m X T ij XT i L T j Q ij R ij = X ij b ij Q T ij y j b ij R 1 ij b ij Paolo Bientinesi (AICES, RWTH Aachen) A Compiler for Linear Algebra Operations August 13-14, / 20

61 1 Objective 2 Automation: CLAK 3 Algorithms and results 4 Conclusions & future work Paolo Bientinesi (AICES, RWTH Aachen) A Compiler for Linear Algebra Operations August 13-14, / 20

62 GWAS b ij := (X T i M 1 j X i ) 1 X T i M 1 j y j Algorithm 1 Algorithm 2... Algorithm LL T = M X := L 1 X S := X T X GG T = S y := L 1 y b := X T y b := G 1 b b := G T b LL T = M X := L 1 X QR := X y := L 1 y b := Q T y b := R 1 b ZW Z T = Φ D :=(hw +(1 h)i) 1 KK T = D X := Z T X X := K T X QR := X y := L 1 y b := Q T y b := R 1 b Paolo Bientinesi (AICES, RWTH Aachen) A Compiler for Linear Algebra Operations August 13-14, / 20

63 Cost analysis Paolo Bientinesi (AICES, RWTH Aachen) A Compiler for Linear Algebra Operations August 13-14, / 20

64 Cost analysis Flop count Scenario Alg. 1 Alg. 2 Alg. 3 Single instance O(n 3 ) O(n 3 ) O(n 3 ) 2D sequence O(tn 3 + mtn 2 ) O(tn 3 + mtn 2 ) O(n 3 + mtn) Paolo Bientinesi (AICES, RWTH Aachen) A Compiler for Linear Algebra Operations August 13-14, / 20

65 Cost analysis Sample-based prediction Sample the kernels not the algorithm! Paolo Bientinesi (AICES, RWTH Aachen) A Compiler for Linear Algebra Operations August 13-14, / 20

66 Cost analysis Sample-based prediction Sample the kernels not the algorithm! Build polynomial models Paolo Bientinesi (AICES, RWTH Aachen) A Compiler for Linear Algebra Operations August 13-14, / 20

67 Cost analysis Sample-based prediction Sample the kernels not the algorithm! Build polynomial models Create a database Paolo Bientinesi (AICES, RWTH Aachen) A Compiler for Linear Algebra Operations August 13-14, / 20

68 Cost analysis Sample-based prediction Sample the kernels not the algorithm! Build polynomial models Create a database Algorithm execution querying Paolo Bientinesi (AICES, RWTH Aachen) A Compiler for Linear Algebra Operations August 13-14, / 20

69 Performance b := (X T M 1 X) 1 X T M 1 y n = 5000 p = 4 m = 3000 time [s] Cholesky QR EV decomp. Measurements Prediction t Paolo Bientinesi (AICES, RWTH Aachen) A Compiler for Linear Algebra Operations August 13-14, / 20

70 1 Objective 2 Automation: CLAK 3 Algorithms and results 4 Conclusions & future work Paolo Bientinesi (AICES, RWTH Aachen) A Compiler for Linear Algebra Operations August 13-14, / 20

71 Conclusions & future work CLAK Linear algebra compiler: algorithm & code generator Paolo Bientinesi (AICES, RWTH Aachen) A Compiler for Linear Algebra Operations August 13-14, / 20

72 Conclusions & future work CLAK Linear algebra compiler: algorithm & code generator Domain specific knowledge: 1) encoded + 2) inferred Paolo Bientinesi (AICES, RWTH Aachen) A Compiler for Linear Algebra Operations August 13-14, / 20

73 Conclusions & future work CLAK Linear algebra compiler: algorithm & code generator Domain specific knowledge: 1) encoded + 2) inferred Performance: n-fold speedups Paolo Bientinesi (AICES, RWTH Aachen) A Compiler for Linear Algebra Operations August 13-14, / 20

74 Conclusions & future work CLAK Linear algebra compiler: algorithm & code generator Domain specific knowledge: 1) encoded + 2) inferred Performance: n-fold speedups TODO list... we ve only started! Paolo Bientinesi (AICES, RWTH Aachen) A Compiler for Linear Algebra Operations August 13-14, / 20

Knowledge-Based Automatic Generation of Algorithms and Code

Knowledge-Based Automatic Generation of Algorithms and Code Knowledge-Based Automatic Generation of Algorithms and Code Diego Fabregat Traver AICES, RWTH Aachen fabregat@aices.rwth-aachen.de Doctoral Defense Aachen, December 6th, 2013 Diego Fabregat (AICES, RWTH

More information

9. Numerical linear algebra background

9. Numerical linear algebra background Convex Optimization Boyd & Vandenberghe 9. Numerical linear algebra background matrix structure and algorithm complexity solving linear equations with factored matrices LU, Cholesky, LDL T factorization

More information

Performance Prediction for Tensor Contractions

Performance Prediction for Tensor Contractions 1 / 18 Performance Prediction for Tensor Contractions Paolo Bientinesi, Edoardo Di Napoli, Diego Fabregat, Elmar Peise AICES, RWTH Aachen pauldj@aices.rwth-aachen.de June 3rd, 214 PASCConference 14 Zürich,

More information

Systematic Generation of Algorithms for Iterative Methods

Systematic Generation of Algorithms for Iterative Methods Rheinisch-Westfälische Technische Hochschule Aachen Aachen Institute for Advanced Study in Computational Engineering Science Systematic Generation of Algorithms for Iterative Methods Henrik Barthels, B.Sc.

More information

A tale of efficiency and productivity. From scalar to tensor computations.

A tale of efficiency and productivity. From scalar to tensor computations. A tale of efficiency and productivity. From scalar to tensor computations. Paolo Bientinesi Aachen nstitute for Computational Engineering Science RWTH Aachen University October 23, 2017 Umeå Universitet

More information

9. Numerical linear algebra background

9. Numerical linear algebra background Convex Optimization Boyd & Vandenberghe 9. Numerical linear algebra background matrix structure and algorithm complexity solving linear equations with factored matrices LU, Cholesky, LDL T factorization

More information

Exercise 1.3 Work out the probabilities that it will be cloudy/rainy the day after tomorrow.

Exercise 1.3 Work out the probabilities that it will be cloudy/rainy the day after tomorrow. 54 Chapter Introduction 9 s Exercise 3 Work out the probabilities that it will be cloudy/rainy the day after tomorrow Exercise 5 Follow the instructions for this problem given on the class wiki For the

More information

Chapter 3 - From Gaussian Elimination to LU Factorization

Chapter 3 - From Gaussian Elimination to LU Factorization Chapter 3 - From Gaussian Elimination to LU Factorization Maggie Myers Robert A. van de Geijn The University of Texas at Austin Practical Linear Algebra Fall 29 http://z.cs.utexas.edu/wiki/pla.wiki/ 1

More information

More on Matrix Inversion

More on Matrix Inversion Week8 More on Matrix Inversion 8.1 Opening Remarks 8.1.1 When LU Factorization with Row Pivoting Fails View at edx The following statements are equivalent statements about A R n n : A is nonsingular. A

More information

AMS526: Numerical Analysis I (Numerical Linear Algebra)

AMS526: Numerical Analysis I (Numerical Linear Algebra) AMS526: Numerical Analysis I (Numerical Linear Algebra) Lecture 7: More on Householder Reflectors; Least Squares Problems Xiangmin Jiao SUNY Stony Brook Xiangmin Jiao Numerical Analysis I 1 / 15 Outline

More information

AMS526: Numerical Analysis I (Numerical Linear Algebra)

AMS526: Numerical Analysis I (Numerical Linear Algebra) AMS526: Numerical Analysis I (Numerical Linear Algebra) Lecture 3: Positive-Definite Systems; Cholesky Factorization Xiangmin Jiao Stony Brook University Xiangmin Jiao Numerical Analysis I 1 / 11 Symmetric

More information

Computational Linear Algebra

Computational Linear Algebra Computational Linear Algebra PD Dr. rer. nat. habil. Ralf Peter Mundani Computation in Engineering / BGU Scientific Computing in Computer Science / INF Winter Term 2017/18 Part 2: Direct Methods PD Dr.

More information

Linear Algebra, part 3 QR and SVD

Linear Algebra, part 3 QR and SVD Linear Algebra, part 3 QR and SVD Anna-Karin Tornberg Mathematical Models, Analysis and Simulation Fall semester, 2012 Going back to least squares (Section 1.4 from Strang, now also see section 5.2). We

More information

Saving Energy in the LU Factorization with Partial Pivoting on Multi-Core Processors

Saving Energy in the LU Factorization with Partial Pivoting on Multi-Core Processors 20th Euromicro International Conference on Parallel, Distributed and Network-Based Special Session on Energy-aware Systems Saving Energy in the on Multi-Core Processors Pedro Alonso 1, Manuel F. Dolz 2,

More information

Mobile Robotics 1. A Compact Course on Linear Algebra. Giorgio Grisetti

Mobile Robotics 1. A Compact Course on Linear Algebra. Giorgio Grisetti Mobile Robotics 1 A Compact Course on Linear Algebra Giorgio Grisetti SA-1 Vectors Arrays of numbers They represent a point in a n dimensional space 2 Vectors: Scalar Product Scalar-Vector Product Changes

More information

Notes on LU Factorization

Notes on LU Factorization Notes on LU Factorization Robert A van de Geijn Department of Computer Science The University of Texas Austin, TX 78712 rvdg@csutexasedu October 11, 2014 The LU factorization is also known as the LU decomposition

More information

REPRESENTATIONS FOR THE THEORY AND PRACTICE OF HIGH-PERFORMANCE DENSE LINEAR ALGEBRA ALGORITHMS. DRAFT October 23, 2007

REPRESENTATIONS FOR THE THEORY AND PRACTICE OF HIGH-PERFORMANCE DENSE LINEAR ALGEBRA ALGORITHMS. DRAFT October 23, 2007 REPRESENTATIONS FOR THE THEORY AND PRACTICE OF HIGH-PERFORMANCE DENSE LINEAR ALGEBRA ALGORITHMS ROBERT A VAN DE GEIJN DRAFT October 23, 2007 Abstract The Cholesky factorization operation is used to demonstrate

More information

EE364a Review Session 7

EE364a Review Session 7 EE364a Review Session 7 EE364a Review session outline: derivatives and chain rule (Appendix A.4) numerical linear algebra (Appendix C) factor and solve method exploiting structure and sparsity 1 Derivative

More information

Numerical Methods I Solving Square Linear Systems: GEM and LU factorization

Numerical Methods I Solving Square Linear Systems: GEM and LU factorization Numerical Methods I Solving Square Linear Systems: GEM and LU factorization Aleksandar Donev Courant Institute, NYU 1 donev@courant.nyu.edu 1 MATH-GA 2011.003 / CSCI-GA 2945.003, Fall 2014 September 18th,

More information

Introduction to Mobile Robotics Compact Course on Linear Algebra. Wolfram Burgard, Cyrill Stachniss, Maren Bennewitz, Diego Tipaldi, Luciano Spinello

Introduction to Mobile Robotics Compact Course on Linear Algebra. Wolfram Burgard, Cyrill Stachniss, Maren Bennewitz, Diego Tipaldi, Luciano Spinello Introduction to Mobile Robotics Compact Course on Linear Algebra Wolfram Burgard, Cyrill Stachniss, Maren Bennewitz, Diego Tipaldi, Luciano Spinello Vectors Arrays of numbers Vectors represent a point

More information

Numerical Linear Algebra

Numerical Linear Algebra Numerical Linear Algebra Direct Methods Philippe B. Laval KSU Fall 2017 Philippe B. Laval (KSU) Linear Systems: Direct Solution Methods Fall 2017 1 / 14 Introduction The solution of linear systems is one

More information

Chapter 2. Matrix Arithmetic. Chapter 2

Chapter 2. Matrix Arithmetic. Chapter 2 Matrix Arithmetic Matrix Addition and Subtraction Addition and subtraction act element-wise on matrices. In order for the addition/subtraction (A B) to be possible, the two matrices A and B must have the

More information

Roundoff Error. Monday, August 29, 11

Roundoff Error. Monday, August 29, 11 Roundoff Error A round-off error (rounding error), is the difference between the calculated approximation of a number and its exact mathematical value. Numerical analysis specifically tries to estimate

More information

Direct Methods for Solving Linear Systems. Simon Fraser University Surrey Campus MACM 316 Spring 2005 Instructor: Ha Le

Direct Methods for Solving Linear Systems. Simon Fraser University Surrey Campus MACM 316 Spring 2005 Instructor: Ha Le Direct Methods for Solving Linear Systems Simon Fraser University Surrey Campus MACM 316 Spring 2005 Instructor: Ha Le 1 Overview General Linear Systems Gaussian Elimination Triangular Systems The LU Factorization

More information

GWAS with mixed models

GWAS with mixed models GWAS with mixed models (the trip from 10 0 to 10 8 ) Yurii Aulchenko yurii [dot] Aulchenko [at] gmail [dot] com Twitter: @YuriiAulchenko YuriiA consulting 1 Outline Methodology development Speeding things

More information

Introduction to Mobile Robotics Compact Course on Linear Algebra. Wolfram Burgard, Bastian Steder

Introduction to Mobile Robotics Compact Course on Linear Algebra. Wolfram Burgard, Bastian Steder Introduction to Mobile Robotics Compact Course on Linear Algebra Wolfram Burgard, Bastian Steder Reference Book Thrun, Burgard, and Fox: Probabilistic Robotics Vectors Arrays of numbers Vectors represent

More information

Accelerating linear algebra computations with hybrid GPU-multicore systems.

Accelerating linear algebra computations with hybrid GPU-multicore systems. Accelerating linear algebra computations with hybrid GPU-multicore systems. Marc Baboulin INRIA/Université Paris-Sud joint work with Jack Dongarra (University of Tennessee and Oak Ridge National Laboratory)

More information

Scientific Computing: Solving Linear Systems

Scientific Computing: Solving Linear Systems Scientific Computing: Solving Linear Systems Aleksandar Donev Courant Institute, NYU 1 donev@courant.nyu.edu 1 Course MATH-GA.2043 or CSCI-GA.2112, Spring 2012 September 17th and 24th, 2015 A. Donev (Courant

More information

The Algorithm of Multiple Relatively Robust Representations for Multi-Core Processors

The Algorithm of Multiple Relatively Robust Representations for Multi-Core Processors Aachen Institute for Advanced Study in Computational Engineering Science Preprint: AICES-2010/09-4 23/September/2010 The Algorithm of Multiple Relatively Robust Representations for Multi-Core Processors

More information

Algebra C Numerical Linear Algebra Sample Exam Problems

Algebra C Numerical Linear Algebra Sample Exam Problems Algebra C Numerical Linear Algebra Sample Exam Problems Notation. Denote by V a finite-dimensional Hilbert space with inner product (, ) and corresponding norm. The abbreviation SPD is used for symmetric

More information

Phys 201. Matrices and Determinants

Phys 201. Matrices and Determinants Phys 201 Matrices and Determinants 1 1.1 Matrices 1.2 Operations of matrices 1.3 Types of matrices 1.4 Properties of matrices 1.5 Determinants 1.6 Inverse of a 3 3 matrix 2 1.1 Matrices A 2 3 7 =! " 1

More information

Sparse BLAS-3 Reduction

Sparse BLAS-3 Reduction Sparse BLAS-3 Reduction to Banded Upper Triangular (Spar3Bnd) Gary Howell, HPC/OIT NC State University gary howell@ncsu.edu Sparse BLAS-3 Reduction p.1/27 Acknowledgements James Demmel, Gene Golub, Franc

More information

Families of Algorithms for Reducing a Matrix to Condensed Form

Families of Algorithms for Reducing a Matrix to Condensed Form Families of Algorithms for Reducing a Matrix to Condensed Form FIELD G. VAN ZEE, The University of Texas at Austin ROBERT A. VAN DE GEIJN, The University of Texas at Austin GREGORIO QUINTANA-ORTí, Universidad

More information

AMS526: Numerical Analysis I (Numerical Linear Algebra)

AMS526: Numerical Analysis I (Numerical Linear Algebra) AMS526: Numerical Analysis I (Numerical Linear Algebra) Lecture 12: Gaussian Elimination and LU Factorization Xiangmin Jiao SUNY Stony Brook Xiangmin Jiao Numerical Analysis I 1 / 10 Gaussian Elimination

More information

Linear Algebra in Actuarial Science: Slides to the lecture

Linear Algebra in Actuarial Science: Slides to the lecture Linear Algebra in Actuarial Science: Slides to the lecture Fall Semester 2010/2011 Linear Algebra is a Tool-Box Linear Equation Systems Discretization of differential equations: solving linear equations

More information

Math 344 Lecture # Linear Systems

Math 344 Lecture # Linear Systems Math 344 Lecture #12 2.7 Linear Systems Through a choice of bases S and T for finite dimensional vector spaces V (with dimension n) and W (with dimension m), a linear equation L(v) = w becomes the linear

More information

Linear Algebraic Equations

Linear Algebraic Equations Linear Algebraic Equations 1 Fundamentals Consider the set of linear algebraic equations n a ij x i b i represented by Ax b j with [A b ] [A b] and (1a) r(a) rank of A (1b) Then Axb has a solution iff

More information

Orthogonal Projection, Low Rank Approximation, and Orthogonal Bases

Orthogonal Projection, Low Rank Approximation, and Orthogonal Bases Week Orthogonal Projection, Low Rank Approximation, and Orthogonal Bases. Opening Remarks.. Low Rank Approximation 38 Week. Orthogonal Projection, Low Rank Approximation, and Orthogonal Bases 38.. Outline..

More information

Inverses. Stephen Boyd. EE103 Stanford University. October 28, 2017

Inverses. Stephen Boyd. EE103 Stanford University. October 28, 2017 Inverses Stephen Boyd EE103 Stanford University October 28, 2017 Outline Left and right inverses Inverse Solving linear equations Examples Pseudo-inverse Left and right inverses 2 Left inverses a number

More information

Notes on Solving Linear Least-Squares Problems

Notes on Solving Linear Least-Squares Problems Notes on Solving Linear Least-Squares Problems Robert A. van de Geijn The University of Texas at Austin Austin, TX 7871 October 1, 14 NOTE: I have not thoroughly proof-read these notes!!! 1 Motivation

More information

Orthogonal Projection, Low Rank Approximation, and Orthogonal Bases

Orthogonal Projection, Low Rank Approximation, and Orthogonal Bases Week Orthogonal Projection, Low Rank Approximation, and Orthogonal Bases. Opening Remarks.. Low Rank Approximation 463 Week. Orthogonal Projection, Low Rank Approximation, and Orthogonal Bases 464.. Outline..

More information

Scientific Computing: Dense Linear Systems

Scientific Computing: Dense Linear Systems Scientific Computing: Dense Linear Systems Aleksandar Donev Courant Institute, NYU 1 donev@courant.nyu.edu 1 Course MATH-GA.2043 or CSCI-GA.2112, Spring 2012 February 9th, 2012 A. Donev (Courant Institute)

More information

A New Block Algorithm for Full-Rank Solution of the Sylvester-observer Equation.

A New Block Algorithm for Full-Rank Solution of the Sylvester-observer Equation. 1 A New Block Algorithm for Full-Rank Solution of the Sylvester-observer Equation João Carvalho, DMPA, Universidade Federal do RS, Brasil Karabi Datta, Dep MSc, Northern Illinois University, DeKalb, IL

More information

BLAS: Basic Linear Algebra Subroutines Analysis of the Matrix-Vector-Product Analysis of Matrix-Matrix Product

BLAS: Basic Linear Algebra Subroutines Analysis of the Matrix-Vector-Product Analysis of Matrix-Matrix Product Level-1 BLAS: SAXPY BLAS-Notation: S single precision (D for double, C for complex) A α scalar X vector P plus operation Y vector SAXPY: y = αx + y Vectorization of SAXPY (αx + y) by pipelining: page 8

More information

Accelerating computation of eigenvectors in the nonsymmetric eigenvalue problem

Accelerating computation of eigenvectors in the nonsymmetric eigenvalue problem Accelerating computation of eigenvectors in the nonsymmetric eigenvalue problem Mark Gates 1, Azzam Haidar 1, and Jack Dongarra 1,2,3 1 University of Tennessee, Knoxville, TN, USA 2 Oak Ridge National

More information

Matrices and Matrix Algebra.

Matrices and Matrix Algebra. Matrices and Matrix Algebra 3.1. Operations on Matrices Matrix Notation and Terminology Matrix: a rectangular array of numbers, called entries. A matrix with m rows and n columns m n A n n matrix : a square

More information

Solving linear systems (6 lectures)

Solving linear systems (6 lectures) Chapter 2 Solving linear systems (6 lectures) 2.1 Solving linear systems: LU factorization (1 lectures) Reference: [Trefethen, Bau III] Lecture 20, 21 How do you solve Ax = b? (2.1.1) In numerical linear

More information

Accelerating computation of eigenvectors in the dense nonsymmetric eigenvalue problem

Accelerating computation of eigenvectors in the dense nonsymmetric eigenvalue problem Accelerating computation of eigenvectors in the dense nonsymmetric eigenvalue problem Mark Gates 1, Azzam Haidar 1, and Jack Dongarra 1,2,3 1 University of Tennessee, Knoxville, TN, USA 2 Oak Ridge National

More information

Matrix-Vector Operations

Matrix-Vector Operations Week3 Matrix-Vector Operations 31 Opening Remarks 311 Timmy Two Space View at edx Homework 3111 Click on the below link to open a browser window with the Timmy Two Space exercise This exercise was suggested

More information

Math 577 Assignment 7

Math 577 Assignment 7 Math 577 Assignment 7 Thanks for Yu Cao 1. Solution. The linear system being solved is Ax = 0, where A is a (n 1 (n 1 matrix such that 2 1 1 2 1 A =......... 1 2 1 1 2 and x = (U 1, U 2,, U n 1. By the

More information

Numerical Linear Algebra Primer. Ryan Tibshirani Convex Optimization /36-725

Numerical Linear Algebra Primer. Ryan Tibshirani Convex Optimization /36-725 Numerical Linear Algebra Primer Ryan Tibshirani Convex Optimization 10-725/36-725 Last time: proximal gradient descent Consider the problem min g(x) + h(x) with g, h convex, g differentiable, and h simple

More information

Matrix Operations. Linear Combination Vector Algebra Angle Between Vectors Projections and Reflections Equality of matrices, Augmented Matrix

Matrix Operations. Linear Combination Vector Algebra Angle Between Vectors Projections and Reflections Equality of matrices, Augmented Matrix Linear Combination Vector Algebra Angle Between Vectors Projections and Reflections Equality of matrices, Augmented Matrix Matrix Operations Matrix Addition and Matrix Scalar Multiply Matrix Multiply Matrix

More information

Modeling and Tuning Parallel Performance in Dense Linear Algebra

Modeling and Tuning Parallel Performance in Dense Linear Algebra Modeling and Tuning Parallel Performance in Dense Linear Algebra Initial Experiences with the Tile QR Factorization on a Multi Core System CScADS Workshop on Automatic Tuning for Petascale Systems Snowbird,

More information

Matrix decompositions

Matrix decompositions Matrix decompositions Zdeněk Dvořák May 19, 2015 Lemma 1 (Schur decomposition). If A is a symmetric real matrix, then there exists an orthogonal matrix Q and a diagonal matrix D such that A = QDQ T. The

More information

18.06 Problem Set 2 Solution

18.06 Problem Set 2 Solution 18.06 Problem Set 2 Solution Total: 100 points Section 2.5. Problem 24: Use Gauss-Jordan elimination on [U I] to find the upper triangular U 1 : 1 a b 1 0 UU 1 = I 0 1 c x 1 x 2 x 3 = 0 1 0. 0 0 1 0 0

More information

Solving Dense Linear Systems I

Solving Dense Linear Systems I Solving Dense Linear Systems I Solving Ax = b is an important numerical method Triangular system: [ l11 l 21 if l 11, l 22 0, ] [ ] [ ] x1 b1 = l 22 x 2 b 2 x 1 = b 1 /l 11 x 2 = (b 2 l 21 x 1 )/l 22 Chih-Jen

More information

Matrix Factorization and Analysis

Matrix Factorization and Analysis Chapter 7 Matrix Factorization and Analysis Matrix factorizations are an important part of the practice and analysis of signal processing. They are at the heart of many signal-processing algorithms. Their

More information

Linear Algebra, part 3. Going back to least squares. Mathematical Models, Analysis and Simulation = 0. a T 1 e. a T n e. Anna-Karin Tornberg

Linear Algebra, part 3. Going back to least squares. Mathematical Models, Analysis and Simulation = 0. a T 1 e. a T n e. Anna-Karin Tornberg Linear Algebra, part 3 Anna-Karin Tornberg Mathematical Models, Analysis and Simulation Fall semester, 2010 Going back to least squares (Sections 1.7 and 2.3 from Strang). We know from before: The vector

More information

Linear Algebra Review

Linear Algebra Review Linear Algebra Review CS 205A: Mathematical Methods for Robotics, Vision, and Graphics Doug James (and Justin Solomon) CS 205A: Mathematical Methods Linear Algebra Review 1 / 16 Midterm Exam Tuesday Feb

More information

Numerical Methods in Matrix Computations

Numerical Methods in Matrix Computations Ake Bjorck Numerical Methods in Matrix Computations Springer Contents 1 Direct Methods for Linear Systems 1 1.1 Elements of Matrix Theory 1 1.1.1 Matrix Algebra 2 1.1.2 Vector Spaces 6 1.1.3 Submatrices

More information

Week6. Gaussian Elimination. 6.1 Opening Remarks Solving Linear Systems. View at edx

Week6. Gaussian Elimination. 6.1 Opening Remarks Solving Linear Systems. View at edx Week6 Gaussian Elimination 61 Opening Remarks 611 Solving Linear Systems View at edx 193 Week 6 Gaussian Elimination 194 61 Outline 61 Opening Remarks 193 611 Solving Linear Systems 193 61 Outline 194

More information

Section Partitioned Matrices and LU Factorization

Section Partitioned Matrices and LU Factorization Section 2.4 2.5 Partitioned Matrices and LU Factorization Gexin Yu gyu@wm.edu College of William and Mary partition matrices into blocks In real world problems, systems can have huge numbers of equations

More information

Introduction to Mobile Robotics Compact Course on Linear Algebra. Wolfram Burgard, Cyrill Stachniss, Kai Arras, Maren Bennewitz

Introduction to Mobile Robotics Compact Course on Linear Algebra. Wolfram Burgard, Cyrill Stachniss, Kai Arras, Maren Bennewitz Introduction to Mobile Robotics Compact Course on Linear Algebra Wolfram Burgard, Cyrill Stachniss, Kai Arras, Maren Bennewitz Vectors Arrays of numbers Vectors represent a point in a n dimensional space

More information

A Divide-and-Conquer Algorithm for Functions of Triangular Matrices

A Divide-and-Conquer Algorithm for Functions of Triangular Matrices A Divide-and-Conquer Algorithm for Functions of Triangular Matrices Ç. K. Koç Electrical & Computer Engineering Oregon State University Corvallis, Oregon 97331 Technical Report, June 1996 Abstract We propose

More information

Q T A = R ))) ) = A n 1 R

Q T A = R ))) ) = A n 1 R Q T A = R As with the LU factorization of A we have, after (n 1) steps, Q T A = Q T A 0 = [Q 1 Q 2 Q n 1 ] T A 0 = [Q n 1 Q n 2 Q 1 ]A 0 = (Q n 1 ( (Q 2 (Q 1 A 0 }{{} A 1 ))) ) = A n 1 R Since Q T A =

More information

Vector/Matrix operations. *Remember: All parts of HW 1 are due on 1/31 or 2/1

Vector/Matrix operations. *Remember: All parts of HW 1 are due on 1/31 or 2/1 Lecture 4: Topics: Linear Algebra II Vector/Matrix operations Homework: HW, Part *Remember: All parts of HW are due on / or / Solving Axb Row reduction method can be used Simple operations on equations

More information

Algorithms for Reducing a Matrix to Condensed Form

Algorithms for Reducing a Matrix to Condensed Form lgorithms for Reducing a Matrix to Condensed Form FLME Working Note #53 Field G. Van Zee Robert. van de Geijn Gregorio Quintana-Ortí G. Joseph Elizondo October 3, 2 Revised January 3, 22 bstract In a recent

More information

Numerical Methods I: Eigenvalues and eigenvectors

Numerical Methods I: Eigenvalues and eigenvectors 1/25 Numerical Methods I: Eigenvalues and eigenvectors Georg Stadler Courant Institute, NYU stadler@cims.nyu.edu November 2, 2017 Overview 2/25 Conditioning Eigenvalues and eigenvectors How hard are they

More information

Lecture 2: Numerical linear algebra

Lecture 2: Numerical linear algebra Lecture 2: Numerical linear algebra QR factorization Eigenvalue decomposition Singular value decomposition Conditioning of a problem Floating point arithmetic and stability of an algorithm Linear algebra

More information

Theoretical Computer Science

Theoretical Computer Science Theoretical Computer Science 412 (2011) 1484 1491 Contents lists available at ScienceDirect Theoretical Computer Science journal homepage: wwwelseviercom/locate/tcs Parallel QR processing of Generalized

More information

Numerical Linear Algebra Primer. Ryan Tibshirani Convex Optimization

Numerical Linear Algebra Primer. Ryan Tibshirani Convex Optimization Numerical Linear Algebra Primer Ryan Tibshirani Convex Optimization 10-725 Consider Last time: proximal Newton method min x g(x) + h(x) where g, h convex, g twice differentiable, and h simple. Proximal

More information

12. Cholesky factorization

12. Cholesky factorization L. Vandenberghe ECE133A (Winter 2018) 12. Cholesky factorization positive definite matrices examples Cholesky factorization complex positive definite matrices kernel methods 12-1 Definitions a symmetric

More information

Numerical Linear Algebra

Numerical Linear Algebra Numerical Linear Algebra Decompositions, numerical aspects Gerard Sleijpen and Martin van Gijzen September 27, 2017 1 Delft University of Technology Program Lecture 2 LU-decomposition Basic algorithm Cost

More information

Program Lecture 2. Numerical Linear Algebra. Gaussian elimination (2) Gaussian elimination. Decompositions, numerical aspects

Program Lecture 2. Numerical Linear Algebra. Gaussian elimination (2) Gaussian elimination. Decompositions, numerical aspects Numerical Linear Algebra Decompositions, numerical aspects Program Lecture 2 LU-decomposition Basic algorithm Cost Stability Pivoting Cholesky decomposition Sparse matrices and reorderings Gerard Sleijpen

More information

arxiv: v1 [cs.ms] 11 Oct 2017

arxiv: v1 [cs.ms] 11 Oct 2017 Deriving Correct High-Performance Algorithms FLAME Working Note #86 arxiv:1710.04286v1 [cs.ms] Oct 2017 Devangi N. Parikh Margaret E. Myers Robert A. van de Geijn The University of Texas at Austin Austin,

More information

Minisymposia 9 and 34: Avoiding Communication in Linear Algebra. Jim Demmel UC Berkeley bebop.cs.berkeley.edu

Minisymposia 9 and 34: Avoiding Communication in Linear Algebra. Jim Demmel UC Berkeley bebop.cs.berkeley.edu Minisymposia 9 and 34: Avoiding Communication in Linear Algebra Jim Demmel UC Berkeley bebop.cs.berkeley.edu Motivation (1) Increasing parallelism to exploit From Top500 to multicores in your laptop Exponentially

More information

AMS526: Numerical Analysis I (Numerical Linear Algebra for Computational and Data Sciences)

AMS526: Numerical Analysis I (Numerical Linear Algebra for Computational and Data Sciences) AMS526: Numerical Analysis I (Numerical Linear Algebra for Computational and Data Sciences) Lecture 19: Computing the SVD; Sparse Linear Systems Xiangmin Jiao Stony Brook University Xiangmin Jiao Numerical

More information

Lecture 10 - Eigenvalues problem

Lecture 10 - Eigenvalues problem Lecture 10 - Eigenvalues problem Department of Computer Science University of Houston February 28, 2008 1 Lecture 10 - Eigenvalues problem Introduction Eigenvalue problems form an important class of problems

More information

May 9, 2014 MATH 408 MIDTERM EXAM OUTLINE. Sample Questions

May 9, 2014 MATH 408 MIDTERM EXAM OUTLINE. Sample Questions May 9, 24 MATH 48 MIDTERM EXAM OUTLINE This exam will consist of two parts and each part will have multipart questions. Each of the 6 questions is worth 5 points for a total of points. The two part of

More information

Engineering Computation

Engineering Computation Engineering Computation Systems of Linear Equations_1 1 Learning Objectives for Lecture 1. Motivate Study of Systems of Equations and particularly Systems of Linear Equations. Review steps of Gaussian

More information

Lecture 11. Linear systems: Cholesky method. Eigensystems: Terminology. Jacobi transformations QR transformation

Lecture 11. Linear systems: Cholesky method. Eigensystems: Terminology. Jacobi transformations QR transformation Lecture Cholesky method QR decomposition Terminology Linear systems: Eigensystems: Jacobi transformations QR transformation Cholesky method: For a symmetric positive definite matrix, one can do an LU decomposition

More information

1 Multiply Eq. E i by λ 0: (λe i ) (E i ) 2 Multiply Eq. E j by λ and add to Eq. E i : (E i + λe j ) (E i )

1 Multiply Eq. E i by λ 0: (λe i ) (E i ) 2 Multiply Eq. E j by λ and add to Eq. E i : (E i + λe j ) (E i ) Direct Methods for Linear Systems Chapter Direct Methods for Solving Linear Systems Per-Olof Persson persson@berkeleyedu Department of Mathematics University of California, Berkeley Math 18A Numerical

More information

Math 108b: Notes on the Spectral Theorem

Math 108b: Notes on the Spectral Theorem Math 108b: Notes on the Spectral Theorem From section 6.3, we know that every linear operator T on a finite dimensional inner product space V has an adjoint. (T is defined as the unique linear operator

More information

The System of Linear Equations. Direct Methods. Xiaozhou Li.

The System of Linear Equations. Direct Methods. Xiaozhou Li. 1/16 The Direct Methods xiaozhouli@uestc.edu.cn http://xiaozhouli.com School of Mathematical Sciences University of Electronic Science and Technology of China Chengdu, China Does the LU factorization always

More information

Basic Math Review for CS4830

Basic Math Review for CS4830 Basic Math Review for CS4830 Dr. Mihail August 18, 2016 (Dr. Mihail) Math Review for CS4830 August 18, 2016 1 / 35 Sets Definition of a set A set is a collection of distinct objects, considered as an object

More information

Knowledge Discovery and Data Mining 1 (VO) ( )

Knowledge Discovery and Data Mining 1 (VO) ( ) Knowledge Discovery and Data Mining 1 (VO) (707.003) Review of Linear Algebra Denis Helic KTI, TU Graz Oct 9, 2014 Denis Helic (KTI, TU Graz) KDDM1 Oct 9, 2014 1 / 74 Big picture: KDDM Probability Theory

More information

Lecture 13 Stability of LU Factorization; Cholesky Factorization. Songting Luo. Department of Mathematics Iowa State University

Lecture 13 Stability of LU Factorization; Cholesky Factorization. Songting Luo. Department of Mathematics Iowa State University Lecture 13 Stability of LU Factorization; Cholesky Factorization Songting Luo Department of Mathematics Iowa State University MATH 562 Numerical Analysis II ongting Luo ( Department of Mathematics Iowa

More information

The Science of Programming Matrix Computations

The Science of Programming Matrix Computations The Science of Programming Matrix Computations The Science of Programming Matrix Computations Robert A van de Geijn The University of Texas at Austin Enrique S Quintana-Ortí Universidad Jaume I Copyright

More information

5.6. PSEUDOINVERSES 101. A H w.

5.6. PSEUDOINVERSES 101. A H w. 5.6. PSEUDOINVERSES 0 Corollary 5.6.4. If A is a matrix such that A H A is invertible, then the least-squares solution to Av = w is v = A H A ) A H w. The matrix A H A ) A H is the left inverse of A and

More information

Matrix-Vector Operations

Matrix-Vector Operations Week3 Matrix-Vector Operations 31 Opening Remarks 311 Timmy Two Space View at edx Homework 3111 Click on the below link to open a browser window with the Timmy Two Space exercise This exercise was suggested

More information

Towards Mechanical Derivation of Krylov Solver Libraries

Towards Mechanical Derivation of Krylov Solver Libraries Towards Mechanical Derivation of Krylov Solver Libraries Victor Eijkhout Texas Advanced Computing Center with Paolo Bientinesi and Robert van de Geijn support: National Science Foundation award #0917096

More information

CS412: Lecture #17. Mridul Aanjaneya. March 19, 2015

CS412: Lecture #17. Mridul Aanjaneya. March 19, 2015 CS: Lecture #7 Mridul Aanjaneya March 9, 5 Solving linear systems of equations Consider a lower triangular matrix L: l l l L = l 3 l 3 l 33 l n l nn A procedure similar to that for upper triangular systems

More information

ELE/MCE 503 Linear Algebra Facts Fall 2018

ELE/MCE 503 Linear Algebra Facts Fall 2018 ELE/MCE 503 Linear Algebra Facts Fall 2018 Fact N.1 A set of vectors is linearly independent if and only if none of the vectors in the set can be written as a linear combination of the others. Fact N.2

More information

Positive Definite Matrix

Positive Definite Matrix 1/29 Chia-Ping Chen Professor Department of Computer Science and Engineering National Sun Yat-sen University Linear Algebra Positive Definite, Negative Definite, Indefinite 2/29 Pure Quadratic Function

More information

Important Matrix Factorizations

Important Matrix Factorizations LU Factorization Choleski Factorization The QR Factorization LU Factorization: Gaussian Elimination Matrices Gaussian elimination transforms vectors of the form a α, b where a R k, 0 α R, and b R n k 1,

More information

Intel Math Kernel Library (Intel MKL) LAPACK

Intel Math Kernel Library (Intel MKL) LAPACK Intel Math Kernel Library (Intel MKL) LAPACK Linear equations Victor Kostin Intel MKL Dense Solvers team manager LAPACK http://www.netlib.org/lapack Systems of Linear Equations Linear Least Squares Eigenvalue

More information

Computing least squares condition numbers on hybrid multicore/gpu systems

Computing least squares condition numbers on hybrid multicore/gpu systems Computing least squares condition numbers on hybrid multicore/gpu systems M. Baboulin and J. Dongarra and R. Lacroix Abstract This paper presents an efficient computation for least squares conditioning

More information

Review Questions REVIEW QUESTIONS 71

Review Questions REVIEW QUESTIONS 71 REVIEW QUESTIONS 71 MATLAB, is [42]. For a comprehensive treatment of error analysis and perturbation theory for linear systems and many other problems in linear algebra, see [126, 241]. An overview of

More information

Hydra: Generation and Tuning of parallel solutions for linear algebra equations. Alexandre X. Duchâteau University of Illinois at Urbana Champaign

Hydra: Generation and Tuning of parallel solutions for linear algebra equations. Alexandre X. Duchâteau University of Illinois at Urbana Champaign Hydra: Generation and Tuning of parallel solutions for linear algebra equations Alexandre X. Duchâteau University of Illinois at Urbana Champaign Collaborators Thesis Advisors Denis Barthou (Labri/INRIA

More information

MARCH 24-27, 2014 SAN JOSE, CA

MARCH 24-27, 2014 SAN JOSE, CA MARCH 24-27, 2014 SAN JOSE, CA Sparse HPC on modern architectures Important scientific applications rely on sparse linear algebra HPCG a new benchmark proposal to complement Top500 (HPL) To solve A x =

More information