Can Nsight Eclipse code in C ++?

we have C ++ code that we want to profile with Nividia Nsight Eclipse (Linux version) before adding CUDA code to it. The idea is to first profile C ++, find the hot spots, convert them to CUDA again, profile and scroll through this process to consistently speed up the code. However, when we look at only C ++, it looks like the profiler needs some existing CUDA code before it generates the output of the timeline and profile. Has anyone else come across this?

+4
source share
3 answers

Nsight Eclipse Edition can only process CUDA code. You might want to install third-party profiling modules for the profile host code.

You can try installing OProfile integration from the Eclipse Foundation website (paste http://download.eclipse.org/releases/indigo/ into the Help / Install New Software dialog ...) I just tried, but could not configure the oprofile command line correctly.

+2
source

You can manually configure your code using nvtx (the NVIDIA Tools Extension) and display the timeline in Nsight, but for automatic profiling and detailed counters, it can only process GPU code.

+1
source

Yes, Nsight Eclipse can write C ++ code. To rephrase your question, it can also display C ++ host code (CPU). By default, it only processes GPU code. CPU profiling is a much more manual task; it will not automatically perform the functions of profiles.

You need to use NVTX. For instance:

#include "nvToolsExt.h" nvtxNameOsThread(0,"InputVideo"); nvtxRangePush(__FUNCTION__); // .. do some CPU computing here nvtxRangePop(); 

Build with -lnvToolsExt -L / usr / local / cuda / lib64

The path to libnvToolsExt.so will be different for everyone. NVTX comes with the CUDA Toolkit.

The CUDA blog has a post about this.

0
source

Source: https://habr.com/ru/post/1435557/


All Articles