GPU Computing
通过运行在GPU加速您的代码
To speed up your code, first try profiling and vectorizing it. For information, seePerformance 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 usegpuArray
to transfer input data to the GPU, and callgather
to retrieve the output data from the GPU. To get started with GPU computing, seeRun MATLAB Functions on a GPU.
For deep learning, MATLAB®provides automatic parallel support for multiple GPUs. SeeDeep Learning with MATLAB on Multiple GPUs(Deep Learning Toolbox).
Frequently Viewed Topics
- GPU Computing in MATLAB
Accelerate your code using basic GPU computing - GPU CUDA and MEX Programming
Further accelerate your code using advanced GPU CUDA and MEX programming