Open discussion for MAGMA library (Matrix Algebra on GPU and Multicore Architectures)
-
XapaJIaMnu
- Posts: 2
- Joined: Sun Nov 02, 2014 9:36 am
Post
by XapaJIaMnu » Sun Nov 02, 2014 9:44 am
Hey,
I recently upgraded magma from 1.4.1 to 1.5 and CUDA from 6.0 to 6.5 and noticed that a profiling program that I use now spams the console with:
Code: Select all
** On entry to SGEMM parameter number 1 had an illegal value
A lot of times...
Looking through the CUBLAS documentation SGEMM parameter one is cublasOperation_t transa, which in magma is translated as a char:
Code: Select all
#define cublas_trans_const( magma_const ) lapacke_trans_const( magma_const )
dheart@adjudicator /opt/magma/include % grep lapacke_trans_const *
magma_types.h:static inline char lapacke_trans_const ( magma_trans_t magma_const ) { return *lapack_trans_const ( magma_const ); }
Could this be the source of the issue or something worse is happening that I should be aware?
I'm using the eigen-magma fork to accelerate a neural network LM. Eigen-magma already needed a fix to compile against the latest magma. Is there something else that could've changed that I also need to fix?
-
mgates3
- Posts: 918
- Joined: Fri Jan 06, 2012 2:13 pm
Post
by mgates3 » Mon Nov 03, 2014 10:52 am
Previous versions of MAGMA (1.4.x and before) used character constants, e.g.,
magma_zgemm( 'N', 'T', ... )
Symbolic names were provided for these:
magma_zgemm( MagmaNoTrans, MagmaTrans, ... )
The new version of MAGMA (1.5 and later) changed these symbolic constants into enums, similar to how cblas, NVIDIA's cublas v2, and AMD's clBLAS use enums. Probably eigen-magma has not been updated to work with MAGMA 1.5.
The magma wrappers that you refer to (magma_zgemm calls cublasZgemm) are still calling the cublas v1 interface, which uses character constants, instead of the cublas v2 interface, which uses the enum constants. So I think that code is correct. The change to enums in MAGMA was the first step toward using cublas v2 for everything in MAGMA.
-mark
-
XapaJIaMnu
- Posts: 2
- Joined: Sun Nov 02, 2014 9:36 am
Post
by XapaJIaMnu » Mon Nov 03, 2014 11:58 am
Hey,
Thanks for answering.
eigen-magma has not been updated to the new Magma enum usage. I fixed the compile errors, but there might be something that didn't produce an error and therefore I didn't fix.
Do you know if this error comes from Magma or from Cublas? (AFAIK it's Cublas).
Is it an error or a warning?
Is there a test program in the Magma test suite that I can run to check if the problem is specifically with CUDA 6.5?
-
mgates3
- Posts: 918
- Joined: Fri Jan 06, 2012 2:13 pm
Post
by mgates3 » Fri Nov 07, 2014 11:16 am
That error:
** On entry to SGEMM parameter number 1 had an illegal value
looks like an error from LAPACK (via xerbla). Errors from MAGMA should look similar, but ought to say "magmablas_sgemm".
-mark