How to fast compile GPU coder application after making a minor change in

2 views (last 30 days)
I use GPU coder to compile Deep Learning based application. But, I made a slight change in (mainly in the file management and reading part). I then want to recompile the GPU coder application. but it takes so long to repeat converting deep learning models to cuda codes. Is there an easy way to recompile the GPU coder application faster?

Answers (1)

Hariprasad Ravishankar
Hariprasad Ravishankar on 21 Dec 2022
Hi @Liwei,
If you generated an EXE by specifying as CustomSource similar to the example here, then you can can rebuild the executable by running make on the generated <entrypoint_function>
For example, if your entry point function is foo.m, you should see a file named in the codegen folder on Linux devices.
You can then execute
make -f
from the linux terminal by 'cd'ing to the codegen folder or from within MATLAB as follows:
!make -f
On Windows, there is an equivalent "batch" file with the '.bat' extension that you can run to rebuild the files.
If you generated a DLL or LIB using the coder.gpuConfig, then you likely have a custom makefile to link to the library generated by coder. In that case you will need to remake your custom makefile.
Liwei on 17 Jan 2023
happy new year! I came back with this question again after the winter break. I use and gpu coder to create exe file to be exexuted on nevidia device. Now, I changed a little in my file and wanted to compile fast. My matlab and gpu coder are on windows 10. Under codgen\exe\foo folder, I could not find batch file, i found out file. Then I run the following command after setting MATLAB TO codgen\exe\foo\ folder. None of the commands works. any idea on it?
!make -f
'make' is not recognized as an internal or external command,
operable program or batch file.
is not recognized as an internal or external command,
operable program or batch file.

Sign in to comment.


Find more on Deep Learning 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!