When Microsoft first launched its Windows Subsystem for Linux (WSL) four years ago, it would have been difficult to predict exactly where it was to go. In truth, we weren’t expecting WSL to take off as it has. It’s quickly become an invaluable feature in Windows for Microsoft, and one that continues to gain new features that, in some cases, actually “wow” us.
At its Build 2020 conference, Microsoft announced a handful of neat additions to WSL, including the ability to access the GPU through WSL, with support for DirectX 12 libraries. Naturally, the mention of DirectX and Linux in the same sentence raises a lot of eyebrows, but at least for now, its interaction is only going to happen through WSL. Don’t expect to game through DX12 on Linux anytime soon.
This week, a new preview build has come out, numbered 20150. It brings about a number of important GPU interaction features, namely revolving around NVIDIA’s CUDA, and also Microsoft’s own DirectML.
On the DirectML front, users of this supported build can begin using their AMD, Intel, or NVIDIA DirectX 12-capable GPUs through WSL for deep-learning inference and training. To give potential users something to immediately work with, Microsoft has crafted a special TensorFlow package based around DirectML, along with examples.
Such rich DirectML support is undoubtedly notable, but so too is the fact that NVIDIA’s CUDA has also been added to WSL, enabling users to run Linux software that needs to make use of the API. That can of course include deep-learning, which would be great in cases where DirectML isn’t an option.
All of these moves are interesting in their own right, and may paint the idea that Microsoft really doesn’t want people using native Linux. But, this interactivity really does blow the doors open for some users who can’t run multiple workstations, and absolutely need Windows for whatever reason (be it tools or games). To some, WSL might deliver (close enough to) the best of both worlds.
If you want to dive into some WSL experimentation, you can check out all of what’s new with the 20150 build itself in this blog post, and get a run-down of CUDA/DirectML specifically in this second one.