Matrix inverse on CPU

Open discussion for MAGMA library (Matrix Algebra on GPU and Multicore Architectures)
Post Reply
CrisCristescu
Posts: 1
Joined: Tue Oct 28, 2014 7:52 am

Matrix inverse on CPU

Post by CrisCristescu » Tue Oct 28, 2014 7:59 am

Hi,

Is it possible to use the MAGMA CPU interface without having a GPU card for matrix inverse calculation?

Thank you!

mgates3
Posts: 918
Joined: Fri Jan 06, 2012 2:13 pm

Re: Matrix inverse on CPU

Post by mgates3 » Wed Oct 29, 2014 1:26 pm

First, do you REALLY need an inverse? Or do you actually want to solve a system of equations, which is both faster and more accurate? That is, X = A^{-1} * B is really solving A*X = B, and so should be computed as

Code: Select all

    magma_*gesv( A, B );   // that is, getrf + getrs
NOT as

Code: Select all

  magma_*getrf( A );
  magma_*getri( A );
  magma_*gemm( 1, A, B, 0, X );
Also, I'm confused about your question. If you don't have a GPU, then MAGMA doesn't provide any benefit -- just use LAPACK. The LAPACK interface is very similar to the MAGMA interface.

If you mean, "Is there a MAGMA CPU interface to getri that then uses the GPU?", then no, there is not currently a routine magma_zgetri. It may get added in the future.
-mark

Post Reply