automation in dense linear algebra
play

Automation in Dense Linear Algebra Paper by Paolo Bientinesi and - PowerPoint PPT Presentation

Automation in Dense Linear Algebra Paper by Paolo Bientinesi and Robert van de Geijn Presented by Smy Zehnder Content Motivation Building a new algorithm Prototype Conclusion 2 Motivation Best algorithm for a dense linear algebra


  1. Automation in Dense Linear Algebra Paper by Paolo Bientinesi and Robert van de Geijn Presented by Sämy Zehnder

  2. Content Motivation Building a new algorithm Prototype Conclusion 2

  3. Motivation ● Best algorithm for a dense linear algebra problem? ● LU ● Cholesky ● Eigenvalues ● SVD ● ... ● Highly used for: ● Interpolation of functions ● Solving systems of equations ● Optimization 3

  4. Idea: Automatically build it! X Y Problem http://www.aices.rwth-aachen.de:8080/~pauldj/pubs/CC-2009.pdf 4

  5. Content Motivation Building a new algorithm Prototype Conclusion 5

  6. Steps needed X Y Γ(X) PME Loop-invariant Loop Code 6

  7. Layout of the algorithm 7

  8. PME L-Inv. Loop Code Γ(X) Example: Cholesky factorization Cholesky A L Γ(A) = L ● How do we compute L, so that A = LL T ? 8

  9. PME L-Inv. Loop Code Γ(X) Problem to PME T A = L L Γ( A )= L 9

  10. PME L-Inv. Loop Code Γ(X) Problem to PME T A = L L Γ( A )= L 10

  11. PME L-Inv. Loop Code Γ(X) Problem to PME T A = L L Γ( A )= L 11

  12. PME L-Inv. Loop Code Γ(X) Problem to PME T A = L L Γ( A )= L 12

  13. PME L-Inv. Loop Code Γ(X) Problem to PME 13

  14. PME L-Inv. Loop Code Γ(X) Loop-invariant ● Holds before, at the begin and after the loop 14

  15. PME L-Inv. Loop Code Γ(X) Loop-invariant ● Holds before, at the begin and after the loop 15

  16. PME L-Inv. Loop Code Γ(X) Choosing a Loop-invariant ● Any subset of the PME ● Some blocks can be 0x0-matrices ● Has to respect the dependencies http://www.aices.rwth-aachen.de:8080/~pauldj/pubs/CC-2009.pdf 16

  17. PME L-Inv. Loop Code Γ(X) Choosing a Loop-invariant 17

  18. PME L-Inv. Loop Code Γ(X) Choosing a Loop-invariant ● At the beginning: 18

  19. PME L-Inv. Loop Code Γ(X) Choosing a Loop-invariant ● At the beginning: ● At the end: 19

  20. PME L-Inv. Loop Code Γ(X) Ensuring progress 20

  21. PME L-Inv. Loop Code Γ(X) Construction of the loop 21

  22. PME L-Inv. Loop Code Γ(X) Construction of the loop PME: 22

  23. PME L-Inv. Loop Code Γ(X) Construction of the loop PME: 23

  24. PME L-Inv. Loop Code Γ(X) Recap 1. Building the PME 2. Choosing the Loop-Invariant 3. Construction of the loop ● Repartioning ● Computation of one step 24

  25. PME L-Inv. Loop Code Γ(X) Recap 1. Building the PME 2. Choosing the Loop-Invariant 3. Construction of the loop ● Repartioning ● Computation of one step 25

  26. PME L-Inv. Loop Code Γ(X) Recap 1. Building the PME 2. Choosing the Loop-Invariant 3. Construction of the loop ● Repartioning ● Computation of one step 26

  27. PME L-Inv. Loop Code Γ(X) Recap 1. Building the PME 2. Choosing the Loop-Invariant 3. Construction of the loop ● Repartioning ● Computation of one step 27

  28. Content Motivation Building a new algorithm Prototype Conclusion 28

  29. PME L-Inv. Loop Code Γ(X) Prototype system ● Takes loop-invariant, returns loop-algorithm ● Generates worksheet, Matlab- or C-code ● More than 300 algorithms for the Level-3 BLAS library ● Found 50 algorithms for the triangular coupled Sylvester equation (3 previously known) 29

  30. PME L-Inv. Loop Code Γ(X) Prototype system function [A] = choleskyL1( A , nb ) [ ATL, ATR, ... ABL, ABR ] = FLA_Part_2x2( A,0,0,’FLA_TL’); %% Loop Invariant %% ATL=choleskyL[ATL] %% ABL’=0 %% ABL=ABL %% ABR=ABR while( size(ATL,1) ~= size(A,1) | size(ATL,2) ~= size(A,2) ) b = min( nb, min( size(ABR,1), size(ABR,2) )); [ A00, A01, A02, ... A10, A11, A12, ... A20, A21, A22 ] = FLA_Repart_2x2_to_3x3(ATL, ATR,... ABL, ABR,... b, b, ’FLA_BR’); %* *********************************************************** *% A10 = A10 . inv(A00)’; A11 = choleskyL(A11 - A10 . A10’); %* *********************************************************** *% [ ATL, ATR, ... ABL, ABR ] = FLA_Cont_with_3x3_to_2x2(A00, A01, A02, ... A10, A11, A12, ... A20, A21, A22, ’FLA_TL’); end; return ATL; 30 http://www.aices.rwth-aachen.de:8080/~pauldj/pubs/CC-2009.pdf

  31. Content Motivation Building a new algorithm Prototype Conclusion 31

  32. Conclusion + Problem description (A = LL T ) sufficient for automatic algorithm generation + Possible to generate proof of correctness side by side with generation of algorithm + Performance: Familiy of algorithms => autotune these - Numerical stability is not ensured. Proof for every algorithm needed. http://kaichido.com/wp-content/uploads/2010/10/Fotolia_733842_XS-Balance-scale1.jpg 32

  33. Thank you! Are there any questions? 33

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend