Calling MAGMA from MATLAB
Calling MAGMA from MATLAB
I'm interested in performing QR and Cholesky matrix factorization on multiple GPUs. I am able to perform these factorizations on a single GPU using the MATLAB 2013b Parallel Computing Toolbox via the qr and chol functions. Are there instructions for invoking the QR and Cholesky MAGMA routines from within MATLAB so that multiple GPUs can be exploited? Why doesn't MATLAB use MAGMA for its GPU matrix factorization library so that multiple GPUs can be exploited?
Re: Calling MAGMA from MATLAB
To my knowledge, Matlab does not currently support multi-GPU functions, but that is a question/suggestion for MathWorks.
-mark
-mark
Re: Calling MAGMA from MATLAB
How difficult is it to invoke the MAGMA routines from within a MATLAB program? Are there instructions for doing this?
-
Boxed Cylon
- Posts: 36
- Joined: Sat Nov 21, 2009 6:03 pm
Re: Calling MAGMA from MATLAB
I wrote a tutorial on matlab+cuda using mex files a few years ago:
http://faculty.washington.edu/dushaw/ep ... l_2_10.pdf
A little dated, but I think it is still valid, generally.
Matlab's parallel processing toolbox has mostly superseded my laborious mex files, however. But it is nice to have the mex file approach working, just in case.
Also, matlab may have its own cuda libraries internally. One issue that has come up is a user's mex file may try to use these libraries first, rather than the expected libraries from cuda. One can test which libraries are used by doing >> !ldd usersmexfile.mex from within matlab. Perhaps matlab has sorted this issue out by now, however. (assuming linux as the OS here)
http://faculty.washington.edu/dushaw/ep ... l_2_10.pdf
A little dated, but I think it is still valid, generally.
Matlab's parallel processing toolbox has mostly superseded my laborious mex files, however. But it is nice to have the mex file approach working, just in case.
Also, matlab may have its own cuda libraries internally. One issue that has come up is a user's mex file may try to use these libraries first, rather than the expected libraries from cuda. One can test which libraries are used by doing >> !ldd usersmexfile.mex from within matlab. Perhaps matlab has sorted this issue out by now, however. (assuming linux as the OS here)