WSL: Cannot use GPU support in Windows 10 preview build 21354

Notes from the dev team

Hey everyone we’re filing this issue on ourselves to track the fact that GPU Compute support is unavailable in preview build 21354. We have identified the fix for this already and it should likely be out in the next Insiders build. Thanks for your patience here (again 😅) as we resolve this issue!

Environment

Windows build number: 21354
Your Distribution version: All distros
Whether the issue is on WSL 2 and/or WSL 1: WSL 2

Steps to reproduce

Trying to use any Linux application that leverages the GPU on Windows will not work.

Expected behavior

I should be able to use Linux applications that leverage the GPU.

Actual behavior

Any access to the vGPU in WSL will fail.

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Reactions: 13
  • Comments: 38 (4 by maintainers)

Most upvoted comments

@craigloewen-msft I appreciate you guys are working hard and I shouldn’t expect rock-hard stability in this line of Windows development but it being the only way of using CUDA under WSL in any meaningful way, is there a chance that a team member does a

docker run --gpus all nvcr.io/nvidia/k8s/cuda-sample:nbody nbody -gpu -benchmark

before a release to ensure that works? Assuming it is an oversight and not some fundamental incompatibility every time. This is the third time this has happened in the past few months, and judging by the amount of people who comment on and star these issues I know I am not alone. It doesn’t help that my computer restarts itself overnight leaving me with a non-functioning system (I know I can turn that off).

Anyway, thanks for all the work you do and I look forward to the fix for this.

@craigloewen-msft I appreciate you guys are working hard and I shouldn’t expect rock-hard stability in this line of Windows development but it being the only way of using CUDA under WSL in any meaningful way, is there a chance that a team member does a

docker run --gpus all nvcr.io/nvidia/k8s/cuda-sample:nbody nbody -gpu -benchmark

before a release to ensure that works? Assuming it is an oversight and not some fundamental incompatibility every time. This is the third time this has happened in the past few months, and judging by the amount of people who comment on and star these issues I know I am not alone. It doesn’t help that my computer restarts itself overnight leaving me with a non-functioning system (I know I can turn that off).

Anyway, thanks for all the work you do and I look forward to the fix for this.

Agreed! We actually do run GPU tests in WSL that are part of our regular process to ensure that we are not breaking anything GPU related when we make any changes to WSL. These last breakages have exposed some gaps in our testing and we are working on fixing them as we definitely don’t want to break you either 😃 . Additionally, GPU compute will be part of the next major Windows release.

Indeed, is there any information wrt. when it will no longer require insider build for CUDA in WSL?

This issue has been fixed in the latest preview build 21359, please upgrade your systems and you’ll have vGPU access again! I am working on getting the changelog there updated to reflect that vGPU is fixed. Thank you all for your patience!

This issue has been fixed in the latest preview build 21359, please upgrade your systems and you’ll have vGPU access again! I am working on getting the changelog there updated to reflect that vGPU is fixed. Thank you all for your patience!

Hi, Thanks, It’s great and timely.

Turns out here is a way to bypass the version check:

https://github.com/NVIDIA/nvidia-container-toolkit/issues/148

$ docker run --gpus all --env NVIDIA_DISABLE_REQUIRE=1 nvcr.io/nvidia/k8s/cuda-sample:nbody nbody -gpu -benchmark

Run "nbody -benchmark [-numbodies=<numBodies>]" to measure performance.
        -fullscreen       (run n-body simulation in fullscreen mode)
        -fp64             (use double precision floating point values for simulation)
        -hostmem          (stores simulation data in host memory)
        -benchmark        (run benchmark to measure performance)
        -numbodies=<N>    (number of bodies (>= 1) to run in simulation)
        -device=<d>       (where d=0,1,2.... for the CUDA device to use)
        -numdevices=<i>   (where i=(number of CUDA devices > 0) to use for simulation)
        -compare          (compares simulation results running once on the default GPU and once on the CPU)
        -cpu              (run n-body simulation on the CPU)
        -tipsy=<file.bin> (load a tipsy model file for simulation)

NOTE: The CUDA Samples are not meant for performance measurements. Results may vary when GPU Boost is enabled.

> Windowed mode
> Simulation data stored in video memory
> Single precision floating point simulation
> 1 Devices used for simulation
GPU Device 0: "Ampere" with compute capability 8.6

> Compute 8.6 CUDA device: [NVIDIA GeForce RTX 3090]
83968 bodies, total time for 10 iterations: 71.278 ms
= 989.179 billion interactions per second
= 19783.574 single-precision GFLOP/s at 20 flops per interaction

@craigloewen-msft I appreciate you guys are working hard and I shouldn’t expect rock-hard stability in this line of Windows development but it being the only way of using CUDA under WSL in any meaningful way, is there a chance that a team member does a

docker run --gpus all nvcr.io/nvidia/k8s/cuda-sample:nbody nbody -gpu -benchmark

before a release to ensure that works? Assuming it is an oversight and not some fundamental incompatibility every time. This is the third time this has happened in the past few months, and judging by the amount of people who comment on and star these issues I know I am not alone. It doesn’t help that my computer restarts itself overnight leaving me with a non-functioning system (I know I can turn that off).

Anyway, thanks for all the work you do and I look forward to the fix for this.

+1

Actually, would be nice to have some way to not living on the bleeding edge to get WSL or Cuda on Windows. Would consider paying for our use case 😃