私はRTX 2060を購入しましたが、これまで私の環境/設定ですべてがうまく機能しています。しかし、まだ私のコードを分析することはできません。
(nvidia) brandon@b350-gaming-pc:~/projects/nvidia$ nvprof ./example.py
==29983== NVPROF is profiling process 29983, command: python3 ./example.py
Time: 0.05056905746459961
==29983== Warning: ERR_NVGPUCTRPERM - The user does not have permission to profile on the target device. See the following link for instructions to enable permissions and get more information: https://developer.nvidia.com/ERR_NVGPUCTRPERM
==29983== Profiling application: python3 ./example.py
==29983== Profiling result:
No kernels were profiled.
No API activities were profiled.
==29983== Warning: Some profiling data are not recorded. Make sure cudaProfilerStop() or cuProfilerStop() is called before application exit to flush profile data.
私はこれが明らかに権限「バグ」であることを知っており、以下を追加しました。
(nvidia) brandon@b350-gaming-pc:~/projects/nvidia$ cat /etc/modprobe.d/cuda.conf
NVreg_RestrictProfilingToAdminUsers=0
ただし、再起動後にコードを分析しようとすると、同じメッセージが表示されます。そして、
(nvidia) brandon@b350-gaming-pc:~/projects/nvidia$ sudo update-initramfs -u
[sudo] password for brandon:
update-initramfs: Generating /boot/initrd.img-4.15.0-55-generic
libkmod: ERROR ../libkmod/libkmod-config.c:656 kmod_config_parse: /etc/modprobe.d/cuda.conf line 1: ignoring bad line starting with 'NVreg_RestrictProfilingToAdminUsers=0'
libkmod: ERROR ../libkmod/libkmod-config.c:656 kmod_config_parse: /etc/modprobe.d/cuda.conf line 1: ignoring bad line starting with 'NVreg_RestrictProfilingToAdminUsers=0'
libkmod: ERROR ../libkmod/libkmod-config.c:656 kmod_config_parse: /etc/modprobe.d/cuda.conf line 1: ignoring bad line starting with 'NVreg_RestrictProfilingToAdminUsers=0'
...
このコマンドは永遠に繰り返されるようです。
ここで何か抜けましたか?
以下は、ドライバと私の環境に関する追加情報です。
(base) brandon@b350-gaming-pc:~$ nvidia-smi
Mon Sep 9 11:12:51 2019
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 418.87.00 Driver Version: 418.87.00 CUDA Version: 10.1 |
|-------------------------------+----------------------+----------------------+
| GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
|===============================+======================+======================|
| 0 GeForce RTX 2060 On | 00000000:0A:00.0 On | N/A |
| 0% 45C P8 20W / 170W | 1323MiB / 5903MiB | 38% Default |
+-------------------------------+----------------------+----------------------+
+-----------------------------------------------------------------------------+
| Processes: GPU Memory |
| GPU PID Type Process name Usage |
|=============================================================================|
| 0 2603 G /usr/lib/firefox/firefox 3MiB |
| 0 4300 G /usr/lib/xorg/Xorg 34MiB |
| 0 4894 G /usr/bin/gnome-shell 51MiB |
| 0 5806 G /usr/lib/xorg/Xorg 254MiB |
| 0 5920 G /usr/bin/gnome-shell 899MiB |
| 0 10378 G ...quest-channel-token=3880407371781342003 36MiB |
+-----------------------------------------------------------------------------+
(base) brandon@b350-gaming-pc:~$ uname -r
4.15.0-55-generic
(base) brandon@b350-gaming-pc:~$ lsmod | grep -i nvidia
nvidia_uvm 798720 0
nvidia_drm 45056 8
nvidia_modeset 1093632 17 nvidia_drm
nvidia 18194432 718 nvidia_uvm,nvidia_modeset
drm_kms_helper 167936 1 nvidia_drm
drm 401408 11 drm_kms_helper,nvidia_drm
ipmi_msghandler 53248 2 ipmi_devintf,nvidia
(base) brandon@b350-gaming-pc:~$ which nvprof
/usr/local/cuda-10.1/bin/nvprof
(base) brandon@b350-gaming-pc:~$ which python
/home/brandon/anaconda3/bin/python
自分のシステムの他のコンテンツ/出力を表示するには、お知らせください。
ベストアンサー1
私の考えでは、このファイルの完全なオプションを見逃したようです/etc/modprobe.d/cuda.conf
。この試み:
options nvidia "NVreg_RestrictProfilingToAdminUsers=0"