MATLAB is very powerful software that has many toolboxes. So, I want to know if we can develop Multi-core supportive programs in MATLAB. If yes, kindly suggest how can we do it? Also recommend any book which can help me.
Since nobody has mentioned this: CUDA is an extension to C, so you can actually compile CUDA source with mex. The only thing you'll need is nvmex (http://www.cs.ucf.edu/~janaka/gpu/using_nvmex.htm) and CUDA libraries to link against. You can then call it directly from Matlab without any other specialized toolboxes. Here is an example for GPU based MaxFlow image segmentation: http://www.mathworks.com/matlabcentral/fileexchange/34126-fast-continuous-max-flow-algorithm-to-2d3d-image-segmentation
If you have a NVIDIA graphic card it is straightforward to use GPU processing in current MATLAB versions. If not, then try opencl (http://www.mathworks.com/matlabcentral/fileexchange/30109-opencl-toolbox-v0-17) which also works with AMD Radeon cards. This toolbox is limited and you will find a lot more support for opencl in Python. Hope this helps.
Hi, if you mean how to distribute the load among several processors and each of those using a different GPU, you might have to use MPI (I have a paper on the subject). Contact me if you need more information.
@Alberto, I don't want to use it with multiple GPU but I want to use it on a GPU with multiple cores. I just want to import my existing algorithm on multiple core mode.
Actually there are commands for running your algorithm on the GPU. There are couple of MATLAB webinars on this , where they explain stepwise how to do it. You can find those webinars on the mathworks site.
You need a CUDA capable card that is not too old and the parallel computing toolbox for Matlab.
The method for porting your code consists basically in creating your objects/arrays in the GPU memory and executing GPU functions on them. Quite many are already implemented in Matlab and the ones that are not can be implemented in CUDA and be called from MATLAB (there are examples in the toolbox)
As far as I know there is no automatic translation tool that will enable a GPU mode, you will have to port your code.
Since nobody has mentioned this: CUDA is an extension to C, so you can actually compile CUDA source with mex. The only thing you'll need is nvmex (http://www.cs.ucf.edu/~janaka/gpu/using_nvmex.htm) and CUDA libraries to link against. You can then call it directly from Matlab without any other specialized toolboxes. Here is an example for GPU based MaxFlow image segmentation: http://www.mathworks.com/matlabcentral/fileexchange/34126-fast-continuous-max-flow-algorithm-to-2d3d-image-segmentation
@Lopez, unfortunately I don't have PC here but I have Macbook Air that have Intel GPU5000 series. It has 40 GPU Cores and I think it is sufficient for programming. I know that now CUDA is not helpful for me. So, kindly advice some alternative options.
As far as I know, with Intel cards you are limited to alternatives such as OpenCL.
Matlab currently does not support any non nVidia card in the parallel toolbox, so there is no straightforward wayof using the Intle GPU in Matlab.
The only (twisted and complicated) way with an Intel card consists on going to OpenCL, create a C function that calls the OpenCL kernel and create a .mex file to call it from Matlab.
Very laborious since you still have to program OpenCL + additional code.
Quite a lot of work, and since you have to program OpenCL any
I'm glad to have access to that book you recommended from Science Direct. Can't wait to read.
I just have a little concern with the nvmex command that Martin Rajchl mentioned earlier. I've read that the nvmex tool is not supported by Mathworks anymore since sometime in 2009. But people are still passing on the files until now. As a new user, I'm very confused as of which ways to go forward!?
Do you have any comparisons between nvmex tool and the new parallel.gpu.CUDAKernel object in Matlab?
Apparently MATLAB 2013 supports CUDA with the parallel computation toolbox. You do not need the nvmex package anymore. you can simply Mex your CUDA files. Math works must have reacted to the demand.
Also the nvmex still works, even though it is not supported anymore.
Thank you very much! Book is in the mail now. I haven't had any success with the build-in Parallel Computing Toolbox although I follow the exact instruction to compile the file provided by Mathworks. Specifically I submitted one question on Matlab answer forum as below: