Ubuntu 下 NVIDIA Nsight Compute 权

2024-06-18  本文已影响0人  寽虎非虫003

问题

使用Nsight Compute运行程序或使用如下命令行

nv-nsight-cu-cli -o nvcheck.log ./exe_demo

运行程序时出现报错

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

解决办法

按照提供的网页
https://developer.nvidia.com/ERR_NVGPUCTRPERM;

先进行cuda-watchdog.conf文件生成、生成在文件夹/etc/modprobe.d中,在该.conf文件中写入

options nvidia NVreg_RestrictProfilingToAdminUsers=0

然后执行

sudo update-initramfs -u -k all
上一篇 下一篇

猜你喜欢

热点阅读