microsoft / WSL

Issues found on WSL
https://docs.microsoft.com/windows/wsl
MIT License
17.23k stars 808 forks source link

Cannot find GPU devices on Bash #829

Closed forhonourlx closed 4 years ago

forhonourlx commented 8 years ago

Does win10 bash support GPU devices?

benhillis commented 8 years ago

Not currently. This is a highly requested feature on our User Voice forum. I would suggest you add your workflow to the discussion there so help us prioritize features we work on in the future.

Thanks for trying out WSL!

fpqc commented 8 years ago

@forhonourlx I wonder if it ever will (and if it did, how would it work). If MS could code some kind of generic driver that passed openGL DRM stuff to the Windows driver stack and passed the rest of it onwards to an X or Wayland server on Windows, maybe it could work, but otherwise I think the best you might get is something that will inevitably be kind of crappy virtualized graphics card.

If not, AIGLX is still a supported (if not the absolute fastest) way of doing graphics rendering in Linux (and according to my sources (Arch Wiki) was still the way that most desktop composition was done until at least 2009). Support for something like AIGLX (which is hardware-agnostic on the X client side) already exists in vcXsrv (although the most important plugin GL_PIX_FROM_TEXMAP) is not implemented right now in hardware accelerated mode, leading to very bad performance due to falling back to software rendering.

aseering commented 8 years ago

Another major use case for GPUs is OpenCL/CUDA/etc, which I don't think AIGLX will help with? And it's more relevant to the sorts of use cases that WSL is initially targeting.

