2

I'm trying to check my GPUs from Windows PowerShell with nvidia-smi but I can't get it to work.

I already checked this post but I don't see a folder that starts with nvdm in my C:\Windows\System32\DriverStore\FileRepository directory.

I have two version of CUDA installed v8.0 and v11.2 but my System Variables (CUDA_HOME, CUDA_PATH, CUDA_PATH_v11_2) all point towards the v11.2 folder.

Is there a reason I would have CUDA but not nvidia-smi on my PC?

talonmies
  • 70,661
  • 34
  • 192
  • 269
nikebol906
  • 152
  • 1
  • 7
  • I'll run the search now but it will take a lot of time because I have a large hard drive. I don't recall installing a driver for Nvidia but I did install CUDA. Is there a way to use the Nvidia desktop manager to know where nvidia-smi.exe is installed? – nikebol906 Jul 26 '21 at 17:18
  • Did you look in: `C:\Program Files\NVIDIA Corporation\NVSMI` ? – Robert Crovella Jul 26 '21 at 17:35
  • I'll probably delete my question and just do that then. Before I do though can you tell me if there is a way to make it so that I can just type `nvidia-smi` in PowerShell and have that information pop up? The original post talks about making a shortcut but I'm wondering if PowerShell has something like `alias` in Linux where you can map commands. – nikebol906 Jul 26 '21 at 17:36
  • If you add the path e.g. `C:\Program Files\NVIDIA Corporation\NVSMI` to your windows PATH variable, you can just open powershell and you will be able to type `nvidia-smi` and it will work. The method to modify a windows PATH variable (or any windows environment variable) is covered in many places on the web. From windows file explorer, right click on your PC icon, then select properties. Then select advanced system settings, then click on the Environment variables button. Add the path to your **system variables** `Path` variable. – Robert Crovella Jul 26 '21 at 17:45
  • Thank you so much for all your help! – nikebol906 Jul 26 '21 at 17:58

1 Answers1

4
  1. Make sure that nvidia-smi.exe is in the folder C:\Program Files\NVIDIA Corporation\NVSMI. If it is not, you may wish to reinstall a NVIDIA GPU driver for your GPU, choosing a driver from a CUDA toolkit installer.

  2. add the path to your windows Path variable:

  • open windows file explorer
  • right click on your PC icon
  • select properties
  • select advanced system settings
  • click the environment variables button
  • Add the following path: C:\Program Files\NVIDIA Corporation\NVSMI to the Path variable listed in the system variables section (select the variable, click "edit")
  • save
  1. Open a new power shell
  2. type nvidia-smi
Robert Crovella
  • 143,785
  • 11
  • 213
  • 257
  • What do you do when you are on WSL and run `nvidia-smi` and it doesnt respond. It doesnt time out. It doesnt throw and error and ctrl-c doesnt kill the command – SumNeuron Jun 16 '22 at 20:59
  • That has nothing to do with windows powershell or this question. – Robert Crovella Jun 16 '22 at 21:00
  • Has to do with `nvidia-smi`? Maybe it is another connection issue? – SumNeuron Jun 16 '22 at 21:01
  • So this question is a suitable landing point for any question that has to do with `nvidia-smi`? Sorry, I don't see it that way. You might wish to ask another question, or do some research. – Robert Crovella Jun 16 '22 at 21:03
  • Just wanted to see if you happened to know since your karma is super high. Sorry for the inconvenience. – SumNeuron Jun 16 '22 at 21:13