在Ubuntu 20.04上,在运行nvidia-smi查询时,我得到了一个非常令人担忧的输出:
$ nvidia-smi --query-gpu=index,pcie.link.gen.current,pcie.link.gen.max,pcie.link.width.current --format=csv
index, pcie.link.gen.current, pcie.link.gen.max, pcie.link.width.current
0, 1, 4, 8
1, 1, 4, 4报告的pcie.link.gen.current为1,尽管卡的最大值为4。如果我的理解是正确的,这将大大降低CPU和GPU之间的内存复制操作的速度,并可能影响我的深入学习训练和推理的速度(在PyTorch上)。
在硬件方面,这是我的设置:
我已经特别设置了这些插槽的PCIE生成设置为4在主板BIOS,但这并不改变什么nvidia-smi报告。
我怎样才能:
发布于 2023-03-01 14:42:05
根据https://enterprise-support.nvidia.com/s/article/Useful-nvidia-smi-Queries-2,它声明“当前的PCI链路生成。当GPU不在使用时,这些链路生成可能会减少。”
因此,作为一个测试,我运行了下面的测试,看看我的服务器上有一个NVIDIA RTX1650。
目前没有正在使用的GPU:
terrance@Intrepid:~$ nvidia-smi
Wed Mar 1 07:13:34 2023
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 525.78.01 Driver Version: 525.78.01 CUDA Version: 12.0 |
|-------------------------------+----------------------+----------------------+
| GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
| | | MIG M. |
|===============================+======================+======================|
| 0 NVIDIA GeForce ... Off | 00000000:01:00.0 On | N/A |
| 35% 37C P8 11W / 75W | 3MiB / 4096MiB | 0% Default |
| | | N/A |
+-------------------------------+----------------------+----------------------+
+-----------------------------------------------------------------------------+
| Processes: |
| GPU GI CI PID Type Process name GPU Memory |
| ID ID Usage |
|=============================================================================|
| No running processes found |
+-----------------------------------------------------------------------------+
terrance@Intrepid:~$ nvidia-smi --query-gpu=index,pcie.link.gen.current,pcie.link.gen.max,pcie.link.width.current --format=csv
index, pcie.link.gen.current, pcie.link.gen.max, pcie.link.width.current
0, 1, 2, 16现在正在使用GPU:
terrance@Intrepid:~$ nvidia-smi
Wed Mar 1 07:40:16 2023
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 525.78.01 Driver Version: 525.78.01 CUDA Version: 12.0 |
|-------------------------------+----------------------+----------------------+
| GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
| | | MIG M. |
|===============================+======================+======================|
| 0 NVIDIA GeForce ... Off | 00000000:01:00.0 On | N/A |
| 35% 40C P0 17W / 75W | 30MiB / 4096MiB | 1% Default |
| | | N/A |
+-------------------------------+----------------------+----------------------+
+-----------------------------------------------------------------------------+
| Processes: |
| GPU GI CI PID Type Process name GPU Memory |
| ID ID Usage |
|=============================================================================|
| 0 N/A N/A 310633 G /usr/lib/xorg/Xorg 23MiB |
| 0 N/A N/A 310787 G xfwm4 1MiB |
+-----------------------------------------------------------------------------+
terrance@Intrepid:~$ nvidia-smi --query-gpu=index,pcie.link.gen.current,pcie.link.gen.max,pcie.link.width.current --format=csv
index, pcie.link.gen.current, pcie.link.gen.max, pcie.link.width.current
0, 2, 2, 16希望这能有所帮助!
https://askubuntu.com/questions/1457183
复制相似问题