This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

GPU Computing

Accelerate your code by running it on a GPU

To speed up your code, first try profiling and vectorizing it. For information, see Performance and Memory (MATLAB). After profiling and vectorizing, you can also try using your computer’s GPU to speed up your calculations. If all the functions that you want to use are supported on the GPU, you can simply use gpuArray to transfer input data to the GPU, and call gather to retrieve the output data from the GPU. To get started with GPU computing, see Run MATLAB Functions on a GPU.

For deep learning, MATLAB® provides automatic parallel support for multiple GPUs. See Deep Learning with MATLAB on Multiple GPUs (Deep Learning Toolbox).

Featured Examples