GPU Coder - Generate CUDA code from MATLAB code - MATLAB (original) (raw)

Main Content

Generate CUDA code from MATLAB code

Description

The GPU Coder app generates CUDA® C++ code from MATLAB® code. You can generate CUDA C++ source code, static libraries, dynamically linked libraries, and executables that you can then integrate into existing CUDA C++ applications outside of MATLAB. You can also generate CUDA MEX functions for MATLAB acceleration. The GPU Coder™ app is integrated into the MATLAB desktop. You can use the app in the installed version of MATLAB and MATLAB Online™.

The app includes:

Using the app, you can:

GPU Coder app

Open the GPU Coder App

Programmatic Use

Version History

Introduced in R2017b

expand all

The GPU Coder app has been redesigned to use several panes integrated into the MATLAB desktop. In previous releases, the app opened in a separate window.

The GPU Coder app is available in MATLAB Online.

By default, the GPU Coder app saves projects with the .coderprj extension instead of a .prj extension. If you open a GPU Coder project created in previous releases, the app saves a copy of the PRJ file as a CODERPRJ file. The app saves changes you make to the CODERPRJ file.

When opening a code generation project from a prior release, the app does not copy parameters specific to NVIDIA® Jetson™ or NVIDIA DRIVE® platforms from the PRJ file to the CODERPRJ file. If you open a project from a prior release that uses NVIDIA Jetson or NVIDIA DRIVE, verify the hardware settings before generating code.

To check for issues in generated code, use the Run Generated MEX button in the GPU Coder tab. You must provide a script that executes your entry-point functions. For more information, seeVerify Correctness of the Generated Code.

In previous releases, you verified generated CPU or GPU code using theCheck for Issues step.

The app does not support converting double-precision MATLAB code to single-precision CUDA code. Use the codegen command with the-singleC option instead. For more information, see Generate Single-Precision C Code at the Command Line. This option requires Fixed-Point Designer™.

The Search Paths parameter is not available in the GPU Coder app. To add additional folders to the search path, generate code using the codegen command with the-I option.

See Also

Apps

Functions

Objects

Topics