Profiling mex files How do I profile cuda Matlab mex files
Hallo wizards,

I have written a few cuda kernels in Matlab Mex format. some of them are not delivering the expected performance. does anyone of you have experience profiling mex files using the cuda profiler? is this even possible?

Thank you in advance for your help.
Ali.
Hallo wizards,



I have written a few cuda kernels in Matlab Mex format. some of them are not delivering the expected performance. does anyone of you have experience profiling mex files using the cuda profiler? is this even possible?



Thank you in advance for your help.

Ali.

#1
Posted 09/22/2008 01:36 PM   
Yeah, I do that all the time.
You can make a matlab script to call your program that contains the calls to the mex files. Put an exit at the end of the script.
Then in the visual profiler set the following:

launch : "/usr/local/matlab/bin/matlab"
working directory : "path to where the script is"
arguments: -nojvm -nosplash -r name_of_the_script_without_m

Make sure that you do not change directory in your script/program before your run the kernel, as the profiler expects the output to be in the working directory
Yeah, I do that all the time.

You can make a matlab script to call your program that contains the calls to the mex files. Put an exit at the end of the script.

Then in the visual profiler set the following:



launch : "/usr/local/matlab/bin/matlab"

working directory : "path to where the script is"

arguments: -nojvm -nosplash -r name_of_the_script_without_m



Make sure that you do not change directory in your script/program before your run the kernel, as the profiler expects the output to be in the working directory

greets,
Denis

#2
Posted 09/22/2008 02:11 PM   
[quote name='E.D. Riedijk' date='Sep 22 2008, 07:11 AM']Yeah, I do that all the time.
You can make a matlab script to call your program that contains the calls to the mex files. Put an exit at the end of the script.
Then in the visual profiler set the following:

launch : "/usr/local/matlab/bin/matlab"
working directory : "path to where the script is"
arguments: -nojvm -nosplash -r name_of_the_script_without_m

Make sure that you do not change directory in your script/program before your run the kernel, as the profiler expects the output to be in the working directory
[right][snapback]442846[/snapback][/right]
[/quote]

Thanks a lot Denis.
[quote name='E.D. Riedijk' date='Sep 22 2008, 07:11 AM']Yeah, I do that all the time.

You can make a matlab script to call your program that contains the calls to the mex files. Put an exit at the end of the script.

Then in the visual profiler set the following:



launch : "/usr/local/matlab/bin/matlab"

working directory : "path to where the script is"

arguments: -nojvm -nosplash -r name_of_the_script_without_m



Make sure that you do not change directory in your script/program before your run the kernel, as the profiler expects the output to be in the working directory

[snapback]442846[/snapback]






Thanks a lot Denis.

#3
Posted 09/22/2008 02:21 PM   
Finally got this going under windows you have to add -wait to make the profiler wait to the end of the matlab session

Thanks to all for hints

Nick
Finally got this going under windows you have to add -wait to make the profiler wait to the end of the matlab session



Thanks to all for hints



Nick

#4
Posted 04/29/2010 12:37 AM   
edit: wrong post
edit: wrong post

#5
Posted 05/19/2011 10:31 PM   
Scroll To Top