-
Notifications
You must be signed in to change notification settings - Fork 868
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WSL2 & CUDA does not work [v20226] #6014
Comments
I am having the same issue. Everything was working flawlessly this morning but then I have updated to 20226.1000 from 20221.1000 and it does not work anymore (tried reinstalling nvidia drivers, etc.) with error that all cuda devices are busy or unavailable. Edit: |
Can you share the contents of c:\Windows\System32\lxss\lib? |
Having same issue. Here's my C:\WINDOWS\System32\lxss\lib. 09/17/2020 01:24 PM 124,664 libcuda.so |
Oh too bad, I also encountered this problem. I was so happy when wsl worked again in the 20226 version, but cuda couldn’t work. I was left out of the cold. I tried the following solutions, but none of them worked for me.
|
Interesting, you seem to be missing the libdxcore libraries. |
I reverted my windows back to the previous version, then reinstalled the 20226 build, and now it looks like this: 09/17/2020 01:24 PM 124,664 libcuda.so |
I am having the same problem. WIndows 10 build 20226 and Nvidia driver 460.20. It is great to see that it is not just my install. I hope that this can be fixed soon. And now I can also confirm that it will work if you roll back to the previous build 20221. You can download the (old) iso file from Microsoft and re-install without losing any data. |
Same problem here, Nvidia driver 460.20 and build 20226. |
I have the same problem Nvidia driver 460.15, build 20226. It worked with the previous insider build. |
I have the same problem in 20226. My build also contains same 8 files in lxss\lib. But I get cudaErrorDevicesUnavailable. Is there a way to roll back 20221? Using "Go back to previous version of Windows 10" sends me to 19041.508. |
It worked for me. Are you sure you have went to the 20226 from 20221 - I think it might store only the last version as backup - the option is no longer available for me when I have reset from 20226 to 20221. |
Yes, you can install 20221 from https://www.microsoft.com/en-us/software-download/windowsinsiderpreviewadvanced |
It seems that it is not possible to downgrade windows without losing the apps and files which is not possible for me under these circumstances. Does anyone know another solution for this? Or we wait for Microsoft the fix the problem? I too have version 10226. |
Same here. +-----------------------------------------------------------------------------+ |
Thanks, @adamfarquhar. Rollback to version 20201 resolve this issue. Even though some settings are removed, files stay. |
Same problem.
Rollback to previous version fixes it. For people who want to do it without reinstalling, go to Recovery > restore previous version of windows |
I have the error |
@kivancguckiran I just joined the insider build so I'm in the same boat. It would probably take like 4 hours, but you could probably revert windows to the previous version (non-insider) maybe then go specifically to 20221. I'm not going to try it and just wait though. |
+1, same issue here.
The kernel, driver and other versions are above the required minimum, so CUDA in WSL 2 should work.
|
I have the same problem in 20226.
Cuda device query is ok.
But cuda utility does not worked.
Below is strace log. |
I also have tensorflow-gpu on WSL2. But I'm getting the error message as shown below.
Following this link resolved the issue for me! It seems like my issue was also the Windows10 Insider Previews... smh. Simply following "Roll Back Soon After Enabling Insider Previews" section solved it for me (current version: 10.0.20221 Build 20221) and now I can train my model again using tensorflow-gpu. Thank you everyone for the help! |
@strarsis In your case you need to use a Windows Insider build from the Dev Channel (build >=20150). CUDA in WSL2 won't work in build 19041. |
@onomatopellan: How long do have I to wait to get this support in stable Windows 10? |
@strarsis This is expected for 21H1 aka April 2021. |
@onomatopellan: To use this now, I have to register for Windows Insider, download the ISO - or can I use the Windows updater? |
This stopped working for me as well. winver 2004 20226 with CUDA. It previously was working until yesterday on previous builds. When will this be fixed? Too many recurring bugs, ready to dump windows |
Updated to Insider version 20279.1 still with 465.12 and all is working well as before. |
Did anyone tried this on a mainline windows build? Other programs on my system does not want to work on insider build. |
I tried it on Nov 24 and there was some issue I couldn't fix, I think it couldn't detect my GPU. |
Thank you all for reporting the status on different OS versions. I was wondering if anyone is currently/have tried version 21286? I am about to try using CUDA on WSL2 (hence, need to switch to the Dev Channel), turns out that the ISO files are only released for selected versions. I would prefer to stay at a steady one for the moment. Appreciate any response :) |
@Cuberick-Orion You can follow CUDA known issues to see if there is a known problem. Most problematic build was 20226, any build after that should not be a problem. |
Windows insider updated to 21327.1000 cuda broken again. previous insider version work well. Error message with BlackScholes: After re-install(Custom-Perform a clean install-restart pc) the CUDA driver (wsl ready) all goes well again. |
+1 |
This is called out in the flight notes: https://blogs.windows.com/windows-insider/2021/03/03/announcing-windows-10-insider-preview-build-21327/
|
The following worked for me:
|
CUDA works again in 21332.1000. |
Error on WSL2Environment: Windows insider program 21332.1000, NVIDIA Driver 461.72 on Windows (for GeForce GTX 1660 Ti) , WSL2 Ubuntu 20-04, After installing and having the NVIDIA driver working on Windows. I followed the NVIDA site https://docs.nvidia.com/cuda/wsl-user-guide/index.html instructions (adapted for Ubuntu 20-04 because the example uses 18-04) Steps on Ubuntu-20.04:
After compiling and executing the ./BlackScholes example I get (again) the same error described on this thread. Situation on Windows 10However the GPU works on Windows with using Pytorch Pytorch Windows, Installed with: Code: But tensorflow 2.4.1 on Windows installed with: It prints 'SUCCESS: Found GPU:' etc, but later in the process it has a problem in one of the cuda libraries. Here is the output of the run:
Note that for Tensorflow I had to download the CUDA Toolk kit 11.2 and associated Cudadnn libraries. Any help will be appreciated. |
What could I do if I Nvidia driver manager can't find appropriate driver for me? |
@kerim371 I'm afraid it won't work.
|
I have a Nvidia GeForce GT750m which is based on the Kepler architecture as well as Windows Dev build 21390, the installer still give the same error as @kerim371 above. |
@kerim371 , @tommyip I was having the same issue, which i resolved installing the drivers via the wsl-ubuntu´s prompt, following the commands shown in https://developer.nvidia.com/cuda-downloads, under Linux>x86_64>WSL-Ubuntu>2.0>deb(network). |
I followed the instructions here:https://radiant-brushlands-42789.herokuapp.com/medium.com/swlh/how-to-install-the-nvidia-cuda-toolkit-11-in-wsl2-88292cf4ab77 |
@AllardJM That guide is incomplete. First of all you need to run a Windows build from the Dev channel and install a Windows Nvidia driver with WSL2 CUDA support. After that you will see a device |
I believe I properly did both. I was able to run the blackschoals
test….just not TF
|
@AllardJM Which version of TensorFlow did you install? If you see the |
@onomatopellan I have an (empty) file dxg under the dev folder.... The TF version is 2.5.0 from pip install tensorflow |
@AllardJM That means the GPU is already available inside WSL2. Launch python3 interpreter and run:
The GPU should be recognized although could not be available due to lack of specific cuda libraries. This is why I always prefer running TensorFlow in Docker since it has all the libraries needed in the container. |
Not working with Ubuntu 18.04 (changed params accordingly). |
Thank you Anh, It seems the problem got worse. If I try to install a device from the NVIDIA site, the first thing the installer does is to check device compatibility and it aborts saying there it didn't detect a compatible device. Please help. I have had intermittent problems with GPU connection, even in Windows 10." As you can see, I am very disappointed with the whole NVIDIA GPU experience on Windows. I am still waiting for an update. This issue, and related ones, have more then 4K Up votes in the insider problem list. Petrarca |
With Windows 10 (non-insider) 2021H2 November update, CUDA now works in WSL 2. |
@strarsis You are right. Thanks for the notification. |
Environment
Steps to reproduce
Exactly followed instructions available at https://docs.nvidia.com/cuda/wsl-user-guide/index.html
Tested on previously working Ubuntu WSL image (IIRC GPU last worked on 20206, than whole WSL2 stopped working)
Tested also on newly created Ubuntu 18.04 and Ubuntu 20.04 images.
I have tested CUDA compatible NVIDIA drivers 455.41 & 460.20. I have tried removing all drivers etc.
I have also tested using CUDA 10.2 & CUDA 11.0.
It was tested on two separate machines (one Intel + GTX1060, other Ryzen + RTX 2080Ti)
Issue tested directly in OS also in docker containers inside.
Example (directly in Ubuntu):
Example in container:
Expected behavior
CUDA working inside WSL2
Actual behavior
All tests which are using CUDA inside WSL Ubuntu are resulting with various CUDA errors - mostly referring to no CUDA devices available.
The text was updated successfully, but these errors were encountered: