Invoke MATLAB computations from within profiler (nvprof)


I have an algorithm whose computations are realised using MATLAB. Now, I am porting this algorithm to GPU.
Since inputs are read using MATLAB, and data transfer from MATLAB to GPU card is performed by “mexcuda”.
After this using CUDA 9.0 version kernels are developed.

Now, I would like to invoke profiler (nvprof) to profile tasks run by MATLAB and CUDA 9.0. Is this possible?

Could anyone suggest how to profile MATLAB computations using nvprof?


Thanks txbob. I could successfully invoke MATLAB from command line using the command:
“nvprof matlab < myfile.m”

Next, I tried to invoke NVIDIA Visual profiler for the same setup. The Visual profiler expects a exe/binary file. In the setup i have explained, I do not have any .exe. Could you please suggest how to perform visual profiling of MATLAB with CUDA files?


P.S: 1) I have enclosed snapshot of the files requested by the profiler.
2) When I link to a *.m file, an error below occurs TERM variable not set