nvidia-smi is working from windows
1- you can always call it from windows cmd [DOS Shell]
or power shell or terminal actually it is in Windows/System32
i.e it is in path
2- for whatever reason you like to call from wsl2 here:
/mnt/c/Windows/System32/nvidia-smi.exe
Mon May 31 19:18:31 2021
±----------------------------------------------------------------------------+
| NVIDIA-SMI 470.14 Driver Version: 470.14 CUDA Version: 11.3 |
|-------------------------------±---------------------±---------------------+
| 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 … WDDM | 00000000:01:00.0 Off | N/A |
| N/A 47C P8 3W / N/A | 183MiB / 6144MiB | 0% Default |
| | | N/A |
±------------------------------±---------------------±---------------------+
±----------------------------------------------------------------------------+
| Processes: |
| GPU GI CI PID Type Process name GPU Memory |
| ID ID Usage |
|=============================================================================|
| 0 N/A N/A 1784 C+G Insufficient Permissions N/A |
| 0 N/A N/A 3720 C+G …cw5n1h2txyewy\LockApp.exe N/A |
| 0 N/A N/A 8688 C+G …5n1h2txyewy\SearchApp.exe N/A |
| 0 N/A N/A 16804 C+G …ekyb3d8bbwe\YourPhone.exe N/A |
±----------------------------------------------------------------------------+
ok.
try it yourself