-
Notifications
You must be signed in to change notification settings - Fork 835
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
[Feature Request] Updates on getting OpenCL and CUDA GPU support? #3789
Comments
Closed. Silence. Love it |
Guys, this is what our developers are mainly going to use WSL for (other than some types of IoT development). Would love to hear some update for this. |
Not trying to blame the team or anything, my guess is that this is one of those features that is too complicated for the team to address given the current support they are getting from MS and other factors internally and externally (third-party drivers, etc.). Given the current feedback from everywhere, I would guess GPU support is not going to come in the near future. I have switched to dual boot native Ubuntu for that reason though it's not the ideal solution (definitely less convenient than WSL + GPU support). Happy to learn other solutions though. The last time I tried, Hyper-V does not seem to work with GPU. VirtualBox doesn't either. |
@chenchen2015 agreed. It's a shame VirtualBox / Docker can't (or too hard) to get GPU support either, dual-boot is only option at present |
That doesn't appear to be the case. The devs have held two questionnaires on CUDA here and here. If this was in the "yeah, never going to happen because impossible" category (like say, probably, The entirely-not-silent response the question posed in this duplicate issue submission was:
Separately,
Imagine, just for a moment, if opening a duplicate issue on a github bug tracker was actually an effective way to get an answer to that. Say, more effective than adding a me2 or +1 to an existing issue (also ineffective). If there was an estimated time frame for CUDA on WSL it goes without saying that the UserVoice status would have flipped from "on the backlog" to "working on it" and you'd have got an email notification answering the rhetorical. The as-of-this-instant answer being... no... there is no estimated time frame for this project. Which is a altogether different answer than there is no timeframe and never will be because impossible.
Indeed. This is a good-as-any reason to hold out optimism. Unlike say the ever-popular |
Here is how I got it working with a little bit of hacking http://www.erogol.com/using-windows-wsl-for-deep-learning-development/ Hope it helps!! |
GPU support seems to be on WSL 2 feature backlog as well (with high priority) according to Microsoft Docs on WSL 2
Thanks, WSL team! Looking forward to see how this goes... |
That line has been nagging me a mildly, because it conflates USB device support with RS232 devices support that happens to be implemented on a Universal Serial Bus. That confuses rather than informs the answer to the FAQ question "Can I access the GPU in WSL 2". There is no USB device access in WSL1, which is #2195 #3745 and a dozen dupes with informal landing zone #412. [Funny thing, in the context of the question: you can do compute over a USB interface -- if we had USB support.] Which is not a complaint that USB device support is missing in either WSL2 or WSL1 (I have no horse in that race). Just that the whole "in the meantime" clause above will lead to people to believe they need to be on WSL1 for USB device support; which does not exist. |
At this point, you are better off spinning up a nix VM in the cloud |
But then you can't justify buying large GPUs for your engineers so they can play games in spare time. |
This is one of the first Google results for "WSL Cuda". I guess it's worth mentioning that it's going to finally happen soon https://developer.nvidia.com/cuda/wsl. |
@XenorPLxx Nice find. Has anyone found any concrete examples or tutorials on WSL 2 and CUDA, yet?? |
It is stated here that a public preview will start in June https://news.developer.nvidia.com/microsoft-and-nvidia-announce-june-preview-for-gpu-acceleration-support-for-wsl/ (It seems you need to be in the Windows Insider Fast Ring and apply for the Nvidia Developer Program, both is free and easy to do) |
Thank you for the swift replies, and useful links @XenorPLxx and @Erik-Sovereign I am perplexed. I am a member of both the Windows Insider Fast Ring, as well as the Nvidia Developer Program, but there still seems to be no support, or even documentation at this point... I have been searching all day. I even attempted to see if it worked out-of-the-box as claimed, but WSL2 doesn't seem to come with Dxgkrnl, d3d12, or anything. -----------EDIT----------- After sifting through some seriously depressing comments about this project on Reddit (https://www.reddit.com/r/programming/comments/gmtg8q/directx_linux/), I found a link on SU post (https://superuser.com/questions/1504421/is-there-a-way-to-unite-wsl2-ubuntu-tensorflow-gpu-cuda-and-pycharmwindows/) with a link that might be helpful: https://ubuntu.com/blog/ubuntu-20-04-lts-arrives If I understand correctly, one must use the Ubuntu 20.04 on Windows from the Windows Store (in addition to having the Windows Insider Fast Ring / NVidia Developer Program access) to do this. I will attempt to do this now and report the results here. The Reddit trolls were wrong. Lol. Attached is the picture proof. It works. First get WSL2 set up for the latest version of Windows 10 with the Insider's program and such. There are plenty of Google results on this part. After that it's a little less documented. It's essentially just like compiling and installing a linux kernal. The main trick is to obtain the latest release version of WSL2: WSL2-Linux-Kernel-4.19.121-microsoft-standard.tar.gz from here: https://github.com/microsoft/WSL2-Linux-Kernel/releases Remember that Windows does not allow case-insensitive duplicates of files and folders. Therefore, make sure to move the tar.gz file to your WSL2 download is inside the WSL2 Unix file-system before trying to extract/compile the kernel. To do this, use the Use this command to set up a x-server display (once you have the latest WSL2 kernal installed): One final note: this was the last tutorial I was reading (before I figured out mesa-utils's glxgears was working [and started messing around with entire xubuntu desktops]): https://microhobby.com.br/blog/2019/09/21/compiling-your-own-linux-kernel-for-windows-wsl2/ It explains how to boot from your new WSL2/linux kernel image once it's compiled. Happy coding fellas, thanks for your help!!! |
Guys remain calm, this is a bleeding edge preview kinder surprise 🥚 pre-alpha component in Windows and it will most likely come with tons of issues and lack documentation. Just give it some time it will most certainly be usable. |
@turowicz Thank you ^^ Please see my updated post (which is too long to quote again). |
@CrazedCoding - We have not yet shipped the GPU support to Insiders. |
@benhillis Ah sorry I totally missed the topic of this issue (OpenCL and CUDA). I was just happy that OpenGL worked at all (and pretty fast if you look at the measurements). I'll try to test OpenCL and CUDA (when the time comes) and make another post here. Thanks again. |
Looks like it might be part of a a recent patch: Windows 10 Insider Preview 20150.1000 (rs_prerelease) |
Has anyone successfully gotten this to work? I am able to run a CUDA sample application, however having issue installing OpenCL afterwards (followed this: https://gist.github.com/Brainiarc7/dc80b023af5b4e0d02b33923de7ba1ed). Trying to get OpenCV for python3 working with GPU acceleration EDIT: I've also confirmed that running through nvidia's setup (which successfully enabled CUDA for me) does not seem to be able to run OpenCL even with the docker containers (despite also successfully running CUDA docker examples). Attempting to run clinfo inside an nvidia docker container still shows 0 platforms available. |
I need OpenCL to run olcvanitygen! |
All frameworks and applications such as OpenCL and Triton need to adjust their code for WSL as the CUDA driver is not exposed in the same way as barebone driver. It is possible that in the next release of the driver Nvidia will modify it so it looks the same, but the current situation is different. |
I couldn't find this information. Is there (or will there be) GPU/CUDA support in WSL 1? |
Ohhhhh, hmmmmm, Maybe you just need WSL 2. |
Went for WSL 2, works like a charm. |
The CUDA GPU support is obviously out but if anybody is interested in OpenCL, it might be worth paying attention to this issue: |
Gratings WSL team,
I just want to again bring up the good old "OpenCL and CUDA GPU support" topic that has been discussed many times.
Numerous previous discussions (e.g. #829 #1788 #327 ) have directed people like me to this highly voted feature request on User Voice forum. As a matter of fact, it is the HIGHEST voted feature request on the forum (which has more than 2 times the votes than the second requested feature, as of 1/20/2019). I saw a survey (#2422 ) done on August 2017, presumably to collect some early user preferences for initial project targeting. The last update on the User Voice forum was on April 2018 which was 10 months ago.
If possible, could you guys please let us know the status of this feature request and ideally, what's the estimated time frame of this project? Will we see an update in the next few months, or by the end of this year?
The text was updated successfully, but these errors were encountered: