Nvidia Cuda Wsl 2
Wsl2 with cuda support takes 18 longer than native ubuntu to train an mnist model on my nvidia rtx 2080 ti.
Nvidia cuda wsl 2. When installing cuda using the package manager do not use the cuda cuda 11 0 or cuda drivers meta packages under wsl 2. Do not choose the cuda cuda 11 0 or cuda drivers meta packages under wsl 2 since these packages will result in an attempt to install the linux nvidia driver under wsl 2. At build 2020 microsoft announced support for gpu compute on windows subsystem for linux 2 ubuntu is the leading linux distribution for wsl and a sponsor of wslconf canonical the publisher of ubuntu provides enterprise support for ubuntu on wsl through ubuntu advantage. Wsl is a windows 10 feature that enables you to run native linux command line tools directly on windows without requiring the complexity of a dual boot environment.
This includes pytorch and tensorflow as well as all the docker and nvidia container toolkit support available in a native linux environment. It would require complicated instructions workarounds and. 2 minutes to read. Apt get install y cuda toolkit 11 0.
These packages have dependencies on the nvidia driver and the package manager will attempt to install the nvidia linux driver which may result in issues. It would take a virtual machine with gpu passthrough enabled to run the stated programs in linux on windows 10 without wsl2. Cuda support with wsl2 is still in early preview mode and i m hopeful that the engineers and researchers over and microsoft and nvidia will eventually reach a point where it gets close to ubuntu performance. With wsl 2 and gpu paravirtualization technology microsoft enables developers to run nvidia gpu accelerated applications on windows.
In this post we discuss what you can expect from cuda in the public preview for wsl 2. Nvidia drivers for cuda on wsl including directml support this technology preview driver is being made available to microsoft windows insiders program members for enabling cuda support for windows subsystem for linux wsl 2.