GPU Code Generation and Acceleration
After you develop your application using Computer Vision Toolbox™, you can generate optimized CUDA code for NVIDIA® graphics processing unit (GPU) from MATLAB code. The code can be integrated into your project as source code, static libraries, or dynamic libraries, and can be used for prototyping on GPUs. You can use the generated CUDA within MATLAB to accelerate computationally intensive portions of your MATLAB code in machine learning, deep learning, or other applications. You must have MATLAB Coder™ and GPU Coder™ to generate CUDA code.
To take advantage of the performance benefits offered by a modern GPU, certain Computer Vision Toolbox functions can run on a GPU. This support requires Parallel Computing Toolbox™.
Topics
- The GPU Environment Check and Setup App (GPU Coder)
Verify and set up the GPU code generation environment.
- Generate Code by Using the GPU Coder App (GPU Coder)
Generate CUDA code from MATLAB code by using the GPU Coder app.
- Generate Code Using the Command Line Interface (GPU Coder)
Generate CUDA code from MATLAB code by using the
codegen
command. - Run MATLAB Functions on a GPU (Parallel Computing Toolbox)
Supply a
gpuArray
argument to automatically run functions on a GPU. - GPU Computing Requirements (Parallel Computing Toolbox)
Support for NVIDIA GPU architectures.