And I used Intel MKL and OpenBLAS for the background libraries.
Solution
When performing vector-matrix product, the Numo::Linalg.dot method calls the gemv function on BLAS with setting transpose option. Even if the transpose option is set, the gemv function does not need to invert the size of rows and columns of a matrix. However, because the size of rows and columns are inverted on another line, the bug occurs. Thus, I added a code to invert the size of rows and columns just before the gemv function is called.
Test
I confirmed that the bug was fixed and a new bug was not introduced in matrix-vector product.
Problem
I found a bug on the
Numo::Linalg.dot
method. The bug occurs when performing vector-matrix product:My environment running the above codes is as follows:
And I used
Intel MKL
andOpenBLAS
for the background libraries.Solution
When performing vector-matrix product, the
Numo::Linalg.dot
method calls thegemv
function on BLAS with setting transpose option. Even if the transpose option is set, the gemv function does not need to invert the size of rows and columns of a matrix. However, because the size of rows and columns are inverted on another line, the bug occurs. Thus, I added a code to invert the size of rows and columns just before the gemv function is called.Test
I confirmed that the bug was fixed and a new bug was not introduced in matrix-vector product.