User`s guide

9 GPU Computing
9-2
GPU Capabilities and Performance
In this section...
“Capabilities” on page 9-2
“Performance Benchmarking” on page 9-2
Capabilities
Parallel Computing Toolbox enables you to program MATLAB to use your computer’s
graphics processing unit (GPU) for matrix operations. In many cases, execution in the
GPU is faster than in the CPU, so this feature might offer improved performance.
Toolbox capabilities with the GPU let you:
“Identify and Select a GPU Device” on page 9-18
“Transfer Arrays Between Workspace and GPU” on page 9-3
“Run Built-In Functions on a GPU” on page 9-8
“Run Element-wise MATLAB Code on GPU” on page 9-13
“Run CUDA or PTX Code on GPU” on page 9-20
“Run MEX-Functions Containing CUDA Code” on page 9-31
Performance Benchmarking
You can use gputimeit to measure the execution time of functions that run on the GPU.
For more details, see “Measure and Improve GPU Performance” on page 9-35.
The MATLAB Central file exchange offers a function called gpuBench, which measures
the execution time for various MATLAB GPU tasks and estimates the peak performance
of your GPU. See http://www.mathworks.com/matlabcentral/fileexchange/34080-
gpubench.