New CUDA on WSL2 WIP driver 465.21 is now available for download!

As we are all wrapping up 2020 and looking forward to 2021, we have something for you!

We are happy to announce the release of the latest version of the preview driver with support for RTX3060Ti and fix for the installation problems observed in notebooks, including some performance optimizations.

Interested participants register in both the NVIDIA Developer Program 4 7 and the Microsoft Windows Insider Program 5 5, and can then access the driver installers and documentation via the Downloads area on our CUDA on WSL 41 32 webpage. Developers can use our Forum for sharing their public preview feedback with the WSL community.

Leverage our developer blog to learn much more about how CUDA works with WSL, including how to get started with running applications, including deep learning containers.

Happy Holidays!

There appears to be definite progress with 465.21, in the sense that my GeForce RTX 2070 is now recognized with 465.21 and I don’t get a blank screen on the second monitor after rebooting (both occurred for me with 465.12).

Unfortunately, I still get deviceQuery result = FAIL for 465.21. Here is the output

CUDA Device Query (Runtime API) version (CUDART static linking)

cudaGetDeviceCount returned 1
-> invalid argument
Result = FAIL

Running command nvidia-smi also now gives a more promising message, noting it now refers to CUDA Version 11.3. With 465.12 it said “NVIDIA-SMI has failed because you are not: a) running as an administrator or b) there is not at least one TCC device in the system”

Using regular driver 460.89 I get deviceQuery = PASS, so I think the CUDA on WSL driver still needs a bit more work. A complete fix by Christmas would be great…

looks incompatible with CUDA 11.2 on Windows host and WSL2 guest

1 Like

Could u please update a new version which is compatible with CUDA 11.2 before holiday? God damn it!

1 Like

Yeah, this is really frustrating. Please fix 465.21 Nvidia so that those of us with Notebooks can use Cuda with WSL I hear AMD GPUs are getting better…

As an update, 465.21 is now working with my WSL 2 (Ubuntu 20.04) Notebook with GeForce RTX 2070.

The first thing I did was uninstall everything Nvidia-related on my Windows setup and then re-installed 465.21. Though I’m not sure this was the key step, I’m including it here for completeness.

On WSL-Ubuntu, I had previously installed cuda-toolkit 11.2 meta package. Without even attempting to remove the old 11.2, I also installed the cuda-toolkit 11.0 meta package and others using the usual Ubuntu commands:

  • sudo apt-get install -y cuda-toolkit-11.0
  • sudo apt-get install -y cuda-tools-11.0
  • sudo apt-get install -y cuda-runtime-11.0
  • sudo apt-get install -y cuda-compiler-11.0
  • sudo apt-get install -y cuda-libraries-11.0
  • sudo apt-get install -y cuda-libraries-dev-11.0

Here are key technical details:

$ cat /usr/local/cuda/version.txt
CUDA Version 11.0.228

$ nvcc –version
nvcc: NVIDIA ® Cuda compiler driver
Copyright © 2005-2020 NVIDIA Corporation
Built on Mon_Nov_30_19:08:53_PST_2020
Cuda compilation tools, release 11.2, V11.2.67
Build cuda_11.2.r11.2/compiler.29373293_0

$ nvidia-smi
| NVIDIA-SMI 460.27.04 Driver Version: 465.21 CUDA Version: 11.3 |
(other details removed)

So my working setup seems to be a mix of 11.0, 11.2 and 11.3 …

I can confirm the steps described by forum user [bwynnemorris] worked for me too. (12dec2020)

My goal is a working Tensorflow 2 environment
Testing with the BlackScholes Cuda sample.

step 1. revert from Cuda version 11.2 to Cuda version 11.0 on Ubuntu 20.4 under WSL2 that is part of Windows 10 Home Insider Preview Build 21277 .

step 2. Remove all NVIDIA stuff on the Windows 10 side and reinstall the 456.21 driver.

Cheers ko
p.s. WSL2 and using gpu’s is very experimental, so some patience.

May I ask why you’re including sudo apt-get install -y cuda-runtime-11-0 in your installation process?

All the other items (tool, compiler, libraries, libraries-dev) are bundled with toolkit (at least they are when I sudo apt-get install -y cuda-toolkit-11-0), so they shouldn’t be necessary. But a --dry-run installation of cuda-runtime-11-0 runtime shows the installation of many other packages, including cuda-drivers and cuda-drivers-460.

It is my understanding that you are not supposed to install any drivers on the WSL side - unless I have misunderstood?

The instructions were not that clear to me and there was a lot of trial and error with my “solution”. I’m also not that clear what the different meta packages do, but here was my thought process…

I could see that cuda-toolkit was required and deliberately avoided the cuda, cuda 11-0 and cuda-driver meta packages. Some guesswork was required for the others, e.g I wasn’t sure if sudo apt commands were needed for tools, runtime, compiler, libraries and libraries-dev. For the cuda, cuda 11-0 and cuda-driver meta packages, it clearly says “Installs all CUDA Toolkit and Driver packages”, whereas for runtime it says “Installs all CUDA toolkit packages required to run CUDA applications, as well as the Driver packages” … I took the latter to mean that it doesn’t actually install the driver packages, just the bits needed to run them!

A couple of the sudo apt commands returned the message, “0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.” (sorry I can’t recall which ones, but not the toolkit). Either way, attempting to install the six meta packages didn’t seem to cause a problem - it seems to be all working ;-)

I’m not a Nvidia guy, but if a Nvidia representative is able to answer, I would also be interested to know the details, e.g. the bare minimum install required