nvprof: Warning: The user does not have permission to profile on the target device.

Please check if the kernel module “nvidia” exists:
$ modinfo nvidia

If you get a module not found error, try
$ modinfo nvida-418
(assuming 418 is the major number of the driver you are using)

In this case you will need to use the following for step 3:
options nvidia-418 “NVreg_RestrictProfilingToAdminUsers=0”

Also confirm that:

  • You are doing steps 1 to 5 as root
  • Reboot the machine as suggested in step 5
  • Check that the value is correctly set to 0
    $ cat /proc/driver/nvidia/params | grep RmProfilingAdminOnly

You should see:
RmProfilingAdminOnly: 0

Hope this works.

1 Like