Profiling CPU functions with the NVIDIA Video Profiler

Hi all,

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 settings and iam able to write data from MATLAB to GPU andthen 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 MATLAB is not shown in the profiler results.

To achieve this i tried options below: 1) Enable CPU tracing in Nvidia Visual Profiler. But i does not seem to work and profiler runs continuously without termination

  1. mexcuda -g This option I thought would support debugging which also did not work

  2. Within Matlab script, enable profiler that is supported by MATLAB’s dedicated profiler (using “profile on”) in file1.m

But none of these options are working. Can anyone suggest how to profile all steps run on MATLAB and CUDA using Nvidia Visual Profiler?