Search code examples
windowspowershellgpunvidia

Running nvidia-smi from Windows PowerShell?


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?


Solution

    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