GPU Compute, WSL Install and WSL Update arrive in the latest Insider build for the Windows Subsystem for Linux
There are three thrilling new updates for the Windows Subsystem for Linux (WSL) in the new Windows Insider Preview Build 20150. The first is GPU compute: a feature that allows your Linux binaries to leverage your GPU, which makes it possible to do more machine learning/AI development and data science workflows directly in WSL. Secondly, we’ve added a new command:
wsl --install which allows you to install WSL with just one command. Lastly, we’ve added
wsl --update which gives you the ability to easily manage the Linux kernel version used by WSL 2 distros.
GPU compute support for the Windows Subsystem for Linux
We’re excited to announce that we’re addressing WSL’s #1 most requested feature by adding GPU compute support. This update will include support for NVIDIA CUDA, which will help enable professionals to use their local Windows machines for inner-loop development and experimentation. Additionally, this will also support DirectML, which will empower students and beginners to use hardware accelerated training on the breadth of Windows hardware, across AMD, Intel, and NVIDIA GPUs. For the full details on this announcement please read this blog post: GPU accelerated ML training inside the Windows Subsystem for Linux on the Windows Developer blog.
To get started with this feature, you’ll need to make sure you have this latest Insider preview build installed, have a WSL 2 distro installed, ensure your Linux kernel is up to date, and install the right drivers for your GPU. You can find the full instructions on the AI docs here!
We are working on making WSL easier to install, and we have added a new command line option to make that possible:
wsl.exe --install. You’ll only see this option on machines that do not have the ‘Windows Subsystem for Linux’ optional component enabled. In this initial release, this command will enable the Windows Subsystem for Linux optional component, as well as the Virtual Machine Platform optional component, and prompt you to restart your machine. In the future we plan to add support to automatically install WSL distros using this command as well. Stay tuned to this blog and the Windows Experience blog for updates on when those changes will be released to the Insider Fast ring. Additionally, WSL 2 distros will be the default type for any new installations of WSL. We made this change as the majority of users in the Insiders Fast ring are using WSL 2, you can read more about this on the WSL BUILD 2020 Summary blog post.
The Linux kernel that is used by WSL 2 distros is now being delivered via Microsoft Update. For almost all WSL users, this means your Linux kernel will be automatically kept up to date just like any other component on your machine and these updates are viewable inside of the ‘Windows Update’ page in your Windows Settings.
We also wanted to add command line options for those users who wish to have fine control over their Linux kernel versions inside of WSL.
wsl.exe --update and its options provide that control. Below is a description of the new commands that are available, and what each does.
wsl.exe --updateManage updates to the WSL 2 kernel. If no options are specified, this will update to the latest kernel version.
wsl.exe --update --statusView update status. This will show you what kernel version you are on, and when you were last updated.
wsl.exe --update --rollbackRevert to a previous version of the Linux kernel.
The rollback command exists to allow users to easily uninstall the latest update if needed. When any new Linux kernel version is installed, your last used kernel is stored as a rollback kernel. When you execute the above command WSL 2 will load using your rollback kernel (i.e: WSL 2 distros will now load using your previous kernel version). When a new update is available, your machine will automatically install the latest kernel version and WSL 2 will load using that latest version.
File your feedback and getting in touch with the team
We always love hearing your feedback about anything and everything WSL! For any technical issues, or feature requests please file them at the WSL Github Repo. For general questions you can find WSL team members on Twitter here on this Twitter list or you can ping me directly @craigaloewen. Let us know what you think of these new features, we’ll be looking forwards to giving you more updates in the future! 😊
<3 u Microsoft 🙂
bug on devblogs.microsoft.com @Microsoft
Re the above-mentioned “Windows Subsystem for Linux Update” appearing in WU, it turns out that they’re appearing even for those with only WSL1. Does that make any sense?
I’m on 20150 and was offered the 4.19.121 update somehow. Last week, I was on the previous Fast build and was offered 4.19.104, so it wasn’t a one-time quirk. And they actually install.
I have not seen any confirmation that the updates are for anything but WSL2.
The experiment, investigation and research are underway. We will meet … Thank you for all your efforts.
Originally manual kernel updates for 2004 were described as temporary, but now, months later, it would appear it’s only being added for 20H2? Can you please update on the status of WSL2 kernel updates on 2004.
Did try to install the Nvidia development driver for Geforce in the Surface Book 3 but then i get notified that can’t installed. is this not working with 1660i?
Wanted to look at ML with GPU.
this comment has been deleted.
The requisite kernel has not shipped yet, as of this writing, best I can tell.
Just enable ‘Receive updates for other Microsoft products when you update windows’ under the Advanced Windows Update options and run
Is there a way to revert the rollback? I rollbacked the WSL2 kernel to 4.19.104 to avoid some initial glitches, but I did not see the option to undo the rollback. The wsl –update command would only returns messages that “No updates are available. Kernel version: 4.19.104”, although the wsl –update –status does show that “The WSL 2 kernel is in the rollback state and is using a previous kernel version. Kernel version: 4.19.104”
I hope there is a graphical way of managing how much space is allowed to a OS installed under WSL.
Also, would be cool to have information about ROCM/AMD stuff and not just CUDA/Tensorflow from Nvidia.
These are great news! Now if only tensorflow-directml supported TensorFlow 2.x 🤔