Page 1 of 1

Symmetric A^-1 on multiple GPU magma paper

Posted: Wed Nov 23, 2016 11:18 pm
by neilcouture
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

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

Posted: Tue Nov 29, 2016 11:10 am
by mgates3
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

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

Posted: Tue Nov 29, 2016 11:13 am
by mgates3
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

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

Posted: Tue Nov 29, 2016 11:43 am
by mgates3
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)