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
Several questions about linear LU solvers in Magma 0.2
-
Stan Tomov
- Posts: 283
- Joined: Fri Aug 21, 2009 10:39 pm
Re: Several questions about linear LU solvers in Magma 0.2
Hello Jpeinado,
We are happy to hear you use and like the MAGMA package.
Regards,
Stan
We are happy to hear you use and like the MAGMA package.
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).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?
There is no particular reason for this one either. We will make the tester uniform with the others.2) The testing_sgesv_gpu.cpp does not give CPU results. Only it gives GPU results.
Why?
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).3) My code has several calls to Cublas_sgemm. May I substitute it by MAGMA_sgemm to get better
results?
Regards,
Stan
Re: Several questions about linear LU solvers in Magma 0.2
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
Thank you very much for your help Stan.
Your work it is very interesting...
I will stay tuned for next version of MAGMA...
jpeinado