GPU Coder Limitations
General Limitations
Spaces in file and path names cause build errors in Linux®. GPU Coder™ uses GNU make tools that have known limitations when file names contain spaces. It is generally a good practice to avoid spaces in file, project, and path names.
GPU Coder disables integrity and array bounds/dimension checks that are part of MATLAB® Coder™.
When using
coder.inline('never')
option during code generation, GPU Coder creates kernel for only the entry-point function containing thecoder.gpu.kernelfun
pragma and does not create kernels automatically for any sub-functions within the entry-point function. It is therefore recommended not to use thecoder.inline('never')
option.Generating kernels for structures with variable-size arrays is not supported.
The CUDA® compute capability that you select must match the compute capability of your hardware.
When using
coder.ceval
with GPU pointers, the Check for Issues option for CPU is not supported.GPU Coder does not support code generation for Simulink® blocks. You cannot use the
NVIDIA Jetson
andNVIDIA Drive
boards from the Hardware board option in the Hardware Implementation pane and target NVIDIA® GPUs.GPU Coder does not support SIMD code generation. Disable SIMD code generation by setting the Leverage target hardware instruction set extensions parameter to
None
.
Function Limitations
You can generate CUDA code for only a subset of MATLAB built-in functions and toolbox functions.
When targeting NVIDIA Tegra® devices, GPU Coder does not support the
quasi-euclidean
method ofbwdist
function and image dimensions greater than 3.When
imfilter
is used with a 1xN kernel and N is an even integer, shared memory is not used in generated code. Whenimfilter
is used with a three-dimensional image, shared memory is not used in theconv2
implementation.GPU Coder has empty code replacement report even if there is a replacement. This issue has been identified with
atan
function.
Unsupported CUDA Features
List of CUDA features that are not supported:
Texture memory
Asynchronous streams
Dynamic kernel invocation — calling kernels from within kernels
Related Topics
- Code Generation Using the Command Line Interface
- Code Generation by Using the GPU Coder App
- Code Generation Reports
- Trace Between Generated CUDA Code and MATLAB Source Code
- Generating a GPU Code Metrics Report for Code Generated from MATLAB Code
- Kernel Analysis
- Memory Bottleneck Analysis
- Analyze Execution Profiles of the Generated Code