注册 | 登录

How do I run MATLAB code on the GPU using CUDA?

itPublisher 分享于




突然想找到这个文章的链接,但是可惜找不到了忘记了版主是谁呢,但是这篇文章比较系统的介绍了CUDA方面的知识。(忘记说了我使用的电脑配置gtx970 和 980都用过

I want to run MATLAB code on the GPU using NVIDIA's CUDA. I found a couple of 3rd-party engines:

Would anyone recommend these or are there better ones out there? Any tips or suggestions?

matlab cuda gpu jacket
  this question
edited Apr 4 '12 at 1:20 Pavan Yalamanchili 10.6k 2 22 47 asked Dec 8 '09 at 17:50 sjchoi 472 1 3 10


4 Answers

Parallel Computing Toolbox released with MATLAB R2010b now has GPU support, including overloads for various mathematical operations, and an interface with pre-existing CUDA kernels.

Doc here:

  this answer
edited Sep 28 '10 at 9:02 answered Dec 9 '09 at 8:06 Edric 16.7k 1 24 35      Jacket now is part of Parallel Computing Toolbox… –  mrgloom Jun 25 '13 at 6:46


Did you find this question interesting? Try our newsletter

Sign up for our newsletter and get our top new questions delivered to your inbox (see an example).

Subscribed! Success! Please click the link in the confirmation email to activate your subscription.

An additional source of information you may want to check out is this PDF white paper from NVIDIA: Accelerating MATLAB with CUDA Using MEX Files.

  this answer
answered Dec 8 '09 at 19:04 gnovice 92.2k 11 204 292


For a comparison of Jacket vs Matlab with CUDA check this out

Also you could use Jacket SDK to develop your own mexfiles in a simpler and more efficient manner (memory management wise)

  this answer
answered Jan 27 '11 at 9:51 Pavan Yalamanchili 10.6k 2 22 47


Overall, I would recommend Accelereyes Jacket; which was one of your findings in your original post.


主要是常规波束形成和方位历程图; 常规波束形成的matlab部分代码如下所示: for i = 1:length(theta)     a_s = exp(-jay*2*pi*[0:N-1]*f0*d/c*sin(theta(i)*pi

While it is not freeware, they do give very substantial educational discounts.

Having said that, performance-wise, any GPU compiler/language/sdk is going to speed up matrix/vector/algebraic/FFT/etc code an order of magnitude or more vs. traditional CPU coding. Even hyper-threaded, 8 way CPU code on my personal machine runs 48x faster with GPU acceleration on a relatively inexpensive nvidia quadro 4000 card. (You don't need to drop $2100 on a tesla unless school or someone else is providing it!)

Having said that, although I am proficient in c, c++, SQL of any kind, etc... I have programmed for well over a decade, I found jacket to be much easier to quickly and efficiently and OPTIMALLY get my real research work up to speed. I looked into GPUMat and Matlab PCT GPU, and found jacket to be an odd combination of power and ease of integration within matlab and the foreign world of GPU's. Jacket's support is also top notch. I would get a highly competent response typically within 1 business day and resolution to problem within 2 days was typical.

To me, THAT is a huge advantage. I fear GPUmat has very limited support, and matlab, while having seemingly comparable support to jacket, their support is not free of charge.

In summary, if you need to get your existing code (assuming it is a viable candidate for GPU parallelization) running 10-48x faster in about 2 weeks with excellent support, go jacket! (YMMV)

  this answer
answered Jul 7 '12 at 17:46 rrstesiak 11 1



Matlab&GPU&CUDA并行加速学习心得 1所需软件: l  NVIDIA GPU一块或多块,允许不同型号的GPU共存(本机配置了华硕GTX960); l  NVIDIA开发驱动程序(安装板卡的








您的注册邮箱: 修改

重新发送激活邮件 进入我的邮箱