Speeding up MATLAB code using GPUs?

AccelerEyes announced in December 2012 that it was working with Mathworks using the GPU code and discontinued its Jacket product for MATLAB:

http://blog.accelereyes.com/blog/2012/12/12/exciting-updates-from-accelereyes/

Unfortunately, they no longer sell Jacket licenses.

As far as I understand, the Jacket GPU ArrayFire solution was much faster than the gpuArray solution provided by MATLAB.

I started working with gpuArray, but I see that many functions are poorly implemented. For example, simple

myArray(:) = 0 

very slow. I wrote some custom CUDA cores, but the poorly implemented standard MATLAB functionality adds a lot of overhead, even if it works constantly with gpuArrays. I fixed some problems by replacing the MATLAB code with the hand-written CUDA code, but I do not want to override the standard MATLAB functions.

Another feature I miss is sparse matrices of GPUs.

So my questions are:

How to speed up failed default GPU implementations provided by MATLAB? In particular, how to speed up work with a sparse matrix in MATLAB using the GPU?

+54
matlab gpu gpgpu jacket
Jun 05 '13 at 15:18
source share
2 answers

MATLAB supports a CUDA-based graphics processor. You must access it from the "Parallel Computing Toolbox". Hope these 2 links also help:

Features of the Parallel Computing Toolbox

Main functions

  • Parallel for-loops (parfor) to run tasks-parallel algorithms on multiple processors
  • Support for NVIDIA GPUs with CUDA Support
  • Full use of multi-core processors on the desktop using workers that run locally
  • Support for computer clusters and networks (with MATLAB distributed computing server)
  • Interactive and batch execution of parallel applications
  • Distributed arrays and uniprocessor multiple data (spmd) for processing big data and parallel data algorithms

Support for the MATLAB graphics platform for NVIDIA GPUs with CUDA support

Using MATLAB for GPU computing makes GPU-based applications faster than with C or Fortran. Thanks to the familiar MATLAB language, you can use CUDA GPU computing technology without having to learn the intricacies of GPU architectures or low-level GPU computing libraries.

You can use GPUs with MATLAB through the Parallel Computing Toolbox , which supports:

  • NVIDIA CUDA-enabled GPUs with 2.0 or higher computing capabilities. For releases 14a and earlier, the computing power of 1.3 is sufficient.
  • Using the GPU directly from MATLAB
  • Multiple GPUs on desktops and computers using MATLAB desktops in the Parallel Computing Toolbox and MATLAB Distributed Computing Server
+4
Nov 15 '13 at 12:11
source share
— -

I had the pleasure of attending the conversation of John, founder of AccelerEyes. They did not get acceleration because they simply deleted the poorly written code and replaced it with code that saved several bits here and there. Their acceleration mainly consisted in using cache accessibility and performing a large number of operations in random access memory (GPU). Matlab relied on data transfer between the GPU and the CPU, if I remember correctly, and therefore the acceleration was crazy.

+2
Oct 31 '13 at 6:10
source share



All Articles