WSL2使用检测不到GPU
输入nvidia-smi
出现以下错误。
Failed to initialize NVML: GPU access blocked by the operating system
Failed to properly shut down NVML: GPU access blocked by the operating system
解决办法:
使用uname -r
查看内核版本,如下所示。
5.10.16.3-microsoft-standard-WSL2
当前版本是windows20H2,升级到21H2即可。
使用windows10易升即可。
安装完记得重启!
参考博文:https://www.cnblogs.com/shenben/articles/16007919.html
Inference:
WSL安装
在 WSL 上启用 NVIDIA CUDA