If there were enough demand and if the relevant players felt like playing nice (inter-company coordination is complicated...), in principle the WSL team could collaborate with NVidia (I'd list all vendors but really NVidia seems to be the big player in this particular field) and build a WSL driver. Not saying that's the best approach, nor that it would ever necessarily happen; just saying it could.

(If you care about CUDA in particular, it might be worth making some noise on the NVidia forums as well; make sure they also hear about any demand for support.)

thesby commented 7 years ago

If cuda is okay on bash, maybe some deep learning tools, such as tensorflow, caffe, can directly run on windows.

roachsinai commented 7 years ago

Truly!

IvanFarkas commented 7 years ago

Would be nice!

jotaf98 commented 7 years ago

Any insights on how challenging, technically, this would be? Just to adjust expectations accordingly.

XinliZ commented 7 years ago

Expecting...

vickylance commented 6 years ago

Ok it's 2017 November. Any updates on this so far?

IvanFarkas commented 6 years ago

Can we have it for Thanksgiving or a super early Christmass present the latest, please?

sunilmut commented 6 years ago

We are quite aware of the demand of this feature and are working to see how best we can support it. It's very unlikely to be part of the next (FCU + 1) release.

@jotaf98 - The challenge here is not just technical but also logistical and other. Because there are multiple players involved here, and not everything is in direct control. But, we are exploring all possibilities here.

jotaf98 commented 6 years ago

@sunilmut Thanks for the insight! Rooting for you guys to find a way to make it work.

yuchenlin commented 6 years ago

Looking forward!

IvanFarkas commented 6 years ago

Ditto!

riceshrug commented 6 years ago

I'd like to add to the chorus, OpenCL support from the bash shell is very important to me. Thank you.

omaralvarez commented 6 years ago

Any new updates on this? I would love to be able to run OpenGL apps.

gigagem commented 6 years ago

Really looking forward to being able to use WSL for running/testing our GPU-intensive programs. Now executing nvidia-smi in WSL Ubuntu, I get "NVIDIA-SMI has failed because it couldn't communicate with the NVIDIA driver. Make sure that the latest NVIDIA driver is installed and running."

GusSand commented 6 years ago

+1 on @peterjc123 request. I'm trying to run some deep learning libs on WSL and can't. Some help here guys. Can you get Abolade on the case? đź‘Ť

Khalilsqu commented 6 years ago

any updates!

ghost commented 5 years ago

C'mon guys, I really need this feature...

Khalilsqu commented 5 years ago

please add also sound system. no sound can be played from wsl

vickylance commented 5 years ago

@Biswa96 Do you have any source for that info? Because from what I believe this is something cannot be implemented. As it would require a complete architecture change in Windows OS.

Yay295 commented 5 years ago

Where did you get the idea that this can't be implemented from?

vickylance commented 5 years ago

@Yay295 This was said by Rich Turner. Here,

It’s on the backlog, but not currently planned.

We know many of you would like to be able to accelerate your numerical analysis code via CUDA/OpenCL, etc.

One thing to explore in the meantime is to try running your code in Windows. Windows actually has very powerful GPU-acceleration capabilities and you may well find that much of your existing code may well work already or require trivial effort to port to Windows itself.

in the meantime, bear with us, and UPVOTE THIS ISSUE if you care (please don’t create another duplicate ask – that doesn’t help us prioritize asks).

Thanks.

This can be found in this link. https://wpdev.uservoice.com/forums/266908-command-prompt-console-windows-subsystem-for-l/suggestions/16108045-opencl-cuda-gpu-support#{toggle_previous_statuses}

therealkenc commented 5 years ago

Because from what I believe this is something cannot be implemented. As it would require a complete architecture change in Windows OS.

this

justanhduc commented 5 years ago

Hi. I would like to ask if there is any update on this? Maybe its too much to ask for a time frame but is there any development team working on this now or the project still on hold? Thank you very much.

AbhimanyuAryan commented 5 years ago

I want to use it for Deep Learning in PyTorch. Please support it so we don't have to download Ubuntu or other Linux distributions separately. Thanks

peterjc123 commented 5 years ago

@AbhimanyuAryan For PyTorch, it is already supported on Windows since April 2018 (0.4.0).

royharoush commented 5 years ago

+1

AbhimanyuAryan commented 5 years ago

@peterjc123 you mean I can use PyTorch GPU inside WSL?

peterjc123 commented 5 years ago

@AbhimanyuAryan Yes if without GPU and No if with GPU. Actually, there's no need to use it in WSL because there is already a native one for Windows.

robelgeda commented 5 years ago

Any updates on this?

Yay295 commented 5 years ago

The update is that WSL 2 is coming soon and does not fix this issue. Due to the release of WSL 2 there probably won't be an update on this for a while as they deal with the inevitable new bugs found.

robelgeda commented 5 years ago

That's disappointing but I suppose they have a lot more urgent things to work on.

AceHack commented 5 years ago

WSL2 requires Hyper-V, seems like a step backward.

vickylance commented 5 years ago

@AceHack Ah damn is it? I was excited for WSL2 until you said Hyper-V :(

AceHack commented 5 years ago

@vickylance same

therealkenc commented 5 years ago

WSL2 requires Hyper-V, seems like a step backward.

These are odd sentiments, given the move to a Real Linux container on Windows approach shifted the probability of this three-digit August 2016 feature request being realized from "probably never" to "at least hypothetically possible sometime if not in the initial WSL2 release".

There are a couple of check-boxes in the "con" column with respect to running a Real Linux kernel under a virtual machine, but this particular tracker is not one of them. I wouldn't even be surprised if the highly voted CUDA request was the tail that wagged the "fine, we'll ship a Linux Kernel" dog.

The recent posts here run a non-zero risk of not aging well. I'm just 'sayin.

vickylance commented 5 years ago

@therealkenc If GPU will be accessible because of the hyper-v requirement I am cool with that. But it breaks some other things enabling Hyper-V on my machine. So I have to kinda back and forth turning on and off it. But if it needs to be worth that effort for me to constantly switch between then it better support CUDA.

glesur commented 5 years ago

I would like to push forward opencl, cuda and openacc support in WSL for the following simple reason; up to now, many scientists (me included) were using and developping high performance computing codes on macos. Reason has always been that it's an "easy to use" unix-type os. This included codes developped on the top of MPI library (used to run on super computers) and cuda/opencl.

Except that Apple has decided to drop opencl/cuda support altogether. This means that scientists developping numerical codes which relies on opencl will not be able to work on macos with the next macos update.

So at the moment, I'm trying windows with WSL using bootcamp. Performance looks good, and the MPI library (using openmpi) is fully functionnal, with limited impact on performances (suprisingly, WSL1 is faster than WSL2).

The only thing which prevents me from switching is the lack of GPU support on WSL. So please implement this, and you'll make many scientists happy, who will switch from macs to windows.

and thanks for the hard work!

machineko commented 4 years ago

Anything new?

thoward27 commented 4 years ago

This is one of the few things keeping me on Ubuntu. If WSL supported CUDA, I could make the switch.

AceHack commented 4 years ago

Any update?

ForrestBarnes commented 4 years ago

Some of the tools I absolutely need to use (ROS Gazebo, YOLOv3) require a Linux system with a graphics card, while some of the other tools I absolutely need to use (SolidWorks) require a Windows system with a graphics card. If there was any way for me to switch between these applications without rebooting every time or buying a second computer...

aerydna commented 4 years ago

any update on this? i'm using wsl2

boshng95 commented 4 years ago

It would be great if Cuda is supported in WSL

robelgeda commented 4 years ago

@benhillis @craigloewen-msft @jackchammons @bitcrazed @therealkenc you now have over 100 people supporting this ticket. Any news? You should discuss about this and let us know a rough timeline (assuming its still possible)

AceHack commented 4 years ago

Bump

GusSand commented 4 years ago

Bump bump !!

On Sat, Nov 2, 2019 at 08:37 Aaron Stainback notifications@github.com wrote:

Bump

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/microsoft/WSL/issues/829?email_source=notifications&email_token=AAMEVVEGJVJXZSZLJQB4IGTQRVYADA5CNFSM4CL6YCO2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEC426FI#issuecomment-549039893, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAMEVVAWDNJMC776OKZGFDLQRVYADANCNFSM4CL6YCOQ .

aerydna commented 4 years ago

dear Santa, if you think i've been a good boy this year it would be great to find Cuda support for wsl under the tree this Christmas..