Main Content

GPU Code Generation from MATLAB Applications

Generate CUDA® code for deployment on desktop or embedded targets

Use GPU Coder™ together with Deep Learning Toolbox™ to generate CUDA MEX or standalone CUDA code that runs on desktop or embedded targets. You can deploy the generated standalone CUDA code that uses the CUDA deep neural network library (cuDNN), the TensorRT™ high performance inference library, or the ARM® Compute library for Mali GPU.

Functions

codegenGenerate C/C++ code from MATLAB code
coder.getDeepLearningLayersGet the list of layers supported for code generation for a specific deep learning library
coder.loadDeepLearningNetworkLoad deep learning network model
coder.DeepLearningConfigCreate deep learning code generation configuration objects

Apps

GPU CoderGenerate GPU code from MATLAB code

Topics

Overview

Supported Networks, Layers, and Classes (GPU Coder)

Networks, layers, and classes supported for code generation.

Code Generation for dlarray (GPU Coder)

Use deep learning arrays in MATLAB code intended for code generation.

Code Generation for Deep Learning Networks by Using cuDNN (GPU Coder)

Generate code for pretrained convolutional neural networks by using the cuDNN library.

Code Generation for Deep Learning Networks by Using TensorRT (GPU Coder)

Generate code for pretrained convolutional neural networks by using the TensorRT library.

Update Network Parameters After Code Generation (GPU Coder)

Perform post code generation updates of deep learning network parameters.

Applications

Code Generation for a Deep Learning Simulink Model that Performs Lane and Vehicle Detection (GPU Coder)

This example shows how to develop a CUDA® application from a Simulink® model that performs lane and vehicle detection using convolutional neural networks (CNN).

Generate Digit Images on NVIDIA GPU Using Variational Autoencoder (GPU Coder)

This example shows how to generate CUDA® MEX for a trained variational autoencoder (VAE) network.

Code Generation For Object Detection Using YOLO v3 Deep Learning

This example shows how to generate CUDA® MEX for a you only look once (YOLO) v3 object detector with custom layers.

Code Generation for a Deep Learning Simulink Model to Classify ECG Signals (GPU Coder)

This example demonstrates how you can use powerful signal processing techniques and Convolutional Neural Networks together to classify ECG signals.

Code Generation for Deep Learning Networks

This example shows how to perform code generation for an image classification application that uses deep learning.

Code Generation for a Sequence-to-Sequence LSTM Network

This example demonstrates how to generate CUDA® code for a long short-term memory (LSTM) network.

Deep Learning Prediction on ARM Mali GPU

This example shows how to use the cnncodegen function to generate code for an image classification application that uses deep learning on ARM® Mali GPUs.

Deploy Signal Classifier on NVIDIA Jetson Using Wavelet Analysis and Deep Learning

This example shows how to generate and deploy a CUDA® executable that classifies human electrocardiogram (ECG) signals using features extracted by the continuous wavelet transform (CWT) and a pretrained convolutional neural network (CNN).

Code Generation for Object Detection by Using YOLO v2

This example shows how to generate CUDA® MEX for a you only look once (YOLO) v2 object detector.

Lane Detection Optimized with GPU Coder

This example shows how to generate CUDA® code from a deep learning network, represented by a SeriesNetwork object.

Deep Learning Prediction by Using NVIDIA TensorRT

This example shows code generation for a deep learning application by using the NVIDIA TensorRT™ library.

Traffic Sign Detection and Recognition

This example shows how to generate CUDA® MEX code for a traffic sign detection and recognition application that uses deep learning.

Logo Recognition Network

This example shows code generation for a logo classification application that uses deep learning.

Code Generation for Denoising Deep Neural Network

This example shows how to generate CUDA® MEX from MATLAB® code and denoise grayscale images by using the denoising convolutional neural network (DnCNN [1]).

Code Generation for Semantic Segmentation Network

This example shows code generation for an image segmentation application that uses deep learning.

Train and Deploy Fully Convolutional Networks for Semantic Segmentation

This example shows how to train and deploy a fully convolutional semantic segmentation network on an NVIDIA® GPU by using GPU Coder™.

Code Generation for Semantic Segmentation Network That Uses U-net

This example shows code generation for an image segmentation application that uses deep learning.