MATLAB: How to use GPU Coder generated code in a different system from where it was generated

GPU Coder

I am generating GPU Code and want to deploy it in a different system for which I do not have the GPU yet. How can I generate the code now, and use it later once I have the GPU installed in the new system?

Best Answer

Generating code and building it in GPU Coder is more involved than traditional application since there is an extra step in hardware integration. Check out the following link detailing the differences:
You can halt the build process by specifying "Source code" as build target in the App. Please refer to this link for more information:
This will still create a makefile with instructions to build the code. When you ship your application with the GPU generated code, your end-user application can run the makefile with the user's CUDA toolkit and supported hardware defined correctly. This link to explains the prerequisites:
This workflow will enable you to deploy the GPU generate code (optimized algorithm, GPU compatible source code) without building the library since you need the user's system specs to build to their specific hardware.