Live data from Hacker News

DirectX is coming to the Windows Subsystem for Linux

devblogs.microsoft.com

151–160 of 548 posts

Re: DirectX is coming to the Windows Subsystem for Linux

#151

FYI: This is the first draft of the Microsoft Virtual GPU (vGPU) driver. The driver exposes a paravirtualized GPU to user mode applications running in a virtual machine on a Windows host. This enables hardware acceleration in environment such as WSL (Windows Subsystem for Linux) where the Linux virtual machine is able to share the GPU with the Windows host. So this isn't actual "DirectX on Linux", just a driver for a…

This sounds like an attempt to win back ML segment from Linux to Windows. There are three letters back in my mind that sound like screaming, but too early to tell unfortunately.

Mentioned it in another comment, but I am not sure what stoped people from doing ML without WSL. I don't even know ML libraries, that don't work on Windows proper.

Re: DirectX is coming to the Windows Subsystem for Linux

#152
post #35
post #16

I remember when DirectX was a huge obstacle to porting games to Linux. This feels like a great, great victory for Linux to me!

> This feels like a great, great victory for Linux to me! Why? This is not DirectX on the Linux desktop, it is DirectX for WSL. This means that code written for this will NOT function on desktop Linux. Additionally, support for DirectX for WSL is support not spent on Vulkan and OpenGL.

> This means that code written for this will NOT function on desktop Linux.

Like CUDA, I assume that most applications would not be coded to this API directly. Microsoft already mentioned OpenCL and OpenGL.

This is to hardware accelerate Linux applications and not to create WSL-specific Linux apps. I can't imagine there's a big market for Linux GUI apps that would only run on Windows.

Re: DirectX is coming to the Windows Subsystem for Linux

#153
post #67
post #47

Earlier quoted context omitted.

How is it too early to tell? It is an extension of the capability of WSL, giving you that sweet convenience of the DirectX API with your existing ML project. Of course, this extension makes your project incompatible with desktop Linux once adopted.

Not necessarily. It is not possible to access the GPU in WSL at all right now, so I need to dual boot which also means dealing with Linux desktop compatibility issues with my laptop. As long as I can use the same ML framework (without DirectX API), then this poses no compatibility issues at all. It just means I can develop & run my ML code in WSL.

Just curious, what stops your ML code from running under Windows?

Re: DirectX is coming to the Windows Subsystem for Linux

#154
I also found the phrasing of this to be ambiguous.

Windows (subsystem for Linux)

has a Windows host running Linux

Or

(Windows subsystem) for Linux

has Windows running on a Linux host

They've been using this phrasing since the OS/2 and POSIX subsystem days and it was also confusing then

Quarterdeck did it right with Desqview/X by just renaming their WIN16 subsystem as winx. Then you would see "desqview winx" and know that it's windows running on desqview and not the other way around.

IBM also got it right: OS/2 Windows VDM. I know it's running on OS/2.

But Microsoft has been running with this phrasing since literally Windows NT and it's always been confusing.

Re: DirectX is coming to the Windows Subsystem for Linux

#156

Earlier quoted context omitted.

> AF_PACKET Just run a Linux hyper-v vm. That's what WSL2 is doing under the hood anyway. I run it this way and it's great. I have windows terminal auto ssh into it. Performance is great. And using the X server x410 on the windows side gui performance is fantastic (though no hardware acceleration) because instead of ssh tunneling x410 suports AF_VSOCK for the x socket, which hyper-v supports for performance as good a…

I've had trouble researching if WSL2 is in fact a hyper-v managed VM. I've seen some documentation referring to WSL2 as a tightly integrated Krypton (scaled down hyper-V) VM. It seems to imply the host overhead isn't as high as a guest on hyper-V

AFAICT Krypton is stripped down in the sense that a lot of the management framework is gone, but as far as the guest is concerned, it's running on hyper-v.

Re: DirectX is coming to the Windows Subsystem for Linux

#157
post #2

> This also enables third party APIs, such as the popular NVIDIA Cuda compute API, to be hardware accelerated within a WSL environment. Dollars to donuts this is why Microsoft is implementing this. GPU acceleration is becoming a critical feature for many users (but especially developers) and this will continue. If WSL is to be a serious competitor, this is necessary and I'm glad to see it showing up. This is true of…

