I have a mex function to solve a linear systems of equations. I use the google cusp library to do this.
I compile the cu file in Visual studio 2012.
And then I link the files in matlab using mex
As suggest by the others to profile the application in the following way
Write your Matlab .m file end add exit at its end.
Launch the NVIDIA Visual Profiler. File → New Session.
File: add the full path of the Matlab executable file, for example C:\Program Files\MATLAB\R2012b \bin\win64\MATLAB.exe .
Working directory: add the full path of the Matlab .m file.
Arguments: -nojvm -nosplash -r file_name_without_m_extension.
but the time line stays empty, I wonder whether it is possible to profile the mex file in the way I compile and link? (not using nvmex)
I tested the cuda samples with the profiler and they worked fine
I was able to successfully use the above procedure you quoted with Matlab 2008b, but not with Matlab 2010a. I have done my tests using a code of my own and not yours.
problem is solved, I think I had the profiler assign to matlab/bin/x64\matlab.exe, instead of just matlab/bin/matlab.exe, Also I noticed that CudaDeviceReset() is required to let the profiler work
Let me say that in your original post you were already referring to C:\Program Files\MATLAB\R2012b \bin\win64\MATLAB.exe and in the code you had already cudaDeviceReset() :-)