jupyter notebook上でPCのGPUチェック


備忘録

「!」記号を付けることでnotebook上でもcmd上のコマンドを実行できるので、以下のように

!nvidia-smi
(base) C:\Users\user>nvidia-smi
Sun Nov 15 00:00:00 2020
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 456.71       Driver Version: 456.71       CUDA Version: 11.1     |
|-------------------------------+----------------------+----------------------+
| GPU  Name            TCC/WDDM | Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|===============================+======================+======================|
|   0  GeForce GTX 1070   WDDM  | 00000000:01:00.0  On |                  N/A |
|  0%   50C    P8     9W / 151W |   4805MiB /  8192MiB |      6%      Default |
+-------------------------------+----------------------+----------------------+

+-----------------------------------------------------------------------------+
| Processes:                                                                  |
|  GPU   GI   CI        PID   Type   Process name                  GPU Memory |
|        ID   ID                                                   Usage      |
|=============================================================================|
|    0   N/A  N/A      6664    C+G   C:\Windows\explorer.exe         N/A      |
+-----------------------------------------------------------------------------+

notebookでなくともcmdプロンプト上から行っても同じ。

以上