Nv-nsight-cu-cli hangs on any binary

I am running the CLI (‘Version 2019.5.0 (Build 27346997)’) on Ubuntu 18.04 to profile a simple CUDA application. I recently changed my drivers to 440.64, and am running CUDA 10.2.

No matter what application I try to profile, the nv-nsight-cu-cli just hangs indefinitely. It seems to be doing some kind of busy waiting (100% CPU) but there is no memory usage etc and it just idles forever (let it run for 12+ hours).

Any ideas on possible causes?

Actually, just changed the driver to 440.33.01, and lo and behold, nv-nsight-cu-cli works correctly now. Does the Nsight Compute tool not work with the latest device drivers? Or is 440.33.01 in an entirely different branch of drivers than 440.64.

Nsight Compute is expected to work with the latest device driver. It is not clear why Nsight Compute is not working with 440.64. We will check.

Any updates on this? Did some more digging and it seems pretty reliable - I cannot use nv-nsight-cu-cli on literally any binary with the latest device drivers. The tool is completely broken on the official newest drivers (at least for me).

We could not reproduce the hang using:
OS: Ubuntu 18.04
Nsight Compute: 2019.5
Driver: 440.64

Can you try collecting a single metric:
$ nv-nsight-cu-cli --metric sm__cycles_elapsed.sum APPLICATION

Also which GPU are you using?

I’m having the same problem, I am using an rtx 2060 and I’m on driver version 450.80.02 and CUDA 2020.1.0. every cuda application that I’ve tried has made my ubuntu desktop hang.

Do you see a hang when running a CUDA application (even without using Nsight Compute)?

Sanjiv, I am having the same problem. But when I use your suggestion to try collecting just a single metric, it works, even though it hangs when I don’t specify any argument. This is V100, cc70. Do you think it’s actually not hanging but just taking a long time (I let it go 15 mins).

Additional info: the issue appears to be when running for any of the metrics that include the string “pct_of_peak_sustained”.

sm__warps_active.avg.pct_of_peak_sustained_active
sm__throughput.avg.pct_of_peak_sustained_elapsed
lts__throughput.avg.pct_of_peak_sustained_elapsed
l1tex__throughput.avg.pct_of_peak_sustained_active
gpu__dram_throughput.avg.pct_of_peak_sustained_elapsed

If I set metrics to comma-separate list of the others:

sm__warps_active.avg.per_cycle_active
sm__maximum_warps_per_active_cycle_pct
sm__maximum_warps_avg_per_active_cycle
sm__cycles_active.avg
launch__waves_per_multiprocessor
launch__thread_count
launch__shared_mem_per_block_static
launch__shared_mem_per_block_dynamic
launch__shared_mem_per_block_driver
launch__shared_mem_per_block
launch__shared_mem_config_size
launch__registers_per_thread
launch__occupancy_per_shared_mem_size
launch__occupancy_per_register_count
launch__occupancy_per_block_size
launch__occupancy_limit_warps
launch__occupancy_limit_shared_mem
launch__occupancy_limit_registers
launch__occupancy_limit_blocks
launch__grid_size
launch__func_cache_config
launch__block_size
gpu__time_duration.sum
gpc__cycles_elapsed.max
gpc__cycles_elapsed.avg.per_second
dram__cycles_elapsed.avg.per_second

it runs to completion and gives meaningful output.

Please provide the version of Nsight Compute and NVIDIA driver you are using? Also what is the OS version?

Do you think it’s actually not hanging but just taking a long time (I let it go 15 mins).

Yes this could be the case. Note that when you do not specify any argument the default set of metrics are collected for each kernel launch. So to reduce the metric collection time you can select a smaller subset of metrics and/or select a fewer number of kernels. Refer the overhead section in the https://docs.nvidia.com/nsight-tools/nsight-compute/ProfilingGuide/index.html#overhead

the issue appears to be when running for any of the metrics that include the string
“pct_of_peak_sustained”

Can you please confirm this by running nsight compute with just any of these metrics?