Clear Filters
Clear Filters

GPU Coder error "Function 'addDependentFile' not supported for code generation."

1 view (last 30 days)
I encounter the following error when using the GPU coder to convert a function and pre-trained-resnet model to a .mex file:
"Function 'addDependentFile' not supported for code generation."
I don't know what causes it, and online search points to nothing. I use the GPU Coder app, but the same happens when I run from the command line. Bellow, you can see the a screenshot of the errors in the GPU Coder app. There you can also see the function I use.
The function is super basic and based on what I've seen in MATLAB tutorial this video. I've added the function as an attachment to test. As input, I use ones(224,224,3,'uint8').
I have a Windows system and the CUDA toolkit v11.0 installed with driver 452.06. I also have cudnn v8.1.1.33 and Visual Studio 2019 (for the c++ compiler?) installed. Bellow you can see a screenshot of nvidia-smi and nvcc -V.
Can anyone please help me? Thank you in advance!
GPU Coder app screenshot
nvidia-smi screenshot
nvidia-smi screenshot
nvcc -V screenshot

Answers (1)

Infinite_king on 7 May 2024
Hi Tim Van De Looverbosch,
Follow the below troubleshooting steps to resolve the issue,
  1. Check the code generation environment to ensure that all dependencies are installed properly and that the environment variables are correctly set. This resource explains how to verify the code generation environment -
  2. If any dependent libraries are missing, install them and set up the respective environment variables. Refer the following MATLAB resource -
  3. Verify the compatibility of each CUDA library version and ensure they are consistent with the supported versions. For details on supported versions, refer to this :-
  4. Follow the steps outlined in the following example to verify and understand the DLL code generation workflow -
Hope this is helpful.


Find more on Get Started with GPU Coder in Help Center and File Exchange




Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!