Thread Subject: MATLAB on GPUs

Subject: MATLAB on GPUs

From: Scott Hirsch

Date: 16 Apr, 2009 17:04:01

Message: 1 of 9

Sebastien (http://www.mathworks.com/matlabcentral/newsreader/author/99754) asked the following question about running MATLAB on GPUs. The discussion didn't quite fit in it's parent thread, so I'm pulling it out here.

"Well, it's not the topic of the subject, but can we imagine a Matlab 2011 (maybe earlier) where computations are deported on GPU with either CUDA/OpenCV API standard ? (I know there is an excellent third party software doing this job, but I think, it should be included in the main package) ..."

What do you all think about this, and what would your expectations be of such capabilities?

Thanks,
 -scott

Subject: MATLAB on GPUs

From: Ken Campbell

Date: 17 Apr, 2009 17:04:01

Message: 2 of 9

"Scott Hirsch" <shirsch.nospam@mathworks.com> wrote in message <gs7oe1$j78$1@fred.mathworks.com>...
> Sebastien (http://www.mathworks.com/matlabcentral/newsreader/author/99754) asked the following question about running MATLAB on GPUs. The discussion didn't quite fit in it's parent thread, so I'm pulling it out here.
>
> "Well, it's not the topic of the subject, but can we imagine a Matlab 2011 (maybe earlier) where computations are deported on GPU with either CUDA/OpenCV API standard ? (I know there is an excellent third party software doing this job, but I think, it should be included in the main package) ..."
>
> What do you all think about this, and what would your expectations be of such capabilities?
>
> Thanks,
> -scott

I'm interested in the general idea of using GPUs to speed up calculations but I didn't immediately think of using Matlab as a 'controller' for this. I get the impression from lurking on this newsgroup that people who really worry about processing speed tend to use Matlab for prototyping and then port to something else (like C++, Fortran etc.) for the actual release.

On the other hand, if Matlab can use GPUs to speed up calculations without the user having to know much too much about how this is being done, that seems like a good idea. I think of that (perhaps controversially) as being similar to the way Matlab uses LAPACK to do some matrix operations. Perhaps, the multithreading that is gradually being introduced into Matlab, is a better example of a similar process.

Ken

Subject: MATLAB on GPUs

From: The GP-you Group The GP-you Group

Date: 28 Apr, 2009 23:36:02

Message: 3 of 9

"Scott Hirsch" <shirsch.nospam@mathworks.com> wrote in message <gs7oe1$j78$1@fred.mathworks.com>...
> Sebastien (http://www.mathworks.com/matlabcentral/newsreader/author/99754) asked the following question about running MATLAB on GPUs. The discussion didn't quite fit in it's parent thread, so I'm pulling it out here.
>
> "Well, it's not the topic of the subject, but can we imagine a Matlab 2011 (maybe earlier) where computations are deported on GPU with either CUDA/OpenCV API standard ? (I know there is an excellent third party software doing this job, but I think, it should be included in the main package) ..."
>
> What do you all think about this, and what would your expectations be of such capabilities?
>
> Thanks,
> -scott

Hi,

you can try our Freeware library GPUmat from http://www.gp-you.org. GPUmat enables Matlab code to run on GPUs. Check the documentation to find out how many features we have implemented.

Thanks,
The GP-you Group

Subject: MATLAB on GPUs

From: Gus Lott

Date: 5 May, 2009 13:26:02

Message: 4 of 9

I think this is where Matlab should be going. One realm they clearly lack in is in the rendering of 3D models. Their renderers seem to be all software driven. AccelerEyes' "jacket" product is pretty fricking cool, but is not comprehensively supported in the handle graphics hierarchy. It's basically just a bunch of MEX files porting the CUDA code into Matlab.

I'd like to see patch/surf/line/image objects with properties that can be interacted with (button down functions) as well as set/get functionality to modify hardware rendered scenes.

I have many applications where this is the bottleneck in Matlab and we end up going to other canned tools (i.e. amira) that can handle this kind of load.

As for raw GPU computing, this is more of an HPC problem in general and it looks like Accelereyes is handling that well. The 3D visualization is the main thing that i see as holding Matlab back in scientific programming.

Subject: MATLAB on GPUs

From: Sebastien Paris

Date: 5 May, 2009 14:15:05

Message: 5 of 9

For me, GPU computation is clearly the future of Matlab. Why ?
i) Because major API such BLAS/LAPACK/ FFTW, etc... are multithreaded and will be fully "GPUed" soon so Matlab should follow the same direction (since Matlab core is nothing else than a cake of API)

ii) Graphic compagnies know that scientific market is very promising so I'am sure than next generation of graphic card will see an huge improvement in double type speed computation ... (versus single)

iii) Because it break nothing in Matlab and it will be very transparent for common user ...

