Difference between CUPTI and NVTX

Can I use NVTX and CUPTI for similar purpose, that is profiling? Are they the different tools doing the same task?

Can someone explain when to use which tool?

I noticed that NVVP will be discontinued, so how do you make custom profiling data available to to the newer tool (Nsight)?

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.

Next-gen Nsight tools are replacing nvprof and NVVP. Refer blog post https://devblogs.nvidia.com/migrating-nvidia-nsight-tools-nvvp-nvprof for the migration plan.


Thanks for your reply.

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.

Can you please clarify which Nsight product you have in mind?

Nsight is an umbrella name for a various different tools. Most relevant to this discussion appear to be:

  • Nsight Systems - https://developer.nvidia.com/nsight-systems
  • Nsight Compute - https://developer.nvidia.com/nsight-compute

Thank you for the info.

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.

Thank you in advance :)

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.