The purpose of both the tools is quite different. CUPTI enables the creation of profiling and tracing tools that target CUDA applications. Using CUPTI APIs, one can develop profiling tools that give insight into the CPU and GPU behavior of CUDA applications. NVIDIA profiling tools nvprof, NVVP and Nsight Systems are layered on top of the CUPTI to capture the CUDA API trace, GPU activity trace, GPU Performance counters and metrics, PC Sampling, Unified Memory profiling, NVLink stats, OpenACC profiling etc etc
On the other hand, NVTX is used for annotating events, code ranges, and resources in the application. It doesn’t provide timing or the GPU trace information. NVTX is used in conjunction with the other Profiling tools like Visual Profiler, Nsight Systems, NSight Visual Studio Edition to capture and visualize annotation and ranges.
Adding onto that, I would like to ask if there are possible ways to populate Nsight options using maybe C++ or shell scripts. What I want to do is, to have a custom application that runs Nsight on surface but the options (options about what profiling information the user needs) are set beforehand and when Nsight launches it shows the profiling information that were previously selected.
I can use Nsight Systems and Nsight Compute as well.
For example, if I am using Nsight Systems, is there a way to populate the options (the checkboxes in the Nsight Systems UI) about enabling certain features like Collect CUDA Trace, Collect Vulkran Trace, Collect NVTX Trace, etc using another script or command line?
I know for Nsight Compute there is a Command Line Interface available, but I want to use the UI, and want the my application to launch Nsight Systems / Compute and start the profiling automatically. So is there a way I can achieve this?
So I have checked out Nsight Compute and have been able to launch the UI version using the command line interface with the application already attached to it.
It would be really helpful if you could tell me about doing the same for Nsight Systems.I want to launch Nsight systems from command line or an external script so that it launches with the applicatin (that I want to profile) attached and when it opens it shows the timeline view.
Nsight Systems also have a command line that you can use to run the tool, and the data from that run can be visualized in the timeline. We do not currently have an option you can pass the command line to ask it to open in the GUI automatically.