--
You received this message because you are subscribed to the Google Groups "OpenBLAS-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openblas-user...@googlegroups.com.
To post to this group, send email to openbla...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
That did the trick. Am I mis-understanding the description of the parameters? It seemed like a 5x4 matrix would have 5 as its value for the first dimension, and it seems like the text above would be more likely to trigger it, providing a value where ldb actually is less than K.
On Wed, Aug 14, 2013 at 10:38 AM, Zhang Xianyi <traits...@gmail.com> wrote:
Hi Sean,
I think lda and ldb are wrong.You can try this.cblas_sgemm(CblasRowMajor, CblasNoTrans, CblasNoTrans, 4, 4, 5, 1, &(A[0][0]), 5, &(B[0][0]), 4, 0, &(C[0][0]), 4);
I'm probably missing something obvious, but I'm trying to get the provided Windows binaries working in a program compiling in visual studio. As a test bed, I have a 4x5 (row-major) matrix multiplied by a 5x4 matrix. As I understand the documentation at http://developer.apple.com/library/mac/DOCUMENTATION/Accelerate/Reference/BLAS_Ref/Reference/reference.html#//apple_ref/c/func/cblas_sgemm, that should be:cblas_sgemm(CblasRowMajor, CblasNoTrans, CblasNoTrans, 4, 4, 5, 1, &(A[0][0]), 4, &(B[0][0]), 5, 0, &(C[0][0]), 4);However, when I try that, I get an error message of "On entry to SGEMM, parameter 10 had an illegal value". Looking at the source code, I think that this is the relevant bit that determines the error message:nrowb = args.k;if (transb & 1) nrowb = args.n;....if (args.ldb < nrowb) info = 10;Above, K is 5, as is ldb. 5 is not less than 5, so I shouldn't be getting this error message. Does anyone have a potential explanation?
--
You received this message because you are subscribed to the Google Groups "OpenBLAS-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openblas-users+unsubscribe@googlegroups.com.
To post to this group, send email to openblas-users@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
Alright. I've figured it out. This is what I wound up with for my helper function which takes in our Matrix class and transpose arguments and ejects a result:int A_m = (tranA ? A.cols() : A.rows() );int A_n = (tranA ? A.rows() : A.cols() );int B_m = (tranB ? B.cols() : B.rows() );int B_n = (tranB ? B.rows() : B.cols() );if (A_n != B_m)ISI_THROW(IllegalArgumentException("Mismatch between source matrices sizes"));this -> resize(A_m, B_n, 0);Float* ptrA = A.el_[0];Float* ptrB = B.el_[0];Float* ptrC = this->el_[0];cblas_sgemm(CblasRowMajor, tranA ? CblasTrans : CblasNoTrans, tranB ? CblasTrans : CblasNoTrans,A_m, B_n, A_n, 1, ptrA, A.cols(), ptrB, B.cols(), 0, ptrC, B_n);So, in short, the first set of dimensions needs to be converted for the transposed dimensions, the latter set don't, and need to refer to columns when using C++ Row Major arrays.
INTEGER. Specifies the number of rows of the matrix op(A) and of the matrix C. The value of m must be at least zero.
INTEGER. Specifies the number of columns of the matrix op(B) and the number of columns of the matrix C.
INTEGER. Specifies the number of columns of the matrix op(A) and the number of rows of the matrix op(B).