本文主要是介绍【linux 常用命令】查看gpu、显卡常用命令,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
1.查看显卡基本信息
lspci | grep -i nvidia
2.查看显卡驱动版本
nvidia-smi -a
3.查看gpu使用情况
nvidia-smi
(spam) [dongli@dt-gpu-1 train]$ nvidia-smi
Fri Sep 27 16:42:33 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 Tesla P40 Off | 00000000:82:00.0 Off | 0 |
| N/A 44C P0 54W / 250W | 22057MiB / 22919MiB | 0% Default |
+-------------------------------+----------------------+----------------------++-----------------------------------------------------------------------------+
| Processes: GPU Memory |
| GPU PID Type Process name Usage |
|=============================================================================|
| 0 125983 C python 22047MiB |
+-----------------------------------------------------------------------------+
(spam) [dongli@dt-gpu-1 train]$ lspci |grep -i nvidia
82:00.0 3D controller: NVIDIA Corporation GP102GL [Tesla P40] (rev a1)
(spam) [dongli@dt-gpu-1 train]$ lspci | grep -i nvidia
82:00.0 3D controller: NVIDIA Corporation GP102GL [Tesla P40] (rev a1)
(spam) [dongli@dt-gpu-1 train]$
Drivers 驱动
CUDA-一种由Nvidia推出的通用并行计算架构和应用程序编程接口模型。02
cuDNN-一套Nvidia专门为深度神经网络设计的GPU计算加速库。
> nvidia-smi 展示nvidia显卡使用信息
4、动态查看gpu使用情况
watch -n 1 nvidia-smi
+-----------------------------------------------------------------------------+
| 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 Tesla P40 Off | 00000000:82:00.0 Off | 0 |
| N/A 31C P0 47W / 250W | 0MiB / 22919MiB | 0% Default |
+-------------------------------+----------------------+----------------------++-----------------------------------------------------------------------------+
| Processes: GPU Memory |
| GPU PID Type Process name Usage |
|=============================================================================|
| No running processes found |
+-----------------------------------------------------------------------------+
这篇关于【linux 常用命令】查看gpu、显卡常用命令的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!