MAGMA and cuBLAS. Can be mixed?

I’m trying to evaluate the performance of magmablas functions, but it’s the first time I play with Magma libraries and I have some doubts. I have some programs written to evaluate performance of some cuBLAS functions, and if I could just keep all the code except the call to the cuBLAS function it would be very simple. Is this possible?, I mean, allocate vectors and matrices using cublas_alloc, cublas_Setvector … and just change the call to cublas_dgemm (or what corresponds) by magmablas_dgemm (of course adapting the parameters).

Nothing like trying. And yes, it’s possible to do that and it works as expected. :)

If you look at the output of “nm lib/libmagma.a |grep cublas” with version 0.2 of MAGMA, you should see they also rely on CUBLAS. Since CUBLAS functions are typically wrappers around CUDA functions, and that all APIs (runtime vs. driver) should now interoperate properly, i guess you can safely give it a try indeed.