Windows 10 Linux subsystem: You get GPU acceleration – with Intel, AMD, Nvidia drivers

Windows 10's subsystem for Linux, WSL, gains GPU access for machine learning.
Written by Liam Tung, Contributing Writer

Nvidia, Intel and AMD have announced their support for Microsoft's new effort to bring graphics processor support to the Windows 10 Windows Subsystem for Linux to enhance machine-learning training. 

GPU support for WSL arrived on Wednesday in the Dev Channel preview of Windows 10 build 20150 under Microsoft's reorganized testing structure, which lets it test Windows 10 builds that aren't tied to a specific future feature release. 

Microsoft announced upcoming GPU support for WSL a few weeks ago at Build 2020, along with support for running Linux GUI apps. The move on GPU access for WSL is intended to bring the performance of applications running in WSL2 up to par with those running on Windows. 

SEE: Windows 10: A cheat sheet (TechRepublic)

GPU compute support is the feature most requested by WSL users, according to Microsoft.

The 20150 update includes support for Nvidia's CUDA parallel computing platform and GPUs, as well as GPUs from AMD and Intel. It also supports DirectML (Direct Machine Learning), Microsoft's Windows 10 API for hardware-accelerated machine learning. 

At Build 2020, Microsoft revealed it has been using its DirectX (Direct 3D 12/D3D12) APIs for graphics to bring GPU hardware acceleration to Linux-based machine-learning workloads running on WSL2. It created a custom DirectX-based Linux GPU kernel driver – the dxgkrnl Linux Edition – for WSL2's Linux kernel, which works with Microsoft's Hyper-V.

Previously GPU virtualization was available to Windows running inside a VM or container, but not Linux guests.

Microsoft sees Nvidia's CUDA platform as important for enhancing machine-learning training on WSL and the pair have launched a preview of CUDA for WSL 2, which includes support for key machine-learning tools like Facebook's PyTorch and Google's TensorFlow . 

"Training ML models is a time-consuming computational task even when using small datasets. To speed up training, many of these tools use Nvidia's CUDA as the optimized path for GPU hardware acceleration, enabling data scientists to hardware-accelerate their training scripts on NVIDIA GPUs," explained Clarke Rahrig, a program manager on the Windows AI platform team.

"Nvidia CUDA support has been present on Windows for years. However, there is a variety of CUDA compute applications that only run in a native Linux environment. In support of meeting professional data scientists where they're at we're adding support for CUDA inside WSL 2."

SEE: Linus Torvalds: Linux kernel 5.8 is 'one of our biggest releases of all time'

Microsoft has also released a preview of TensorFlow with a DirectML, which it plans to open-source in a few months. AMD, Intel and Nvidia have also released preview drivers that support the DirectML TensorFlow package on WSL. 

AMD's driver for WSL GPU acceleration is compatible with its Radeon and Ryzen processors with Vega graphics. Intel notes that its WSL driver has only been validated on Ubuntu 18.04 and Ubuntu 20.04.

Editorial standards