Installing Prerequisite Products
To use GPU Coder™ for CUDA® code generation, you must install and setup the following products. For setup instructions , see Setting Up the Prerequisite Products.
MathWorks Products and Support Packages
MATLAB® (required).
MATLAB Coder™ (required).
Parallel Computing Toolbox™ (required).
Simulink® (required for generating code from Simulink models).
Deep Learning Toolbox™ (required for deep learning).
Embedded Coder® (required for GPU performance analyzer).
Simulink Coder (required for generating code from Simulink models).
GPU Coder Interface for Deep Learning support package (required for deep learning).
MATLAB Coder Support Package for NVIDIA® Jetson™ and NVIDIA DRIVE® Platforms (required for deployment to embedded targets such as NVIDIA Jetson and Drive).
Computer Vision Toolbox™ (recommended).
Image Processing Toolbox™ (recommended).
For instructions on installing MathWorks® products, see the MATLAB installation documentation for your platform. If you have installed
MATLAB and want to check which other MathWorks products are installed, enter ver
in
the MATLAB Command Window.
To install the support packages, use the Add-On Explorer in MATLAB.
If MATLAB is installed on a path that contains non 7-bit ASCII characters, such as Japanese characters, GPU Coder does not work because it cannot locate code generation library functions.
Third-Party Hardware
NVIDIA GPU enabled for CUDA with a compatible graphics driver. For more information, see CUDA GPUs (NVIDIA).
To see the CUDA compute capability requirements for code generation, consult the following table.
Target Compute Capability CUDA MEX
Source code, static or dynamic library, and executables
3.2 or higher.
Deep learning applications in 8-bit integer precision
6.1, 7.0 or higher.
Deep learning applications in half-precision (16-bit floating point)
5.3, 6.0, 6.2 or higher.
ARM® Mali graphics processor.
For the Mali device, GPU Coder supports code generation for only deep learning networks.
Third-Party Software
Required
Software Name | Additional Information | Linux® | Windows® |
---|---|---|---|
C/C++ Compiler | N/A | GCC C/C++ compiler For supported versions, see Supported and Compatible Compilers. | Microsoft® Visual Studio® 2022 |
Microsoft Visual Studio 2019 | |||
Microsoft Visual Studio 2017 | |||
NVIDIA Display Driver | Minimum required driver version CUDA applications can run with limited feature set, on systems with the minimum required driver version. | >= 450.80.02 | >= 452.39 |
Driver version for full compatibility | >= 520.61.05 | >= 520.06 |
Note
The table lists the driver version requirements for CUDA Toolkit v11.8. For different CUDA Toolkit versions, refer to the CUDA Toolkit release notes (NVIDIA).
Optional
For CUDA MEX, the code generator uses the NVIDIA compiler and libraries installed with MATLAB. Standalone code (static library, dynamically linked library, or executable program) generation has additional software requirements.
Software Name | Information |
---|---|
CUDA Toolkit | GPU Coder has been tested with CUDA Toolkit v9.x-v12.2. To download the CUDA Toolkit, see CUDA Toolkit Archive (NVIDIA). |
NVIDIA CUDA deep neural network library (cuDNN) for NVIDIA GPUs | For the host GPU device, GPU Coder has been tested with cuDNN v8.9. To download cuDNN, see cuDNN (NVIDIA). |
NVIDIA TensorRT™ high performance inference optimizer and runtime library | For the host GPU device, GPU Coder has been tested with TensorRT v8.6.1. To download TensorRT, see TensorRT (NVIDIA). |
ARM Compute Library for Mali GPUs | GPU Coder has been tested with v19.05. For more information, see Compute Library (ARM). |
Open Source Computer Vision Library (OpenCV) | Required for deep learning examples. For examples targeting NVIDIA GPUs on the host development computer, use OpenCV v3.1.0. For examples targeting ARM GPUs, use OpenCV v2.4.9 on the ARM target hardware. For more information, see OpenCV. |
Tips
See Also
Apps
Functions
Objects
Related Topics
- Setting Up the Prerequisite Products
- The GPU Environment Check and Setup App
- Generate Code by Using the GPU Coder App
- Generate Code Using the Command Line Interface
- Code Generation for Deep Learning Networks by Using cuDNN
- Code Generation for Deep Learning Networks by Using TensorRT
- Code Generation for Deep Learning Networks Targeting ARM Mali GPUs