Profiling MATLAB mex CUDA Applications with NVIDIA Visual Profiler

I am trying to profile CUDA code embedded in a mex file called from MATLAB. Running on a win7 x64 machine, MATLAB r2014b

The code is structured as follows:

 MATLAB   test.m
    ->contains some standard code generating variables (and calling 1 or 2 minor own MATLAB fucntions)
    -> calls testcuda.mex
        ->contains small, standard, no library C++ code
        -> calls either test1.cu or test2.cu
              ->.cu files end in cudaDeviceReset();

I did the following, as indicated in several places on the Internet:

  • Compiled mex files. Check them out. They work.
  • Add exitat the end of test.m.
  • Launch the NVIDIA Visualizer. File → New Session.
  • add the full path to the Matlab executable, for example C:\Program Files\MATLAB\R2014b\bin\matlab.exe
  • Working directory: add the full path to the Matlab.m file. C:\CUDA_MATLABtests\MyToolbox
  • Arguments: -nojvm -nosplash -r test

However, when I run the profiler, I get

======== Warning: No CUDA application was profiled, exiting

And nothing more.

Am I missing instructions?

Is there any specific code structure that does not allow profile profiling?

+4
1

Matlab , ​​ <matlabroot>\bin <matlabroot>\bin\<arch>. , mex .

  • , <matlabroot>\bin\<arch>.
  • , <matlabroot>\bin, -wait. , , .

<matlabroot>\bin\<arch> , .

+4

All Articles