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
codegen | Generate C/C++ code from MATLAB code |
coder.getDeepLearningLayers | Get the list of layers supported for code generation for a specific deep learning library |
coder.loadDeepLearningNetwork | Load deep learning network model |
coder.loadNetworkDistributionDiscriminator | Load network distribution discriminator for code generation (Since R2023a) |
coder.DeepLearningConfig | Create deep learning code generation configuration objects |
Apps
GPU Coder | Generate 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)
CUDA code generation fordlnetwork
anddlarray
objects. - Code Generation for Object Detection Using YOLO v4 Deep Learning (GPU Coder)
Generate plain CUDA code without dependencies on deep learning libraries for YOLO v4 object detector. - Code Generation for Object Detection Using YOLO v3 Deep Learning Network
This example shows how to generate CUDA® MEX for a you only look once (YOLO) v3 object detector. - 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 generate CUDA code 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 thecnncodegen
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
Generate and deploy a CUDA executable to classify electrocardiogram signals using wavelet-derived features. - 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 develop a deep learning lane detection application that runs on NVIDIA® GPUs. - Deep Learning Prediction with NVIDIA TensorRT Library
This example shows how to generate code 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 plain 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. - Code Generation for Semantic Segmentation Network That Uses U-net
This example shows code generation for an image segmentation application that uses deep learning.