Kernel Creation from MATLAB Code
GPU Coder™ generates and executes optimized CUDA kernels for specific algorithm structures and patterns in your MATLAB® code. The generated code calls optimized NVIDIA® CUDA libraries, including cuFFT, cuSolver, cuBLAS, cuDNN, and TensorRT. You can integrate the generated code into your project as source code, static libraries, or dynamic libraries, and compile the code for desktops, servers, and GPUs embedded on NVIDIA Jetson, DRIVE, and other platforms. You can also use GPU Coder to incorporate handwritten CUDA code into your algorithms and into the generated code.
Apps
Functions
Code Configuration Settings
Objects
Topics
- Configure GPU Code Generation
Configure the code generator using configuration objects or the GPU Coder app.
- Kernels from Element-Wise Loops
Create kernels from MATLAB functions containing scalarized, element-wise math operations.
- Generate GPU Kernels for Reduction Operations
Create kernels from MATLAB functions containing reduction operations.
- Kernels from Library Calls
Target GPU optimized math libraries such as cuBLAS, cuSOLVER, and cuFFT.
- Support for GPU Arrays
Generate CUDA code that uses GPU arrays.
- Use Dynamically Allocated C++ Arrays in Generated Function Interfaces
Understand and use dynamically allocated arrays from the generated CUDA C++ function interfaces.
- Call Custom CUDA Kernels from the Generated Code
Integrate custom CUDA kernels with MATLAB code intended for code generation.
- Call Custom CUDA Device Functions from Generated Code
Integrate custom GPU device functions with MATLAB code intended for code generation.
- Design Patterns
Create kernels for MATLAB functions containing computational design patterns.
- Reduce GPU Memory Allocations By Using GPU Memory Manager
Avoid repetitive memory allocations by creating and reusing memory pools for generated CUDA applications.
- What Is Half Precision?
Introduction to the half-precision data type in MATLAB and Simulink®.
- Half Precision Code Generation Support
C/C++ and GPU code generation support for functions that support half-precision inputs.







