Difference between sgetrf, sgetrf_gpu and sgetrf_gpu2

Open discussion for MAGMA

Difference between sgetrf, sgetrf_gpu and sgetrf_gpu2

Postby Maxime » Mon Apr 12, 2010 12:07 pm

Hello,
I want to compute a LU factorization using MAGMA, but I found 3 different functions : magma_sgetrf, magma_sgetrf_gpu and magma_sgetrf_gpu2.
Apparently magma_sgetrf is doing operations on the GPU too since it requires a workspace on the GPU, but then what is different from magma_sgetrf_gpu ?
And what is the function magma_sgetrf_gpu2 ? There is no reference to it in the User's Guide, but it is in an example (testing_sgetrf_gpu-v2).
(Also I assume it is the same for the other function like dgetrf, sgeqrf, etc. for which 3 versions are implemented)

Regards

Maxime
Maxime
 
Posts: 2
Joined: Mon Apr 12, 2010 11:32 am

Re: Difference between sgetrf, sgetrf_gpu and sgetrf_gpu2

Postby Stan Tomov » Wed Apr 14, 2010 1:01 pm

Hi,
Yes, all functions use the GPU. The difference is just the interface. Routine magma_sgetrf and magma_sgetrf_gpu takes input matrix and produces result on the CPU memory (as shown in testing_sgetrf.cpp), while magma_sgetrf_gpu assumes the input matrix and the output factorization are on the GPU memory (as given in testing_sgetrf_gpu.cpp).
Routine magma_sgetrf_gpu2 is another version of LU in the GPU interface. It was coded to facilitate the solving part, more precisely the pivoting. We used it internally for the mixed precision iterative refinement solvers (see testing_dsgesv_gpu.cpp). The interface here is not as in LAPACK that's why we didn't include it in the Users' guide. It has one more argument related to pivoting that facilitates parallel pivoting - the LAPACK compliant is sequential in nature in the sense you have to make it in order, e.g. giving row i of the matrix was interchanged with row IPIV(i). The new indexing shows row i of the matrix was moved to row IPIV(i) and therefore could process reordering,e.g., needed in solvers, in parallel.
Stan
Stan Tomov
 
Posts: 251
Joined: Fri Aug 21, 2009 10:39 pm

Re: Difference between sgetrf, sgetrf_gpu and sgetrf_gpu2

Postby Maxime » Sun Apr 18, 2010 11:56 am

OK, thank you for your time.

Maxime
Maxime
 
Posts: 2
Joined: Mon Apr 12, 2010 11:32 am


Return to User discussion

Who is online

Users browsing this forum: No registered users and 1 guest