Several questions about linear LU solvers in Magma 0.2

Open discussion for MAGMA

Several questions about linear LU solvers in Magma 0.2

Postby jpeinado » Fri Dec 04, 2009 6:55 am

Hi:

First of all, my congratulations to all the MAGMA people. I was looking how to mix
MATLAB, CUBLAS code and I read all the info available (thank you Boxed Cyclon). Now
I want to mix also MAGMA code.

Well, now, I need to solve a linear system. In MAGMA 0.1, I needed the triangular solver
TRSM but in MAGMA 0.2, (I think that triangular solvers and calls to SWAP code, for the
right hand solvers are included).

Well I downloaded MAGMA 0.2, and I have several questions...

1) I see in MAGMA User's Guide that the linear system is now solved using
magma_xgesv_gpu...Perfect!!!, but when I am going to test it and I see the code...in
testing_sgesv_gpu.cpp file:



magma_sgetrf_gpu(&N, &N, d_A, &dlda, IPIV, h_work_M_S, INFO);
magma_sgetrs_gpu("N", N, NRHS, d_A, dlda, IPIV, d_B, LDB, INFO, h_work_M_S);

I think this is the equivalent way to magma_sgesv_gpu, but there is no call to sgesv_gpu...

Why?


2) The testing_sgesv_gpu.cpp does not give CPU results. Only it gives GPU results

Why?



3) My code has several calls to Cublas_sgemm. May I substitute it by MAGMA_sgemm to get better
results?


With many thanks in advance.

Again, congratulations for your work

jpeinado
jpeinado
 
Posts: 10
Joined: Thu Dec 03, 2009 2:53 pm

Re: Several questions about linear LU solvers in Magma 0.2

Postby Stan Tomov » Fri Dec 04, 2009 11:45 am

Hello Jpeinado,

We are happy to hear you use and like the MAGMA package.
1) ...in testing_sgesv_gpu.cpp file:

magma_sgetrf_gpu(&N, &N, d_A, &dlda, IPIV, h_work_M_S, INFO);
magma_sgetrs_gpu("N", N, NRHS, d_A, dlda, IPIV, d_B, LDB, INFO, h_work_M_S);

I think this is the equivalent way to magma_sgesv_gpu, but there is no call to sgesv_gpu...
Why?

We are going to fix this. There is no particular reason - we should group the pair of calling magma_sgetrf_gpu and magma_sgetrs_gpu into a sgesv_gpu routine (currently not added mainly because we missed it).

2) The testing_sgesv_gpu.cpp does not give CPU results. Only it gives GPU results.
Why?

There is no particular reason for this one either. We will make the tester uniform with the others.

3) My code has several calls to Cublas_sgemm. May I substitute it by MAGMA_sgemm to get better
results?

Yes, especially for sizes not multiple of 32. magma_sgemm uses a combination of kernels and may need some additional tuning but in general should be faster for the sizes not multiple of the algorithm's internal blocking sizes (e.g. 32).

Regards,
Stan
Stan Tomov
 
Posts: 249
Joined: Fri Aug 21, 2009 10:39 pm

Re: Several questions about linear LU solvers in Magma 0.2

Postby jpeinado » Fri Dec 04, 2009 1:02 pm

Hi again:

Thank you very much for your help Stan.

Your work it is very interesting...

I will stay tuned for next version of MAGMA...

jpeinado
jpeinado
 
Posts: 10
Joined: Thu Dec 03, 2009 2:53 pm


Return to User discussion

Who is online

Users browsing this forum: No registered users and 1 guest

cron