主要内容

MATLAB代码的内核创建

MATLAB代码结构和创建CUDA的模式®GPU kernels

GPU Coder™ generates and executes optimized CUDA kernels for specific algorithm structures and patterns in your MATLAB®代码. The generated code calls optimized NVIDIA®CUDA libraries, including cuFFT, cuSolver, cuBLAS, cuDNN, and TensorRT. The generated code can be integrated into your project as source code, static libraries, or dynamic libraries, and can be compiled for desktops, servers, and GPUs embedded on NVIDIA Jetson, DRIVE, and other platforms. GPU Coder lets you incorporate handwritten CUDA code into your algorithms and into the generated code.

Apps

expand all

GPU Coder Generate GPU code fromMATLAB代码
GPU Environment Check Verify and set up GPU code generation environment

Functions

expand all

代码gen 从中生成C/C ++代码MATLAB代码
GPUCODER OpenGPU Coderapp
Coder.CheckgPuinstall Verify GPU code generation environment
代码r.gpuConfig Configuration parameters forCUDA代码generation fromMATLAB使用代码GPU Coder
half Construct half-precision numeric object
代码r.gpu.kernel Pragma that mapsfor-loops to GPU kernels
代码r.gpu.kernelfun Pragma that maps function to GPU kernels
代码r.gpu.nokernel Pragma to disable kernel creation for loops
代码r.gpu.constantMemory Pragma that maps a variable to the constant memory on GPU
GPUCODER.stencilKernel 创造CUDA代码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
代码r.gpu.persistentMemory 将变量分配为GPU上的持续内存
GPUCODER.sort Optimized GPU implementation of theMATLABsort function
coder.gpu.iterations Pragma向代码生成器提供信息以在可变界循环上做出并行决策
GPUCODER.transpose Optimized GPU implementation of theMATLABtranspose function
GPUCODER.reduce Optimized GPU implementation for reduction operations
CODER.CEVAL Call external C/C++ function

Objects

expand all

代码r.gpuConfig Configuration parameters forCUDA代码generation fromMATLAB使用代码GPU Coder
Coder.CodeConfig Configuration parameters for C/C++ code generation fromMATLAB代码
代码r.EmbeddedCodeConfig Configuration parameters for C/C++ code generation fromMATLAB代码with嵌入式编码器
代码r.gpuEnvConfig 创建包含传递给参数的配置对象Coder.CheckgPuinstall用于执行GPU代码生成环境检查

Topics

Kernels from Element-Wise Loops

创造kernels from MATLAB functions containing scalarized, element-wise math operations.

Kernels from Scatter-Gather Type Operations

创造kernels from MATLAB functions containing reduction operations.

Kernels from Library Calls

Target GPU optimized math libraries such as cuBLAS, cuSOLVER, cuFFT, and Thrust.

Support for GPU Arrays

Generate CUDA code that uses GPU arrays.

旧版代码集成

将自定义GPU代码与用于代码生成的MATLAB代码集成。

Design Patterns

创造kernels for MATLAB functions containing computational design patterns.

GPU Memory Allocation and Minimization

Memory allocation options and optimizations for GPU Coder.

Featured Examples