Please consider adding WSL2 GPU accelerator support

Post requests to add new GPUs to the official whitelist here.

Moderators: Site Moderators, FAHC Science Team

Post Reply
jpalpant
Posts: 10
Joined: Wed Mar 11, 2020 12:52 am

Please consider adding WSL2 GPU accelerator support

Post by jpalpant »

Microsoft has started to support GPU acceleration inside the Windows Subsystem for Linux with version 2 (WSL2). WSL is a sort of Linux container running on Windows, and it's really convenient for development and testing. With WSL2, Microsoft presents a virtual GPU device and sort of proxies the actual Windows GPU driver, and this is supported with a variety of GPUs. They claim to support CUDA fairly well and automatically - in a WSL instance with Windows NVIDIA drivers, you can run CUDA samples automatically. They do not yet support OpenCL (or OpenGL, or Vulkan, I believe), but at least CUDA support is there.

I don't know if it's sufficient for FAH, but would love to hear if it is and if this system of GPU access could be added to the whitelist. Currently FAH does not detect the virtual GPU device due to the blacklist, as it has a new PCI vendor and device code:

Code: Select all

$ lspci -nn
...
d175:00:00.0 3D controller [0302]: Microsoft Corporation Device [1414:008e]
The announcement: https://developer.nvidia.com/blog/annou ... r-linux-2/
NVIDIA's CUDA on WSL guide: https://docs.nvidia.com/cuda/wsl-user-guide/index.html
toTOW
Site Moderator
Posts: 6359
Joined: Sun Dec 02, 2007 10:38 am
Location: Bordeaux, France
Contact:

Re: Please consider adding WSL2 GPU accelerator support

Post by toTOW »

Unless you can enable GPU passthrough to expose the real GPU to the virtualized Linux client, it won't be supported by FAH.
Image

Folding@Home beta tester since 2002. Folding Forum moderator since July 2008.
jpalpant
Posts: 10
Joined: Wed Mar 11, 2020 12:52 am

Re: Please consider adding WSL2 GPU accelerator support

Post by jpalpant »

I see, thank you for responding! I think it's unlikely that MSFT plans to do so in the near future considering the way they're working on the GPUPV stuff, but if that changes, I'll keep that in mind.
JimboPalmer
Posts: 2522
Joined: Mon Feb 16, 2009 4:12 am
Location: Greenwood MS USA

Re: Please consider adding WSL2 GPU accelerator support

Post by JimboPalmer »

[I not not privy to program internals, I just hang out here]

Since every supported GPU runs OpenCL 1.2 or newer, I am unsure if you even can run a GPU which only has CUDA. It sure looks like F@H starts OpenCL and then starts CUDA, which is doomed to fail.

If indeed you can run just CUDA, then it might be possible to see what virtualized GPU MS is pretending to be. if you run "FAHClient.exe --lspci" it should tell you what GPU you linux thinks it has, F@H could whitelist that virtualized GPU. But I suspect it will still choke on no OpenCL,.
Tsar of all the Rushers
I tried to remain childlike, all I achieved was childish.
A friend to those who want no friends
Post Reply