Nsight Compute command line does not profile Source Counters

I want to profile the Source Counters using the following command:

sudo /usr/local/cuda/nsight-compute-2020.2.1/ncu --section SourceCounters ./a.out

However, it outputs nothing but the header content as follows:

==PROF== Connected to process 7710 (/data1/xxx/test/a.out)
==PROF== Profiling "logsumexp_backward_input_kernel" - 1: 0%....50%....100% - 4 passes
==PROF== Disconnected from process 7710
[7710] a.out@
  void logsumexp_backward_input_kernel<4, 4, true, false>(float const*, float const*, float const*, float const*, float const*, int, int, int, int, int, float*), 2022-Mar-06 12:38:05, Context 1, Stream 7

For some sections such as SpeedOfLight, the output is normal containing desired information. Why is the output empty for SourceCounters section? How can I address the issue?

My CUDA version is 11.1. My GPU is 3090. The NVIDIA driver is 450.66.

I have try it on the same version of ncu, and got the same output.

But it will output normally when i switch ncu version of 2021.2.2.0 and CUDA version11.4.

You can upgrade ncu carefully and try it again.

Thank you for your help. I will have a try.

By default, the command line prints only the metrics in the selected sections’ headers. For the SourceCounters section, there are no or only very few metrics in the header (depending on which Nsight Compute version you are using), so most of them won’t be printed to stdout by default. The reason is that most metrics in this section are per-instruction and should be viewed on the UI’s Source page, or on the CLI’s source printout for recent ncu version.

Note though that you can always print all metrics that were collected with the CLI by selecting the Raw page

--page raw

instead of the default Details page.

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.