Main Content

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).

  • Computer Vision Toolbox™ (recommended).

  • Deep Learning Toolbox™ (required for deep learning).

  • Embedded Coder® (recommended).

  • Image Processing Toolbox™ (recommended).

  • Simulink Coder (required for generating code from Simulink models).

  • GPU Coder Interface for Deep Learning Libraries 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).

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 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.

    TargetCompute Capability

    CUDA MEX

    See GPU Support by Release.

    Source code, static or dynamic library, and executables

    3.2 or higher.

    Deep learning applications in 8-bit integer precision

    6.1, 6.3 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

C/C++ Compiler:

Linux®

Windows®

GCC C/C++ compiler. For supported versions, see Supported and Compatible Compilers

Microsoft® Visual Studio® 2013

Microsoft Visual Studio 2015

Microsoft Visual Studio 2017

Microsoft Visual Studio 2019

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 NameInformation

CUDA toolkit

GPU Coder has been tested with CUDA toolkit v9.x-v11.0.

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.1.0.

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 v7.2.x.

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

 General

 CUDA Toolkit

 Deep Learning

 NVIDIA Embedded Targets

 ARM Mali

See Also

Apps

Functions

Objects

Related Topics