Page 1 of 1

Magma 1.5 Cuda 6.5 On entry to SGEMM parameter number 1 had

Posted: Sun Nov 02, 2014 9:44 am
by XapaJIaMnu
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?

Re: Magma 1.5 Cuda 6.5 On entry to SGEMM parameter number 1

Posted: Mon Nov 03, 2014 10:52 am
by mgates3
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

Re: Magma 1.5 Cuda 6.5 On entry to SGEMM parameter number 1

Posted: Mon Nov 03, 2014 11:58 am
by XapaJIaMnu
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?

Re: Magma 1.5 Cuda 6.5 On entry to SGEMM parameter number 1

Posted: Fri Nov 07, 2014 11:16 am
by mgates3
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