I am trying to profile a CUDA code that is 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 stated in several places on the internet:
exit
in the end of test.m.C:\Program Files\MATLAB\R2014b\bin\matlab.exe
C:\CUDA_MATLABtests\MyToolbox
-nojvm -nosplash -r test
However, when I run the profiler,I get
======== Warning: No CUDA application was profiled, exiting
And nothing more.
I am missing some instruction?
Is there any particular code structure that would make the profiler not to profile?
Profiling Overview The Visual Profiler is a graphical profiling tool that displays a timeline of your application's CPU and GPU activity, and that includes an automated analysis engine to identify optimization opportunities. The nvprof profiling tool enables you to collect and view profiling data from the command-line.
The NVIDIA Visual Profiler is a cross-platform performance profiling tool that delivers developers vital feedback for optimizing CUDA C/C++ applications. First introduced in 2008, Visual Profiler supports all 350 million+ CUDA capable NVIDIA GPUs shipped since 2006 on Linux, Mac OS X, and Windows.
A Matlab installation comes with two binaries, a launcher in <matlabroot>\bin
and the main application in <matlabroot>\bin\<arch>
. The later is the executable which also executes the mex functions in it's address space.
<matlabroot>\bin\<arch>
.<matlabroot>\bin
setting the -wait
parameter. Seeing the launcher application terminating, debugging tools often stop.Never use the binary in <matlabroot>\bin\<arch>
directly unless you have to.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With