win查看CUDA内存使用情况
解决方法:打开cmd命令行窗口执行:nvidia-smi
结果中NVIDIA GeForce GTX 960M就是显卡信息,66MiB/4096MiB就是使用情况,表示我这个显卡内存是4G,已经使用66M
结果如下:
Tue May 7 00:32:37 2024
+---------------------------------------------------------------------------------------+
| NVIDIA-SMI 535.98 Driver Version: 535.98 CUDA Version: 12.2 |
|-----------------------------------------+----------------------+----------------------+
| GPU Name TCC/WDDM | Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap | Memory-Usage | GPU-Util Compute M. |
| | | MIG M. |
|=========================================+======================+======================|
| 0 NVIDIA GeForce GTX 960M WDDM | 00000000:01:00.0 Off | N/A |
| N/A 0C P8 N/A / 200W | 66MiB / 4096MiB | 4% Default |
| | | N/A |
+-----------------------------------------+----------------------+----------------------+