Model Configuration Parameters: GPU Code - MATLAB & Simulink (original) (raw)

The Code Generation > GPU Code category includes parameters for configuring GPU-specific settings of the generated code.

These parameters require a GPU Coder™ license.

On the Configuration Parameters dialog box, the following configuration parameters are on the Code Generation > GPU Code pane.

Parameter Description
GPU index Specify the CUDA® device to target.
Compute capability Specify the minimum compute capability for which CUDA code is generated.
Custom compute capability Specify the name of the NVIDIA® virtual GPU architecture for code generation.
Memory mode Specify the Memory allocation (malloc) mode to be used in the generated CUDA code.
Maximum blocks per kernel Specify the maximum number of CUDA blocks created during a kernel launch.
Dynamic memory allocation threshold Specify the size above which the private variables are allocated on the heap instead of the stack.
Memory Manager Select the GPU memory manager for efficient memory allocation, management, and improving run-time performance.
Stack size per GPU thread Specify the maximum stack limit per GPU thread.
Include error checks in generated code Add run-time error-checking functionality to the generated CUDA code.
Kernel name prefix Specify custom kernel name prefixes.
Additional compiler flags Specify additional flags to the nvcc compiler.
cuBLAS Replacement of math function calls with NVIDIAcuBLAS library calls.
cuSOLVER Replacement of math function calls with NVIDIAcuSOLVER library calls.
cuFFT Replacement of math function calls with NVIDIAcuFFT library calls.