CUDA kernels are functions that are executed on the GPU device. These kernels are executed by many GPU threads in parallel. By efficiently mapping compute intensive portions of your algorithm to kernels, you can take advantage of the performance improvements provided by GPU computing technology. You can trigger GPU Coder™ to create CUDA kernels for specific algorithm structures and patterns in your MATLAB® code.
GPU Coder | Generate GPU code from MATLAB code |
Check GPU Install | Verify and set up the GPU code generation environment |
half | Construct half-precision numeric object |
coder.checkGpuInstall | Verify GPU code generation environment |
coder.gpuConfig | Configuration parameters for CUDA code generation from MATLAB code by using GPU Coder |
codegen | Generate C/C++ code from MATLAB code |
gpucoder | Open GPU Coder app |
coder.gpu.kernel | Pragma that maps for -loops to GPU kernels |
coder.gpu.kernelfun | Pragma that maps function to GPU kernels |
coder.gpu.nokernel | Pragma to disable kernel creation for loops |
coder.gpu.constantMemory | Pragma that maps a variable to the constant memory on GPU |
gpucoder.stencilKernel | Create CUDA code for stencil functions |
gpucoder.matrixMatrixKernel | Optimized GPU implementation of functions containing matrix-matrix operations |
gpucoder.batchedMatrixMultiply | Optimized GPU implementation of batched matrix multiply operation |
gpucoder.stridedMatrixMultiply | Optimized GPU implementation of strided and batched matrix multiply operation |
gpucoder.batchedMatrixMultiplyAdd | Optimized GPU implementation of batched matrix multiply with add operation |
gpucoder.stridedMatrixMultiplyAdd | Optimized GPU implementation of strided, batched matrix multiply with add operation |
gpucoder.sort | Optimized GPU implementation of the MATLAB sort function |
coder.gpu.iterations | Pragma that provides information to the code generator for making parallelization decisions on variable bound loops |
gpucoder.transpose | Optimized GPU implementation of the MATLAB transpose function |
gpucoder.reduce | Optimized GPU implementation for reduction operations |
coder.ceval | Call external C/C++ function |
coder.gpuConfig | Configuration parameters for CUDA code generation from MATLAB code by using GPU Coder |
coder.CodeConfig | Configuration parameters for C/C++ code generation from MATLAB code |
coder.EmbeddedCodeConfig | Configuration parameters for C/C++ code generation from MATLAB code with Embedded Coder |
coder.gpuEnvConfig | Create configuration object containing the parameters passed to
coder.checkGpuInstall for performing GPU code generation environment
checks |
Kernels from Element-Wise Loops
Create kernels from MATLAB functions containing scalarized, element-wise math operations.
Kernels from Scatter-Gather Type Operations
Create kernels from MATLAB functions containing reduction operations.
Target GPU optimized math libraries such as cuBLAS, cuSOLVER, cuFFT, and Thrust.
Generate CUDA code that uses GPU arrays.
Integrate custom GPU code with MATLAB code intended for code generation.
Create kernels for MATLAB functions containing computational design patterns.
GPU Memory Allocation and Minimization
Memory allocation options and optimizations for GPU Coder.