How do I run nvidia-smi on Windows?

帅比萌擦擦* 提交于 2020-02-28 18:37:18

问题


nvidia-smi executed in a command prompt in windows returns the following error

C:\Users>nvidia-smi
'nvidia-smi' is not recognized as an internal or external command,
operable program or batch file.

Where is it located? CUDA is installed already.


回答1:


Nvidia-SMI is stored by default in the following location:

C:\Program Files\NVIDIA Corporation\NVSMI

You can move to that directory and then run nvidia-smi from there. Unlike linux, it can't be executed by the command line in a different path.

What might be easier to do is to open that directory in Windows Explorer, create a short cut of nvidia-smi.exe and put it on your desktop. Then, right click on it, hit properties, and Under Shortcut > Target modify the string path to include -l < time you want it to refresh >.

For example, modify:

"C:\Program Files\NVIDIA Corporation\NVSMI\nvidia-smi.exe"

to

"C:\Program Files\NVIDIA Corporation\NVSMI\nvidia-smi.exe" -l 5

Then hit "Apply", and then "OK".

In this example, when you open the shortcut, it will keep the command prompt open and allow you to watch your work as nvidia-smi refreshes every five seconds.




回答2:


You can add "C:\Program Files\NVIDIA Corporation\NVSMI" to PATH and than restart console.

System Properties > Advanced > Environment Variables > System Variables -> Path -> Edit > New > insert folder path with nvidia-smi



来源:https://stackoverflow.com/questions/57100015/how-do-i-run-nvidia-smi-on-windows

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!