Main Content

Model Configuration Parameters: GPU Code

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.


Kernel name prefix (Simulink Coder)

Specify custom kernel name prefixes.

GPU device index (Simulink Coder)

Specify the CUDA® device to target.

Memory allocation mode (Simulink Coder)

Specify the Memory allocation (malloc) mode to be used in the generated CUDA code.

Dynamic memory allocation threshold (Simulink Coder)

Specify the size above which the private variables are allocated on the heap instead of the stack.

Stack size per GPU thread (Simulink Coder)

Specify the maximum stack limit per GPU thread.

cuBLAS (Simulink Coder)

Replacement of math function calls with NVIDIA® cuBLAS library calls.

cuSOLVER (Simulink Coder)

Replacement of math function calls with NVIDIA cuSOLVER library calls.

cuFFT (Simulink Coder)

Replacement of math function calls with NVIDIA cuFFT library calls.

Include error checks in generated code (Simulink Coder)

Add run-time error-checking functionality to the generated CUDA code.

Compute capability (Simulink Coder)

Specify the minimum compute capability for which CUDA code is generated.

Custom compute capability (Simulink Coder)

Specify the name of the NVIDIA virtual GPU architecture for code generation.

Additional compiler flags (Simulink Coder)

Specify additional flags to the nvcc compiler.

Related Topics