linux 查看gpu個數(shù)
對于NVIDIA控制面板,你先在你的Linux系統(tǒng)上安裝NVIDIA驅(qū)動程序,你就在用程序菜單中找到打開NVIDIA控制面板。在控制面板中,你看到“系統(tǒng)信息”選項,點擊進入后,你在“組件”列表中查看到GPU的數(shù)量。
```
nvidia-smi
```
```
+-----------------------------------------------------------------------------+
| NVIDIA-SMI Driver Version: CUDA Version: |
|-------------------------------+----------------------+----------------------|
| 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. |
|===============================+======================+======================|
| GeForce RTX Off | :: Off | N/A |
| N/A C P W / N/A | MiB / GB | % Default |
+-------------------------------+----------------------+----------------------+
+-----------------------------------------------------------------------------+
| Processes: |
| GPU GI CI PID Type Process name GPU Memory |
| ID ID Usage |
|=============================================================================|
| No running processes found |
+-----------------------------------------------------------------------------+
```
從這個輸出中,你看到GPU的數(shù)量(在這個例子中是),以及每個GPU的些基本信息。