Nsight Compute: The user does not have permission to access NVIDIA GPu Performance Counters on target device 0

Viewed 23

I want to use NVIDIA Nsight Compute Command Line Profiler (ncu) to profile my cuda program. It printed out such error message after executing ncu axpy -o profile

==ERROR== Error: ERR_NVGPUCTRPERM - The user does not have permission to access NVIDIA GPU Performance Counters on the target device0. For instructions on enabling perfmissions and to get more information see https://developer.nvidia.com/ERR_NVGPUCTRPERM

Then I followed the section Command Line Control - Linux Desktop Only in that link:

  1. Unload the old modules.

systemctl isolate multi-user
modprobe -r nvidia_uvm nvidia_drm nvidia_modeset nvidia-vgpu-vfio nvidia

  1. Specify the access you desire: Insert the modules with the registry key set/unset.

modprobe nvidia NVreg_RestrictProfilingToAdminUsers=0

  1. Restart the window manager (if desired).

systemctl isolate graphical

  1. If the steps above fail to work, a system reboot may also be required.

However, I get stuck in step2. When I inputted the command in step2, terminal outputted:

modprobe: FATAL: Module nvidia not found in directory /lib/modules/5.15.0-46-generic

FYI: Driver Version:470.94 CUDA Version: 11.4 Ubuntu Version:20.04

Could anyone have idea how to solve it? Thanks in advance.

0 Answers
Related