ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Just in case you have troubles with this as i did. You need sudo for profiling CUDA GPUs. Just adding sudo in front unfortunatelly does not work, as sudo users have different envrionment variables. ROS commands are not be available in the sudo environment. What worked for me is:

  1. sudo -s
  2. nvprof --output-profile ./profile.dat '/home/ma/catkin_ws/devel/lib/YOUR_PKG/YOUR_NODE' --profile-from-start off

If this still does not work, try to source the .bashrc after the first step. Btw. if you open the profile.dat in the NVIDiA visual profiler (nvvp) you get a very nice timeline. You can only open the file if the profiler comes from the same CUDA version as nvprof. Good luck!