non-square C-order matrices in cuBLAS ( numba )

Viewed 408

I'm trying to use the cuBLAS functions in Anaconda's Numba package and having an issue. I need the input matrices to be in C-order. The output can be in Fortran order.

I can run the example script provided with the package, here. The script has two functions, gemm_v1 and gemm_v2. In gemm_v1, the user has to create the input matrices in Fortran order. In gemm_v2, they can be passed to the cuda implementation of GEMM and transposed on the device. I can get these examples to work with square matrices. However, I can't figure out how to get gemm_v2 to work with non-square input matrices. Is there a way to work with C-order input matrices that are non-square?

Note:
Ideally, both the input and output matrices would stay on the device after the call to GEMM to be used in other calculations ( this is part of an iterative method ).

1 Answers
Related