## Symmetric A^-1 on multiple GPU magma paper

Open discussion for MAGMA library (Matrix Algebra on GPU and Multicore Architectures)

### Symmetric A^-1 on multiple GPU magma paper

I red a few years ago that Magma can perform symmetric matrix inversion on multiple GPU

On page 40 of 45 of the following paper

http://on-demand.gputechconf.com/gtc/20 ... rators.pdf

Is this currently implemented in Magma as I could not find it in the samples.

thanks

-Neil
neilcouture

Posts: 1
Joined: Wed Nov 23, 2016 11:09 pm

### Re: Symmetric A^-1 on multiple GPU magma paper

Those slides reference Cholesky inversion for symmetric/Hermitian positive definite matrices. This is implemented in either magma_zpotri and magma_zpotri_gpu (after factoring with magma_zpotrf or magma_zpotrf_gpu).

MAGMA also has several symmetric indefinite factorizations, in magma_zhetrf, magma_zhetrf_aasen, and magma_zhetrf_nopiv. We don't yet have the corresponding inverses, though. For zhetrf, one could use the zhetri routine in LAPACK.

-mark
mgates3

Posts: 773
Joined: Fri Jan 06, 2012 2:13 pm

### Re: Symmetric A^-1 on multiple GPU magma paper

Since your subject line mentioned multiple GPUs, the factorization in magma_zpotrf will use multiple GPUs. Set the \$MAGMA_NUM_GPUS environment variable. The subsequent inverse in magma_zpotri uses only one GPU.
-mark
mgates3

Posts: 773
Joined: Fri Jan 06, 2012 2:13 pm

### Re: Symmetric A^-1 on multiple GPU magma paper

Also, while there are some circumstances that require an explicit inverse, generally doing a factorization & solve is both faster and more accurate than computing an explicit inverse and multiplying. That is, solving A*X = B (equivalently, X = A^{-1}*B) by
1. factoring A = L*L^T (potrf) and then
2. solving (L*L^T) X = B (potrs)
is better than
1. factoring A = L*L^T (potrf)
2. computing inverse A^{-1} = L^{-T} * L^{-1} (potri)
3. multiplying X = A^{-1}*B (hemm)
Last edited by mgates3 on Tue Nov 29, 2016 11:46 am, edited 1 time in total.
Reason: correct formula
mgates3

Posts: 773
Joined: Fri Jan 06, 2012 2:13 pm