命令行nvidia-smi 查看CUDA
时间: 2024-11-22 16:29:33 浏览: 39
nvidia-smi的简介、安装使用的安装包
命令行`nvidia-smi`是NVIDIA提供的一个工具,用于管理和监控 NVIDIA GPU 的状态,包括显卡基本信息、GPU温度、占用率、内存使用情况以及当前正在运行的CUDA作业等。通过这个命令,开发者可以实时了解他们的图形处理单元的工作状态,并对CUDA应用的性能有直观的认识。
运行`nvidia-smi`时,你可以看到类似这样的信息:
```
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 470.104.01 Driver Version: 465.35.00 CUDA Version: 11.4 |
|-------------------------------+----------------------+----------------------+
| 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 GeForce RTX 3090 Off | 00000000:04:00.0 Off | N/A |
| 80% 38C P0 | 1MiB / 24179MiB | 0% Default |
| | | N/A |
+--------+
| 1 GeForce RTX 3090 Off | 00000000:81:00.0 Off | N/A |
| 77% 47C P0 | 1MiB / 24179MiB | 0% Default |
| | | N/A |
+--------
Process name | Usage |
------------------------------------+----------------------
... | ... |
<unnamed> cuda process | 1MiB / 24179MiB | 2% / 99%
... | ... |
+-----------------------------------------------------------------------------+
Total memory: [24179MiB] Free memory: [24178MiB] | Utilization: 0% /
Memory occupied by running tasks: 1MiB
```
阅读全文