iv) Because, if matlab will not take this path, other scientific language will take it ...


Sebastien


"Gus Lott" <lottg.nospam@janelia.hhmi.org> wrote in message <gtpepa$b6t$1@fred.mathworks.com>...
> I think this is where Matlab should be going. One realm they clearly lack in is in the rendering of 3D models. Their renderers seem to be all software driven. AccelerEyes' "jacket" product is pretty fricking cool, but is not comprehensively supported in the handle graphics hierarchy. It's basically just a bunch of MEX files porting the CUDA code into Matlab.
>
> I'd like to see patch/surf/line/image objects with properties that can be interacted with (button down functions) as well as set/get functionality to modify hardware rendered scenes.
>
> I have many applications where this is the bottleneck in Matlab and we end up going to other canned tools (i.e. amira) that can handle this kind of load.
>
> As for raw GPU computing, this is more of an HPC problem in general and it looks like Accelereyes is handling that well. The 3D visualization is the main thing that i see as holding Matlab back in scientific programming.

Subject: MATLAB on GPUs

From: Matti Jukola

Date: 7 May, 2009 10:45:03

Message: 6 of 9

"Scott Hirsch" <shirsch.nospam@mathworks.com> wrote in message <gs7oe1$j78$1@fred.mathworks.com>...
> Sebastien (http://www.mathworks.com/matlabcentral/newsreader/author/99754) asked the following question about running MATLAB on GPUs. The discussion didn't quite fit in it's parent thread, so I'm pulling it out here.
>
> "Well, it's not the topic of the subject, but can we imagine a Matlab 2011 (maybe earlier) where computations are deported on GPU with either CUDA/OpenCV API standard ? (I know there is an excellent third party software doing this job, but I think, it should be included in the main package) ..."
>
> What do you all think about this, and what would your expectations be of such capabilities?
>
> Thanks,
> -scott

I feel that GPGPU and other means of parallel/simd computing will be more important in following years, but I still don't fully expect that Mathworks would implement these capabilities to MATLAB very fast. Reason for this is immaturity of GPU computing, its frameworks (CUDA/OpenCL) and not so sure future of current gpu and cpu architectures and how these will change parallelization (Intel Larrabee, NVIDIA GeForce 300, ATI ?, AMD Bulldozer, etc).

While Mathworks is considering implementing GPU computing (preferably OpenCL) to MATLAB, smaller GPU packages like Jacket and gp-you will show how larger crowd will react to GPU-computing for MATLAB. But I don't see myself using Jacket or gp-you. Jacket is way too expensive for non-commercial workstation use and its function support feels too limited (at least for image processing). Gp-you is new player and its 'freeware'. However gp-you-group has not released much information who they are and what is their plan for gp-you development. Personally I think that gp-yous 'freeware' is closer to 'free beta testers (non-commercial) wanted for commercial project'.

What I would like to see is open source project that implements available CUDA/OpenCL kernels/librarys, easy/fast GPU memory management (like Jacket and gp-you have) and relatively easy GPU function extensibility to MATLAB. If there is more people willing to spend their time to project like this, please speak up.

Matti Jukola

Subject: MATLAB on GPUs

From: Sebastien Paris

Date: 7 May, 2009 14:10:03

Message: 7 of 9

yes it shoud be great to have a such open project... but based on which API ? CUDA or OPENCL ?. It remind me another fight between two HD disc Formats : HD DVD & Blue Ray ....


"Matti Jukola" <donotspamr...s.k....p.o.s....t......i@gmail.com> wrote in message <gtue3f$b95$1@fred.mathworks.com>...
> "Scott Hirsch" <shirsch.nospam@mathworks.com> wrote in message <gs7oe1$j78$1@fred.mathworks.com>...
> > Sebastien (http://www.mathworks.com/matlabcentral/newsreader/author/99754) asked the following question about running MATLAB on GPUs. The discussion didn't quite fit in it's parent thread, so I'm pulling it out here.
> >
> > "Well, it's not the topic of the subject, but can we imagine a Matlab 2011 (maybe earlier) where computations are deported on GPU with either CUDA/OpenCV API standard ? (I know there is an excellent third party software doing this job, but I think, it should be included in the main package) ..."
> >
> > What do you all think about this, and what would your expectations be of such capabilities?
> >
> > Thanks,
> > -scott
>
> I feel that GPGPU and other means of parallel/simd computing will be more important in following years, but I still don't fully expect that Mathworks would implement these capabilities to MATLAB very fast. Reason for this is immaturity of GPU computing, its frameworks (CUDA/OpenCL) and not so sure future of current gpu and cpu architectures and how these will change parallelization (Intel Larrabee, NVIDIA GeForce 300, ATI ?, AMD Bulldozer, etc).
>
> While Mathworks is considering implementing GPU computing (preferably OpenCL) to MATLAB, smaller GPU packages like Jacket and gp-you will show how larger crowd will react to GPU-computing for MATLAB. But I don't see myself using Jacket or gp-you. Jacket is way too expensive for non-commercial workstation use and its function support feels too limited (at least for image processing). Gp-you is new player and its 'freeware'. However gp-you-group has not released much information who they are and what is their plan for gp-you development. Personally I think that gp-yous 'freeware' is closer to 'free beta testers (non-commercial) wanted for commercial project'.
>
> What I would like to see is open source project that implements available CUDA/OpenCL kernels/librarys, easy/fast GPU memory management (like Jacket and gp-you have) and relatively easy GPU function extensibility to MATLAB. If there is more people willing to spend their time to project like this, please speak up.
>
> Matti Jukola

Subject: MATLAB on GPUs

From: Matti Jukola

Date: 7 May, 2009 16:40:03

Message: 8 of 9

"Sebastien Paris" <sebastien.paris.nospam@lsis.org> wrote in message <gtuq3r$77e$1@fred.mathworks.com>...
> yes it shoud be great to have a such open project... but based on which API ? CUDA or OPENCL ?. It remind me another fight between two HD disc Formats : HD DVD & Blue Ray ....

My personal prediction is that NVIDIA wants to keep CUDA for its own HP TESLA-systems, but OpenCL will be much more popular with basic workstations and/or with consumers.

CUDA officially works only with NVIDIAs GPUs, on the other hand, OpenCL isn't yeat published, but it should work with GPUs, CPUs (and physics cards?). So for compatibility with hardware, OpenCL seems to be the best choice. But if we look through CUDA and OpenCL documentation, both have quite the same structure. So if there is serious interest in this subject, planning for basic functions/object/data-structures/extensibility could already be planned and tested with CUDA (or planned directly for OpenCL with its documentation). After I get my current project finished I will see what I can do for MATLAB<->CUDA implementation/integration.

Subject: MATLAB on GPUs

From: Allan Lyckegaard

Date: 12 May, 2009 11:38:01

Message: 9 of 9

"Matti Jukola" <donotspamr...s.k....p.o.s....t......i@gmail.com> wrote in message <gtv2t3$260$1@fred.mathworks.com>...
> "Sebastien Paris" <sebastien.paris.nospam@lsis.org> wrote in message <gtuq3r$77e$1@fred.mathworks.com>...
> > yes it shoud be great to have a such open project... but based on which API ? CUDA or OPENCL ?. It remind me another fight between two HD disc Formats : HD DVD & Blue Ray ....
>
> My personal prediction is that NVIDIA wants to keep CUDA for its own HP TESLA-systems, but OpenCL will be much more popular with basic workstations and/or with consumers.
>
> CUDA officially works only with NVIDIAs GPUs, on the other hand, OpenCL isn't yeat published, but it should work with GPUs, CPUs (and physics cards?). So for compatibility with hardware, OpenCL seems to be the best choice. But if we look through CUDA and OpenCL documentation, both have quite the same structure. So if there is serious interest in this subject, planning for basic functions/object/data-structures/extensibility could already be planned and tested with CUDA (or planned directly for OpenCL with its documentation). After I get my current project finished I will see what I can do for MATLAB<->CUDA implementation/integration.

I think an open source CUDA-toolbox for Matlab (and maybe even Octave) would be of great interest for many Matlab users aroundthe world. I know from my own community (materials science and tomography) that such a toolbox would be a hit.

I think it is important that it is released under a open source license e.g. GPL. This will also encourage people to contribute to the toolbox.

My knowledge on CUDA/OpenCL is limited so far but I am interested in contributing to the birth of such a project.

/Allan

Tags for this Thread

Everyone's Tags:

Add a New Tag:

Separated by commas
Ex.: root locus, bode

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Tag Activity for This Thread
Tag Applied By Date/Time
jacket James Malcolm 12 Dec, 2010 15:37:48
accelereyes James Malcolm 12 Dec, 2010 15:37:48
toolbox Allan Lyckegaard 12 May, 2009 07:39:08
opencl Allan Lyckegaard 12 May, 2009 07:39:08
cuda Allan Lyckegaard 12 May, 2009 07:39:08
gpu Allan Lyckegaard 12 May, 2009 07:39:07
cuda Matti Jukola 7 May, 2009 06:49:03
open source Matti Jukola 7 May, 2009 06:49:03
opencl Matti Jukola 7 May, 2009 06:49:03
gpgpu Matti Jukola 7 May, 2009 06:49:03
project Matti Jukola 7 May, 2009 06:49:03
cuda Sebastien Paris 5 May, 2009 10:19:03
opencl Sebastien Paris 5 May, 2009 10:19:03
cpgpu Sebastien Paris 5 May, 2009 10:19:03
rssFeed for this Thread

Contact us at files@mathworks.com