"There is currently no presentation integration with WSL as WSL is a console only experience today. The D3D12 API can be used for offscreen rendering and compute, but there is no swapchain support to copy pixels directly to the screen (yet )." This leads me to believe that display support is intended in the future. It's a work in progress. They've gone this far why would they stop at compute? Still, it's pretty aweso…

They've announced that Linux GUI apps are coming later this year to WSL2; while that is possible without GPU, I imagine MS wants a decent UX for the feature, though, which suggests...

Re: DirectX is coming to the Windows Subsystem for Linux

#158

Earlier quoted context omitted.

Yup, from one of the MS staff replies further in the thread[1] > There is a single usecase for this: WSL2 developer who wants to run machine learning on his GPU. The developer is working on his laptop, which is running Windows and that laptop has a single GPU that Windows is using. Can't say I can get behind MS trying to shift maintenance for a Windows only "feature" onto the Linux devs here. 1. https://lkml.org/lkml…

To be honest I don't quite understand what stopped those developers from running machine learning on their GPUs under Windows itself. Most frameworks work just fine. I've been doing quite a lot of TensorFlow with both Python and .NET. The only time I faced the need for Linux box is trying a demo project from OpenAI, which did not use the features it required Linux for on a single machine anyway.

I believe the purpose is for devs who are deploying to Linux, their toolchain may not fully work in Windows, but they want to have a similar dev/test env within Windows... pretty much the whole point of Windows Subsystem for Linux (WSL). It's not that the frameworks don't work on Windows, it's the deployment tech, like Docker, Ansible, their build scripts etc etc. Some users may be doing something totally custom on top of the GPU without a framework layer but that is probably very few users. I'd have to guess though that those users would be the type of users that would get MS to go through the effort though...

Re: DirectX is coming to the Windows Subsystem for Linux

#159
post #139

EEE, slowly the Linux desktop | os environment will be a thing of the past. something you won't run directly but interact via the windows api. and your only other choice will be mac os on arm. the biggest mistake the linux ecosystem did, was being so fragmented. if they had rallied around one desktop env, then lots of people would've migrated. I personally use a t490 on ubuntu and a 2013 macbook. but even I I'm attem…

> the biggest mistake the linux ecosystem did, was being so fragmented.

I'm not sure how many times I have pointed this out here, but given the lack of a standardized desktop environment, that is the reason why most software companies are reluctant to support Linux users. But in contrast with 'Android' in the mobile industry has succeeded in doing this with Linux as its kernel.

For a typical or even a complex desktop app, I can support 100% of all Windows users, 100% of the time. macOS is more or less the same here. Linux distros however has this fragmentation running so deep that to target the majority of users there, you must supporting 5+ distros they could be running. That's 5+ CIs to maintain and 5+ troubleshooting guides to update here.

As even Linus Torvalds would say: > 'I still wish we were better at having a standardize desktop that goes across all the distributions… It’s not a kernel issue. It’s more of a personal annoyance how the fragmentation of the different vendors have, I think, held the desktop back a bit. ' This is a distro ecosystem problem, not a 'kernel' issue.

Re: DirectX is coming to the Windows Subsystem for Linux

#160
post #61

Earlier quoted context omitted.

In the linked thread the Microsoft developers explicitly deny that this is the intent, if that's worth anything to you. The goal, rather, is to take all the usual (for the Linux side) GPU stuff and give it access to the Windows host's GPU, when running on WSL. That is, they are already working on getting OpenGL/Vulkan/etc. to run on top of this: https://www.collabora.com/news-and-blog/news-and-events/intr... Rather t…

The developers' word is irrelevant. Microsoft is a business. Microsoft will pursue its long term business interests. Developers are hired to do what the business directs. So the question is really, "what would best serve Microsoft's business interests?" and not "what do the developers intend?" because in time only one question matters and unfortunately it's not the one with the best interests of non-windows-users in…

The initial implementation of WSL was not mandated by the business. it was created by the developers that were tasked with exploring how to run Android apps (on the ms phone) and they went bananas and invented and created WSL. First later the business side of Microsoft came in to play on wsl
Post reply on HN