I am trying to profile a CUDA code which is invoked from MATLAB through “mexcuda”. I have Matlab R2016a and CUDA 9.0 versions running on Ubuntu 16.04.
I am trying to profile this setup using Nvidia Visual Profiler. I followed posts related to this topic regarding the nvvp settings and am able to write data from MATLAB to GPU and then profile all the kernels written using CUDA.
The problem I face is that Nvidia profiler gives time details of the CUDA kernels alone. The time taken by computations run in CPU(ie MATLAB) is not shown in the profiler results.
To achieve this I tried options below:
Enable CPU tracing in Nvidia Visual Profiler. But it does not seem to work and profiler runs continuously without termination.
mexcuda -g file.cu This option I thought would support debugging which also did not work
Within Matlab script, enable profiler that is supported by MATLAB’s dedicated profiler (using “profile on”) in file1.m
But none of these options is working. Can anyone suggest how to profile all steps run on MATLAB and CUDA using Nvidia Visual Profiler?
I am stuck with this issue for a long time.