2. When I do sgemm(a, b, c) where a and b are gpuarray's, I am getting
c = np.dot(b, a) instead of c = np.dot(a, b). Does gpuarray convert
row major format to something else (column?) in its internal
representation? Or am I calling sgemm incorrectly?
I have a wrapper for CUBLAS in my Python package PARRET. I know exactly
what is happening here. Let me just quote what I have in PARRET's
documentation.
Since GPUArray stores matrix entries in row-major ordering, but CUBLAS
assumes column-major ordering, caution need to be taken when passing
GPUArray objects as arguments.
* No change need to be made for BLAS 1 functions.
* For BLAS 2 functions, the matrix is interpreted as transposed
matrix, so the transp flag need to be set accordingly.
* For BLAS 3 functions, the input matrices and output matrix are
interpreted as transposed matrices, so the order of matrix
multiplication need to switched, while the transp flags should
remain unchanged.
Ying Wai (Daniel) Fan
_______________________________________________
PyCUDA mailing list
[email protected]
http://host304.hostmonster.com/mailman/listinfo/pycuda_tiker.net